Open CASCADE Technology Reference Manual 8.0.2
Loading...
Searching...
No Matches
BRepGraph_RefId::Typed< TheKind > Struct Template Reference

Compile-time typed wrapper around BRepGraph_RefId. More...

#include <BRepGraph_RefId.hxx>

Public Member Functions

 Typed ()
 Typed (const uint32_t theIdx)
 Typed (const BRepGraph_RefId theRefId)
 Construct from an untyped reference id of the same kind.
template<Kind OtherKind, typename std::enable_if_t< OtherKind !=TheKind, int > = 0>
 Typed (const Typed< OtherKind > &)=delete
bool IsValid () const
bool IsValid (const uint32_t theMaxCount) const
 True if this id points to an allocated slot within [0, theMaxCount). UINT32_MAX (invalid sentinel) always fails this check for any realistic count.
template<typename CountProviderT>
auto IsValidIn (const CountProviderT &theProvider) const -> decltype(theProvider.Nb(), bool())
template<typename CountProviderT>
auto IsValidIn (const CountProviderT &theProvider) const -> decltype(theProvider.Size(), bool())
 operator BRepGraph_RefId () const
bool operator== (const Typed &theOther) const
bool operator!= (const Typed &theOther) const
bool operator< (const Typed &theOther) const
bool operator<= (const Typed &theOther) const
bool operator> (const Typed &theOther) const
bool operator>= (const Typed &theOther) const
Typed & operator++ ()
 Pre-increment (++id).
Typed operator++ (int)
 Post-increment (id++).
Typed operator+ (const uint32_t theOffset) const
 Advance by offset.
Typed operator- (const uint32_t theOffset) const
 Retreat by offset.
bool operator== (const BRepGraph_RefId &theOther) const
bool operator!= (const BRepGraph_RefId &theOther) const
bool IsRemoved (const BRepGraph &theGraph) const
 Return true if this reference entry has been soft-removed in the given graph.
bool IsOwned (const BRepGraph &theGraph) const
 Return true if this reference entry has an active owner in the given graph.

Static Public Member Functions

static Typed Start ()
 First valid id in a dense per-kind sequence.
static Typed Invalid ()
 Invalid sentinel id.
static Typed FromRefId (const BRepGraph_RefId theRefId)

Data Fields

uint32_t Index

Static Public Attributes

static constexpr uint32_t THE_START_INDEX = 0u
static constexpr uint32_t THE_INVALID_INDEX = std::numeric_limits<uint32_t>::max()

Detailed Description

template<Kind TheKind>
struct BRepGraph_RefId::Typed< TheKind >

Compile-time typed wrapper around BRepGraph_RefId.

Provides compile-time kind safety similarly to BRepGraph_NodeId::Typed.

Constructor & Destructor Documentation

◆ Typed() [1/4]

template<Kind TheKind>
BRepGraph_RefId::Typed< TheKind >::Typed ( )
inline

◆ Typed() [2/4]

template<Kind TheKind>
BRepGraph_RefId::Typed< TheKind >::Typed ( const uint32_t theIdx)
inlineexplicit

◆ Typed() [3/4]

template<Kind TheKind>
BRepGraph_RefId::Typed< TheKind >::Typed ( const BRepGraph_RefId theRefId)
inlineexplicit

Construct from an untyped reference id of the same kind.

◆ Typed() [4/4]

template<Kind TheKind>
template<Kind OtherKind, typename std::enable_if_t< OtherKind !=TheKind, int > = 0>
BRepGraph_RefId::Typed< TheKind >::Typed ( const Typed< OtherKind > & )
delete

Member Function Documentation

◆ FromRefId()

template<Kind TheKind>
Typed BRepGraph_RefId::Typed< TheKind >::FromRefId ( const BRepGraph_RefId theRefId)
inlinestatic

◆ Invalid()

template<Kind TheKind>
Typed BRepGraph_RefId::Typed< TheKind >::Invalid ( )
inlinestaticnodiscard

Invalid sentinel id.

◆ IsOwned()

template<Kind TheKind>
bool BRepGraph_RefId::Typed< TheKind >::IsOwned ( const BRepGraph & theGraph) const
inlinenodiscard

Return true if this reference entry has an active owner in the given graph.

◆ IsRemoved()

template<Kind TheKind>
bool BRepGraph_RefId::Typed< TheKind >::IsRemoved ( const BRepGraph & theGraph) const
inlinenodiscard

Return true if this reference entry has been soft-removed in the given graph.

◆ IsValid() [1/2]

template<Kind TheKind>
bool BRepGraph_RefId::Typed< TheKind >::IsValid ( ) const
inlinenodiscard

◆ IsValid() [2/2]

template<Kind TheKind>
bool BRepGraph_RefId::Typed< TheKind >::IsValid ( const uint32_t theMaxCount) const
inlinenodiscard

True if this id points to an allocated slot within [0, theMaxCount). UINT32_MAX (invalid sentinel) always fails this check for any realistic count.

◆ IsValidIn() [1/2]

template<Kind TheKind>
template<typename CountProviderT>
auto BRepGraph_RefId::Typed< TheKind >::IsValidIn ( const CountProviderT & theProvider) const -> decltype(theProvider.Nb(), bool())
inlinenodiscard

◆ IsValidIn() [2/2]

template<Kind TheKind>
template<typename CountProviderT>
auto BRepGraph_RefId::Typed< TheKind >::IsValidIn ( const CountProviderT & theProvider) const -> decltype(theProvider.Size(), bool())
inlinenodiscard

◆ operator BRepGraph_RefId()

template<Kind TheKind>
BRepGraph_RefId::Typed< TheKind >::operator BRepGraph_RefId ( ) const
inline

◆ operator!=() [1/2]

template<Kind TheKind>
bool BRepGraph_RefId::Typed< TheKind >::operator!= ( const BRepGraph_RefId & theOther) const
inline

◆ operator!=() [2/2]

template<Kind TheKind>
bool BRepGraph_RefId::Typed< TheKind >::operator!= ( const Typed< TheKind > & theOther) const
inline

◆ operator+()

template<Kind TheKind>
Typed BRepGraph_RefId::Typed< TheKind >::operator+ ( const uint32_t theOffset) const
inlinenodiscard

Advance by offset.

◆ operator++() [1/2]

template<Kind TheKind>
Typed & BRepGraph_RefId::Typed< TheKind >::operator++ ( )
inline

Pre-increment (++id).

◆ operator++() [2/2]

template<Kind TheKind>
Typed BRepGraph_RefId::Typed< TheKind >::operator++ ( int )
inline

Post-increment (id++).

◆ operator-()

template<Kind TheKind>
Typed BRepGraph_RefId::Typed< TheKind >::operator- ( const uint32_t theOffset) const
inlinenodiscard

Retreat by offset.

◆ operator<()

template<Kind TheKind>
bool BRepGraph_RefId::Typed< TheKind >::operator< ( const Typed< TheKind > & theOther) const
inline

◆ operator<=()

template<Kind TheKind>
bool BRepGraph_RefId::Typed< TheKind >::operator<= ( const Typed< TheKind > & theOther) const
inline

◆ operator==() [1/2]

template<Kind TheKind>
bool BRepGraph_RefId::Typed< TheKind >::operator== ( const BRepGraph_RefId & theOther) const
inline

◆ operator==() [2/2]

template<Kind TheKind>
bool BRepGraph_RefId::Typed< TheKind >::operator== ( const Typed< TheKind > & theOther) const
inline

◆ operator>()

template<Kind TheKind>
bool BRepGraph_RefId::Typed< TheKind >::operator> ( const Typed< TheKind > & theOther) const
inline

◆ operator>=()

template<Kind TheKind>
bool BRepGraph_RefId::Typed< TheKind >::operator>= ( const Typed< TheKind > & theOther) const
inline

◆ Start()

template<Kind TheKind>
Typed BRepGraph_RefId::Typed< TheKind >::Start ( )
inlinestaticnodiscard

First valid id in a dense per-kind sequence.

Field Documentation

◆ Index

template<Kind TheKind>
uint32_t BRepGraph_RefId::Typed< TheKind >::Index

◆ THE_INVALID_INDEX

template<Kind TheKind>
uint32_t BRepGraph_RefId::Typed< TheKind >::THE_INVALID_INDEX = std::numeric_limits<uint32_t>::max()
staticconstexpr

◆ THE_START_INDEX

template<Kind TheKind>
uint32_t BRepGraph_RefId::Typed< TheKind >::THE_START_INDEX = 0u
staticconstexpr

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