Dragonfly  4.3
A text-based game engine
Public Member Functions | Private Attributes | Friends | List of all members
df::ObjectList Class Reference
Collaboration diagram for df::ObjectList:
Collaboration graph

Public Member Functions

 ObjectList (const ObjectList &other)
ObjectListoperator= (const ObjectList &rhs)
int insert (Object *p_o)
int remove (Object *p_o)
void clear ()
int getCount () const
bool isEmpty () const
bool isFull () const
ObjectList operator+ (ObjectList)

Private Attributes

int m_count
int m_max_count
Object ** p_item


class ObjectListIterator

Constructor & Destructor Documentation

df::ObjectList::ObjectList ( const ObjectList other)

Copy contructor (does deep copy).

Member Function Documentation

void df::ObjectList::clear ( )

Clear list (setting count to 0).

int df::ObjectList::getCount ( ) const

Return count of number of objects in list.

int df::ObjectList::insert ( Object p_o)

Insert object pointer in list.

Return 0 if ok, else -1.

bool df::ObjectList::isEmpty ( ) const

Return true if list is empty, else false.

bool df::ObjectList::isFull ( ) const

Return true if list is full, else false.

ObjectList df::ObjectList::operator+ ( ObjectList  )

Add two lists, second appended to first.

ObjectList& df::ObjectList::operator= ( const ObjectList rhs)

Assignment operator (does deep copy).

int df::ObjectList::remove ( Object p_o)

Remove object pointer from list, Return 0 if found, else -1.

Friends And Related Function Documentation

friend class ObjectListIterator

Iterators can access.

Member Data Documentation

int df::ObjectList::m_count

Count of objects in list.

int df::ObjectList::m_max_count

Maximum objects in list (variable).

Object** df::ObjectList::p_item

Array of pointers to objects.