Open CASCADE Technology
7.6.0
|
Document iterator through shape nodes. More...
#include <XCAFPrs_DocumentExplorer.hxx>
string identification tools | |
Handle< XCAFDoc_ColorTool > | myColorTool |
color tool More... | |
Handle< XCAFDoc_VisMaterialTool > | myVisMatTool |
visual material tool More... | |
TDF_LabelSequence | myRoots |
sequence of root labels More... | |
TDF_LabelSequence::Iterator | myRootIter |
current root label More... | |
NCollection_Vector< XCAFPrs_DocumentNode > | myNodeStack |
node stack More... | |
Standard_Integer | myTop |
top position in the node stack More... | |
Standard_Boolean | myHasMore |
global flag indicating that iterator points to the label More... | |
XCAFPrs_Style | myDefStyle |
default style More... | |
XCAFPrs_DocumentNode | myCurrent |
current label info More... | |
XCAFPrs_DocumentExplorerFlags | myFlags |
iteration flags More... | |
static TCollection_AsciiString | DefineChildId (const TDF_Label &theLabel, const TCollection_AsciiString &theParentId) |
Construct a unique string identifier for the given label. The identifier is a concatenation of label entries (TDF_Tool::Entry() with tailing '.') of hierarchy from parent to child joined via '/' and looking like this: More... | |
static TDF_Label | FindLabelFromPathId (const Handle< TDocStd_Document > &theDocument, const TCollection_AsciiString &theId, TopLoc_Location &theParentLocation, TopLoc_Location &theLocation) |
Find a shape entity based on a text identifier constructed from OCAF labels defining full path. More... | |
static TDF_Label | FindLabelFromPathId (const Handle< TDocStd_Document > &theDocument, const TCollection_AsciiString &theId, TopLoc_Location &theLocation) |
Find a shape entity based on a text identifier constructed from OCAF labels defining full path. More... | |
static TopoDS_Shape | FindShapeFromPathId (const Handle< TDocStd_Document > &theDocument, const TCollection_AsciiString &theId) |
Find a shape entity based on a text identifier constructed from OCAF labels defining full path. More... | |
XCAFPrs_DocumentExplorer () | |
Empty constructor. More... | |
XCAFPrs_DocumentExplorer (const Handle< TDocStd_Document > &theDocument, const XCAFPrs_DocumentExplorerFlags theFlags, const XCAFPrs_Style &theDefStyle=XCAFPrs_Style()) | |
Constructor for exploring the whole document. More... | |
XCAFPrs_DocumentExplorer (const Handle< TDocStd_Document > &theDocument, const TDF_LabelSequence &theRoots, const XCAFPrs_DocumentExplorerFlags theFlags, const XCAFPrs_Style &theDefStyle=XCAFPrs_Style()) | |
Constructor for exploring specified list of root shapes in the document. More... | |
void | Init (const Handle< TDocStd_Document > &theDocument, const TDF_Label &theRoot, const XCAFPrs_DocumentExplorerFlags theFlags, const XCAFPrs_Style &theDefStyle=XCAFPrs_Style()) |
Initialize the iterator from a single root shape in the document. More... | |
void | Init (const Handle< TDocStd_Document > &theDocument, const TDF_LabelSequence &theRoots, const XCAFPrs_DocumentExplorerFlags theFlags, const XCAFPrs_Style &theDefStyle=XCAFPrs_Style()) |
Initialize the iterator from the list of root shapes in the document. More... | |
Standard_Boolean | More () const |
Return TRUE if iterator points to the valid node. More... | |
const XCAFPrs_DocumentNode & | Current () const |
Return current position. More... | |
XCAFPrs_DocumentNode & | ChangeCurrent () |
Return current position. More... | |
const XCAFPrs_DocumentNode & | Current (Standard_Integer theDepth) const |
Return current position within specified assembly depth. More... | |
Standard_Integer | CurrentDepth () const |
Return depth of the current node in hierarchy, starting from 0. Zero means Root label. More... | |
void | Next () |
Go to the next node. More... | |
const Handle< XCAFDoc_ColorTool > & | ColorTool () const |
Return color tool. More... | |
const Handle< XCAFDoc_VisMaterialTool > & | VisMaterialTool () const |
Return material tool. More... | |
void | initRoot () |
Initialize root label. More... | |
void | initCurrent (Standard_Boolean theIsAssembly) |
Initialize properties for a current label. More... | |
Document iterator through shape nodes.
XCAFPrs_DocumentExplorer::XCAFPrs_DocumentExplorer | ( | ) |
Empty constructor.
XCAFPrs_DocumentExplorer::XCAFPrs_DocumentExplorer | ( | const Handle< TDocStd_Document > & | theDocument, |
const XCAFPrs_DocumentExplorerFlags | theFlags, | ||
const XCAFPrs_Style & | theDefStyle = XCAFPrs_Style() |
||
) |
Constructor for exploring the whole document.
theDocument | document to explore |
theFlags | iteration flags |
theDefStyle | default style for nodes with undefined style |
XCAFPrs_DocumentExplorer::XCAFPrs_DocumentExplorer | ( | const Handle< TDocStd_Document > & | theDocument, |
const TDF_LabelSequence & | theRoots, | ||
const XCAFPrs_DocumentExplorerFlags | theFlags, | ||
const XCAFPrs_Style & | theDefStyle = XCAFPrs_Style() |
||
) |
Constructor for exploring specified list of root shapes in the document.
theDocument | document to explore |
theRoots | root labels to explore within specified document |
theFlags | iteration flags |
theDefStyle | default style for nodes with undefined style |
|
inline |
Return current position.
|
inline |
Return color tool.
|
inline |
Return current position.
|
inline |
Return current position within specified assembly depth.
|
inline |
Return depth of the current node in hierarchy, starting from 0. Zero means Root label.
|
static |
Construct a unique string identifier for the given label. The identifier is a concatenation of label entries (TDF_Tool::Entry() with tailing '.') of hierarchy from parent to child joined via '/' and looking like this:
This generation scheme also allows finding originating labels using TDF_Tool::Label(). The tailing dot simplifies parent equality check.
theLabel | child label to define id |
theParentId | parent string identifier defined by this method |
|
inlinestatic |
Find a shape entity based on a text identifier constructed from OCAF labels defining full path.
|
static |
Find a shape entity based on a text identifier constructed from OCAF labels defining full path.
|
static |
Find a shape entity based on a text identifier constructed from OCAF labels defining full path.
void XCAFPrs_DocumentExplorer::Init | ( | const Handle< TDocStd_Document > & | theDocument, |
const TDF_Label & | theRoot, | ||
const XCAFPrs_DocumentExplorerFlags | theFlags, | ||
const XCAFPrs_Style & | theDefStyle = XCAFPrs_Style() |
||
) |
Initialize the iterator from a single root shape in the document.
theDocument | document to explore |
theRoot | single root label to explore within specified document |
theFlags | iteration flags |
theDefStyle | default style for nodes with undefined style |
void XCAFPrs_DocumentExplorer::Init | ( | const Handle< TDocStd_Document > & | theDocument, |
const TDF_LabelSequence & | theRoots, | ||
const XCAFPrs_DocumentExplorerFlags | theFlags, | ||
const XCAFPrs_Style & | theDefStyle = XCAFPrs_Style() |
||
) |
Initialize the iterator from the list of root shapes in the document.
theDocument | document to explore |
theRoots | root labels to explore within specified document |
theFlags | iteration flags |
theDefStyle | default style for nodes with undefined style |
|
protected |
Initialize properties for a current label.
|
protected |
Initialize root label.
|
inline |
Return TRUE if iterator points to the valid node.
void XCAFPrs_DocumentExplorer::Next | ( | ) |
Go to the next node.
|
inline |
Return material tool.
|
protected |
color tool
|
protected |
current label info
|
protected |
default style
|
protected |
iteration flags
|
protected |
global flag indicating that iterator points to the label
|
protected |
node stack
|
protected |
current root label
|
protected |
sequence of root labels
|
protected |
top position in the node stack
|
protected |
visual material tool