![]() |
Open CASCADE Technology Reference Manual 8.0.0
|
Lightweight typed index into a per-kind reference vector inside BRepGraph. More...
#include <BRepGraph_RefId.hxx>
Data Structures | |
| struct | Typed |
| Compile-time typed wrapper around BRepGraph_RefId. More... | |
Public Types | |
| enum class | Kind : int { Shell = 0 , Face = 1 , Wire = 2 , CoEdge = 3 , Vertex = 4 , Solid = 5 , Child = 6 , Occurrence = 7 } |
| Enumeration of supported topology reference kinds. More... | |
Public Member Functions | |
| BRepGraph_RefId () | |
| BRepGraph_RefId (const Kind theKind, const uint32_t theIdx) | |
| 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()) |
| bool | operator== (const BRepGraph_RefId &theOther) const |
| bool | operator!= (const BRepGraph_RefId &theOther) const |
| bool | operator< (const BRepGraph_RefId &theOther) const |
| BRepGraph_RefId & | operator++ () |
| Pre-increment (++id). | |
| BRepGraph_RefId | operator++ (int) |
| Post-increment (id++). | |
| BRepGraph_RefId | operator+ (const uint32_t theOffset) const |
| Advance by offset. | |
| BRepGraph_RefId | operator- (const uint32_t theOffset) const |
| Retreat by offset. | |
Static Public Member Functions | |
| static bool | IsTopologyRefKind (const Kind theKind) |
| static BRepGraph_RefId | Start (const Kind theKind) |
| First valid id in a dense sequence for the specified kind. | |
| static BRepGraph_RefId | Invalid (const Kind theKind=Kind::Shell) |
| Invalid sentinel id for the specified kind. | |
| template<typename FuncT > | |
| static auto | Visit (const BRepGraph_RefId theRefId, FuncT &&theFunc) -> decltype(std::forward< FuncT >(theFunc)(Typed< Kind::Shell >())) |
| Dispatch a generic ref id to a callable taking the matching typed ref id. | |
Data Fields | |
| Kind | RefKind |
| 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() |
Lightweight typed index into a per-kind reference vector inside BRepGraph.
The pair (Kind, Index) forms a unique reference identifier within one graph instance. Default-constructed RefId has Index = UINT32_MAX (invalid).
|
strong |
Enumeration of supported topology reference kinds.
|
inline |
|
inlinestatic |
Invalid sentinel id for the specified kind.
|
inline |
True if this id points to an allocated slot within [0, theMaxCount). UINT32_MAX (invalid sentinel) always fails this check for any realistic count.
|
inline |
|
inline |
|
inline |
|
inline |
Advance by offset.
|
inline |
Pre-increment (++id).
|
inline |
Post-increment (id++).
|
inline |
Retreat by offset.
|
inline |
|
inline |
|
inlinestatic |
First valid id in a dense sequence for the specified kind.
|
inlinestatic |
Dispatch a generic ref id to a callable taking the matching typed ref id.
| uint32_t BRepGraph_RefId::Index |
| Kind BRepGraph_RefId::RefKind |
|
staticconstexpr |