#include <variabletreenode.h>

Public Member Functions | |
| VariableTreeNode () | |
| Constructor. | |
| VariableTreeNode (VariableTreeNode *_parent, unsigned _var, bool _direct_output) | |
| Constructor. | |
| virtual | ~VariableTreeNode () |
| bool | insertNode (unsigned parent_var, unsigned introduced_var, bool direct_output) |
| Inserts a new node for a variable. | |
| void | print (OutputStream &dos) |
| Prints this single VariableTreeNode. | |
| unsigned | getVar () |
| Returns the (numeric value of a) variable of a VariableTreeNode. | |
| vector< VariableTreeNode * > * | getChildren () |
| Returns all children of a VariableTreeNode. | |
| bool | isDirectOutput () |
| Returns if the for-loop introducing the variable generates direct output. | |
Private Member Functions | |
| void | print (OutputStream &dos, unsigned indents) |
| Prints this single VariableTreeNode with whitespace indenting. | |
Private Attributes | |
| VariableTreeNode * | parent |
| The entered VariableTreeNode (parent node). | |
| unsigned | var |
| The entered variable. | |
| vector< VariableTreeNode * > | children |
| bool | direct_output |
Represents a single node of the constructed variable tree, i.e. of the constructed VariableTree, which takes a VariableTreeNode as parent node and a variable as child node of this parent node as arguments.
Definition at line 56 of file variabletreenode.h.
| VariableTreeNode::VariableTreeNode | ( | ) |
Constructor.
Constructor - creating object for variable $root.
Definition at line 37 of file variabletreenode.cpp.
Referenced by insertNode().
| VariableTreeNode::VariableTreeNode | ( | VariableTreeNode * | _parent, | |
| unsigned | _var, | |||
| bool | _direct_output | |||
| ) |
Constructor.
Constructor - creating object for a VariableTreeNode and a variable.
| [in] | _parent | Pointer to a VariableTreeNode object (parent node). |
| [in] | _var | Variable to be inserted as child node (of the entered parent node). |
| [in] | _direct_output | true if the associated for-loop directly produces output, false otherwise. |
Definition at line 41 of file variabletreenode.cpp.
| VariableTreeNode::~VariableTreeNode | ( | ) | [virtual] |
| vector< VariableTreeNode * > * VariableTreeNode::getChildren | ( | ) | [inline] |
Returns all children of a VariableTreeNode.
Returns all children of a VariableTreeNode, i.e. returns the member variable.
| vector<VariableTreeNode*>* | Pointer to a vector object containing a pointer to VariableTreeNode objects. |
Definition at line 111 of file variabletreenode.h.
Referenced by ProjectionTree::createProjectionTree().
| unsigned VariableTreeNode::getVar | ( | ) | [inline] |
Returns the (numeric value of a) variable of a VariableTreeNode.
Returns the (numeric value of a) variable of a VariableTreeNode, i.e. returns the member variable.
| unsigned | Numeric value of a variable. |
Definition at line 104 of file variabletreenode.h.
References var.
Referenced by ProjectionTree::createProjectionTree().
| bool VariableTreeNode::insertNode | ( | unsigned | parent_var, | |
| unsigned | introduced_var, | |||
| bool | direct_output | |||
| ) |
Inserts a new node for a variable.
Inserts a new node for a variable, which is appended as child of the first argument of this method.
| [in] | parent_var | Parent node of a new node. |
| [in] | introduced_var | New node or variable respectively to be inserted. |
| [in] | direct_output | true if the associated for-loop directly produces output, false otherwise. |
| bool | true if the new node was successfully inserted, false otherwise. |
Definition at line 53 of file variabletreenode.cpp.
References children, var, and VariableTreeNode().
Referenced by VariableTree::insertNode().
| bool VariableTreeNode::isDirectOutput | ( | ) | [inline] |
Returns if the for-loop introducing the variable generates direct output.
Returns if the for-loop introducing the variable generates direct output.
| bool | true if the for-loop introducing the variable generates direct output, false otherwise. |
Definition at line 121 of file variabletreenode.h.
| void VariableTreeNode::print | ( | OutputStream & | dos, | |
| unsigned | indents | |||
| ) | [private] |
Prints this single VariableTreeNode with whitespace indenting.
Prints this single VariableTreeNode with whitespace indenting.
| [in] | dos | Pointer to a OutputStream object. |
| [in] | indents | Number of whitespaces to put before output or of a VariableTreeNode respectively. |
| void |
Definition at line 79 of file variabletreenode.cpp.
References children, direct_output, VarName::getInstance(), VarName::getVarname(), incrementIndents(), NEWLINE, resetIndents(), var, and writeIndents().
| void VariableTreeNode::print | ( | OutputStream & | dos | ) |
Prints this single VariableTreeNode.
Prints this single VariableTreeNode.
| [in] | dos | Pointer to a OutputStream object. |
| void |
Definition at line 74 of file variabletreenode.cpp.
References resetIndents().
Referenced by VariableTree::print().
vector< VariableTreeNode * > VariableTreeNode::children [private] |
All child nodes of a VariableTreeNode.
Definition at line 151 of file variabletreenode.h.
Referenced by insertNode(), print(), and ~VariableTreeNode().
bool VariableTreeNode::direct_output [private] |
Indicator if the for-loop introducing the variable generates direct output.
Definition at line 157 of file variabletreenode.h.
Referenced by print().
VariableTreeNode * VariableTreeNode::parent [private] |
The entered VariableTreeNode (parent node).
The entered VariableTreeNode (parent node), which is the first argument of the constructor.
Definition at line 139 of file variabletreenode.h.
unsigned VariableTreeNode::var [private] |
The entered variable.
The entered variable, which is the second argument of the constructor and internally represented by a number.
Definition at line 145 of file variabletreenode.h.
Referenced by getVar(), insertNode(), and print().
1.5.9