![]() |
Open CASCADE Technology Reference Manual 8.0.0
|
Lightweight typed index into a per-kind representation vector inside BRepGraph. More...
#include <BRepGraph_RepId.hxx>
Data Structures | |
| struct | Typed |
| Compile-time typed wrapper around BRepGraph_RepId. More... | |
Public Types | |
| enum class | Kind : int { Surface = 0 , Curve3D = 1 , Curve2D = 2 , Triangulation = 3 , Polygon3D = 4 , Polygon2D = 5 , PolygonOnTri = 6 } |
| Categories of representation data. More... | |
Public Member Functions | |
| BRepGraph_RepId () | |
| Default: invalid RepId (Index = UINT32_MAX). RepKind is set to Kind::Surface but is meaningless when !IsValid(). | |
| BRepGraph_RepId (const Kind theKind, const uint32_t theIdx) | |
| bool | IsValid () const |
| True if this id points to an allocated representation 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(). | |
| bool | operator== (const BRepGraph_RepId &theOther) const |
| bool | operator!= (const BRepGraph_RepId &theOther) const |
| bool | operator< (const BRepGraph_RepId &theOther) const |
| BRepGraph_RepId & | operator++ () |
| Pre-increment (++id). | |
| BRepGraph_RepId | operator++ (int) |
| Post-increment (id++). | |
| BRepGraph_RepId | operator+ (const uint32_t theOffset) const |
| Advance by offset. | |
| BRepGraph_RepId | operator- (const uint32_t theOffset) const |
| Retreat by offset. | |
Static Public Member Functions | |
| static bool | IsGeometryKind (const Kind theKind) |
| True if the kind is a geometry kind (Surface, Curve3D, Curve2D). | |
| static bool | IsMeshKind (const Kind theKind) |
| True if the kind is a mesh kind (Triangulation, Polygon3D, Polygon2D, PolygonOnTri). | |
| static BRepGraph_RepId | Start (const Kind theKind) |
| First valid id in a dense sequence for the specified kind. | |
| static BRepGraph_RepId | Invalid (const Kind theKind=Kind::Surface) |
| Invalid sentinel id for the specified kind. | |
| template<typename FuncT > | |
| static auto | Visit (const BRepGraph_RepId theRepId, FuncT &&theFunc) -> decltype(std::forward< FuncT >(theFunc)(Typed< Kind::Surface >())) |
| Dispatch a generic rep id to a callable taking the matching typed rep id. | |
Data Fields | |
| Kind | RepKind |
| 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 representation vector inside BRepGraph.
The pair (Kind, Index) forms a unique representation identifier within one graph instance. Default-constructed RepId has Index = UINT32_MAX (invalid).
Representations are NOT topology nodes - they hold geometry or mesh data referenced by topology entities. They do not participate in BFS traversal, reverse index, or parent-child relationships.
RepId is a value type: cheap to copy, compare, hash.
|
strong |
Categories of representation data.
| Enumerator | |
|---|---|
| Surface | Geom_Surface for faces. |
| Curve3D | Geom_Curve for edges. |
| Curve2D | Geom2d_Curve for coedges (PCurve geometry) |
| Triangulation | Poly_Triangulation for faces. |
| Polygon3D | Poly_Polygon3D for edges. |
| Polygon2D | Poly_Polygon2D for coedges (polygon-on-surface) |
| PolygonOnTri | Poly_PolygonOnTriangulation for coedges. |
|
inline |
Default: invalid RepId (Index = UINT32_MAX). RepKind is set to Kind::Surface but is meaningless when !IsValid().
|
inlinestatic |
Invalid sentinel id for the specified kind.
True if the kind is a geometry kind (Surface, Curve3D, Curve2D).
True if the kind is a mesh kind (Triangulation, Polygon3D, Polygon2D, PolygonOnTri).
|
inline |
True if this id points to an allocated representation slot.
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 |
True if this id is within the dense range exposed by a provider with Nb().
|
inline |
True if this id is within the dense range exposed by a provider with Size().
|
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 rep id to a callable taking the matching typed rep id.
| uint32_t BRepGraph_RepId::Index |
| Kind BRepGraph_RepId::RepKind |
|
staticconstexpr |