OCCT3D About OCCT
Open CASCADE Technology Reference Manual 8.0.1
Loading...
Searching...
No Matches
Data Structures | Public Member Functions | Protected Member Functions
BRepGraph_Cache Class Referenceabstract

Lightweight owner-bound base for transient graph cache services. More...

#include <BRepGraph_Cache.hxx>

Inheritance diagram for BRepGraph_Cache:
Inheritance graph
[legend]

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_GUIDID () const =0
 Cache service identity, unique within a graph registry.
 
virtual const TCollection_AsciiStringName () 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_Transientoperator= (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_TransientThis () 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 BRepGraphGraph () const
 Attached graph for read-only cache services. Raises Standard_ProgramError if detached.
 
BRepGraphAttachedGraph () 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 charget_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.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ BRepGraph_Cache()

BRepGraph_Cache::BRepGraph_Cache ( )
protected

Member Function Documentation

◆ AttachedGraph()

BRepGraph * BRepGraph_Cache::AttachedGraph ( ) const
inlineprotectednoexcept

Attached mutable graph for graph-owned cache services. Returns null if detached.

◆ Clear()

virtual void BRepGraph_Cache::Clear ( )
virtualnoexcept

Clear all transient data owned by this cache.

Reimplemented in BRepGraph_CacheDerivedState, and BRepGraph_CacheMesh.

◆ CopyFreshTo()

virtual void BRepGraph_Cache::CopyFreshTo ( const BRepGraph_CopyRemap & theCopy) const
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.

◆ Graph()

const BRepGraph & BRepGraph_Cache::Graph ( ) const
protected

Attached graph for read-only cache services. Raises Standard_ProgramError if detached.

◆ ID()

virtual const Standard_GUID & BRepGraph_Cache::ID ( ) const
pure virtual

Cache service identity, unique within a graph registry.

Implemented in BRepGraph_CacheDerivedState, and BRepGraph_CacheMesh.

◆ IsAttached()

bool BRepGraph_Cache::IsAttached ( ) const
inlineprotectednoexcept

True while this cache is registered in a live graph registry.

◆ ItemOwnGen()

bool BRepGraph_Cache::ItemOwnGen ( const BRepGraph_ItemId theItem,
uint32_t & theGen ) const
protectednoexcept

Return current OwnGen for an active graph item.

◆ Name()

virtual const TCollection_AsciiString & BRepGraph_Cache::Name ( ) const
pure virtual

Cache service display name.

Implemented in BRepGraph_CacheDerivedState, and BRepGraph_CacheMesh.

◆ NodeOwnGen()

bool BRepGraph_Cache::NodeOwnGen ( const BRepGraph_NodeId theNode,
uint32_t & theGen ) const
protectednoexcept

Return current OwnGen for an active node.

◆ NodeSubtreeGen()

bool BRepGraph_Cache::NodeSubtreeGen ( const BRepGraph_NodeId theNode,
uint32_t & theGen ) const
protectednoexcept

Return current SubtreeGen for an active node.

◆ OnAttached()

virtual void BRepGraph_Cache::OnAttached ( )
protectedvirtualnoexcept

Called after the cache is attached to a graph registry.

◆ OnDetached()

virtual void BRepGraph_Cache::OnDetached ( )
protectedvirtualnoexcept

Called before the cache is detached from a graph registry.

◆ RefOwnGen()

bool BRepGraph_Cache::RefOwnGen ( const BRepGraph_RefId theRef,
uint32_t & theGen ) const
protectednoexcept

Return current OwnGen for an active reference.

◆ ResolveActiveFaceRef()

bool BRepGraph_Cache::ResolveActiveFaceRef ( const BRepGraph_FaceRefId theRef,
BRepGraph_FaceId & theFace ) const
protectednoexcept

Resolve an active face reference to its active face node.

◆ ResolveActiveRefChild()

bool BRepGraph_Cache::ResolveActiveRefChild ( const BRepGraph_RefId theRef,
BRepGraph_NodeId & theNode ) const
protectednoexcept

Resolve an active reference to its active child node.


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