OCCT3D About OCCT
Open CASCADE Technology Reference Manual 8.0.1
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 ()
 
 BRepGraph_LayerRegistry (const BRepGraph_LayerRegistry &)=delete
 
BRepGraph_LayerRegistryoperator= (const BRepGraph_LayerRegistry &)=delete
 
 BRepGraph_LayerRegistry (BRepGraph_LayerRegistry &&theOther) noexcept
 
BRepGraph_LayerRegistryoperator= (BRepGraph_LayerRegistry &&theOther) noexcept
 
uint32_t 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.
 
template<typename T >
occ::handle< T > Find () const
 Typed lookup by layer GUID.
 
template<typename T >
occ::handle< T > Ensure ()
 Return an existing layer or create and register a default one. Template convenience wrapper: extracts GUID and calls ensureLayer.
 
bool FindSlot (const Standard_GUID &theGUID, uint32_t &theSlot) const
 Return current slot for a GUID.
 
occ::handle< BRepGraph_LayerLayer (uint32_t theSlot) const
 Return layer by slot index, or null handle if the slot is out of range.
 
uint32_t 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) noexcept
 Dispatch OnNodeRemoved to all registered layers.
 
void DispatchOnItemRemoved (const BRepGraph_ItemId theItem) noexcept
 Dispatch generic item removal to all registered layers.
 
void DispatchOnNodeReplaced (const BRepGraph_NodeId theOldNode, const BRepGraph_NodeId theNewNode) noexcept
 Dispatch OnNodeReplaced to all registered layers.
 
void DispatchNodeModified (const BRepGraph_NodeId theNode) noexcept
 Dispatch OnNodeModified to subscribed layers.
 
void DispatchItemModified (const BRepGraph_ItemId theItem) noexcept
 Dispatch generic item modification through the matching typed subscription path.
 
void DispatchNodesModified (const NCollection_Array1< BRepGraph_NodeId > &theModifiedNodes, const int theModifiedKindsMask) noexcept
 Dispatch OnNodesModified to subscribed layers.
 
void CopyLayersTo (BRepGraph &theTargetGraph, const NCollection_FlatDataMap< BRepGraph_ItemId, BRepGraph_ItemId > &theItemRemap, const BRepGraph_CopyRemap::Mode theMode) const
 Ask every registered source layer to copy itself into the target graph. For Mode::Compact, layers are unregistered first and CopyTo creates fresh instances.
 
void CopyLayersTo (BRepGraph &theTargetGraph, BRepGraph_CopyRemap::MappingKind theMappingKind, BRepGraph_CopyRemap::Mode theMode) const
 Ask every registered source layer to copy itself using identity mapping. Source item ids are the same as target item ids (full identity copy).
 
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_Array1< BRepGraph_RefId > &theModifiedRefs, const int theModifiedRefKindsMask) noexcept
 Dispatch OnRefsModified to subscribed layers (deferred/batch mode).
 
void ClearAll () noexcept
 Clear all registered layer data without unregistering services.
 
void InvalidateAll () noexcept
 Invalidate all registered layer data.
 

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 ( )

◆ BRepGraph_LayerRegistry() [2/3]

BRepGraph_LayerRegistry::BRepGraph_LayerRegistry ( const BRepGraph_LayerRegistry & )
delete

◆ BRepGraph_LayerRegistry() [3/3]

BRepGraph_LayerRegistry::BRepGraph_LayerRegistry ( BRepGraph_LayerRegistry && theOther)
noexcept

Member Function Documentation

◆ ClearAll()

void BRepGraph_LayerRegistry::ClearAll ( )
noexcept

Clear all registered layer data without unregistering services.

◆ CopyLayersTo() [1/2]

void BRepGraph_LayerRegistry::CopyLayersTo ( BRepGraph & theTargetGraph,
BRepGraph_CopyRemap::MappingKind theMappingKind,
BRepGraph_CopyRemap::Mode theMode ) const

Ask every registered source layer to copy itself using identity mapping. Source item ids are the same as target item ids (full identity copy).

Parameters
[in]theTargetGraphtarget graph to receive layer data
[in]theMappingKindidentity or explicit mapping
[in]theModeCopy or Compact semantics

◆ CopyLayersTo() [2/2]

void BRepGraph_LayerRegistry::CopyLayersTo ( BRepGraph & theTargetGraph,
const NCollection_FlatDataMap< BRepGraph_ItemId, BRepGraph_ItemId > & theItemRemap,
const BRepGraph_CopyRemap::Mode theMode ) const

Ask every registered source layer to copy itself into the target graph. For Mode::Compact, layers are unregistered first and CopyTo creates fresh instances.

Parameters
[in]theTargetGraphtarget graph to receive layer data
[in]theItemRemapsource -> target item id mapping
[in]theModeCopy or Compact semantics

◆ DispatchItemModified()

void BRepGraph_LayerRegistry::DispatchItemModified ( const BRepGraph_ItemId theItem)
noexcept

Dispatch generic item modification through the matching typed subscription path.

◆ DispatchNodeModified()

void BRepGraph_LayerRegistry::DispatchNodeModified ( const BRepGraph_NodeId theNode)
noexcept

Dispatch OnNodeModified to subscribed layers.

◆ DispatchNodesModified()

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

Dispatch OnNodesModified to subscribed layers.

◆ DispatchOnItemRemoved()

void BRepGraph_LayerRegistry::DispatchOnItemRemoved ( const BRepGraph_ItemId theItem)
noexcept

Dispatch generic item removal to all registered layers.

◆ DispatchOnNodeRemoved()

void BRepGraph_LayerRegistry::DispatchOnNodeRemoved ( const BRepGraph_NodeId theNode)
noexcept

Dispatch OnNodeRemoved to all registered layers.

◆ DispatchOnNodeReplaced()

void BRepGraph_LayerRegistry::DispatchOnNodeReplaced ( const BRepGraph_NodeId theOldNode,
const BRepGraph_NodeId theNewNode )
noexcept

Dispatch OnNodeReplaced 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_Array1< BRepGraph_RefId > & theModifiedRefs,
const int theModifiedRefKindsMask )
noexcept

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

◆ Ensure()

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

Return an existing layer or create and register a default one. Template convenience wrapper: extracts GUID and calls ensureLayer.

◆ Find()

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

Typed lookup by layer GUID.

◆ 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()

bool BRepGraph_LayerRegistry::FindSlot ( const Standard_GUID & theGUID,
uint32_t & theSlot ) const

Return current slot for a GUID.

◆ 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 data.

◆ Layer()

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

Return layer by slot index, or null handle if the slot is out of range.

◆ NbLayers()

uint32_t BRepGraph_LayerRegistry::NbLayers ( ) const
inline

Number of registered layers.

◆ operator=() [1/2]

BRepGraph_LayerRegistry & BRepGraph_LayerRegistry::operator= ( BRepGraph_LayerRegistry && theOther)
noexcept

◆ operator=() [2/2]

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

◆ RegisterLayer()

uint32_t 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.

◆ 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: