#include <projectiontreelabels.h>

Public Member Functions | |
| ProjectionTreeLabels (ProjectionTreeNode *root) | |
| Constructor. | |
| virtual | ~ProjectionTreeLabels () |
| void | updateParentPredecessorInformation () |
| Brings the parent and predecessor links of the labels up to date. | |
| void | print (OutputStream &dos) |
| Prints all projection tree labels. | |
| void | getAllRecursiveDosNodeSuccessors (unsigned id, vector< unsigned > &succ) |
| Returns the ids of all dos::node() successors recursively. | |
| ProjectionTreeLabel * | getLabelById (unsigned id) |
| Returns the label by ID. | |
| unsigned | nrOfLabels () |
| Returns the number of all projection tree labels. | |
Private Member Functions | |
| ProjectionTreeLabel * | computeProjectionTreeLabels (ProjectionTreeNode *n, unsigned &id, unsigned cur_position) |
| Help function for projection tree label computation. | |
Private Attributes | |
| vector< ProjectionTreeLabel * > | labels |
Represents a dictionary that contains all ProjectionTreeLabel objects that have been extracted from the ProjectionTree.
Definition at line 50 of file projectiontreelabels.h.
| ProjectionTreeLabels::ProjectionTreeLabels | ( | ProjectionTreeNode * | root | ) |
Constructor.
Constructor - creating object for a ProjectionTreeNode.
| [in] | root | Pointer to a ProjectionTreeNode object. |
Definition at line 37 of file projectiontreelabels.cpp.
References computeProjectionTreeLabels().
| ProjectionTreeLabels::~ProjectionTreeLabels | ( | ) | [virtual] |
| ProjectionTreeLabel * ProjectionTreeLabels::computeProjectionTreeLabels | ( | ProjectionTreeNode * | n, | |
| unsigned & | id, | |||
| unsigned | cur_position | |||
| ) | [private] |
Help function for projection tree label computation.
Recursively calls itself.
| [in] | n | The parent node. |
| [in] | id | The id of the parent node. |
| [in] | cur_position | The current path step position in the current path. |
| ProjectionTreeLabel* | The label that has been set up. |
Definition at line 83 of file projectiontreelabels.cpp.
References ProjectionTreeNode::getChildren(), ProjectionTreeLabel::getChildSuccessors(), ProjectionTreeNode::getPath(), PathExpression::getPathSize(), ProjectionTreeLabel::getProjectionTreeNode(), ProjectionTreeLabel::getSelfSuccessors(), and labels.
Referenced by ProjectionTreeLabels().
| void ProjectionTreeLabels::getAllRecursiveDosNodeSuccessors | ( | unsigned | id, | |
| vector< unsigned > & | succ | |||
| ) |
Returns the ids of all dos::node() successors recursively.
Ignores all successors without dos::node() label; for suchlike successors, no further recursion is performed.
| [in] | id | The id of the token we search the dos::node() successors for. |
| [in] | succ | Collects the ids of all dos::node() successors. |
| void |
Definition at line 59 of file projectiontreelabels.cpp.
References ProjectionTreeLabel::getChildSuccessors(), ProjectionTreeLabel::getId(), getLabelById(), ProjectionTreeLabel::getSameLevelSuccessor(), and ProjectionTreeLabel::isDosNodeLabel().
Referenced by TokenConfiguration::TokenConfiguration().
| ProjectionTreeLabel * ProjectionTreeLabels::getLabelById | ( | unsigned | id | ) | [inline] |
Returns the label by ID.
Implements a straightforward dictionary lookup.
| [in] | id | The ID of the label that is requested. |
| ProjectionTreeLabel* | Pointer to the ProjectionTreeLabel with the specified ID. |
Definition at line 97 of file projectiontreelabels.h.
References labels.
Referenced by TokenConfiguration::applyTag(), TokenConfiguration::applyText(), TokenConfiguration::createRoleList(), TokenConfiguration::forceChildKeep(), getAllRecursiveDosNodeSuccessors(), TokenConfiguration::isOutput(), and TokenConfiguration::keepSubtree().
| unsigned ProjectionTreeLabels::nrOfLabels | ( | ) | [inline] |
Returns the number of all projection tree labels.
Returns the number of all projection tree labels.
| unsigned | The number of projection tree labels. |
Definition at line 104 of file projectiontreelabels.h.
Referenced by TokenConfiguration::TokenConfiguration().
| void ProjectionTreeLabels::print | ( | OutputStream & | dos | ) |
Prints all projection tree labels.
Used for debugging purpose only.
| [in] | dos | Reference to the (debug) OutputStream. |
| void |
Definition at line 53 of file projectiontreelabels.cpp.
References labels.
Referenced by Executor::buildProjectionTree().
| void ProjectionTreeLabels::updateParentPredecessorInformation | ( | ) |
Brings the parent and predecessor links of the labels up to date.
To be called once after extraction.
| void |
Definition at line 49 of file projectiontreelabels.cpp.
References labels.
Referenced by ProjectionTree::labelTree().
vector< ProjectionTreeLabel * > ProjectionTreeLabels::labels [private] |
Stores the list of all projection tree labels.
Definition at line 125 of file projectiontreelabels.h.
Referenced by computeProjectionTreeLabels(), getLabelById(), print(), updateParentPredecessorInformation(), and ~ProjectionTreeLabels().
1.5.9