#include <pathstepexpression.h>
Public Member Functions | |
PathStepExpression (EXP_TYPE _type, AXIS_TYPE _axis, PathStepAttribute *_attribute) | |
Constructor. | |
virtual | ~PathStepExpression () |
virtual void | print (OutputStream &dos) const =0 |
Prints the corresponding path step expression. | |
AXIS_TYPE | getAxisType () |
Returns the AXIS_TYPE. | |
void | setAxisType (AXIS_TYPE _axis) |
Sets the AXIS_TYPE. | |
NODETEST_TYPE | getNodeTestType () |
Returns the NODETEST_TYPE. | |
PathStepAttribute * | getAttribute () |
Returns the attribute of this path step expression. | |
void | setAttribute (PathStepAttribute *_attribute) |
Sets the attribute of this path step expression. | |
unsigned | getStepWeight (bool is_last_step) |
Returns the weight of this path step expression. | |
bool | isTagNodeTest () |
Returns if this path step expression is of the form /tag . | |
bool | isStarNodeTest () |
Returns if this path step expression is of the form / * . | |
bool | isNodeNodeTest () |
Returns if this path step expression is of the form /node () . | |
bool | isTextNodeTest () |
Returns if this path step expression is of the form /text () . | |
bool | isDosNodeStep () |
Returns if this path step expression is of the form /dos : : node () . | |
bool | isSyntacticallyEqualTo (PathStepExpression *ps) |
Returns if this path step expression is syntactically equal to the entered path step expression. | |
virtual bool | isMatchingTag (TAG tag)=0 |
Returns if the correspnding path step expression is matching the entered TAG. | |
bool | hasAttribute () |
Returns if this path step expression contains an PathStepAttribute. | |
virtual PathStepExpression * | clone ()=0 |
Returns a new, independent copy of a path step expression or of this object respectively. | |
virtual PathStepExpression * | cloneWithoutAttributes ()=0 |
Returns a new, independent copy of a path step expression or of this object respectively without any PathStepAttribute. | |
Protected Attributes | |
AXIS_TYPE | axis |
The type of axis for this path step expression. | |
PathStepAttribute * | attribute |
The attribute associated with this path step expression. |
Represents base class of all path step expressions.
Definition at line 81 of file pathstepexpression.h.
PathStepExpression::PathStepExpression | ( | EXP_TYPE | _type, | |
AXIS_TYPE | _axis, | |||
PathStepAttribute * | _attribute | |||
) |
Constructor.
Constructor - creating object for an EXP_TYPE, an AXIS_TYPE and a PathStepAttribute if required.
[in] | _type | EXP_TYPE. |
[in] | _axis | AXIS_TYPE. |
[in] | _attribute | Pointer to a PathStepAttribute object. |
Definition at line 41 of file pathstepexpression.cpp.
PathStepExpression::~PathStepExpression | ( | ) | [virtual] |
PathStepExpression * PathStepExpression::clone | ( | ) | [pure virtual] |
Returns a new, independent copy of a path step expression or of this object respectively.
Returns a new, independent copy of a path step expression or of this object respectively.
PathStepExpression* | Copy of a path step expression or of this object respectively. |
Implemented in PathStepNodeExpression, PathStepStarExpression, PathStepTagExpression, and PathStepTextExpression.
Referenced by PathEnvironment::getPathBetween(), ProjectionTreeNode::getRootPath(), PathExpressionAdornment::PathExpressionAdornment(), and DependencyTuple::registerToPassiveProjectionTree().
PathStepExpression * PathStepExpression::cloneWithoutAttributes | ( | ) | [pure virtual] |
Returns a new, independent copy of a path step expression or of this object respectively without
any PathStepAttribute.
Returns a new, independent copy of a path step expression or of this object respectively without
any PathStepAttribute.
PathStepExpression* | Copy of a path step expression or of this object respectively without any PathStepAttribute. |
Implemented in PathStepNodeExpression, PathStepStarExpression, PathStepTagExpression, and PathStepTextExpression.
PathStepAttribute * PathStepExpression::getAttribute | ( | ) | [inline] |
Returns the attribute of this path step expression.
Returns the attribute of this path step expression. The returned PathStepAttribute might be NULL
.
PathStepAttribute* | Pointer to a PathStepAttribute object. |
Definition at line 137 of file pathstepexpression.h.
References attribute.
Referenced by BufferIterator::BufferIterator(), Role::isPosRole(), and DependencyTuple::isPosTuple().
AXIS_TYPE PathStepExpression::getAxisType | ( | ) | [inline] |
Returns the AXIS_TYPE.
Returns the AXIS_TYPE, i.e. return the member variable.
AXIS_TYPE. |
Definition at line 112 of file pathstepexpression.h.
References axis.
Referenced by TokenConfiguration::applyTag(), PassiveProjectionTreeConfiguration::applyTag(), TokenConfiguration::applyText(), BufferIterator::BufferIterator(), ProjectionTreeLabel::descendantAxisBetw(), ProjectionTreeLabel::getAxisFollowingFSA(), ProjectionTreeLabel::isChildLabel(), ProjectionTreeLabel::isChildOrDescendantLabel(), ProjectionTreeLabel::isDescendantLabel(), ProjectionTreeLabel::isDosLabel(), ProjectionTreeLabel::isDosNodeLabel(), ProjectionTreeLabel::isDosOrDescendantLabel(), BufferIterator::isSatisfyingPath(), PathExpression::isSemanticallyContainedIn(), isSyntacticallyEqualTo(), PathExpression::mightHasChildDescendantConflict(), and PathExpressionAdornment::PathExpressionAdornment().
NODETEST_TYPE PathStepExpression::getNodeTestType | ( | ) |
Returns the NODETEST_TYPE.
Returns the NODETEST_TYPE.
NODETEST_TYPE. |
Definition at line 52 of file pathstepexpression.cpp.
References Expression::type.
Referenced by BufferIterator::isMatchingNodeTestAndPredicates(), and isSyntacticallyEqualTo().
unsigned PathStepExpression::getStepWeight | ( | bool | is_last_step | ) |
Returns the weight of this path step expression.
Returns the weight of this path step expression.
[in] | is_last_step | Indicator if this path step expression is the last one, i.e. true if it is the last one, false otherwise. |
unsigned | Weight of this path step expression. |
Definition at line 67 of file pathstepexpression.cpp.
References axis, Expression::type, WEIGHT_AXIS_CHILD, WEIGHT_AXIS_DESCENDANT, WEIGHT_AXIS_DOS, WEIGHT_INNER_NODETEST, WEIGHT_NODETEST_NODE, WEIGHT_NODETEST_STAR, WEIGHT_NODETEST_TAG, and WEIGHT_NODETEST_TEXT.
bool PathStepExpression::hasAttribute | ( | ) | [inline] |
Returns if this path step expression contains an PathStepAttribute.
Returns if this path step expression contains an PathStepAttribute.
bool | true if this path step expression contains an PathStepAttribute, false otherwise. |
Definition at line 235 of file pathstepexpression.h.
References attribute.
Referenced by BufferIterator::BufferIterator(), Role::isPosRole(), and DependencyTuple::isPosTuple().
bool PathStepExpression::isDosNodeStep | ( | ) | [inline] |
Returns if this path step expression is of the form /dos
:
:
node
()
.
Returns if this path step expression is of the form /dos
:
:
node
()
.
bool | true if this path step expression is of the form /dos : : node () , false otherwise. |
Definition at line 207 of file pathstepexpression.h.
References axis, and Expression::type.
Referenced by BufferIterator::BufferIterator(), BufferIterator::init(), Role::isDosRole(), DependencyTuple::isDosTuple(), PathExpression::mightHasChildDescendantConflict(), PathExpressionAdornment::PathExpressionAdornment(), ProjectionTreeNode::removeRedundantRoles(), and BufferIterator::reset().
bool PathStepExpression::isMatchingTag | ( | TAG | tag | ) | [pure virtual] |
Returns if the correspnding path step expression is matching the entered TAG.
Returns if the correspnding path step expression is matching the entered TAG.
[in] | tag | TAG. |
bool | true if the correspnding path step expression is matching the entered TAG, false otherwise. |
Implemented in PathStepNodeExpression, PathStepStarExpression, PathStepTagExpression, and PathStepTextExpression.
Referenced by PassiveProjectionTreeConfiguration::applyTag(), isSyntacticallyEqualTo(), and ProjectionTreeLabel::matchesTag().
bool PathStepExpression::isNodeNodeTest | ( | ) | [inline] |
Returns if this path step expression is of the form /node
()
.
Returns if this path step expression is of the form /node
()
.
bool | true if this path step expression is of the form /node () , false otherwise. |
Definition at line 186 of file pathstepexpression.h.
References Expression::type.
Referenced by ProjectionTreeLabel::isDosNodeLabel(), ProjectionTreeLabel::isNodeLabel(), ProjectionTreeLabel::matchesText(), and PathExpressionAdornment::PathExpressionAdornment().
bool PathStepExpression::isStarNodeTest | ( | ) | [inline] |
Returns if this path step expression is of the form /
*
.
Returns if this path step expression is of the form /
*
.
bool | true if this path step expression is of the form / * , false otherwise. |
Definition at line 176 of file pathstepexpression.h.
References Expression::type.
Referenced by PathExpression::isSemanticallyContainedIn(), ProjectionTreeLabel::isStarLabel(), and PathExpressionAdornment::PathExpressionAdornment().
bool PathStepExpression::isSyntacticallyEqualTo | ( | PathStepExpression * | ps | ) |
Returns if this path step expression is syntactically equal to the entered path step expression.
Returns if this path step expression is syntactically equal to the entered path step expression.
[in] | ps | Pointer to a PathStepExpression object (path step expression to be compared). |
bool | true if this path step expression is syntactically equal to the entered path step expression, false otherwise. |
Definition at line 105 of file pathstepexpression.cpp.
References axis, getAxisType(), getNodeTestType(), isMatchingTag(), and isTagNodeTest().
Referenced by PassiveProjectionTreeNode::registerPath().
bool PathStepExpression::isTagNodeTest | ( | ) | [inline] |
Returns if this path step expression is of the form /tag
.
Returns if this path step expression is of the form /tag
.
bool | true if this path step expression is of the form /tag , false otherwise. |
Definition at line 166 of file pathstepexpression.h.
References Expression::type.
Referenced by ProjectionTreeLabel::getTag(), PathExpression::isSemanticallyContainedIn(), isSyntacticallyEqualTo(), and PathExpression::mightHasChildDescendantConflict().
bool PathStepExpression::isTextNodeTest | ( | ) | [inline] |
Returns if this path step expression is of the form /text
()
.
Returns if this path step expression is of the form /text
()
.
bool | true if this path step expression is of the form /text () , false otherwise. |
Definition at line 196 of file pathstepexpression.h.
References Expression::type.
Referenced by ProjectionTreeLabel::matchesText(), PathExpression::mightHasChildDescendantConflict(), and PathExpressionAdornment::PathExpressionAdornment().
void PathStepExpression::print | ( | OutputStream & | dos | ) | const [pure virtual] |
Prints the corresponding path step expression.
Prints the corresponding path step expression.
[in] | dos | Pointer to a OutputStream object. |
void |
Implements Expression.
Implemented in PathStepNodeExpression, PathStepStarExpression, PathStepTagExpression, and PathStepTextExpression.
void PathStepExpression::setAttribute | ( | PathStepAttribute * | _attribute | ) | [inline] |
Sets the attribute of this path step expression.
Sets the attribute of this path step expression.
[in] | _attribute | Pointer to a PathStepAttribute object. |
void |
Definition at line 147 of file pathstepexpression.h.
References attribute.
void PathStepExpression::setAxisType | ( | AXIS_TYPE | _axis | ) | [inline] |
Sets the AXIS_TYPE.
Sets the AXIS_TYPE, i.e. sets the member variable.
[in] | _axis | AXIS_TYPE. |
void |
Definition at line 120 of file pathstepexpression.h.
Referenced by PathExpressionAdornment::PathExpressionAdornment().
PathStepAttribute * PathStepExpression::attribute [protected] |
The attribute associated with this path step expression.
The attribute associated with this path step expression, which is the third argument of the constructor. This member variable may be NULL
.
Definition at line 268 of file pathstepexpression.h.
Referenced by PathStepTextExpression::clone(), PathStepTagExpression::clone(), PathStepStarExpression::clone(), PathStepNodeExpression::clone(), getAttribute(), hasAttribute(), PathStepTextExpression::print(), PathStepTagExpression::print(), PathStepStarExpression::print(), PathStepNodeExpression::print(), setAttribute(), and ~PathStepExpression().
AXIS_TYPE PathStepExpression::axis [protected] |
The type of axis for this path step expression.
The type of axis for this path step expression, which is the second argument of the constructor.
Definition at line 261 of file pathstepexpression.h.
Referenced by PathStepTextExpression::clone(), PathStepTagExpression::clone(), PathStepStarExpression::clone(), PathStepNodeExpression::clone(), PathStepTextExpression::cloneWithoutAttributes(), PathStepTagExpression::cloneWithoutAttributes(), PathStepStarExpression::cloneWithoutAttributes(), PathStepNodeExpression::cloneWithoutAttributes(), getAxisType(), getStepWeight(), isDosNodeStep(), isSyntacticallyEqualTo(), PathStepTextExpression::print(), PathStepTagExpression::print(), PathStepStarExpression::print(), and PathStepNodeExpression::print().