Open CASCADE Technology  7.7.0
Data Structures | Public Member Functions
XCAFDoc_AssemblyItemId Class Reference

Unique item identifier in the hierarchical product structure. A full path to an assembly component in the "part-of" graph starting from the root node. More...

#include <XCAFDoc_AssemblyItemId.hxx>

Data Structures

struct  Hasher
 

Public Member Functions

 XCAFDoc_AssemblyItemId ()
 Constructs an empty item ID. More...
 
 XCAFDoc_AssemblyItemId (const TColStd_ListOfAsciiString &thePath)
 Constructs an item ID from a list of strings, where every string is a label entry. More...
 
 XCAFDoc_AssemblyItemId (const TCollection_AsciiString &theString)
 Constructs an item ID from a formatted path, where label entries are separated by '/' symbol. More...
 
void Init (const TColStd_ListOfAsciiString &thePath)
 Initializes the item ID from a list of strings, where every string is a label entry. More...
 
void Init (const TCollection_AsciiString &theString)
 Initializes the item ID from a formatted path, where label entries are separated by '/' symbol. More...
 
Standard_Boolean IsNull () const
 Returns true if the full path is empty, otherwise - false. More...
 
void Nullify ()
 Clears the full path. More...
 
Standard_Boolean IsChild (const XCAFDoc_AssemblyItemId &theOther) const
 Checks if this item is a child of the given item. More...
 
Standard_Boolean IsDirectChild (const XCAFDoc_AssemblyItemId &theOther) const
 Checks if this item is a direct child of the given item. More...
 
Standard_Boolean IsEqual (const XCAFDoc_AssemblyItemId &theOther) const
 Checks for item IDs equality. More...
 
const TColStd_ListOfAsciiStringGetPath () const
 Returns the full path as a list of label entries. More...
 
TCollection_AsciiString ToString () const
 Returns the full pass as a formatted string. More...
 
virtual void DumpJson (Standard_OStream &theOStream, Standard_Integer theDepth=-1) const
 Dumps the content of me into the stream. More...
 

Detailed Description

Unique item identifier in the hierarchical product structure. A full path to an assembly component in the "part-of" graph starting from the root node.

Constructor & Destructor Documentation

◆ XCAFDoc_AssemblyItemId() [1/3]

XCAFDoc_AssemblyItemId::XCAFDoc_AssemblyItemId ( )

Constructs an empty item ID.

◆ XCAFDoc_AssemblyItemId() [2/3]

XCAFDoc_AssemblyItemId::XCAFDoc_AssemblyItemId ( const TColStd_ListOfAsciiString thePath)

Constructs an item ID from a list of strings, where every string is a label entry.

Parameters
[in]thePath- list of label entries.

◆ XCAFDoc_AssemblyItemId() [3/3]

XCAFDoc_AssemblyItemId::XCAFDoc_AssemblyItemId ( const TCollection_AsciiString theString)

Constructs an item ID from a formatted path, where label entries are separated by '/' symbol.

Parameters
[in]theString- formatted full path.

Member Function Documentation

◆ DumpJson()

virtual void XCAFDoc_AssemblyItemId::DumpJson ( Standard_OStream theOStream,
Standard_Integer  theDepth = -1 
) const
virtual

Dumps the content of me into the stream.

◆ GetPath()

const TColStd_ListOfAsciiString& XCAFDoc_AssemblyItemId::GetPath ( ) const

Returns the full path as a list of label entries.

◆ Init() [1/2]

void XCAFDoc_AssemblyItemId::Init ( const TColStd_ListOfAsciiString thePath)

Initializes the item ID from a list of strings, where every string is a label entry.

Parameters
[in]thePath- list of label entries.

◆ Init() [2/2]

void XCAFDoc_AssemblyItemId::Init ( const TCollection_AsciiString theString)

Initializes the item ID from a formatted path, where label entries are separated by '/' symbol.

Parameters
[in]theString- formatted full path.

◆ IsChild()

Standard_Boolean XCAFDoc_AssemblyItemId::IsChild ( const XCAFDoc_AssemblyItemId theOther) const

Checks if this item is a child of the given item.

Parameters
[in]theOther- potentially ancestor item.
Returns
true if the item is a child of theOther item, otherwise - false.

◆ IsDirectChild()

Standard_Boolean XCAFDoc_AssemblyItemId::IsDirectChild ( const XCAFDoc_AssemblyItemId theOther) const

Checks if this item is a direct child of the given item.

Parameters
[in]theOther- potentially parent item.
Returns
true if the item is a direct child of theOther item, otherwise - false.

◆ IsEqual()

Standard_Boolean XCAFDoc_AssemblyItemId::IsEqual ( const XCAFDoc_AssemblyItemId theOther) const

Checks for item IDs equality.

Parameters
[in]theOther- the item ID to check equality with.
Returns
true if this ID is equal to theOther, otherwise - false.

◆ IsNull()

Standard_Boolean XCAFDoc_AssemblyItemId::IsNull ( ) const

Returns true if the full path is empty, otherwise - false.

◆ Nullify()

void XCAFDoc_AssemblyItemId::Nullify ( )

Clears the full path.

◆ ToString()

TCollection_AsciiString XCAFDoc_AssemblyItemId::ToString ( ) const

Returns the full pass as a formatted string.


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