36 return "Kross::Api::List";
42 TQValueList<Object::Ptr> list = getValue();
43 for(TQValueList<Object::Ptr>::Iterator it = list.begin(); it != list.end(); ++it)
44 s += "'" + (*it)->toString() + "', ";
45 return (s.endsWith( ", ") ? s.left(s.length() - 2) : s) + "]";
50 TQValueList<Object::Ptr>& list = getValue();
51 if(idx >= list.count()) {
54 krossdebug( TQString( "List::item index=%1 is out of bounds. Raising TypeException.").arg(idx) );
Common exception class used for representing exceptions in Kross.
TDESharedPtr< Exception > Ptr Shared pointer to implement reference-counting.
virtual const TQString getClassName() const See.
Object::Ptr item(uint idx, Object *defaultobject=0) Return the Object with defined index from the TQValueList this list holds.
List(TQValueList< Object::Ptr > value=TQValueList< Object::Ptr >()) Constructor.
TDESharedPtr< List > Ptr Shared pointer to implement reference-counting.
virtual ~List() Destructor.
uint count() Return the number of items in the TQValueList this list holds.
void append(Object::Ptr object) Append an Kross::Api::Object to the list.
virtual const TQString toString()
The common Object class all other object-classes are inheritated from.
TDESharedPtr< Object > Ptr Shared pointer to implement reference-counting.
TQValueList< Object::Ptr > & getValue()
Value(TQValueList< Object::Ptr > value)
The common Kross API used as common codebase.
void krossdebug(const TQString &s) Debugging function.
|