Dragonfly 4.20
A text-based game engine
Public Member Functions | Private Member Functions | Private Attributes | List of all members
df::ObjectListIterator Class Reference

Public Member Functions

 ObjectListIterator (const ObjectList *p_list)
 
void first ()
 
void last ()
 
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

◆ ObjectListIterator() [1/2]

df::ObjectListIterator::ObjectListIterator ( )
private

Iterator must be given list when created.

◆ ObjectListIterator() [2/2]

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

Create iterator, over indicated list.

Member Function Documentation

◆ currentObject()

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

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

◆ first()

void df::ObjectListIterator::first ( )

Set iterator to first item in list.

◆ isDone()

bool df::ObjectListIterator::isDone ( ) const

Return true if at end of list.

◆ last()

void df::ObjectListIterator::last ( )

Reset to last object in list.

◆ next()

void df::ObjectListIterator::next ( )

Set iterator to next item in list.

◆ operator=()

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

Assignment operator.

◆ setList()

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

Set to new List.

Member Data Documentation

◆ m_index

int df::ObjectListIterator::m_index
private

Index into list.

◆ m_p_list

const ObjectList* df::ObjectListIterator::m_p_list
private

List iterating over.