![]() |
Open CASCADE Technology Reference Manual 8.0.0
|
Non-const view for managing transient cache values on nodes. More...
#include <BRepGraph_CacheView.hxx>
Public Member Functions | |
| void | Set (const BRepGraph_NodeId theNode, const occ::handle< BRepGraph_CacheKind > &theKind, const occ::handle< BRepGraph_CacheValue > &theValue) |
| Attach a cached value to a node. | |
| void | Set (const BRepGraph_NodeId theNode, const int theKindSlot, const occ::handle< BRepGraph_CacheValue > &theValue) |
| Attach a cached value using a pre-resolved cache-kind slot. | |
| occ::handle< BRepGraph_CacheValue > | Get (const BRepGraph_NodeId theNode, const occ::handle< BRepGraph_CacheKind > &theKind) const |
| Retrieve a cached value from a node. | |
| occ::handle< BRepGraph_CacheValue > | Get (const BRepGraph_NodeId theNode, const int theKindSlot) const |
| Retrieve a cached value using a pre-resolved cache-kind slot. | |
| bool | Has (const BRepGraph_NodeId theNode, const occ::handle< BRepGraph_CacheKind > &theKind) const |
| Check if a non-stale cached value exists on a node. | |
| bool | Has (const BRepGraph_NodeId theNode, const int theKindSlot) const |
| Check if a non-stale cached value exists using a pre-resolved slot. | |
| bool | Remove (const BRepGraph_NodeId theNode, const occ::handle< BRepGraph_CacheKind > &theKind) |
| Remove a cached value from a node. | |
| bool | Remove (const BRepGraph_NodeId theNode, const int theKindSlot) |
| Remove a cached value using a pre-resolved cache-kind slot. | |
| void | Invalidate (const BRepGraph_NodeId theNode, const occ::handle< BRepGraph_CacheKind > &theKind) |
| Invalidate (but do not remove) a cached value on a node. | |
| void | Invalidate (const BRepGraph_NodeId theNode, const int theKindSlot) |
| Invalidate a cached value using a pre-resolved cache-kind slot. | |
| BRepGraph_CacheKindIterator< BRepGraph_NodeId > | CacheKindIter (const BRepGraph_NodeId theNode) const |
| Create a zero-allocation iterator over all cache kinds populated on a node. | |
| BRepGraph_CacheKindIterator< BRepGraph_RefId > | CacheKindIter (const BRepGraph_RefId theRef) const |
| Create a zero-allocation iterator over all cache kinds populated on a reference. | |
| void | Set (const BRepGraph_RefId theRef, const occ::handle< BRepGraph_CacheKind > &theKind, const occ::handle< BRepGraph_CacheValue > &theValue) |
| Attach a cached value to a reference. | |
| void | Set (const BRepGraph_RefId theRef, const int theKindSlot, const occ::handle< BRepGraph_CacheValue > &theValue) |
| Attach a cached value to a reference using a pre-resolved cache-kind slot. | |
| occ::handle< BRepGraph_CacheValue > | Get (const BRepGraph_RefId theRef, const occ::handle< BRepGraph_CacheKind > &theKind) const |
| Retrieve a cached value from a reference. | |
| occ::handle< BRepGraph_CacheValue > | Get (const BRepGraph_RefId theRef, const int theKindSlot) const |
| Retrieve a cached value from a reference using a pre-resolved cache-kind slot. | |
| bool | Has (const BRepGraph_RefId theRef, const occ::handle< BRepGraph_CacheKind > &theKind) const |
| Check if a non-stale cached value exists on a reference. | |
| bool | Has (const BRepGraph_RefId theRef, const int theKindSlot) const |
| Check if a non-stale cached value exists on a reference using a pre-resolved slot. | |
| bool | Remove (const BRepGraph_RefId theRef, const occ::handle< BRepGraph_CacheKind > &theKind) |
| Remove a cached value from a reference. | |
| bool | Remove (const BRepGraph_RefId theRef, const int theKindSlot) |
| Remove a cached value from a reference using a pre-resolved cache-kind slot. | |
| void | Invalidate (const BRepGraph_RefId theRef, const occ::handle< BRepGraph_CacheKind > &theKind) |
| Invalidate (but do not remove) a cached value on a reference. | |
| void | Invalidate (const BRepGraph_RefId theRef, const int theKindSlot) |
| Invalidate a cached value on a reference using a pre-resolved cache-kind slot. | |
Non-const view for managing transient cache values on nodes.
This view is the stable public cache API for BRepGraph callers. External code should use Cache() for all cache access. Low-level storage operations such as reserve or cross-graph cache transfer stay internal to graph-maintenance code through the graph's private cache access.
Cached values are keyed by BRepGraph_CacheKind descriptors (Handle-based) and stored as Handle(BRepGraph_CacheValue). Each CacheKind carries a Standard_GUID for stable identity and is registered in BRepGraph_CacheKindRegistry which maps GUIDs to dense runtime slot indices for O(1) internal storage lookup.
Supports set, get, remove, invalidate, and kind enumeration per node. Cached data is stored centrally in BRepGraph_TransientCache with generation-based freshness tracking via SubtreeGen. Hot-path callers may pre-resolve a cache-kind slot once through BRepGraph_CacheKindRegistry::Register() and then use slot-based overloads to avoid repeated registry locking. Obtained via BRepGraph::Cache().
| BRepGraph_CacheKindIterator< BRepGraph_NodeId > BRepGraph::CacheView::CacheKindIter | ( | const BRepGraph_NodeId | theNode | ) | const |
Create a zero-allocation iterator over all cache kinds populated on a node.
| [in] | theNode | node to query |
| BRepGraph_CacheKindIterator< BRepGraph_RefId > BRepGraph::CacheView::CacheKindIter | ( | const BRepGraph_RefId | theRef | ) | const |
Create a zero-allocation iterator over all cache kinds populated on a reference.
| [in] | theRef | reference to query |
| occ::handle< BRepGraph_CacheValue > BRepGraph::CacheView::Get | ( | const BRepGraph_NodeId | theNode, |
| const int | theKindSlot ) const |
Retrieve a cached value using a pre-resolved cache-kind slot.
| occ::handle< BRepGraph_CacheValue > BRepGraph::CacheView::Get | ( | const BRepGraph_NodeId | theNode, |
| const occ::handle< BRepGraph_CacheKind > & | theKind ) const |
Retrieve a cached value from a node.
| [in] | theNode | node to query |
| [in] | theKind | cache kind descriptor identifying the slot |
| occ::handle< BRepGraph_CacheValue > BRepGraph::CacheView::Get | ( | const BRepGraph_RefId | theRef, |
| const int | theKindSlot ) const |
Retrieve a cached value from a reference using a pre-resolved cache-kind slot.
| occ::handle< BRepGraph_CacheValue > BRepGraph::CacheView::Get | ( | const BRepGraph_RefId | theRef, |
| const occ::handle< BRepGraph_CacheKind > & | theKind ) const |
Retrieve a cached value from a reference.
| bool BRepGraph::CacheView::Has | ( | const BRepGraph_NodeId | theNode, |
| const int | theKindSlot ) const |
Check if a non-stale cached value exists using a pre-resolved slot.
| bool BRepGraph::CacheView::Has | ( | const BRepGraph_NodeId | theNode, |
| const occ::handle< BRepGraph_CacheKind > & | theKind ) const |
Check if a non-stale cached value exists on a node.
| [in] | theNode | node to query |
| [in] | theKind | cache kind descriptor identifying the slot |
| bool BRepGraph::CacheView::Has | ( | const BRepGraph_RefId | theRef, |
| const int | theKindSlot ) const |
Check if a non-stale cached value exists on a reference using a pre-resolved slot.
| bool BRepGraph::CacheView::Has | ( | const BRepGraph_RefId | theRef, |
| const occ::handle< BRepGraph_CacheKind > & | theKind ) const |
Check if a non-stale cached value exists on a reference.
| void BRepGraph::CacheView::Invalidate | ( | const BRepGraph_NodeId | theNode, |
| const int | theKindSlot ) |
Invalidate a cached value using a pre-resolved cache-kind slot.
| void BRepGraph::CacheView::Invalidate | ( | const BRepGraph_NodeId | theNode, |
| const occ::handle< BRepGraph_CacheKind > & | theKind ) |
Invalidate (but do not remove) a cached value on a node.
| [in] | theNode | node whose cache entry to invalidate |
| [in] | theKind | cache kind descriptor identifying the slot |
| void BRepGraph::CacheView::Invalidate | ( | const BRepGraph_RefId | theRef, |
| const int | theKindSlot ) |
Invalidate a cached value on a reference using a pre-resolved cache-kind slot.
| void BRepGraph::CacheView::Invalidate | ( | const BRepGraph_RefId | theRef, |
| const occ::handle< BRepGraph_CacheKind > & | theKind ) |
Invalidate (but do not remove) a cached value on a reference.
| bool BRepGraph::CacheView::Remove | ( | const BRepGraph_NodeId | theNode, |
| const int | theKindSlot ) |
Remove a cached value using a pre-resolved cache-kind slot.
| bool BRepGraph::CacheView::Remove | ( | const BRepGraph_NodeId | theNode, |
| const occ::handle< BRepGraph_CacheKind > & | theKind ) |
Remove a cached value from a node.
| [in] | theNode | node to remove the value from |
| [in] | theKind | cache kind descriptor identifying the slot |
| bool BRepGraph::CacheView::Remove | ( | const BRepGraph_RefId | theRef, |
| const int | theKindSlot ) |
Remove a cached value from a reference using a pre-resolved cache-kind slot.
| bool BRepGraph::CacheView::Remove | ( | const BRepGraph_RefId | theRef, |
| const occ::handle< BRepGraph_CacheKind > & | theKind ) |
Remove a cached value from a reference.
| void BRepGraph::CacheView::Set | ( | const BRepGraph_NodeId | theNode, |
| const int | theKindSlot, | ||
| const occ::handle< BRepGraph_CacheValue > & | theValue ) |
Attach a cached value using a pre-resolved cache-kind slot.
| void BRepGraph::CacheView::Set | ( | const BRepGraph_NodeId | theNode, |
| const occ::handle< BRepGraph_CacheKind > & | theKind, | ||
| const occ::handle< BRepGraph_CacheValue > & | theValue ) |
Attach a cached value to a node.
| [in] | theNode | node to attach the value to |
| [in] | theKind | cache kind descriptor identifying the slot |
| [in] | theValue | cached value to store |
| void BRepGraph::CacheView::Set | ( | const BRepGraph_RefId | theRef, |
| const int | theKindSlot, | ||
| const occ::handle< BRepGraph_CacheValue > & | theValue ) |
Attach a cached value to a reference using a pre-resolved cache-kind slot.
| void BRepGraph::CacheView::Set | ( | const BRepGraph_RefId | theRef, |
| const occ::handle< BRepGraph_CacheKind > & | theKind, | ||
| const occ::handle< BRepGraph_CacheValue > & | theValue ) |
Attach a cached value to a reference.
| [in] | theRef | reference to attach the value to |
| [in] | theKind | cache kind descriptor identifying the slot |
| [in] | theValue | cached value to store |