Open CASCADE Technology Reference Manual 8.0.2
Loading...
Searching...
No Matches
BRepGraph_LayerIterator Class Reference

Iterator over registered layers in a BRepGraph_LayerRegistry. More...

#include <BRepGraph_LayerIterator.hxx>

Public Member Functions

 BRepGraph_LayerIterator (const BRepGraph_LayerRegistry &theRegistry)
 Construct an iterator over all layers in the registry.
bool More () const
 True if the iterator has a current element.
void Next ()
 Advance to the next layer.
occ::handle< BRepGraph_Layer > Value () const
 Return the current layer handle.
uint32_t Slot () const
 Return the current slot index in the registry.
uint32_t NbLayers () const
 Number of layers in the registry.
NCollection_ForwardRangeIterator< BRepGraph_LayerIterator > begin ()
 STL range-for support.
NCollection_ForwardRangeSentinel end () const
 Sentinel marking end of iteration.

Detailed Description

Iterator over registered layers in a BRepGraph_LayerRegistry.

Provides zero-allocation iteration with OCCT More()/Next()/Value() pattern and STL range-for via begin()/end().

// Range-for:
for (const occ::handle<BRepGraph_Layer>& aLayer :
BRepGraph_LayerIterator(aGraph.LayerRegistry()))
doSomething(aLayer);
// Traditional:
for (BRepGraph_LayerIterator anIt(aGraph.LayerRegistry()); anIt.More(); anIt.Next())
doSomething(anIt.Value());
BRepGraph_LayerIterator(const BRepGraph_LayerRegistry &theRegistry)
Construct an iterator over all layers in the registry.
Definition BRepGraph_LayerIterator.hxx:39
opencascade::handle< T > handle
Intrusive smart pointer template for Standard_Transient descendants. This is an alias to opencascade:...
Definition Standard_Handle.hxx:421

Constructor & Destructor Documentation

◆ BRepGraph_LayerIterator()

BRepGraph_LayerIterator::BRepGraph_LayerIterator ( const BRepGraph_LayerRegistry & theRegistry)
inlineexplicit

Construct an iterator over all layers in the registry.

Member Function Documentation

◆ begin()

NCollection_ForwardRangeIterator< BRepGraph_LayerIterator > BRepGraph_LayerIterator::begin ( )
inline

STL range-for support.

◆ end()

NCollection_ForwardRangeSentinel BRepGraph_LayerIterator::end ( ) const
inline

Sentinel marking end of iteration.

◆ More()

bool BRepGraph_LayerIterator::More ( ) const
inlinenodiscard

True if the iterator has a current element.

◆ NbLayers()

uint32_t BRepGraph_LayerIterator::NbLayers ( ) const
inlinenodiscard

Number of layers in the registry.

◆ Next()

void BRepGraph_LayerIterator::Next ( )
inline

Advance to the next layer.

◆ Slot()

uint32_t BRepGraph_LayerIterator::Slot ( ) const
inlinenodiscard

Return the current slot index in the registry.

◆ Value()

occ::handle< BRepGraph_Layer > BRepGraph_LayerIterator::Value ( ) const
inlinenodiscard

Return the current layer handle.


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