![]() |
Open CASCADE Technology Reference Manual 8.0.1
|
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_CacheRegistry & | operator= (const BRepGraph_CacheRegistry &)=delete |
| BRepGraph_CacheRegistry (BRepGraph_CacheRegistry &&theOther) noexcept | |
| BRepGraph_CacheRegistry & | operator= (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_Cache > | FindCache (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_Cache > | Cache (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. | |
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.
| BRepGraph_CacheRegistry::BRepGraph_CacheRegistry | ( | ) |
|
delete |
|
noexcept |
| 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.
| [in] | theSlot | graph-local cache slot |
| BRepGraph_CacheIterator BRepGraph_CacheRegistry::CacheIter | ( | ) | const |
Iterate registered cache services.
|
noexcept |
Unregister all cache services.
|
noexcept |
Clear data in all registered cache services.
| 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.
| 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.
|
inline |
Return an existing cache service or create and register a default one. Template convenience wrapper: extracts GUID and calls ensureCache.
|
inline |
Typed lookup by cache GUID.
|
inline |
Typed convenience lookup by cache GUID.
| occ::handle< BRepGraph_Cache > BRepGraph_CacheRegistry::FindCache | ( | const Standard_GUID & | theGUID | ) | const |
Find a cache service by GUID.
| [in] | theGUID | cache identity |
| bool BRepGraph_CacheRegistry::FindSlot | ( | const occ::handle< BRepGraph_Cache > & | theCache, |
| uint32_t & | theSlot ) const |
Return current graph-local slot for a cache service.
| [in] | theCache | cache service |
| [out] | theSlot | graph-local slot index |
| bool BRepGraph_CacheRegistry::FindSlot | ( | const Standard_GUID & | theGUID, |
| uint32_t & | theSlot ) const |
Return current graph-local slot for a GUID.
| [in] | theGUID | cache family identity |
| [out] | theSlot | graph-local slot index |
|
inline |
Number of registered cache services.
|
noexcept |
|
delete |
| uint32_t BRepGraph_CacheRegistry::Register | ( | const occ::handle< BRepGraph_Cache > & | theCache | ) |
Register a cache service. Short form used by graph-local cache operations.
| [in] | theCache | cache service |
| uint32_t BRepGraph_CacheRegistry::RegisterCache | ( | const occ::handle< BRepGraph_Cache > & | theCache | ) |
Register a cache service. Replaces an existing cache with the same GUID.
| [in] | theCache | cache service |
| void BRepGraph_CacheRegistry::UnregisterCache | ( | const Standard_GUID & | theGUID | ) |
Remove a cache service by GUID.
| [in] | theGUID | cache identity |