![]() |
Open CASCADE Technology Reference Manual 8.0.1
|
Lightweight owner-bound base for transient graph cache services. More...
#include <BRepGraph_Cache.hxx>

Data Structures | |
| class | ItemEntry |
| Value base for item-derived cache entries. More... | |
| class | NodeEntry |
| Value base for node-derived cache entries. More... | |
| class | RefEntry |
| Value base for reference-derived cache entries. More... | |
Public Member Functions | |
| virtual const Standard_GUID & | ID () const =0 |
| Cache service identity, unique within a graph registry. | |
| virtual const TCollection_AsciiString & | Name () const =0 |
| Cache service display name. | |
| virtual void | Clear () noexcept |
| Clear all transient data owned by this cache. | |
| virtual void | CopyFreshTo (const BRepGraph_CopyRemap &theCopy) const |
| Copy fresh, remappable cache data into the target graph described by the remap. Default implementation copies nothing. | |
Public Member Functions inherited from Standard_Transient | |
| Standard_Transient () | |
| Empty constructor. | |
| Standard_Transient (const Standard_Transient &) | |
| Copy constructor – does nothing. | |
| Standard_Transient & | operator= (const Standard_Transient &) |
| Assignment operator, needed to avoid copying reference counter. | |
| virtual | ~Standard_Transient ()=default |
| Destructor must be virtual. | |
| virtual const opencascade::handle< Standard_Type > & | DynamicType () const |
| Returns a type descriptor about this object. | |
| bool | IsInstance (const opencascade::handle< Standard_Type > &theType) const |
| Returns a true value if this is an instance of Type. | |
| bool | IsInstance (const char *const theTypeName) const |
| Returns a true value if this is an instance of TypeName. | |
| bool | IsKind (const opencascade::handle< Standard_Type > &theType) const |
| Returns true if this is an instance of Type or an instance of any class that inherits from Type. Note that multiple inheritance is not supported by OCCT RTTI mechanism. | |
| bool | IsKind (const char *const theTypeName) const |
| Returns true if this is an instance of TypeName or an instance of any class that inherits from TypeName. Note that multiple inheritance is not supported by OCCT RTTI mechanism. | |
| Standard_Transient * | This () const |
| Returns non-const pointer to this object (like const_cast). For protection against creating handle to objects allocated in stack or call from constructor, it will raise exception Standard_ProgramError if reference counter is zero. | |
| int | GetRefCount () const noexcept |
| Get the reference counter of this object. | |
| void | IncrementRefCounter () noexcept |
| Increments the reference counter of this object. Uses relaxed memory ordering since incrementing only requires atomicity, not synchronization with other memory operations. | |
| int | DecrementRefCounter () noexcept |
| Decrements the reference counter of this object; returns the decremented value. Uses release ordering for the decrement to ensure all writes to the object are visible before the count reaches zero. An acquire fence is added only when the count reaches zero, ensuring proper synchronization before deletion. This is more efficient than using acq_rel for every decrement. | |
| virtual void | Delete () const |
| Memory deallocator for transient classes. | |
Protected Member Functions | |
| BRepGraph_Cache () | |
| bool | IsAttached () const noexcept |
| True while this cache is registered in a live graph registry. | |
| const BRepGraph & | Graph () const |
| Attached graph for read-only cache services. Raises Standard_ProgramError if detached. | |
| BRepGraph * | AttachedGraph () const noexcept |
| Attached mutable graph for graph-owned cache services. Returns null if detached. | |
| virtual void | OnAttached () noexcept |
| Called after the cache is attached to a graph registry. | |
| virtual void | OnDetached () noexcept |
| Called before the cache is detached from a graph registry. | |
| bool | NodeSubtreeGen (const BRepGraph_NodeId theNode, uint32_t &theGen) const noexcept |
| Return current SubtreeGen for an active node. | |
| bool | NodeOwnGen (const BRepGraph_NodeId theNode, uint32_t &theGen) const noexcept |
| Return current OwnGen for an active node. | |
| bool | RefOwnGen (const BRepGraph_RefId theRef, uint32_t &theGen) const noexcept |
| Return current OwnGen for an active reference. | |
| bool | ItemOwnGen (const BRepGraph_ItemId theItem, uint32_t &theGen) const noexcept |
| Return current OwnGen for an active graph item. | |
| bool | ResolveActiveRefChild (const BRepGraph_RefId theRef, BRepGraph_NodeId &theNode) const noexcept |
| Resolve an active reference to its active child node. | |
| bool | ResolveActiveFaceRef (const BRepGraph_FaceRefId theRef, BRepGraph_FaceId &theFace) const noexcept |
| Resolve an active face reference to its active face node. | |
Additional Inherited Members | |
Public Types inherited from Standard_Transient | |
| typedef void | base_type |
| Returns a type descriptor about this object. | |
Static Public Member Functions inherited from Standard_Transient | |
| static constexpr const char * | get_type_name () |
| Returns a type descriptor about this object. | |
| static const opencascade::handle< Standard_Type > & | get_type_descriptor () |
| Returns type descriptor of Standard_Transient class. | |
Lightweight owner-bound base for transient graph cache services.
A cache service stores typed, recomputable, graph-local data such as bounding boxes, UV bounds, or display-resolution results. The registry owns only service identity and lifetime binding; concrete caches own their own typed storage and validate freshness lazily via graph generation counters.
|
protected |
|
inlineprotectednoexcept |
Attached mutable graph for graph-owned cache services. Returns null if detached.
Clear all transient data owned by this cache.
Reimplemented in BRepGraph_CacheDerivedState, and BRepGraph_CacheMesh.
|
virtual |
Copy fresh, remappable cache data into the target graph described by the remap. Default implementation copies nothing.
Reimplemented in BRepGraph_CacheDerivedState, and BRepGraph_CacheMesh.
|
protected |
Attached graph for read-only cache services. Raises Standard_ProgramError if detached.
|
pure virtual |
Cache service identity, unique within a graph registry.
Implemented in BRepGraph_CacheDerivedState, and BRepGraph_CacheMesh.
|
inlineprotectednoexcept |
True while this cache is registered in a live graph registry.
|
protectednoexcept |
Return current OwnGen for an active graph item.
|
pure virtual |
Cache service display name.
Implemented in BRepGraph_CacheDerivedState, and BRepGraph_CacheMesh.
|
protectednoexcept |
Return current OwnGen for an active node.
|
protectednoexcept |
Return current SubtreeGen for an active node.
Called after the cache is attached to a graph registry.
Called before the cache is detached from a graph registry.
|
protectednoexcept |
Return current OwnGen for an active reference.
|
protectednoexcept |
Resolve an active face reference to its active face node.
|
protectednoexcept |
Resolve an active reference to its active child node.