Open CASCADE Technology: NIS_ObjectsIterator Class Reference

Open CASCADE Technology 6.9.1

- Main Page
- Related Pages
- Namespaces
- Data Structures
- Files

- Data Structures
- Data Structure Index
- Class Hierarchy
- Data Fields

Public Member Functions | Protected Attributes
NIS_ObjectsIterator Class Reference

`#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

## 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

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 | ( | void |  | ) | const
| inline

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

void NIS_ObjectsIterator::Next | ( |  | ) |

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.

## Field Documentation

NCollection_SparseArray<Handle< NIS_InteractiveObject > >::ConstIterator NIS_ObjectsIterator::myIter
| protected

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

- NIS_ObjectsIterator.hxx