PathStepTagExpression Class Reference

Represents a single XPath path step of the form /tag or //tag. More...

#include <pathsteptagexpression.h>

Inheritance diagram for PathStepTagExpression:

Inheritance graph
[legend]
Collaboration diagram for PathStepTagExpression:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 PathStepTagExpression (AXIS_TYPE _axis, const char *_tag)
 Constructor.
 PathStepTagExpression (const char *_tag)
 Constructor.
 PathStepTagExpression (AXIS_TYPE _axis, TAG _tag, PathStepAttribute *_attribute)
 Constructor.
virtual ~PathStepTagExpression ()
virtual void print (OutputStream &dos) const
TAG getNodeTest ()
 Returns the node test or the (numeric) value of the tagname respectively.
bool isMatchingTag (TAG tag)
PathStepTagExpressionclone ()
PathStepTagExpressioncloneWithoutAttributes ()

Private Attributes

TAG nt
 The (numeric) value of the entered string of a tagname.


Detailed Description

Represents a single XPath path step of the form /tag or //tag.

Represents a single XPath path step of the form /tag or //tag (whereas tag denotes a tagname), which takes an AXIS_TYPE (default: child-axis), a string as tagname, e.g. /bib or //book, and a PathStepAttribute (if required), e.g. /tag[position()=1] or //tag[position()=1], as arguments.

Note:
Tagnames 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 pathsteptagexpression.h.


Constructor & Destructor Documentation

PathStepTagExpression::PathStepTagExpression ( AXIS_TYPE  _axis,
const char *  _tag 
)

Constructor.

Constructor - creating object for an AXIS_TYPE and a string (as tagname).

Parameters:
[in] _axis AXIS_TYPE.
[in] _tag Pointer to a char object.

Definition at line 37 of file pathsteptagexpression.cpp.

Referenced by clone(), and cloneWithoutAttributes().

PathStepTagExpression::PathStepTagExpression ( const char *  _tag  ) 

Constructor.

Constructor - creating object for (default) AXIS_TYPE child and a string (as tagname).

Parameters:
[in] _tag Pointer to a char object.

Definition at line 44 of file pathsteptagexpression.cpp.

PathStepTagExpression::PathStepTagExpression ( AXIS_TYPE  _axis,
TAG  _tag,
PathStepAttribute _attribute 
)

Constructor.

Constructor - creating object for an AXIS_TYPE, a TAG, which is the (numeric value of a) tagname and a PathStepAttribute.

Parameters:
[in] _axis AXIS_TYPE.
[in] _tag TAG.
[in] _attribute Pointer to a PathStepAttribute object.

Definition at line 49 of file pathsteptagexpression.cpp.

PathStepTagExpression::~PathStepTagExpression (  )  [virtual]

Destructor.

Definition at line 56 of file pathsteptagexpression.cpp.


Member Function Documentation

PathStepTagExpression * PathStepTagExpression::clone (  )  [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.

Return values:
PathStepExpression* Copy of a path step expression or of this object respectively.

Implements PathStepExpression.

Definition at line 77 of file pathsteptagexpression.cpp.

References PathStepExpression::attribute, PathStepExpression::axis, PathStepAttribute::clone(), nt, and PathStepTagExpression().

PathStepTagExpression * PathStepTagExpression::cloneWithoutAttributes (  )  [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.

Return values:
PathStepExpression* Copy of a path step expression or of this object respectively without any PathStepAttribute.

Implements PathStepExpression.

Definition at line 85 of file pathsteptagexpression.cpp.

References PathStepExpression::axis, nt, and PathStepTagExpression().

TAG PathStepTagExpression::getNodeTest (  )  [inline]

Returns the node test or the (numeric) value of the tagname respectively.

Returns the node test or the (numeric) value of the tagname respectively, which has been returned after insertion into TagMap.

Return values:
TAG Numeric value of the tagname.

Definition at line 103 of file pathsteptagexpression.h.

References nt.

Referenced by ProjectionTreeLabel::getTag(), PathExpression::isSemanticallyContainedIn(), and PathExpression::mightHasChildDescendantConflict().

bool PathStepTagExpression::isMatchingTag ( TAG  tag  )  [inline, 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.

Parameters:
[in] tag TAG.
Return values:
bool true if the correspnding path step expression is matching the entered TAG, false otherwise.

Implements PathStepExpression.

Definition at line 108 of file pathsteptagexpression.h.

void PathStepTagExpression::print ( OutputStream dos  )  const [virtual]

Prints the corresponding path step expression.

Prints the corresponding path step expression.

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

Implements PathStepExpression.

Definition at line 59 of file pathsteptagexpression.cpp.

References PathStepExpression::attribute, PathStepExpression::axis, TagMap::getTag(), nt, and Expression::tagmap.


Member Data Documentation

The (numeric) value of the entered string of a tagname.

The (numeric) value of the entered string of a tagname, which has been returned after insertion into TagMap.

Definition at line 128 of file pathsteptagexpression.h.

Referenced by clone(), cloneWithoutAttributes(), getNodeTest(), and print().


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