lib
Kross::Api::List Class Reference
#include <list.h>
Inheritance diagram for Kross::Api::List:

Detailed Description
The List class implementates Value to handle lists and collections.Definition at line 36 of file list.h.
Public Types | |
typedef KSharedPtr< List > | Ptr |
Public Member Functions | |
List (QValueList< Object::Ptr > value=QValueList< Object::Ptr >()) | |
virtual | ~List () |
virtual const QString | getClassName () const |
virtual const QString | toString () |
Object::Ptr | item (uint idx, Object *defaultobject=0) |
uint | count () |
void | append (Object::Ptr object) |
Static Public Member Functions | |
template<typename TYPE> | |
static Object::Ptr | toObject (TYPE t) |
Friends | |
class | Value< List, QValueList< Object::Ptr > > |
Member Typedef Documentation
typedef KSharedPtr<List> Kross::Api::List::Ptr |
Constructor & Destructor Documentation
List::List | ( | QValueList< Object::Ptr > | value = QValueList<Object::Ptr>() |
) |
Member Function Documentation
const QString List::getClassName | ( | ) | const [virtual] |
const QString List::toString | ( | ) | [virtual] |
- Returns:
- a string representation of the whole list.
- See also:
- Kross::Api::Object::toString()
Reimplemented from Kross::Api::Object.
Object::Ptr List::item | ( | uint | idx, | |
Object * | defaultobject = 0 | |||
) |
Return the Object with defined index from the QValueList this list holds.
- Exceptions:
-
TypeException If index is out of bounds.
- Parameters:
-
idx The QValueList-index. defaultobject The 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.
uint List::count | ( | ) |
void List::append | ( | Object::Ptr | object | ) |
Append an Kross::Api::Object to the list.
- Parameters:
-
object The Kross::Api::Object instance to append to this list.
template<typename TYPE>
static Object::Ptr Kross::Api::List::toObject | ( | TYPE | t | ) | [inline, static] |
This method got used by the ProxyFunction classes to translate an unknown TYPE
to a Object instance.
Classes like Value or ListT or Class are overwriting this method to transparently translate these passed type while this method just assumes that the type is already a Object instance.
Reimplemented from Kross::Api::Value< T, V >.
Reimplemented in Kross::Api::ListT< OBJECT >.
The documentation for this class was generated from the following files: