Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions
BRepGraph_RefUID Struct Reference

Unique reference identifier within a BRepGraph. More...

#include <BRepGraph_RefUID.hxx>

Public Member Functions

 BRepGraph_RefUID ()
 
 BRepGraph_RefUID (const BRepGraph_RefId::Kind theKind, const size_t theCounter, const uint32_t theGeneration)
 
bool IsValid () const
 
BRepGraph_RefId::Kind Kind () const
 
size_t Counter () const
 
uint32_t Generation () const
 
bool operator== (const BRepGraph_RefUID &theOther) const
 
bool operator!= (const BRepGraph_RefUID &theOther) const
 
bool operator< (const BRepGraph_RefUID &theOther) const
 
size_t HashValue () const
 

Static Public Member Functions

static BRepGraph_RefUID Invalid ()
 

Detailed Description

Unique reference identifier within a BRepGraph.

Identity = (RefKind, Counter). Generation is excluded from equality/hash. Counter 0 is an invalid sentinel.

Serialization Contract

Entity UIDs (BRepGraph_UID) and reference UIDs (BRepGraph_RefUID) share a single monotonic counter (BRepGraph_Data::myNextUIDCounter). To persist a BRepGraph across sessions:

  1. Write: for each reference entry, serialize (RefKind, Counter, OwnGen).
  2. Read: reconstruct reference entries, populate RefUID vectors with deserialized (RefKind, Counter) values, set myNextUIDCounter to max(all_entity_counters, all_ref_counters) + 1.
  3. myGeneration resets to 0 on load (session-scoped).
  4. VersionStamps from a previous session will correctly detect staleness via Generation mismatch.

Constructor & Destructor Documentation

◆ BRepGraph_RefUID() [1/2]

BRepGraph_RefUID::BRepGraph_RefUID ( )
inline

◆ BRepGraph_RefUID() [2/2]

BRepGraph_RefUID::BRepGraph_RefUID ( const BRepGraph_RefId::Kind theKind,
const size_t theCounter,
const uint32_t theGeneration )
inline

Member Function Documentation

◆ Counter()

size_t BRepGraph_RefUID::Counter ( ) const
inline

◆ Generation()

uint32_t BRepGraph_RefUID::Generation ( ) const
inline

◆ HashValue()

size_t BRepGraph_RefUID::HashValue ( ) const
inline

◆ Invalid()

static BRepGraph_RefUID BRepGraph_RefUID::Invalid ( )
inlinestatic

◆ IsValid()

bool BRepGraph_RefUID::IsValid ( ) const
inline

◆ Kind()

BRepGraph_RefId::Kind BRepGraph_RefUID::Kind ( ) const
inline

◆ operator!=()

bool BRepGraph_RefUID::operator!= ( const BRepGraph_RefUID & theOther) const
inline

◆ operator<()

bool BRepGraph_RefUID::operator< ( const BRepGraph_RefUID & theOther) const
inline

◆ operator==()

bool BRepGraph_RefUID::operator== ( const BRepGraph_RefUID & theOther) const
inline

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