#include <pathenvironment.h>
Public Member Functions | |
PathEnvironment () | |
Constructor. | |
virtual | ~PathEnvironment () |
void | insertPath (unsigned var, PathExpression *path) |
Inserts a new variable with its path. | |
void | print (OutputStream &dos) |
Prints all variables with their path. | |
PathExpression * | getPath (unsigned var) |
Returns the path for the entered variable. | |
PathExpression * | getPathBetween (unsigned end, unsigned start) |
Returns the path spanned between the two entered variables. | |
Private Attributes | |
PEnv | env |
The underlying map of this object. |
Represents mapping of variables to their path, which takes therefore a variable, e.g. $x
or $root
, and a PathExpression, e.g. /bib//book
or /bib/book/title
, as arguments.
Definition at line 61 of file pathenvironment.h.
PathEnvironment::PathEnvironment | ( | ) |
Constructor.
Constructor - creating object.
Definition at line 37 of file pathenvironment.cpp.
References PathExpression::addPathStep(), env, ParVarMap::getInstance(), ParVarMap::getParVar(), ParVarMap::getPath(), ParVarMap::getVarsq(), insertPath(), and TAGID_ROOT.
PathEnvironment::~PathEnvironment | ( | ) | [virtual] |
PathExpression * PathEnvironment::getPath | ( | unsigned | var | ) |
Returns the path for the entered variable.
Returns the path for the entered variable.
[in] | var | Variable for which path should be obtained. |
PathExpression* | Pointer to a PathExpression object. |
Definition at line 101 of file pathenvironment.cpp.
References env.
Referenced by getPathBetween(), and DependencyTuple::registerToPassiveProjectionTree().
PathExpression * PathEnvironment::getPathBetween | ( | unsigned | end, | |
unsigned | start | |||
) |
Returns the path spanned between the two entered variables.
Returns the path spanned between the two entered variables.
[in] | end | Variable for which path should be obtained. |
[in] | start | Variable for which path should be obtained. |
PathExpression* | Pointer to a PathExpression object. |
Definition at line 107 of file pathenvironment.cpp.
References PathExpression::addPathStep(), PathStepExpression::clone(), getPath(), PathExpression::getPathStepAt(), and PathExpression::getPathSteps().
Referenced by RoleList::getFreshRole().
void PathEnvironment::insertPath | ( | unsigned | var, | |
PathExpression * | path | |||
) |
Inserts a new variable with its path.
Inserts a new variable with its path.
[in] | var | Variable for which path holds. |
[in] | path | Pointer to a PathExpression object. |
void |
Definition at line 83 of file pathenvironment.cpp.
References env.
Referenced by PathEnvironment().
void PathEnvironment::print | ( | OutputStream & | dos | ) |
Prints all variables with their path.
Prints all variables with their path.
[in] | dos | Pointer to a OutputStream object. |
void |
Definition at line 87 of file pathenvironment.cpp.
References env, VarName::getInstance(), VarName::getVarname(), and NEWLINE.
Referenced by Executor::collectQueryInformation().
PEnv PathEnvironment::env [private] |
The underlying map of this object.
The underlying map of this object, which maps variables to their path.
Definition at line 113 of file pathenvironment.h.
Referenced by getPath(), insertPath(), PathEnvironment(), print(), and ~PathEnvironment().