CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

csNodeIterator Class Reference

A node iterator. More...

#include <mapnode.h>

List of all members.

Public Methods

 csNodeIterator (iSector *pSector, const char *classname=NULL)
 The constructor. More...

 ~csNodeIterator ()
 The destructor as usual. More...

void Reset (iSector *pSector, const char *classname=NULL)
 Reuse the iterator for an other search. More...

iMapNodeGetNode ()
 Get the object we are pointing at. More...

void Next ()
 Move forward. More...

bool IsFinished () const
 Check if there are other nodes. More...


Protected Methods

void SkipWrongClassname ()
 Skip all nodes with wrong classname. More...

void NextNode ()
 Step to the next node in the sector, ignoring its classname. More...


Detailed Description

A node iterator.

Definition at line 79 of file cstool/mapnode.h.


Constructor & Destructor Documentation

csNodeIterator::csNodeIterator iSector   pSector,
const char *    classname = NULL
 

The constructor.

Theorectially, we could handle any iObject, but that doesn't make sense for the current implementation, so we restrict it to iSector to avoid some pitfalls.

If a classname is given, search is restricted to nodes, in which the key "classname" has the same value as the given classname. the classname string is _not_ duplicated, so the caller is responsible to take care, that the string is available while the Iterator is alive.

csNodeIterator::~csNodeIterator  
 

The destructor as usual.


Member Function Documentation

iMapNode* csNodeIterator::GetNode  
 

Get the object we are pointing at.

bool csNodeIterator::IsFinished   const
 

Check if there are other nodes.

void csNodeIterator::Next  
 

Move forward.

void csNodeIterator::NextNode   [protected]
 

Step to the next node in the sector, ignoring its classname.

void csNodeIterator::Reset iSector   pSector,
const char *    classname = NULL
 

Reuse the iterator for an other search.

void csNodeIterator::SkipWrongClassname   [protected]
 

Skip all nodes with wrong classname.


The documentation for this class was generated from the following file:
Generated for Crystal Space by doxygen 1.2.14