PathEnvironment Class Reference

Represents mapping of variables to their path. More...

#include <pathenvironment.h>

Collaboration diagram for PathEnvironment:

Collaboration graph
[legend]

List of all members.

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.
PathExpressiongetPath (unsigned var)
 Returns the path for the entered variable.
PathExpressiongetPathBetween (unsigned end, unsigned start)
 Returns the path spanned between the two entered variables.

Private Attributes

PEnv env
 The underlying map of this object.


Detailed Description

Represents mapping of variables to their path.

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.

Note:
Variables are internally represented by numbers!
Author:
Michael Schmidt

Gunnar Jehl

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

Definition at line 61 of file pathenvironment.h.


Constructor & Destructor Documentation

PathEnvironment::PathEnvironment (  ) 

PathEnvironment::~PathEnvironment (  )  [virtual]

Destructor.

Definition at line 72 of file pathenvironment.cpp.

References env.


Member Function Documentation

PathExpression * PathEnvironment::getPath ( unsigned  var  ) 

Returns the path for the entered variable.

Returns the path for the entered variable.

Parameters:
[in] var Variable for which path should be obtained.
Return values:
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.

Parameters:
[in] end Variable for which path should be obtained.
[in] start Variable for which path should be obtained.
Return values:
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.

Parameters:
[in] var Variable for which path holds.
[in] path Pointer to a PathExpression object.
Return values:
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.

Parameters:
[in] dos Pointer to a OutputStream object.
Return values:
void 

Definition at line 87 of file pathenvironment.cpp.

References env, VarName::getInstance(), VarName::getVarname(), and NEWLINE.

Referenced by Executor::collectQueryInformation().


Member Data Documentation

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


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