#include <dependencyset.h>
Public Member Functions | |
DependencySet (unsigned _var) | |
Constructor. | |
virtual | ~DependencySet () |
void | insertTuple (PathExpression *path, bool pos, bool dos, bool cond) |
Inserts a new tuple to this set of dependency-tuples. | |
void | print (OutputStream &dos) |
Prints this set of dependency-tuples. | |
unsigned | getVar () |
Returns the variable of this set of dependency-tuples. | |
vector< DependencyTuple * > * | getTuples () |
Returns all dependency-tuples for this variable. | |
bool | hasTuples () |
Returns if this variable has a set of dependency-tuples. | |
void | removeSyntacticallyEqualTuple (PassiveProjectionTree *ppt) |
Removes all tuples of this set dependency-tuples that are syntactically equal. | |
void | removeSemanticallyContainedTuple (PassiveProjectionTree *ppt) |
Removes all tuples of this set dependency-tuples that are semantically contained among each other. | |
Private Attributes | |
unsigned | var |
The entered variable. | |
vector< DependencyTuple * > | tuples |
The set of dependency-tuples for this variable. |
Represents a set of dependency-tuples for a variable, i.e. a set of DependencyTuple for a variable, e.g. dep($x) = {</bib//book/dos
:
:
node
(), ri>, </bib/book/title[positions
()=1], rj>}
(whereas i != j
), which are attached to the VariableTree as child nodes of this variable. This attachment together with the extension of all VariableTreeNode by their corresponding PathExpression results in the ProjectionTree.
Definition at line 55 of file dependencyset.h.
DependencySet::DependencySet | ( | unsigned | _var | ) |
Constructor.
Constructor - creating object for a variable (with no DependencyTuple).
[in] | _var | Variable for which this set of dependency-tuples holds. |
Definition at line 37 of file dependencyset.cpp.
DependencySet::~DependencySet | ( | ) | [virtual] |
vector< DependencyTuple * > * DependencySet::getTuples | ( | ) | [inline] |
Returns all dependency-tuples for this variable.
Returns all dependency-tuples for this variable, i.e. returns the member variable.
vector<DependencyTuple*>* | Pointer to a vector object containing pointer of DependencyTuple objects. |
Definition at line 100 of file dependencyset.h.
unsigned DependencySet::getVar | ( | ) | [inline] |
Returns the variable of this set of dependency-tuples.
Returns the variable of this set of dependency-tuples, i.e. returns the member variable.
unsigned | Variable of this set of dependency-tuples. |
Definition at line 93 of file dependencyset.h.
References var.
bool DependencySet::hasTuples | ( | ) | [inline] |
Returns if this variable has a set of dependency-tuples.
Returns if this variable has a set of dependency-tuples, i.e. returns true
if this variable has at least one DependencyTuple, false
otherwise.
bool | true if this variable has at least one DependencyTuple, false otherwise. |
Definition at line 110 of file dependencyset.h.
References tuples.
void DependencySet::insertTuple | ( | PathExpression * | path, | |
bool | pos, | |||
bool | dos, | |||
bool | cond | |||
) |
Inserts a new tuple to this set of dependency-tuples.
Inserts a new tuple to this set of dependency-tuples, i.e. creates a new DependencyTuple for this set of dependency-tuples.
[in] | path | Pointer to a PathExpression object. |
[in] | pos | true if this new tuple should be a [positions ()=1] dependency-tuple, false otherwise. |
[in] | dos | true if this new tuple should be a /dos : : node () dependency-tuple, false otherwise. |
[in] | cond | true if this new tuple results from a CondExpression, false otherwise. |
void |
Definition at line 46 of file dependencyset.cpp.
References PathExpression::addPathStep(), PathExpression::clone(), PathExpression::getTailPathStep(), PathExpression::isEmptyPath(), and tuples.
void DependencySet::print | ( | OutputStream & | dos | ) |
Prints this set of dependency-tuples.
Prints this set of dependency-tuples.
[in] | dos | Pointer to a OutputStream object. |
void |
Definition at line 62 of file dependencyset.cpp.
void DependencySet::removeSemanticallyContainedTuple | ( | PassiveProjectionTree * | ppt | ) |
Removes all tuples of this set dependency-tuples that are semantically contained among each other.
Removes all tuples of this set dependency-tuples that are semantically contained among each other, i.e. those tuples are kept that locate a greater or a greater equal set of nodes of an arbitrarily XML tree than any other tuple of this set of dependency-tuples.
[in] | ppt | Pointer to a PassiveProjectionTree object. All deleted paths are registered to the passive projection tree. |
void |
Definition at line 85 of file dependencyset.cpp.
void DependencySet::removeSyntacticallyEqualTuple | ( | PassiveProjectionTree * | ppt | ) |
Removes all tuples of this set dependency-tuples that are syntactically equal.
Removes all tuples of this set dependency-tuples that are syntactically equal with respect to their paths.
[in] | ppt | Pointer to a PassiveProjectionTree object. All deleted paths are registered to the passive projection tree. |
void |
Definition at line 71 of file dependencyset.cpp.
vector< DependencyTuple * > DependencySet::tuples [private] |
The set of dependency-tuples for this variable.
The set of dependency-tuples for this variable, which is a set of DependencyTuple.
Definition at line 149 of file dependencyset.h.
Referenced by hasTuples(), insertTuple(), print(), removeSemanticallyContainedTuple(), removeSyntacticallyEqualTuple(), and ~DependencySet().
unsigned DependencySet::var [private] |
The entered variable.
The entered variable, which is the argument of the constructor and internally represented by a number.
Definition at line 143 of file dependencyset.h.
Referenced by getVar(), removeSemanticallyContainedTuple(), and removeSyntacticallyEqualTuple().