Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Public Member Functions
BRepGraph::UIDsView Class Reference

Read-only view for persistent unique identifiers. More...

#include <BRepGraph_UIDsView.hxx>

Public Member Functions

BRepGraph_UID Of (const BRepGraph_NodeId theNode) const
 Return the UID assigned to a node.
 
BRepGraph_RefUID Of (const BRepGraph_RefId theRefId) const
 Return the RefUID assigned to a reference.
 
BRepGraph_NodeId NodeIdFrom (const BRepGraph_UID &theUID) const
 Resolve a UID back to a NodeId using the internal reverse index.
 
BRepGraph_RefId RefIdFrom (const BRepGraph_RefUID &theUID) const
 Resolve a RefUID back to a RefId using the internal reverse index.
 
bool Has (const BRepGraph_UID &theUID) const
 Check if a UID is valid and exists in this graph generation.
 
bool Has (const BRepGraph_RefUID &theUID) const
 Check if a RefUID is valid and exists in this graph generation.
 
uint32_t Generation () const
 Return the current generation counter (incremented on each BRepGraph::Clear()).
 
const Standard_GUIDGraphGUID () const
 Return the graph-level identity GUID. Generated randomly at BRepGraph::Clear() time; changes on each rebuild.
 
BRepGraph_VersionStamp StampOf (const BRepGraph_NodeId theNode) const
 Produce a version stamp for the given node. Combines the node's UID with its current OwnGen and graph Generation.
 
BRepGraph_VersionStamp StampOf (const BRepGraph_RefId theRefId) const
 Produce a version stamp for the given reference. Combines the reference's RefUID with its current OwnGen and graph Generation.
 
bool IsStale (const BRepGraph_VersionStamp &theStamp) const
 Check if a previously-taken stamp is stale. A stamp is stale when the stamped node or reference has been mutated, removed, or the graph was rebuilt since the stamp was taken.
 

Detailed Description

Read-only view for persistent unique identifiers.

UIDs are (Kind, Counter) pairs that persist across graph mutations (Compact, node removal). Counters are monotonic and independent of vector indices. Clear() starts a new graph generation and refreshes the graph GUID, enabling stale-reference detection when a graph is rebuilt. Provides bidirectional NodeId/UID resolution. Obtained via BRepGraph::UIDs().

Member Function Documentation

◆ Generation()

uint32_t BRepGraph::UIDsView::Generation ( ) const

Return the current generation counter (incremented on each BRepGraph::Clear()).

Returns
graph generation number

◆ GraphGUID()

const Standard_GUID & BRepGraph::UIDsView::GraphGUID ( ) const

Return the graph-level identity GUID. Generated randomly at BRepGraph::Clear() time; changes on each rebuild.

Returns
reference to the graph identity GUID

◆ Has() [1/2]

bool BRepGraph::UIDsView::Has ( const BRepGraph_RefUID & theUID) const

Check if a RefUID is valid and exists in this graph generation.

Parameters
[in]theUIDunique reference identifier to check
Returns
true if the RefUID resolves to an active reference in this graph generation

◆ Has() [2/2]

bool BRepGraph::UIDsView::Has ( const BRepGraph_UID & theUID) const

Check if a UID is valid and exists in this graph generation.

Parameters
[in]theUIDunique identifier to check
Returns
true if the UID resolves to an active node in this graph generation

◆ IsStale()

bool BRepGraph::UIDsView::IsStale ( const BRepGraph_VersionStamp & theStamp) const

Check if a previously-taken stamp is stale. A stamp is stale when the stamped node or reference has been mutated, removed, or the graph was rebuilt since the stamp was taken.

Parameters
[in]theStampversion stamp to check
Returns
true if the stamp no longer matches the current graph state

◆ NodeIdFrom()

BRepGraph_NodeId BRepGraph::UIDsView::NodeIdFrom ( const BRepGraph_UID & theUID) const

Resolve a UID back to a NodeId using the internal reverse index.

Parameters
[in]theUIDunique identifier to resolve
Returns
corresponding active NodeId, or invalid NodeId if not found/removed

◆ Of() [1/2]

BRepGraph_UID BRepGraph::UIDsView::Of ( const BRepGraph_NodeId theNode) const

Return the UID assigned to a node.

Parameters
[in]theNodenode identifier
Returns
UID for the active node, or invalid UID if theNode is out of bounds or removed

◆ Of() [2/2]

BRepGraph_RefUID BRepGraph::UIDsView::Of ( const BRepGraph_RefId theRefId) const

Return the RefUID assigned to a reference.

Parameters
[in]theRefIdreference identifier
Returns
RefUID for the active reference, or invalid RefUID if theRefId is out of bounds or removed

◆ RefIdFrom()

BRepGraph_RefId BRepGraph::UIDsView::RefIdFrom ( const BRepGraph_RefUID & theUID) const

Resolve a RefUID back to a RefId using the internal reverse index.

Parameters
[in]theUIDunique reference identifier to resolve
Returns
corresponding active RefId, or invalid RefId if not found/removed

◆ StampOf() [1/2]

BRepGraph_VersionStamp BRepGraph::UIDsView::StampOf ( const BRepGraph_NodeId theNode) const

Produce a version stamp for the given node. Combines the node's UID with its current OwnGen and graph Generation.

Parameters
[in]theNodenode identifier
Returns
version stamp, or invalid stamp if theNode is invalid, removed, or out of bounds

◆ StampOf() [2/2]

BRepGraph_VersionStamp BRepGraph::UIDsView::StampOf ( const BRepGraph_RefId theRefId) const

Produce a version stamp for the given reference. Combines the reference's RefUID with its current OwnGen and graph Generation.

Parameters
[in]theRefIdreference identifier
Returns
version stamp, or invalid stamp if theRefId is invalid, removed, or out of bounds

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