Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Data Structures | Public Member Functions | Data Fields | Static Public Attributes
BRepGraphInc_Reconstruct::Cache Struct Reference

Per-Kind dense vector cache for O(1) shape lookup by entity index. Replaces NCollection_DataMap to eliminate hash/equality overhead. More...

#include <BRepGraphInc_Reconstruct.hxx>

Data Structures

struct  TempScope
 

Public Member Functions

 Cache ()
 
const TopoDS_ShapeSeek (const BRepGraph_NodeId theNode) const
 Seek a cached shape. Returns nullptr if not yet cached.
 
void Bind (const BRepGraph_NodeId theNode, const TopoDS_Shape &theShape)
 Bind a reconstructed shape to a node. Grows the vector as needed.
 
bool IsBound (const BRepGraph_NodeId theNode) const
 Check if a node is already cached.
 

Data Fields

occ::handle< NCollection_IncAllocatormyAllocator
 
occ::handle< NCollection_IncAllocatormyTempAllocator
 
NCollection_DynamicArray< TopoDS_ShapemyKinds [THE_KIND_COUNT]
 
int myTempScopeDepth = 0
 

Static Public Attributes

static constexpr int THE_KIND_COUNT = BRepGraph_NodeId::THE_KIND_COUNT
 Number of Kind slots used by BRepGraph_NodeId dense-kind indexing. Includes topology kinds, assembly kinds, and the reserved gap at kind 9.
 
static constexpr int THE_DEFAULT_INCREMENT = 32
 

Detailed Description

Per-Kind dense vector cache for O(1) shape lookup by entity index. Replaces NCollection_DataMap to eliminate hash/equality overhead.

Constructor & Destructor Documentation

◆ Cache()

BRepGraphInc_Reconstruct::Cache::Cache ( )
inline

Member Function Documentation

◆ Bind()

void BRepGraphInc_Reconstruct::Cache::Bind ( const BRepGraph_NodeId theNode,
const TopoDS_Shape & theShape )
inline

Bind a reconstructed shape to a node. Grows the vector as needed.

◆ IsBound()

bool BRepGraphInc_Reconstruct::Cache::IsBound ( const BRepGraph_NodeId theNode) const
inline

Check if a node is already cached.

◆ Seek()

const TopoDS_Shape * BRepGraphInc_Reconstruct::Cache::Seek ( const BRepGraph_NodeId theNode) const
inline

Seek a cached shape. Returns nullptr if not yet cached.

Field Documentation

◆ myAllocator

occ::handle<NCollection_IncAllocator> BRepGraphInc_Reconstruct::Cache::myAllocator

◆ myKinds

NCollection_DynamicArray<TopoDS_Shape> BRepGraphInc_Reconstruct::Cache::myKinds[THE_KIND_COUNT]

◆ myTempAllocator

occ::handle<NCollection_IncAllocator> BRepGraphInc_Reconstruct::Cache::myTempAllocator

◆ myTempScopeDepth

int BRepGraphInc_Reconstruct::Cache::myTempScopeDepth = 0

◆ THE_DEFAULT_INCREMENT

constexpr int BRepGraphInc_Reconstruct::Cache::THE_DEFAULT_INCREMENT = 32
staticconstexpr

◆ THE_KIND_COUNT

constexpr int BRepGraphInc_Reconstruct::Cache::THE_KIND_COUNT = BRepGraph_NodeId::THE_KIND_COUNT
staticconstexpr

Number of Kind slots used by BRepGraph_NodeId dense-kind indexing. Includes topology kinds, assembly kinds, and the reserved gap at kind 9.


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