![]() |
Open CASCADE Technology Reference Manual 8.0.1
|
Explicit identity of a concrete usage from traversal root to selected node. More...
#include <BRepGraph_UsagePath.hxx>
Data Structures | |
| struct | Step |
| One concrete traversal step in a usage path. More... | |
Public Member Functions | |
| BRepGraph_UsagePath ()=default | |
| Creates an empty usage path. | |
| BRepGraph_UsagePath (const size_t theCapacity) | |
| Creates a usage path with pre-allocated capacity. | |
| size_t | Size () const |
| Returns the number of steps in the path. | |
| bool | IsEmpty () const |
| Returns true if the path has no steps. | |
| const Step & | Value (const size_t theIdx) const |
| Returns the step at the given index. | |
| const Step & | First () const |
| Returns the first step in the path. | |
| const Step & | Last () const |
| Returns the last step in the path. | |
| void | Append (Step theStep) |
| Appends a step to the end of the path. | |
| void | InsertBefore (const size_t theIdx, Step theStep) |
| Inserts a step before the given index. | |
| void | Clear () |
| Removes all steps from the path. | |
| bool | IsEqual (const BRepGraph_UsagePath &theOther) const |
| Returns true if this path is equal to the other path. | |
| bool | operator== (const BRepGraph_UsagePath &theOther) const |
| Returns true if this path is equal to the other path. | |
| size_t | HashCode () const |
| Returns a hash code for this path. Uses first step, last step, and size for O(1) computation. | |
Explicit identity of a concrete usage from traversal root to selected node.
A usage path is an ordered sequence of steps that records the exact traversal from a root node down to a specific graph entity. Each step captures the node reached, the reference through which it was reached, and the sibling order (step index) at that level.
Paths are used to disambiguate multiple occurrences of the same definition reachable through different references or sibling positions.
|
default |
Creates an empty usage path.
|
inlineexplicit |
Creates a usage path with pre-allocated capacity.
| [in] | theCapacity | number of steps to pre-allocate |
Appends a step to the end of the path.
| [in] | theStep | step to append |
|
inline |
Removes all steps from the path.
|
inline |
Returns the first step in the path.
| size_t BRepGraph_UsagePath::HashCode | ( | ) | const |
Returns a hash code for this path. Uses first step, last step, and size for O(1) computation.
Inserts a step before the given index.
| [in] | theIdx | zero-based index to insert before |
| [in] | theStep | step to insert |
|
inline |
Returns true if the path has no steps.
| bool BRepGraph_UsagePath::IsEqual | ( | const BRepGraph_UsagePath & | theOther | ) | const |
Returns true if this path is equal to the other path.
| [in] | theOther | path to compare with |
|
inline |
Returns the last step in the path.
|
inline |
Returns true if this path is equal to the other path.
| [in] | theOther | path to compare with |
|
inline |
Returns the number of steps in the path.
Returns the step at the given index.
| [in] | theIdx | zero-based index |