GizmoDistribution

gzDistSessionObjectIterator Class Reference

Iterator for objects in a session. More...

#include <gzDistSession.h>

List of all members.

Public Member Functions

 gzDistSessionObjectIterator (const gzDistSessionPtr &session, gzType *objectType)
 Constructor.
 gzDistSessionObjectIterator (const gzDistSessionPtr &session)
 Constructor.
 ~gzDistSessionObjectIterator ()
 Destructor.
gzDistObjectoperator() ()
 Iterating operator.
gzDistObjectcurrent ()
 Returns the object at current position.
gzVoid reset ()
 Resets the iterator.
gzVoid unLockSession ()
 Unlock session.


Detailed Description

Iterator for objects in a session.

Definition at line 385 of file gzDistSession.h.


Constructor & Destructor Documentation

gzDistSessionObjectIterator::gzDistSessionObjectIterator const gzDistSessionPtr &  session,
gzType *  objectType
 

Constructor.

Warning: The constructor can block the distribution kernel. It's therefor important that the iterator is destroyed or is run to the end as soon as possible. The kernel can manually be unlocken by the unLockSession() call.

gzDistSessionObjectIterator::gzDistSessionObjectIterator const gzDistSessionPtr &  session  ) 
 

Constructor.

Same as gzDistSessionObjectIterator(const gzDistSessionPtr&, gzType*) but the object type is default the class type of gzDistObject. This is the same as all objects in session.

gzDistSessionObjectIterator::~gzDistSessionObjectIterator  ) 
 

Destructor.

Unlocks kernel.


Member Function Documentation

gzDistObject* gzDistSessionObjectIterator::operator()  ) 
 

Iterating operator.

The operator() iterates one step through session and returns a pointer to a gzDistObject at current session iterator position. At end of session it returns NULL.

gzVoid gzDistSessionObjectIterator::unLockSession  ) 
 

Unlock session.

If you want to operate in a session, e.g. remove an object inside an iterator loop, and you want to wait until the operation is completed, the session must be unlocked. Otherwise the distribution kernel cannot process the operation. If you want to use the iterator again, you have to call reset() before the iterator is able to use. current() will return NULL after the session is unlocked.


The documentation for this class was generated from the following file:
Documentation for GizmoDistribution generated at Wed Feb 20 11:59:22 2008 by   Saab Training Systems AB, ¸ (c) 2003-and beyond