|
Unicorn XML Toolkit Version 1.00.00 |
|||||||||
� PREV CLASS �� NEXT CLASS | FRAMES��NO FRAMES | |||||||||
SUMMARY: � CONSTR �|� FUNCTION �|�DATA | DETAIL: � CONSTR �|� FUNCTION �|�DATA |
class CExprToken { public: enum { none, endOfStream, parenleft, parenright, bracketleft, bracketright, period, periodPeriod, at, comma, colonColon, nameTest, nodeType, operatorName, multiplyOperator, slash, slashSlash, bar, plus, minus, equal, exclamEqual, less, lessEqual, greater, greaterEqual, functionName, axisName, literal, number, variableReference }; enum { ntypComment, ntypText, ntypProcessingInstruction, ntypNode }; enum { operAnd, operOr, operMod, operDiv }; enum { axisAncestor, axisAncestorOrSelf, axisAttribute, axisChild, axisDescendant, axisDescendantOrSelf, axisFollowing, axisFollowingSibling, axisNamespace, axisParent, axisPreceding, axisPrecedingSibling, axisSelf }; public: CExprToken(); ~CExprToken(); public: void Create(int nType); void Create(int nType, int nValue); void Create(int nType, CNumber numValue); void Create(int nType, const CString &strValue); public: const CExprToken &operator=(const CExprToken &token); int GetType() const; int GetCode() const; CNumber GetNumber() const; CString GetString() const; };
The XPath expression token.
This class may be used by applications which implement languages based on the XPath expression language (for example, the XSLT pattern language).
Every token has the associated type value. Type values are represented via constants specified by the anonymous enumeration in this class declaration. Furthermore, certain tokens may have associated integer, number or string values.
CNumber
Constructor/Destructor Summary | |
CExprToken
();
����������Constructs the token. |
|
~CExprToken
();
����������Destroys the token. |
Function Summary | |
void
|
Create
(int nType);
����������Creates the token with the given type. |
void
|
Create
(int nType, int nValue);
����������Creates the token with the given type and integer value. |
void
|
Create
(int nType, CNumber numValue);
����������Creates the token with the given type and number value. |
void
|
Create
(int nType, const CString &strValue);
����������Creates the token with the given type and string value. |
int
|
GetType
();
����������Returns the type of this token. |
int
|
GetCode
();
����������Returns the integer value assigned to this token. |
CNumber
|
GetNumber
();
����������Returns the number value assigned to this token. |
CString
|
GetString
();
����������Returns the string value assigned to this token. |
Constructor/Destructor Detail |
CExprToken();
Constructs the token.
The content of the newly constructed token
is initially unspecified; it must be set explicitly
using the
Create
function.
~CExprToken();
Destroys the token.
Function Detail |
void Create(int nType);
Creates the token with the given type.
nType
- the type of this tokenvoid Create(int nType, int nValue);
Creates the token with the given type and integer value.
nType
- the of this tokennValue
- the integer value of this tokenvoid Create(int nType, CNumber numValue);
Creates the token with the given type and number value.
nType
- the type of this tokennumValue
- the number value of this tokenvoid Create(int nType, const CString &strValue);
Creates the token with the given type and string value.
nType
- the type of this tokenstrValue
- the string value of this tokenint GetType();
Returns the type of this token.
int GetCode();
Returns the integer value assigned to this token.
CNumber GetNumber();
Returns the number value assigned to this token.
CString GetString();
Returns the string value assigned to this token.
|
Unicorn XML Toolkit Version 1.00.00 |
|||||||||
� PREV CLASS �� NEXT CLASS | FRAMES��NO FRAMES | |||||||||
SUMMARY: � CONSTR �|� FUNCTION �|�DATA | DETAIL: � CONSTR �|� FUNCTION �|�DATA |