![]() |
Open CASCADE Technology Reference Manual 8.0.2
|
Compile-time typed wrapper around BRepGraph_NodeId. More...
#include <BRepGraph_NodeId.hxx>
Public Member Functions | |
| Typed () | |
| Default: invalid (Index = UINT32_MAX). | |
| Typed (const uint32_t theIdx) | |
| Construct from index. | |
| Typed (const BRepGraph_NodeId theId) | |
| Construct from an untyped node 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 |
| True if this id points to an allocated node slot. | |
| 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()) |
| True if this id is within the dense range exposed by a provider with Nb(). | |
| template<typename CountProviderT> | |
| auto | IsValidIn (const CountProviderT &theProvider) const -> decltype(theProvider.Size(), bool()) |
| True if this id is within the dense range exposed by a provider with Size(). | |
| operator BRepGraph_NodeId () const | |
| Implicit conversion to untyped NodeId. | |
| 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_NodeId &theOther) const |
| Comparison with untyped NodeId (checks both Kind and Index). | |
| bool | operator!= (const BRepGraph_NodeId &theOther) const |
| bool | IsRemoved (const BRepGraph &theGraph) const |
| Return true if this node has been soft-removed in the given graph. | |
| bool | IsOwned (const BRepGraph &theGraph) const |
| Return true if this node 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 | FromNodeId (const BRepGraph_NodeId theId) |
| Explicit conversion from untyped NodeId. Asserts that the Kind matches in debug builds. | |
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() |
Compile-time typed wrapper around BRepGraph_NodeId.
Provides compile-time kind safety: a Typed<Kind::Face> cannot be accidentally used where a Typed<Kind::Edge> is expected. Implicitly converts to BRepGraph_NodeId for API continuity.
| TheKind | the BRepGraph_NodeId::Kind this typed id represents |
|
inline |
Default: invalid (Index = UINT32_MAX).
|
inlineexplicit |
Construct from index.
|
inlineexplicit |
Construct from an untyped node id of the same kind.
|
delete |
|
inlinestatic |
Explicit conversion from untyped NodeId. Asserts that the Kind matches in debug builds.
| [in] | theId | untyped NodeId to convert |
|
inlinestaticnodiscard |
Invalid sentinel id.
|
inlinenodiscard |
Return true if this node has an active owner in the given graph.
|
inlinenodiscard |
Return true if this node has been soft-removed in the given graph.
|
inlinenodiscard |
True if this id points to an allocated node slot.
|
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.
|
inlinenodiscard |
True if this id is within the dense range exposed by a provider with Nb().
|
inlinenodiscard |
True if this id is within the dense range exposed by a provider with Size().
|
inline |
Implicit conversion to untyped NodeId.
|
inline |
|
inline |
|
inlinenodiscard |
Advance by offset.
|
inline |
Pre-increment (++id).
|
inline |
Post-increment (id++).
|
inlinenodiscard |
Retreat by offset.
|
inline |
|
inline |
|
inline |
Comparison with untyped NodeId (checks both Kind and Index).
|
inline |
|
inline |
|
inline |
|
inlinestaticnodiscard |
First valid id in a dense per-kind sequence.
| uint32_t BRepGraph_NodeId::Typed< TheKind >::Index |
|
staticconstexpr |
|
staticconstexpr |