Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Public Member Functions
BRepGraph_CacheKindIterator< TKeyId > Class Template Reference

Zero-allocation iterator over populated cache kinds on a node or reference. More...

#include <BRepGraph_CacheKindIterator.hxx>

Public Member Functions

bool More () const
 True if the iterator has a current element.
 
void Next ()
 Advance to the next populated cache kind.
 
occ::handle< BRepGraph_CacheKindValue () const
 Return the current cache kind descriptor.
 
int KindSlot () const
 Return the current cache-kind slot index (for fast slot-based access).
 
int NbKinds () const
 Number of populated cache kinds found.
 
NCollection_ForwardRangeIterator< BRepGraph_CacheKindIteratorbegin ()
 STL range-for support.
 
NCollection_ForwardRangeSentinel end () const
 Sentinel marking end of iteration.
 

Detailed Description

template<typename TKeyId>
class BRepGraph_CacheKindIterator< TKeyId >

Zero-allocation iterator over populated cache kinds on a node or reference.

Template parameter TKeyId is either BRepGraph_NodeId or BRepGraph_RefId. Supports OCCT More()/Next()/Value() pattern and STL range-for via begin()/end().

Constructed by BRepGraph::CacheView::CacheKindIter(). Stores populated kind slot indices in a fixed-size stack buffer (no heap allocation).

// Range-for:
for (const occ::handle<BRepGraph_CacheKind>& aKind : aGraph.Cache().CacheKindIter(aNode))
// Traditional:
for (auto anIt = aGraph.Cache().CacheKindIter(aNode); anIt.More(); anIt.Next())
doSomething(anIt.Value());
STL input iterator that wraps an OCCT More()/Next() iterator.
Definition NCollection_ForwardRange.hxx:142
Intrusive smart pointer for use with Standard_Transient class and its descendants.
Definition Standard_Handle.hxx:54

Member Function Documentation

◆ begin()

STL range-for support.

◆ end()

Sentinel marking end of iteration.

◆ KindSlot()

template<typename TKeyId >
int BRepGraph_CacheKindIterator< TKeyId >::KindSlot ( ) const
inline

Return the current cache-kind slot index (for fast slot-based access).

◆ More()

template<typename TKeyId >
bool BRepGraph_CacheKindIterator< TKeyId >::More ( ) const
inline

True if the iterator has a current element.

◆ NbKinds()

template<typename TKeyId >
int BRepGraph_CacheKindIterator< TKeyId >::NbKinds ( ) const
inline

Number of populated cache kinds found.

◆ Next()

template<typename TKeyId >
void BRepGraph_CacheKindIterator< TKeyId >::Next ( )
inline

Advance to the next populated cache kind.

◆ Value()

Return the current cache kind descriptor.


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