#include <list.h>

Inheritance diagram for Kross::Api::List:
Kross::Api::Value< List, TQValueList< Object::Ptr > > Kross::Api::Object Kross::Api::ListT< OBJECT >

Public Types

typedef TDESharedPtr< List > Ptr
 
- Public Types inherited from Kross::Api::Object
typedef TDESharedPtr< Object > Ptr
 

Public Member Functions

 List (TQValueList< Object::Ptr > value=TQValueList< Object::Ptr >())
 
virtual ~List ()
 
virtual const TQString getClassName () const
 
virtual const TQString toString ()
 
Object::Ptr item (uint idx, Object *defaultobject=0)
 
uint count ()
 
void append (Object::Ptr object)
 
- Public Member Functions inherited from Kross::Api::Value< List, TQValueList< Object::Ptr > >
 Value (TQValueList< Object::Ptr > value)
 
virtual ~Value ()
 
TQValueList< Object::Ptr > & getValue ()
 
- Public Member Functions inherited from Kross::Api::Object
 Object ()
 
virtual ~Object ()
 
virtual Object::Ptr call (const TQString &name, TDESharedPtr< List > arguments)
 
virtual TQStringList getCalls ()
 

Static Public Member Functions

template<typename TYPE >
static Object::Ptr toObject (TYPE t)
 
- Static Public Member Functions inherited from Kross::Api::Value< List, TQValueList< Object::Ptr > >
static Object::Ptr toObject (TYPE t)
 
- Static Public Member Functions inherited from Kross::Api::Object
template<class T >
static T * fromObject (Object::Ptr object)
 
template<typename TYPE >
static Object::Ptr toObject (TYPE t)
 

Friends

class Value< List, TQValueList< Object::Ptr > >
 

Detailed Description

The List class implementates Value to handle lists and collections.

Definition at line 36 of file list.h.

Member Typedef Documentation

◆ Ptr

typedef TDESharedPtr<List> Kross::Api::List::Ptr

Shared pointer to implement reference-counting.

Definition at line 44 of file list.h.

Constructor & Destructor Documentation

◆ List()

List::List ( TQValueList< Object::Ptr >  value = TQValueList<Object::Ptr>())

Constructor.

Parameters
valueThe list of Object instances this list has initialy.

Definition at line 25 of file list.cpp.

◆ ~List()

List::~List ( )
virtual

Destructor.

Definition at line 30 of file list.cpp.

Member Function Documentation

◆ append()

void List::append ( Object::Ptr  object)

Append an Kross::Api::Object to the list.

Parameters
objectThe Kross::Api::Object instance to append to this list.

Definition at line 65 of file list.cpp.

◆ count()

uint List::count ( )

Return the number of items in the TQValueList this list holds.

Returns
The number of items.

Definition at line 60 of file list.cpp.

◆ getClassName()

const TQString List::getClassName ( ) const
virtual

See.

See also
Kross::Api::Object::getClassName()

Implements Kross::Api::Object.

Definition at line 34 of file list.cpp.

◆ item()

Object::Ptr List::item ( uint  idx,
Object *  defaultobject = 0 
)

Return the Object with defined index from the TQValueList this list holds.

Exceptions
TypeExceptionIf index is out of bounds.
Parameters
idxThe TQValueList-index.
defaultobjectThe default Object which should be used if there exists no item with such an index. This Object instance will be returned if not NULL and if the index is out of bounds. If its NULL a TypeException will be thrown.
Returns
The Object instance.

Definition at line 48 of file list.cpp.

◆ toObject()

template<typename TYPE >
static Object::Ptr Kross::Api::List::toObject ( TYPE  t)
inlinestatic

Definition at line 111 of file list.h.

◆ toString()

const TQString List::toString ( )
virtual
Returns
a string representation of the whole list.
See also
Kross::Api::Object::toString()

Reimplemented from Kross::Api::Object.

Definition at line 39 of file list.cpp.

Friends And Related Symbol Documentation

◆ Value< List, TQValueList< Object::Ptr > >

friend class Value< List, TQValueList< Object::Ptr > >
friend

Definition at line 1 of file list.h.


The documentation for this class was generated from the following files: