Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Public Member Functions
BRepGraph_LayerRegistry Class Reference

Dense GUID-keyed runtime registry of graph layers. More...

#include <BRepGraph_LayerRegistry.hxx>

Public Member Functions

 BRepGraph_LayerRegistry ()=default
 
 BRepGraph_LayerRegistry (const BRepGraph_LayerRegistry &)=delete
 
BRepGraph_LayerRegistryoperator= (const BRepGraph_LayerRegistry &)=delete
 
 BRepGraph_LayerRegistry (BRepGraph_LayerRegistry &&) noexcept=default
 
BRepGraph_LayerRegistryoperator= (BRepGraph_LayerRegistry &&) noexcept=default
 
void SetOwningGraph (BRepGraph *theGraph) noexcept
 Bind the owning graph. Propagates to every registered layer.
 
BRepGraphOwningGraph () const noexcept
 Owning graph bound via SetOwningGraph(), or nullptr.
 
int RegisterLayer (const occ::handle< BRepGraph_Layer > &theLayer)
 Register a layer. Replaces an existing layer with the same GUID.
 
void UnregisterLayer (const Standard_GUID &theGUID)
 Remove a layer by GUID.
 
occ::handle< BRepGraph_LayerFindLayer (const Standard_GUID &theGUID) const
 Find a layer by GUID. Returns null handle if not found.
 
template<typename T >
occ::handle< T > FindLayer () const
 Typed convenience lookup by layer GUID.
 
int FindSlot (const Standard_GUID &theGUID) const
 Return current slot for a GUID, or -1 if not registered.
 
const occ::handle< BRepGraph_Layer > & Layer (const int theSlot) const
 Return layer by slot index.
 
int NbLayers () const
 Number of registered layers.
 
bool HasModificationSubscribers () const
 True if any registered layer subscribes to node modification events.
 
int SubscribedKindsMask () const
 Bitwise OR of all registered layer node subscription masks.
 
void DispatchOnNodeRemoved (const BRepGraph_NodeId theNode, const BRepGraph_NodeId theReplacement) noexcept
 Dispatch OnNodeRemoved to all registered layers.
 
void DispatchNodeModified (const BRepGraph_NodeId theNode) noexcept
 Dispatch OnNodeModified to subscribed layers.
 
void DispatchNodesModified (const NCollection_DynamicArray< BRepGraph_NodeId > &theModifiedNodes, const int theModifiedKindsMask) noexcept
 Dispatch OnNodesModified to subscribed layers.
 
void DispatchOnCompact (const NCollection_DataMap< BRepGraph_NodeId, BRepGraph_NodeId > &theRemapMap) noexcept
 Dispatch OnCompact to all registered layers.
 
bool HasRefModificationSubscribers () const
 True if any registered layer subscribes to reference modification events.
 
int SubscribedRefKindsMask () const
 Bitwise OR of all registered layer reference subscription masks.
 
void DispatchOnRefRemoved (const BRepGraph_RefId theRef) noexcept
 Dispatch OnRefRemoved to all registered layers (unconditional - not filtered).
 
void DispatchRefModified (const BRepGraph_RefId theRef) noexcept
 Dispatch OnRefModified to subscribed layers (immediate mode).
 
void DispatchRefsModified (const NCollection_DynamicArray< BRepGraph_RefId > &theModifiedRefs, const int theModifiedRefKindsMask) noexcept
 Dispatch OnRefsModified to subscribed layers (deferred/batch mode).
 
void ClearAll () noexcept
 Clear all registered layer payloads without unregistering them.
 
void InvalidateAll () noexcept
 Invalidate all registered layer payloads.
 

Detailed Description

Dense GUID-keyed runtime registry of graph layers.

Stores registered layers in a compact vector for O(1) slot access and a GUID-to-slot map for O(1) lookup by stable public identity.

Constructor & Destructor Documentation

◆ BRepGraph_LayerRegistry() [1/3]

BRepGraph_LayerRegistry::BRepGraph_LayerRegistry ( )
default

◆ BRepGraph_LayerRegistry() [2/3]

BRepGraph_LayerRegistry::BRepGraph_LayerRegistry ( const BRepGraph_LayerRegistry & )
delete

◆ BRepGraph_LayerRegistry() [3/3]

BRepGraph_LayerRegistry::BRepGraph_LayerRegistry ( BRepGraph_LayerRegistry && )
defaultnoexcept

Member Function Documentation

◆ ClearAll()

void BRepGraph_LayerRegistry::ClearAll ( )
noexcept

Clear all registered layer payloads without unregistering them.

◆ DispatchNodeModified()

void BRepGraph_LayerRegistry::DispatchNodeModified ( const BRepGraph_NodeId theNode)
noexcept

Dispatch OnNodeModified to subscribed layers.

◆ DispatchNodesModified()

void BRepGraph_LayerRegistry::DispatchNodesModified ( const NCollection_DynamicArray< BRepGraph_NodeId > & theModifiedNodes,
const int theModifiedKindsMask )
noexcept

Dispatch OnNodesModified to subscribed layers.

◆ DispatchOnCompact()

void BRepGraph_LayerRegistry::DispatchOnCompact ( const NCollection_DataMap< BRepGraph_NodeId, BRepGraph_NodeId > & theRemapMap)
noexcept

Dispatch OnCompact to all registered layers.

◆ DispatchOnNodeRemoved()

void BRepGraph_LayerRegistry::DispatchOnNodeRemoved ( const BRepGraph_NodeId theNode,
const BRepGraph_NodeId theReplacement )
noexcept

Dispatch OnNodeRemoved to all registered layers.

◆ DispatchOnRefRemoved()

void BRepGraph_LayerRegistry::DispatchOnRefRemoved ( const BRepGraph_RefId theRef)
noexcept

Dispatch OnRefRemoved to all registered layers (unconditional - not filtered).

◆ DispatchRefModified()

void BRepGraph_LayerRegistry::DispatchRefModified ( const BRepGraph_RefId theRef)
noexcept

Dispatch OnRefModified to subscribed layers (immediate mode).

◆ DispatchRefsModified()

void BRepGraph_LayerRegistry::DispatchRefsModified ( const NCollection_DynamicArray< BRepGraph_RefId > & theModifiedRefs,
const int theModifiedRefKindsMask )
noexcept

Dispatch OnRefsModified to subscribed layers (deferred/batch mode).

◆ FindLayer() [1/2]

template<typename T >
occ::handle< T > BRepGraph_LayerRegistry::FindLayer ( ) const
inline

Typed convenience lookup by layer GUID.

◆ FindLayer() [2/2]

occ::handle< BRepGraph_Layer > BRepGraph_LayerRegistry::FindLayer ( const Standard_GUID & theGUID) const

Find a layer by GUID. Returns null handle if not found.

◆ FindSlot()

int BRepGraph_LayerRegistry::FindSlot ( const Standard_GUID & theGUID) const

Return current slot for a GUID, or -1 if not registered.

◆ HasModificationSubscribers()

bool BRepGraph_LayerRegistry::HasModificationSubscribers ( ) const
inline

True if any registered layer subscribes to node modification events.

◆ HasRefModificationSubscribers()

bool BRepGraph_LayerRegistry::HasRefModificationSubscribers ( ) const
inline

True if any registered layer subscribes to reference modification events.

◆ InvalidateAll()

void BRepGraph_LayerRegistry::InvalidateAll ( )
noexcept

Invalidate all registered layer payloads.

◆ Layer()

const occ::handle< BRepGraph_Layer > & BRepGraph_LayerRegistry::Layer ( const int theSlot) const

Return layer by slot index.

◆ NbLayers()

int BRepGraph_LayerRegistry::NbLayers ( ) const
inline

Number of registered layers.

◆ operator=() [1/2]

BRepGraph_LayerRegistry & BRepGraph_LayerRegistry::operator= ( BRepGraph_LayerRegistry && )
defaultnoexcept

◆ operator=() [2/2]

BRepGraph_LayerRegistry & BRepGraph_LayerRegistry::operator= ( const BRepGraph_LayerRegistry & )
delete

◆ OwningGraph()

BRepGraph * BRepGraph_LayerRegistry::OwningGraph ( ) const
inlinenoexcept

Owning graph bound via SetOwningGraph(), or nullptr.

◆ RegisterLayer()

int BRepGraph_LayerRegistry::RegisterLayer ( const occ::handle< BRepGraph_Layer > & theLayer)

Register a layer. Replaces an existing layer with the same GUID.

Returns
slot index in the internal dense vector, or -1 for null input.

◆ SetOwningGraph()

void BRepGraph_LayerRegistry::SetOwningGraph ( BRepGraph * theGraph)
noexcept

Bind the owning graph. Propagates to every registered layer.

◆ SubscribedKindsMask()

int BRepGraph_LayerRegistry::SubscribedKindsMask ( ) const
inline

Bitwise OR of all registered layer node subscription masks.

◆ SubscribedRefKindsMask()

int BRepGraph_LayerRegistry::SubscribedRefKindsMask ( ) const
inline

Bitwise OR of all registered layer reference subscription masks.

◆ UnregisterLayer()

void BRepGraph_LayerRegistry::UnregisterLayer ( const Standard_GUID & theGUID)

Remove a layer by GUID.


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