Open CASCADE Technology
6.5.4
|
#include <NIS_ObjectsIterator.hxx>
Public Member Functions | |
NIS_ObjectsIterator () | |
NIS_ObjectsIterator (const Handle_NIS_InteractiveContext &theCtx) | |
void | Initialize (const Handle_NIS_InteractiveContext &theCtx) |
Standard_Boolean | More () const |
const Handle_NIS_InteractiveObject & | Value () const |
void | Next () |
Protected Attributes | |
NCollection_SparseArray < Handle_NIS_InteractiveObject > ::ConstIterator | myIter |
Iterator of objects contained in a NIS_InteractiveContext instance. The iteration is always in the ascending sense of object ID. Examples:
// Erase all objects in the Context NIS_ObjectsIterator anIter (myContext); for (; anIter.More(); anIter.Next()) myContext->Erase (anIter.Value(), Standard_False); // Set object attributes to their IDs (hardly useful outside the example) anIter.Initialize (myContext); Handle(NIS_InteractiveObject) anObj; while (!(anObj = anIter.Value().IsNull())) { anObj->SetAttribute (static_cast<void *> (anObj->ID())); anIter.Next(); }
NIS_ObjectsIterator::NIS_ObjectsIterator | ( | ) | [inline] |
Empty Constructor.
NIS_ObjectsIterator::NIS_ObjectsIterator | ( | const Handle_NIS_InteractiveContext & | theCtx | ) | [inline] |
Constructor.
theCtx | Interactive context that is to be iterated for all objects. |
void NIS_ObjectsIterator::Initialize | ( | const Handle_NIS_InteractiveContext & | theCtx | ) |
Reset the Iterator to start the iterations of objects.
theCtx | Interactive context that is to be iterated for all objects. |
Standard_Boolean NIS_ObjectsIterator::More | ( | void | ) | const [inline] |
Query if the Iterator has an object (not yet finished the iteration process).
Step forward to the next valid InteractiveObject instance.
const Handle_NIS_InteractiveObject& NIS_ObjectsIterator::Value | ( | ) | const |
Returns the current object at the iteration pointer. If the iteration is over (More() == False) this method returns NULL Handle.
NCollection_SparseArray<Handle_NIS_InteractiveObject>::ConstIterator NIS_ObjectsIterator::myIter [protected] |