lib

Kross::Api::List Class Reference

#include <list.h>

Inheritance diagram for Kross::Api::List:

Kross::Api::Value< T, V > Kross::Api::Object Kross::Api::ListT< OBJECT, TYPE > List of all members.

Detailed Description

The List class implementates Value to handle lists and collections.

Definition at line 36 of file list.h.


Public Types

typedef KSharedPtr< ListPtr

Public Member Functions

 List (QValueList< Object::Ptr > value=QValueList< Object::Ptr >(), const QString &name="list")
virtual ~List ()
virtual const QString getClassName () const
virtual const QString toString ()
Object::Ptr item (uint idx)
uint count ()
void append (Object::Ptr object)

Friends

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

Member Typedef Documentation

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

Shared pointer to implement reference-counting.

Reimplemented from Kross::Api::Object.

Definition at line 44 of file list.h.


Constructor & Destructor Documentation

List::List QValueList< Object::Ptr value = QValueList< Object::Ptr >(),
const QString &  name = "list"
 

Constructor.

Parameters:
value The list of Object instances this list has initialy.
name A name this list has.

Definition at line 27 of file list.cpp.

List::~List  )  [virtual]
 

Destructor.

Definition at line 32 of file list.cpp.


Member Function Documentation

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.

Definition at line 65 of file list.cpp.

uint List::count  ) 
 

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

Returns:
The number of items.

Definition at line 60 of file list.cpp.

const QString List::getClassName  )  const [virtual]
 

See.

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

Implements Kross::Api::Object.

Definition at line 36 of file list.cpp.

Object::Ptr List::item uint  idx  ) 
 

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.
Returns:
The Object instance.

Definition at line 50 of file list.cpp.

const QString 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 41 of file list.cpp.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys