OCCT3D About OCCT
Open CASCADE Technology Reference Manual 8.0.1
Loading...
Searching...
No Matches
Data Structures | Public Member Functions
BRepGraph_UsagePath Class Reference

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 StepValue (const size_t theIdx) const
 Returns the step at the given index.
 
const StepFirst () const
 Returns the first step in the path.
 
const StepLast () 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.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ BRepGraph_UsagePath() [1/2]

BRepGraph_UsagePath::BRepGraph_UsagePath ( )
default

Creates an empty usage path.

◆ BRepGraph_UsagePath() [2/2]

BRepGraph_UsagePath::BRepGraph_UsagePath ( const size_t theCapacity)
inlineexplicit

Creates a usage path with pre-allocated capacity.

Parameters
[in]theCapacitynumber of steps to pre-allocate

Member Function Documentation

◆ Append()

void BRepGraph_UsagePath::Append ( Step theStep)
inline

Appends a step to the end of the path.

Parameters
[in]theStepstep to append

◆ Clear()

void BRepGraph_UsagePath::Clear ( )
inline

Removes all steps from the path.

◆ First()

const Step & BRepGraph_UsagePath::First ( ) const
inline

Returns the first step in the path.

◆ HashCode()

size_t BRepGraph_UsagePath::HashCode ( ) const

Returns a hash code for this path. Uses first step, last step, and size for O(1) computation.

◆ InsertBefore()

void BRepGraph_UsagePath::InsertBefore ( const size_t theIdx,
Step theStep )
inline

Inserts a step before the given index.

Parameters
[in]theIdxzero-based index to insert before
[in]theStepstep to insert

◆ IsEmpty()

bool BRepGraph_UsagePath::IsEmpty ( ) const
inline

Returns true if the path has no steps.

◆ IsEqual()

bool BRepGraph_UsagePath::IsEqual ( const BRepGraph_UsagePath & theOther) const

Returns true if this path is equal to the other path.

Parameters
[in]theOtherpath to compare with

◆ Last()

const Step & BRepGraph_UsagePath::Last ( ) const
inline

Returns the last step in the path.

◆ operator==()

bool BRepGraph_UsagePath::operator== ( const BRepGraph_UsagePath & theOther) const
inline

Returns true if this path is equal to the other path.

Parameters
[in]theOtherpath to compare with

◆ Size()

size_t BRepGraph_UsagePath::Size ( ) const
inline

Returns the number of steps in the path.

◆ Value()

const Step & BRepGraph_UsagePath::Value ( const size_t theIdx) const
inline

Returns the step at the given index.

Parameters
[in]theIdxzero-based index

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