#include <projectiontree.h>
Public Member Functions | |
ProjectionTree (VariableTree *_vt, vector< DependencySet * > *_depset) | |
Constructor. | |
virtual | ~ProjectionTree () |
void | insertNode (int parent_var, int introduced_var, PathExpression *path, bool dep, Role *role, bool direct_output) |
Inserts a new node into the projection tree. | |
void | print (OutputStream &dos) |
Prints the complete projection tree. | |
ProjectionTreeNode * | getRootNode () |
Returns the root node of the projection tree. | |
ProjectionTreeLabels * | getLabels () |
Returns the labels of the projection tree. | |
void | labelTree () |
Labels the whole projection tree. | |
void | removeUnneededNodes (PassiveProjectionTree *ppt) |
Removes all unneeded nodes in the projection tree. | |
void | removeRedundantRoles (PassiveProjectionTree *ppt) |
Removes all redundant roles/nodes in the projection tree. | |
Private Member Functions | |
void | createProjectionTree (VariableTreeNode *varnode, vector< DependencySet * > *depset) |
Creates the projection tree. | |
Private Attributes | |
ProjectionTreeNode * | root |
RoleList * | roleinfo |
ProjectionTreeLabels * | labels |
Represents the constructed projection tree, which is constructed through a VariableTree and a DependencySet.
Definition at line 51 of file projectiontree.h.
ProjectionTree::ProjectionTree | ( | VariableTree * | _vt, | |
vector< DependencySet * > * | _depset | |||
) |
Constructor.
Constructor - creating object from a VariableTree and a vector of DependencySet.
[in] | _vt | Pointer to a VariableTree object. |
[in] | _depset | Pointer to a vector containing pointers to all DependencySet objects. |
Definition at line 37 of file projectiontree.cpp.
References createProjectionTree(), and VariableTree::getRootNode().
ProjectionTree::~ProjectionTree | ( | ) | [virtual] |
void ProjectionTree::createProjectionTree | ( | VariableTreeNode * | varnode, | |
vector< DependencySet * > * | depset | |||
) | [private] |
Creates the projection tree.
Creates the projection tree.
[in] | varnode | Pointer to a VariableTreeNode object (root node of the variable tree). |
[in] | depset | Pointer to a vector containing pointers to all DependencySet objects. |
void |
Definition at line 74 of file projectiontree.cpp.
References VariableTreeNode::getChildren(), RoleList::getFreshRole(), RoleList::getInstance(), ParVarMap::getInstance(), ParVarMap::getParVar(), ParVarMap::getPath(), VariableTreeNode::getVar(), insertNode(), and TAGID_ROOT.
Referenced by ProjectionTree().
ProjectionTreeLabels * ProjectionTree::getLabels | ( | ) | [inline] |
Returns the labels of the projection tree.
Returns the labels of the projection tree, i.e. returns the member variable.
ProjectionTreeLabels* | Pointer to a ProjectionTreeLabels object. |
Definition at line 103 of file projectiontree.h.
Referenced by Executor::buildProjectionTree().
ProjectionTreeNode * ProjectionTree::getRootNode | ( | ) | [inline] |
Returns the root node of the projection tree.
Returns the root node of the projection tree, i.e. returns the member variable.
ProjectionTreeNode* | Pointer to a ProjectionTreeNode object. |
Definition at line 96 of file projectiontree.h.
References root.
void ProjectionTree::insertNode | ( | int | parent_var, | |
int | introduced_var, | |||
PathExpression * | path, | |||
bool | dep, | |||
Role * | role, | |||
bool | direct_output | |||
) |
Inserts a new node into the projection tree.
Inserts a new node into the projection tree, which is appended as child of the first argument of this method.
[in] | parent_var | Parent node of the new node. |
[in] | introduced_var | New node or variable respectively to be inserted. |
[in] | path | Pointer to a PathExpression object, which is linked to the variable. |
[in] | dep | Indicator if new node or variable respectively derives from a dependency, i.e. true if it derives from a DependencySet, false otherwise. |
[in] | role | Pointer to a Role object, which is associated with this new node or variable respectively. |
[in] | direct_output | Indicator if new node or variable respectively has direct output in its corresponding ForExpression, i.e. true if direct output is present, false otherwise. |
void |
Definition at line 50 of file projectiontree.cpp.
References ProjectionTreeNode::insertNode(), and root.
Referenced by createProjectionTree().
void ProjectionTree::labelTree | ( | ) |
Labels the whole projection tree.
Labels the whole projection tree.
void |
Definition at line 61 of file projectiontree.cpp.
References labels, root, and ProjectionTreeLabels::updateParentPredecessorInformation().
Referenced by Executor::buildProjectionTree().
void ProjectionTree::print | ( | OutputStream & | dos | ) |
Prints the complete projection tree.
Prints the complete projection tree.
[in] | dos | Pointer to a OutputStream object. |
void |
Definition at line 57 of file projectiontree.cpp.
References ProjectionTreeNode::print(), and root.
Referenced by Executor::buildProjectionTree().
void ProjectionTree::removeRedundantRoles | ( | PassiveProjectionTree * | ppt | ) |
Removes all redundant roles/nodes in the projection tree.
Removes all redundant roles/nodes in the projection tree.
[in] | ppt | Pointer to a PassiveProjectionTree object, which keeps all dropped nodes. |
void |
Definition at line 70 of file projectiontree.cpp.
References ProjectionTreeNode::removeRedundantRoles(), and root.
Referenced by Executor::buildProjectionTree().
void ProjectionTree::removeUnneededNodes | ( | PassiveProjectionTree * | ppt | ) |
Removes all unneeded nodes in the projection tree.
Removes all unneeded nodes in the projection tree.
[in] | ppt | Pointer to a PassiveProjectionTree object, which keeps all dropped nodes. |
void |
Definition at line 66 of file projectiontree.cpp.
References ProjectionTreeNode::removeUnneededNodes(), and root.
Referenced by Executor::buildProjectionTree().
ProjectionTreeLabels * ProjectionTree::labels [private] |
Containing all ProjectionTreeLabels of the projection tree.
Definition at line 158 of file projectiontree.h.
Referenced by labelTree(), and ~ProjectionTree().
RoleList * ProjectionTree::roleinfo [private] |
The list of roles containing all necessary Role information of the projection tree.
Definition at line 152 of file projectiontree.h.
ProjectionTreeNode * ProjectionTree::root [private] |
The root node of the projection tree.
Definition at line 146 of file projectiontree.h.
Referenced by getRootNode(), insertNode(), labelTree(), print(), removeRedundantRoles(), removeUnneededNodes(), and ~ProjectionTree().