ProjectionTree Class Reference

Represents the constructed projection tree. More...

#include <projectiontree.h>

Collaboration diagram for ProjectionTree:

Collaboration graph
[legend]

List of all members.

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.
ProjectionTreeNodegetRootNode ()
 Returns the root node of the projection tree.
ProjectionTreeLabelsgetLabels ()
 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

ProjectionTreeNoderoot
RoleListroleinfo
ProjectionTreeLabelslabels


Detailed Description

Represents the constructed projection tree.

Represents the constructed projection tree, which is constructed through a VariableTree and a DependencySet.

Author:
Michael Schmidt

Gunnar Jehl

Version:
2.1
License:
Software License Agreement (BSD License)

Definition at line 51 of file projectiontree.h.


Constructor & Destructor Documentation

ProjectionTree::ProjectionTree ( VariableTree _vt,
vector< DependencySet * > *  _depset 
)

Constructor.

Constructor - creating object from a VariableTree and a vector of DependencySet.

Parameters:
[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]

Destructor.

Definition at line 45 of file projectiontree.cpp.

References labels, and root.


Member Function Documentation

void ProjectionTree::createProjectionTree ( VariableTreeNode varnode,
vector< DependencySet * > *  depset 
) [private]

Creates the projection tree.

Creates the projection tree.

Parameters:
[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.
Return values:
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.

Return values:
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.

Return values:
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.

Parameters:
[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.
Return values:
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.

Note:
Apply this method after all optimization!
Return values:
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.

Parameters:
[in] dos Pointer to a OutputStream object.
Return values:
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.

Parameters:
[in] ppt Pointer to a PassiveProjectionTree object, which keeps all dropped nodes.
Return values:
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.

Parameters:
[in] ppt Pointer to a PassiveProjectionTree object, which keeps all dropped nodes.
Return values:
void 

Definition at line 66 of file projectiontree.cpp.

References ProjectionTreeNode::removeUnneededNodes(), and root.

Referenced by Executor::buildProjectionTree().


Member Data Documentation

Containing all ProjectionTreeLabels of the projection tree.

Definition at line 158 of file projectiontree.h.

Referenced by labelTree(), and ~ProjectionTree().

The list of roles containing all necessary Role information of the projection tree.

Definition at line 152 of file projectiontree.h.

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().


Generated on Sun May 24 20:20:28 2009 for G(arbage) C(ollected) X(Query) Engine by  doxygen 1.5.9