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

Public Member Functions

 ObjectListIterator (const ObjectList *p_list)
 
void first ()
 
void next ()
 
bool isDone () const
 
ObjectcurrentObject () const
 
ObjectListIteratoroperator= (const ObjectListIterator &rhs)
 
void setList (const ObjectList *p_list)
 

Private Member Functions

 ObjectListIterator ()
 

Private Attributes

int m_index
 
const ObjectListm_p_list
 

Constructor & Destructor Documentation

df::ObjectListIterator::ObjectListIterator ( )
private

Iterator must be given list when created.

df::ObjectListIterator::ObjectListIterator ( const ObjectList p_list)

Create iterator, over indicated list.

Member Function Documentation

Object* df::ObjectListIterator::currentObject ( ) const

Return pointer to current item in list, NULL if done/empty.

void df::ObjectListIterator::first ( )

Set iterator to first item in list.

bool df::ObjectListIterator::isDone ( ) const

Return true if at end of list.

void df::ObjectListIterator::next ( )

Set iterator to next item in list.

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

Assignment operator.

void df::ObjectListIterator::setList ( const ObjectList p_list)

Set to new List.

Member Data Documentation

int df::ObjectListIterator::m_index
private

Index into list.

const ObjectList* df::ObjectListIterator::m_p_list
private

List iterating over.