Provides generic methods for traversing assembly tree and graph.
More...
#include <XCAFDoc_AssemblyTool.hxx>
|
| template<typename Func > |
| static void | Traverse (XCAFDoc_AssemblyIterator theIterator, Func theFunc) |
| | Generic method for traversing assembly tree. Performs in-depth traversing of the assembly tree and calls user defined function for each assembly tree node. User function takes single argument of XCAFDoc_AssemblyItemId type and returns true/false to continue/break.
|
| |
| template<typename Func , typename Filter > |
| static void | Traverse (const occ::handle< XCAFDoc_AssemblyGraph > &theGraph, Filter theFilter, Func theFunc, const int theNode=1) |
| | Generic method for traversing assembly graph. Performs in-depth traversing of the assembly graph beginning from root nodes and calls user defined function for each assembly graph node accepted by the user defined filtering function. Filtering function takes the assembly graph passed for traversing, current graph node ID and returns true/false to accept/reject node.
|
| |
Provides generic methods for traversing assembly tree and graph.
◆ Traverse() [1/2]
Generic method for traversing assembly graph. Performs in-depth traversing of the assembly graph beginning from root nodes and calls user defined function for each assembly graph node accepted by the user defined filtering function. Filtering function takes the assembly graph passed for traversing, current graph node ID and returns true/false to accept/reject node.
const int theNode)
{
}
STL input iterator that wraps an OCCT More()/Next() iterator.
Definition NCollection_ForwardRange.hxx:142
@ NodeType_Part
Leaf node to represent parts.
Definition XCAFDoc_AssemblyGraph.hxx:40
Intrusive smart pointer for use with Standard_Transient class and its descendants.
Definition Standard_Handle.hxx:54
User function theFunc takes the assembly graph passed for traversing, current graph node ID and returns true/false to continue/break.
- Parameters
-
| [in] | theGraph | - assembly graph. |
| [in] | theFilter | - user filtering function called for each assembly graph node. |
| [in] | theFunc | - user function called for accepted assembly graph node. |
| [in] | theNode | - starting positive one-based graph node ID. |
◆ Traverse() [2/2]
Generic method for traversing assembly tree. Performs in-depth traversing of the assembly tree and calls user defined function for each assembly tree node. User function takes single argument of XCAFDoc_AssemblyItemId type and returns true/false to continue/break.
{
std::cout << theItem.
ToString() << std::endl;
return true;
}
Unique item identifier in the hierarchical product structure. A full path to an assembly component in...
Definition XCAFDoc_AssemblyItemId.hxx:27
TCollection_AsciiString ToString() const
Returns the full pass as a formatted string.
- Parameters
-
| [in] | theIterator | - starting position in the assembly tree. |
| [in] | theFunc | - user function called for each assembly tree node. |
The documentation for this class was generated from the following file: