|
| void | Set (const BRepGraph_RefId theRef, const occ::handle< BRepGraph_CacheKind > &theKind, const occ::handle< BRepGraph_CacheValue > &theValue, const uint32_t theCurrentOwnGen) |
| | Store a cached value for a reference and cache kind.
|
| |
| void | Set (const BRepGraph_RefId theRef, const int theKindSlot, const occ::handle< BRepGraph_CacheValue > &theValue, const uint32_t theCurrentOwnGen) |
| | Store a cached value using a pre-resolved kind slot index. Bypasses BRepGraph_CacheKindRegistry lookup - use in hot parallel paths.
|
| |
| occ::handle< BRepGraph_CacheValue > | Get (const BRepGraph_RefId theRef, const occ::handle< BRepGraph_CacheKind > &theKind, const uint32_t theCurrentOwnGen) const |
| | Retrieve a cached value for a reference and cache kind. Returns null handle if no value is stored or if OwnGen has changed.
|
| |
| occ::handle< BRepGraph_CacheValue > | Get (const BRepGraph_RefId theRef, const int theKindSlot, const uint32_t theCurrentOwnGen) const |
| | Retrieve a cached value using a pre-resolved kind slot index.
|
| |
| bool | Remove (const BRepGraph_RefId theRef, const occ::handle< BRepGraph_CacheKind > &theKind) |
| | Remove a cached value for a reference and cache kind.
|
| |
| bool | Remove (const BRepGraph_RefId theRef, const int theKindSlot) |
| | Remove a cached value using a pre-resolved cache-kind slot.
|
| |
| int | CollectCacheKindSlots (const BRepGraph_RefId theRef, const uint32_t theCurrentOwnGen, int theSlots[]) const |
| | Collect fresh cache-kind slot indices for a reference (zero heap allocation). Used internally by CacheView::CacheKindIterator.
|
| |
| void | Reserve (const int theKindCount, const int theCounts[THE_REF_KIND_COUNT]) |
| | Pre-allocate storage for lock-free parallel access.
|
| |
| bool | IsReserved () const noexcept |
| | True if Reserve() has been called and storage is pre-allocated.
|
| |
| void | Clear () noexcept |
| | Clear all cached data. Called on BRepGraph_Builder::Add() and Compact().
|
| |
| | BRepGraph_RefTransientCache (BRepGraph_RefTransientCache &&theOther) noexcept |
| | Move constructor: transfers data, creates fresh mutex.
|
| |
| BRepGraph_RefTransientCache & | operator= (BRepGraph_RefTransientCache &&theOther) noexcept |
| | Move assignment: transfers data, mutex stays local.
|
| |
| | BRepGraph_RefTransientCache ()=default |
| |
| | BRepGraph_RefTransientCache (const BRepGraph_RefTransientCache &)=delete |
| |
| BRepGraph_RefTransientCache & | operator= (const BRepGraph_RefTransientCache &)=delete |
| |
Centralized transient cache for algorithm-computed per-reference values.
Symmetric counterpart of BRepGraph_TransientCache, keyed by BRepGraph_RefId instead of BRepGraph_NodeId. Freshness is tracked via BaseRef::OwnGen rather than BaseDef::SubtreeGen, because references do not own subtrees.
Shares the same BRepGraph_CacheKind descriptors and BRepGraph_CacheKindRegistry as the node cache; the same kind GUID can address values in both caches.
OwnGen-based freshness
Each stored slot records OwnGen at write time. On read, if the stored OwnGen differs from the reference's current OwnGen the cached value is considered stale.
Lifecycle
NOT a Layer. Cleared on BRepGraph_Builder::Add() and Compact(). No explicit removal callback
- stale data is auto-detected by OwnGen mismatch.
Thread safety
After Reserve(), Get() and Set() for in-range indices bypass the mutex entirely. Out-of-range access falls back to mutex-protected vector growth.