OCCT-Light 0.1
C ABI and C++ veneer for multi-language CAD workflows
Loading...
Searching...
No Matches
occtl::RefUID Class Reference

Persistent identity surviving reference removal and graph compaction. More...

#include <uid.hpp>

Public Member Functions

 RefUID (const ::occtl_ref_uid_t theUid) noexcept
 Wraps an existing C value type (zero-cost).
 
::occtl_ref_uid_t get () const noexcept
 Borrows-it view of the underlying C value type, for direct ABI calls.
 
std::array< std::uint8_t, OCCTL_REF_UID_WIRE_SIZEto_bytes () const
 Encodes this RefUID into the fixed-width C wire format.
 
bool is_valid () const noexcept
 True when the UID is not the all-zero sentinel.
 
bool operator== (const RefUID &theOther) const noexcept
 Bitwise equality.
 
bool operator!= (const RefUID &theOther) const noexcept
 Bitwise inequality.
 

Static Public Member Functions

static RefUID invalid () noexcept
 Returns the invalid sentinel (all-zero bits).
 
static RefUID from_bytes (const std::array< std::uint8_t, OCCTL_REF_UID_WIRE_SIZE > &theBytes)
 Decodes a RefUID from the fixed-width C wire format.
 

Detailed Description

Persistent identity surviving reference removal and graph compaction.

Use occtl::Graph::ref_id_from_ref_uid to resolve back to a RefId. The all-zero value (OCCTL_REF_UID_INVALID) is the invalid sentinel.

Member Function Documentation

◆ from_bytes()

static RefUID occtl::RefUID::from_bytes ( const std::array< std::uint8_t, OCCTL_REF_UID_WIRE_SIZE > &  theBytes)
inlinestatic

Decodes a RefUID from the fixed-width C wire format.

Exceptions
Errorwith code OCCTL_FORMAT_ERROR when reserved bytes are non-zero.

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