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

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

#include <uid.hpp>

Public Member Functions

 RepUID (const ::occtl_rep_uid_t theUid) noexcept
 Wraps an existing C value type (zero-cost).
 
::occtl_rep_uid_t get () const noexcept
 Borrows-it view of the underlying C value type, for direct ABI calls.
 
std::array< std::uint8_t, OCCTL_REP_UID_WIRE_SIZEto_bytes () const
 Encodes this RepUID 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 RepUID &theOther) const noexcept
 Bitwise equality.
 
bool operator!= (const RepUID &theOther) const noexcept
 Bitwise inequality.
 

Static Public Member Functions

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

Detailed Description

Persistent identity surviving representation removal and graph compaction.

Use occtl::Graph::rep_id_from_rep_uid to resolve back to a RepId. The all-zero value (OCCTL_REP_UID_INVALID) is the invalid sentinel.

Member Function Documentation

◆ from_bytes()

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

Decodes a RepUID 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: