Vegastrike 0.5.1 rc1  1.0
Original sources for Vegastrike Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UnitCollection::ConstFastIterator Class Reference

#include <oldcollection.h>

Public Member Functions

 ConstFastIterator ()
 
 ConstFastIterator (const ConstFastIterator &orig)
 
 ConstFastIterator (const UnitListNode *start)
 
 ~ConstFastIterator ()
 
const Unitcurrent () const
 
void advance ()
 
const Unitoperator++ ()
 
const Unitoperator++ (int)
 
const Unitoperator* () const
 
const Unitnext ()
 
bool isDone () const
 
bool notDone () const
 

Detailed Description

Definition at line 192 of file oldcollection.h.

Constructor & Destructor Documentation

UnitCollection::ConstFastIterator::ConstFastIterator ( )
inline

Definition at line 196 of file oldcollection.h.

196 : ConstFastIterator() : pos( NULL ) {}
UnitCollection::ConstFastIterator::ConstFastIterator ( const ConstFastIterator orig)
inline

Definition at line 197 of file oldcollection.h.

197 : pos( orig.pos ) {}
UnitCollection::ConstFastIterator::ConstFastIterator ( const UnitListNode *  start)
inline

Definition at line 198 of file oldcollection.h.

198 : pos( start ) {}
UnitCollection::ConstFastIterator::~ConstFastIterator ( )
inline

Definition at line 199 of file oldcollection.h.

200  {
201  pos = NULL;
202  }

Member Function Documentation

void UnitCollection::ConstFastIterator::advance ( )
inline

Definition at line 207 of file oldcollection.h.

Referenced by next(), and operator++().

208  {
209  pos = pos->next;
210  }
const Unit* UnitCollection::ConstFastIterator::current ( ) const
inline

Definition at line 203 of file oldcollection.h.

Referenced by next(), operator*(), and operator++().

204  {
205  return pos->next->unit;
206  }
bool UnitCollection::ConstFastIterator::isDone ( ) const
inline

Definition at line 231 of file oldcollection.h.

232  {
233  return pos->next->unit == NULL;
234  }
const Unit* UnitCollection::ConstFastIterator::next ( )
inline

Definition at line 226 of file oldcollection.h.

References advance(), and current().

227  {
228  advance();
229  return current();
230  }
bool UnitCollection::ConstFastIterator::notDone ( ) const
inline

Definition at line 235 of file oldcollection.h.

236  {
237  return pos->next->unit != NULL;
238  }
const Unit* UnitCollection::ConstFastIterator::operator* ( ) const
inline

Definition at line 222 of file oldcollection.h.

References current().

223  {
224  return current();
225  }
const Unit* UnitCollection::ConstFastIterator::operator++ ( )
inline

Definition at line 211 of file oldcollection.h.

References advance(), and current().

212  {
213  advance();
214  return current();
215  }
const Unit* UnitCollection::ConstFastIterator::operator++ ( int  )
inline

Definition at line 216 of file oldcollection.h.

References advance(), and current().

217  {
218  const Unit *un = current();
219  advance();
220  return un;
221  }

The documentation for this class was generated from the following file: