OCCT3D About OCCT
Open CASCADE Technology Reference Manual 8.0.1
Loading...
Searching...
No Matches
Public Member Functions
BRepGraph_CacheRegistry Class Reference

GUID-keyed runtime registry of graph cache services. More...

#include <BRepGraph_CacheRegistry.hxx>

Public Member Functions

 BRepGraph_CacheRegistry ()
 
 BRepGraph_CacheRegistry (const BRepGraph_CacheRegistry &)=delete
 
BRepGraph_CacheRegistryoperator= (const BRepGraph_CacheRegistry &)=delete
 
 BRepGraph_CacheRegistry (BRepGraph_CacheRegistry &&theOther) noexcept
 
BRepGraph_CacheRegistryoperator= (BRepGraph_CacheRegistry &&theOther) noexcept
 
uint32_t RegisterCache (const occ::handle< BRepGraph_Cache > &theCache)
 Register a cache service. Replaces an existing cache with the same GUID.
 
uint32_t Register (const occ::handle< BRepGraph_Cache > &theCache)
 Register a cache service. Short form used by graph-local cache operations.
 
void UnregisterCache (const Standard_GUID &theGUID)
 Remove a cache service by GUID.
 
occ::handle< BRepGraph_CacheFindCache (const Standard_GUID &theGUID) const
 Find a cache service by GUID.
 
template<typename T >
occ::handle< T > FindCache () const
 Typed convenience lookup by cache GUID.
 
template<typename T >
occ::handle< T > Find () const
 Typed lookup by cache GUID.
 
template<typename T >
occ::handle< T > Ensure ()
 Return an existing cache service or create and register a default one. Template convenience wrapper: extracts GUID and calls ensureCache.
 
bool FindSlot (const Standard_GUID &theGUID, uint32_t &theSlot) const
 Return current graph-local slot for a GUID.
 
bool FindSlot (const occ::handle< BRepGraph_Cache > &theCache, uint32_t &theSlot) const
 Return current graph-local slot for a cache service.
 
occ::handle< BRepGraph_CacheCache (uint32_t theSlot) const
 Return cache service by graph-local slot, or null handle if the slot is out of range.
 
uint32_t NbCaches () const
 Number of registered cache services.
 
BRepGraph_CacheIterator CacheIter () const
 Iterate registered cache services.
 
void ClearAll () noexcept
 Clear data in all registered cache services.
 
void CopyFreshCachesTo (BRepGraph &theTargetGraph, const NCollection_FlatDataMap< BRepGraph_ItemId, BRepGraph_ItemId > &theItemRemap, const BRepGraph_CopyRemap::Mode theMode) const
 Ask registered cache services to copy fresh, remappable data into the target graph.
 
void CopyFreshCachesTo (BRepGraph &theTargetGraph, BRepGraph_CopyRemap::MappingKind theMappingKind, BRepGraph_CopyRemap::Mode theMode) const
 Ask registered cache services to copy fresh data using identity mapping.
 
void Clear () noexcept
 Unregister all cache services.
 

Detailed Description

GUID-keyed runtime registry of graph cache services.

Stores registered cache services in a stable slot array for O(1) slot access and a GUID-to-slot map for lookup by stable public identity. Cache services own their typed transient data; this registry only manages identity and owner binding.

Constructor & Destructor Documentation

◆ BRepGraph_CacheRegistry() [1/3]

BRepGraph_CacheRegistry::BRepGraph_CacheRegistry ( )

◆ BRepGraph_CacheRegistry() [2/3]

BRepGraph_CacheRegistry::BRepGraph_CacheRegistry ( const BRepGraph_CacheRegistry & )
delete

◆ BRepGraph_CacheRegistry() [3/3]

BRepGraph_CacheRegistry::BRepGraph_CacheRegistry ( BRepGraph_CacheRegistry && theOther)
noexcept

Member Function Documentation

◆ Cache()

occ::handle< BRepGraph_Cache > BRepGraph_CacheRegistry::Cache ( uint32_t theSlot) const

Return cache service by graph-local slot, or null handle if the slot is out of range.

Parameters
[in]theSlotgraph-local cache slot

◆ CacheIter()

BRepGraph_CacheIterator BRepGraph_CacheRegistry::CacheIter ( ) const

Iterate registered cache services.

◆ Clear()

void BRepGraph_CacheRegistry::Clear ( )
noexcept

Unregister all cache services.

◆ ClearAll()

void BRepGraph_CacheRegistry::ClearAll ( )
noexcept

Clear data in all registered cache services.

◆ CopyFreshCachesTo() [1/2]

void BRepGraph_CacheRegistry::CopyFreshCachesTo ( BRepGraph & theTargetGraph,
BRepGraph_CopyRemap::MappingKind theMappingKind,
BRepGraph_CopyRemap::Mode theMode ) const

Ask registered cache services to copy fresh data using identity mapping.

◆ CopyFreshCachesTo() [2/2]

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

Ask registered cache services to copy fresh, remappable data into the target graph.

◆ Ensure()

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

Return an existing cache service or create and register a default one. Template convenience wrapper: extracts GUID and calls ensureCache.

◆ Find()

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

Typed lookup by cache GUID.

◆ FindCache() [1/2]

template<typename T >
occ::handle< T > BRepGraph_CacheRegistry::FindCache ( ) const
inline

Typed convenience lookup by cache GUID.

◆ FindCache() [2/2]

occ::handle< BRepGraph_Cache > BRepGraph_CacheRegistry::FindCache ( const Standard_GUID & theGUID) const

Find a cache service by GUID.

Parameters
[in]theGUIDcache identity
Returns
cache service, or null handle if not found

◆ FindSlot() [1/2]

bool BRepGraph_CacheRegistry::FindSlot ( const occ::handle< BRepGraph_Cache > & theCache,
uint32_t & theSlot ) const

Return current graph-local slot for a cache service.

Parameters
[in]theCachecache service
[out]theSlotgraph-local slot index
Returns
true if the cache service is registered

◆ FindSlot() [2/2]

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

Return current graph-local slot for a GUID.

Parameters
[in]theGUIDcache family identity
[out]theSlotgraph-local slot index
Returns
true if the cache service is registered

◆ NbCaches()

uint32_t BRepGraph_CacheRegistry::NbCaches ( ) const
inline

Number of registered cache services.

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ Register()

uint32_t BRepGraph_CacheRegistry::Register ( const occ::handle< BRepGraph_Cache > & theCache)

Register a cache service. Short form used by graph-local cache operations.

Parameters
[in]theCachecache service
Returns
graph-local slot index

◆ RegisterCache()

uint32_t BRepGraph_CacheRegistry::RegisterCache ( const occ::handle< BRepGraph_Cache > & theCache)

Register a cache service. Replaces an existing cache with the same GUID.

Parameters
[in]theCachecache service
Returns
graph-local slot index

◆ UnregisterCache()

void BRepGraph_CacheRegistry::UnregisterCache ( const Standard_GUID & theGUID)

Remove a cache service by GUID.

Parameters
[in]theGUIDcache identity

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