#include <passiveprojectiontreenode.h>
Public Member Functions | |
PassiveProjectionTreeNode () | |
Constructor. | |
PassiveProjectionTreeNode (PassiveProjectionTreeNode *_parent, PathStepExpression *_label) | |
Constructor. | |
virtual | ~PassiveProjectionTreeNode () |
void | registerPath (PathExpression *path, unsigned pos) |
Registers a path to the passive projection tree node. | |
void | print (OutputStream &dos) |
Prints the path expression node. | |
PassiveProjectionTreeNode * | getParent () |
Returns the parent of this passive projection tree node. | |
vector < PassiveProjectionTreeNode * > * | getChildren () |
Returns the children of this PassiveProjectionTreeNode. | |
PathStepExpression * | getLabel () |
Returns the label of the passive projection tree node. | |
Private Member Functions | |
void | print (OutputStream &dos, unsigned indents) |
Prints the path expression node fixed indent. | |
Private Attributes | |
PassiveProjectionTreeNode * | parent |
Pointer to the parent of this passive projection tree node. | |
PathStepExpression * | label |
The path step expression associated with this node. | |
vector < PassiveProjectionTreeNode * > | children |
Each node in the passive projection tree describes exactly one path step (i.e., is labeled with a path step or NULL, for the root).
Definition at line 54 of file passiveprojectiontreenode.h.
PassiveProjectionTreeNode::PassiveProjectionTreeNode | ( | ) |
Constructor.
Constructor - creating object for the root node.
Definition at line 37 of file passiveprojectiontreenode.cpp.
Referenced by registerPath().
PassiveProjectionTreeNode::PassiveProjectionTreeNode | ( | PassiveProjectionTreeNode * | _parent, | |
PathStepExpression * | _label | |||
) |
Constructor.
Constructor - creating object for a labeled passive projection tree node.
[in] | _parent | The designated parent of this node. |
[in] | _label | The designated label of this node. |
Definition at line 41 of file passiveprojectiontreenode.cpp.
PassiveProjectionTreeNode::~PassiveProjectionTreeNode | ( | ) | [virtual] |
Destructor.
Definition at line 45 of file passiveprojectiontreenode.cpp.
vector< PassiveProjectionTreeNode * > * PassiveProjectionTreeNode::getChildren | ( | ) | [inline] |
Returns the children of this PassiveProjectionTreeNode.
The children are all stored in member childre.
vector<PassiveProjectionTreeNode*>* | Pointer to the vector containing the children of the curren PassiveProjectionTreeNode. |
Definition at line 106 of file passiveprojectiontreenode.h.
Referenced by PassiveProjectionTreeConfiguration::applyTag().
PathStepExpression * PassiveProjectionTreeNode::getLabel | ( | ) | [inline] |
Returns the label of the passive projection tree node.
Note that the label of the root node is NULL.
PathStepExpression* | Pointer to the PathStepExpression label. |
Definition at line 115 of file passiveprojectiontreenode.h.
References label.
Referenced by PassiveProjectionTreeConfiguration::applyTag().
PassiveProjectionTreeNode * PassiveProjectionTreeNode::getParent | ( | ) | [inline] |
Returns the parent of this passive projection tree node.
Returns NULL for the root node.
PassiveProjectionTreeNode* | Pointer to the parent node of the current ProjectionTreeNode, if it exists, NULL otherwise. |
Definition at line 98 of file passiveprojectiontreenode.h.
References parent.
void PassiveProjectionTreeNode::print | ( | OutputStream & | dos, | |
unsigned | indents | |||
) | [private] |
Prints the path expression node fixed indent.
Help function of public print() method.
[in] | dos | Refernece to the (debug) OutputStream. |
[in] | indents | Number of indent characters. |
void |
Definition at line 87 of file passiveprojectiontreenode.cpp.
References children, incrementIndents(), label, NEWLINE, resetIndents(), and writeIndents().
void PassiveProjectionTreeNode::print | ( | OutputStream & | dos | ) |
Prints the path expression node.
This method is for debugging purpose only.
[in] | dos | Reference to the (debug) OutputStream. |
void |
Definition at line 82 of file passiveprojectiontreenode.cpp.
References resetIndents().
Referenced by PassiveProjectionTree::print().
void PassiveProjectionTreeNode::registerPath | ( | PathExpression * | path, | |
unsigned | pos | |||
) |
Registers a path to the passive projection tree node.
The path is automatically inserted at the right position.
[in] | path | The path to be registered. |
[in] | pos | The current position within the path |
void |
Definition at line 52 of file passiveprojectiontreenode.cpp.
References children, PathExpression::getPathStepAt(), PathStepExpression::isSyntacticallyEqualTo(), PassiveProjectionTreeNode(), and registerPath().
Referenced by registerPath(), and PassiveProjectionTree::registerPath().
vector< PassiveProjectionTreeNode * > PassiveProjectionTreeNode::children [private] |
The children of this passive projection tree node.
Definition at line 145 of file passiveprojectiontreenode.h.
Referenced by print(), registerPath(), and ~PassiveProjectionTreeNode().
PathStepExpression * PassiveProjectionTreeNode::label [private] |
The path step expression associated with this node.
Is NULL for the root node.
Definition at line 139 of file passiveprojectiontreenode.h.
Referenced by getLabel(), print(), and ~PassiveProjectionTreeNode().
Pointer to the parent of this passive projection tree node.
Is NULL for the root node.
Definition at line 133 of file passiveprojectiontreenode.h.
Referenced by getParent().