OCC Main Page | Visualization | Toolkits | Packages | Class Hierarchy | Data Structures | File List | Data Fields | Globals

Visualization
TKNIS
NIS


NIS_ObjectsIterator Class Reference

#include <NIS_ObjectsIterator.hxx>


Public Member Functions

 NIS_ObjectsIterator ()
 NIS_ObjectsIterator (const Handle_NIS_InteractiveContext &theCtx)
Standard_EXPORT void Initialize (const Handle_NIS_InteractiveContext &theCtx)
Standard_Boolean More () const
 Handle (NIS_InteractiveObject) Value() const
Standard_EXPORT void Next ()

Protected Attributes

NCollection_Vector< Handle_NIS_InteractiveObject
>::Iterator 
myIter


Detailed Description

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();
}


Constructor & Destructor Documentation

NIS_ObjectsIterator::NIS_ObjectsIterator  )  [inline]
 

Empty Constructor.

NIS_ObjectsIterator::NIS_ObjectsIterator const Handle_NIS_InteractiveContext &  theCtx  )  [inline]
 

Constructor.

Parameters:
theCtx Interactive context that is to be iterated for all objects.


Member Function Documentation

NIS_ObjectsIterator::Handle NIS_InteractiveObject   )  const [inline]
 

Returns the current object at the iteration pointer. If the iteration is over (More() == False) this method returns NULL Handle.

Standard_EXPORT void NIS_ObjectsIterator::Initialize const Handle_NIS_InteractiveContext &  theCtx  ) 
 

Reset the Iterator to start the iterations of objects.

Parameters:
theCtx Interactive context that is to be iterated for all objects.

Standard_Boolean NIS_ObjectsIterator::More  )  const [inline]
 

Query if the Iterator has an object (not yet finished the iteration process).

Standard_EXPORT void NIS_ObjectsIterator::Next  ) 
 

Step forward to the next valid InteractiveObject instance.


Field Documentation

NCollection_Vector<Handle_NIS_InteractiveObject>::Iterator NIS_ObjectsIterator::myIter [protected]
 


The documentation for this class was generated from the following file:
Generated on Mon Aug 25 13:55:53 2008 for OpenCASCADE by  doxygen 1.4.1