Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.11


Public Member Functions | Protected Member Functions | List of all members
XToken Class Reference

#include <XToken.hpp>

Inherits XObject.

Public Member Functions

 XToken (MemoryManager &theMemoryManager)
 Create an XToken. More...
 
 XToken (const XalanDOMString &theString, double theNumber, MemoryManager &theMemoryManager)
 Create an XToken for string in the token queue. More...
 
 XToken (double theNumber, const XalanDOMString &theString, MemoryManager &theMemoryManager)
 Create an XToken for number in the token queue. More...
 
 XToken (const XToken &theSource)
 Create an XToken from another one. More...
 
 XToken (const XToken &theSource, MemoryManager &theMemoryManager)
 Create an XToken from another one. More...
 
virtual ~XToken ()
 
virtual const XalanDOMStringgetTypeString () const
 Given a request type, return the equivalent string. More...
 
virtual double num (XPathExecutionContext &executionContext) const
 Cast result object to a number. More...
 
virtual bool boolean (XPathExecutionContext &executionContext) const
 Cast result object to a boolean. More...
 
virtual const XalanDOMStringstr (XPathExecutionContext &executionContext) const
 Cast result object to a string. More...
 
virtual const XalanDOMStringstr () const
 Cast result object to a string. More...
 
virtual void str (XPathExecutionContext &executionContext, FormatterListener &formatterListener, MemberFunctionPtr function) const
 Send the string value to a FormatterListener instance. More...
 
virtual void str (FormatterListener &formatterListener, MemberFunctionPtr function) const
 Send the string value to a FormatterListener instance. More...
 
virtual void str (XPathExecutionContext &executionContext, XalanDOMString &theBuffer) const
 Append the string value directly a string. More...
 
virtual void str (XalanDOMString &theBuffer) const
 Append the string value directly a string. More...
 
virtual double stringLength (XPathExecutionContext &executionContext) const
 Get the length of the string value of the instance. More...
 
virtual void ProcessXObjectTypeCallback (XObjectTypeCallback &theCallbackObject)
 Process a callback request for preferred type information. More...
 
virtual void ProcessXObjectTypeCallback (XObjectTypeCallback &theCallbackObject) const
 Process a callback request for preferred type information. More...
 
XTokenoperator= (const XToken &theRHS)
 
bool boolean () const
 
double num () const
 Cast result object to a number. More...
 
double stringLength () const
 
void set (const XalanDOMString &theString, double theNumber)
 Set the instance as a string in the token queue. More...
 
void set (double theNumber, const XalanDOMString &theString)
 Set the instance as a number in the token queue. More...
 
- Public Member Functions inherited from XObject
 XObject (eObjectType theObjectType, MemoryManager &theMemoryManager)
 Create an XObject. More...
 
virtual const XalanDocumentFragmentrtree () const
 Cast result object to a result tree fragment. More...
 
virtual const NodeRefListBasenodeset () const
 Cast result object to a nodelist. More...
 
bool equals (const XObject &theRHS, XPathExecutionContext &executionContext) const
 Tell if two objects are functionally equal. More...
 
bool notEquals (const XObject &theRHS, XPathExecutionContext &executionContext) const
 Tell if two objects are functionally not equal. More...
 
bool lessThan (const XObject &theRHS, XPathExecutionContext &executionContext) const
 Tell if one object is less than the other. More...
 
bool lessThanOrEquals (const XObject &theRHS, XPathExecutionContext &executionContext) const
 Tell if one object is less than or equal the other. More...
 
bool greaterThan (const XObject &theRHS, XPathExecutionContext &executionContext) const
 Tell if one object is greater than the other. More...
 
bool greaterThanOrEquals (const XObject &theRHS, XPathExecutionContext &executionContext) const
 Tell if one object is greater than or equal the other. More...
 
eObjectType getType () const
 Tell what kind of class this is. More...
 
void setFactory (XObjectFactory *theFactory)
 

Protected Member Functions

virtual void referenced ()
 
virtual void dereferenced ()
 
- Protected Member Functions inherited from XObject
 XObject (const XObject &)
 Create an XObject from another XObject. More...
 
 XObject (const XObject &source, MemoryManager &theManager)
 Create an XObject from another XObject. More...
 
MemoryManager & getMemoryManager () const
 Get the MemoryManager for this instance. More...
 
void throwInvalidConversionException (const XalanDOMString &theTargetType) const
 
virtual eObjectType getRealType () const
 Tell what kind of class this is. More...
 
virtual ~XObject ()
 
- Protected Member Functions inherited from XalanReferenceCountedObject
 XalanReferenceCountedObject ()
 Create a XalanReferenceCountedObject. More...
 
virtual ~XalanReferenceCountedObject ()
 
virtual XalanSize_t getReferenceCount () const
 

Additional Inherited Members

- Public Types inherited from XObject
enum  eObjectType {
  eTypeNull = 0, eTypeUnknown = 1, eTypeBoolean = 2, eTypeNumber = 3,
  eTypeString = 4, eTypeNodeSet = 5, eTypeResultTreeFrag = 6, eTypeUserDefined = 7,
  eTypeStringReference = 8, eTypeStringAdapter = 9, eTypeStringCached = 10, eTypeXTokenNumberAdapter = 11,
  eTypeXTokenStringAdapter = 12, eTypeNodeSetNodeProxy = 13, eUnknown
}
 Enumeration of possible object types. More...
 
typedef XPathExecutionContext::GetCachedString GetCachedString
 
typedef void(FormatterListener::* MemberFunctionPtr) (const XMLCh *const, const FormatterListener::size_type)
 
- Static Public Member Functions inherited from XObject
static void initialize (MemoryManager &theMemoryManager)
 Perform static initialization. More...
 
static void terminate ()
 Perform static shut down. More...
 
static bool boolean (double theNumber)
 Static conversion function. More...
 
static bool boolean (const XalanDOMString &theString)
 Static conversion function. More...
 
static bool boolean (const NodeRefListBase &theNodeList)
 Static conversion function. More...
 
static const XalanDOMStringstring (bool theBool)
 Static conversion function. More...
 
static void string (bool theBool, XalanDOMString &theString)
 Static conversion function. More...
 
static void string (bool theBool, FormatterListener &formatterListener, MemberFunctionPtr function)
 Static conversion function. More...
 
static void string (double theNumber, XalanDOMString &theString)
 Static conversion function. More...
 
static void string (double theNumber, FormatterListener &formatterListener, MemberFunctionPtr function)
 Static conversion function. More...
 
static void string (const XalanNode &theNode, XalanDOMString &theString)
 Static conversion function. More...
 
static void string (const XalanNode &theNode, FormatterListener &formatterListener, MemberFunctionPtr function)
 Static conversion function. More...
 
static void string (const NodeRefListBase &theNodeList, XalanDOMString &theString)
 Static conversion function. More...
 
static void string (const NodeRefListBase &theNodeList, FormatterListener &formatterListener, MemberFunctionPtr function)
 Static conversion function. More...
 
static void string (const XalanNode &theNode, XPathExecutionContext &theExecutionContext, XalanDOMString &theString)
 Static conversion function. More...
 
static void string (const XalanNode &theNode, XPathExecutionContext &theExecutionContext, FormatterListener &formatterListener, MemberFunctionPtr function)
 Static conversion function. More...
 
static void string (const NodeRefListBase &theNodeList, XPathExecutionContext &theExecutionContext, XalanDOMString &theString)
 Static conversion function. More...
 
static void string (const NodeRefListBase &theNodeList, XPathExecutionContext &theExecutionContext, FormatterListener &formatterListener, MemberFunctionPtr function)
 Static conversion function. More...
 
static void string (const XalanDOMString &theString, FormatterListener &formatterListener, MemberFunctionPtr function)
 Calls the supplied FormatterListener member function with the string. More...
 
static double number (bool theBoolean)
 Static conversion function. More...
 
static double number (const XalanDOMString &theString, MemoryManager &theManager)
 
static double number (XPathExecutionContext &executionContext, const NodeRefListBase &theNodeList)
 Static conversion function. More...
 
static double number (XPathExecutionContext &executionContext, const XalanNode &theNode)
 Static conversion function. More...
 
- Static Protected Member Functions inherited from XalanReferenceCountedObject
static void addReference (XalanReferenceCountedObject *theInstance)
 Increment reference count. More...
 
static void removeReference (XalanReferenceCountedObject *theInstance)
 Decrement reference count. More...
 
- Static Protected Attributes inherited from XObject
static const XalanDOMString s_emptyString
 
static const XalanDOMStrings_booleanString
 
static const XalanDOMStrings_falseString
 
static const XalanDOMStrings_nodesetString
 
static const XalanDOMStrings_numberString
 
static const XalanDOMStrings_resultTreeFragmentString
 
static const XalanDOMStrings_stringString
 
static const XalanDOMStrings_trueString
 

Detailed Description

Definition at line 41 of file XToken.hpp.

Constructor & Destructor Documentation

◆ XToken() [1/5]

XToken::XToken ( MemoryManager &  theMemoryManager)

Create an XToken.

Parameters
theMemoryManagerThe MemoryManager instance.

◆ XToken() [2/5]

XToken::XToken ( const XalanDOMString theString,
double  theNumber,
MemoryManager &  theMemoryManager 
)

Create an XToken for string in the token queue.

Parameters
theStringThe string data for the token. The instance will keep a point to this string, so it must be persistent.
theNumberThe numeric data for the token. This must be consistent with the lexical value in theString.
theMemoryManagerThe MemoryManager instance.

◆ XToken() [3/5]

XToken::XToken ( double  theNumber,
const XalanDOMString theString,
MemoryManager &  theMemoryManager 
)

Create an XToken for number in the token queue.

Parameters
theNumberThe numeric data for the token. This must be consistent with the lexical value in theString.
theStringThe string data for the token. The instance will keep a point to this string, so it must be persistent.
theMemoryManagerThe MemoryManager instance.

◆ XToken() [4/5]

XToken::XToken ( const XToken theSource)

Create an XToken from another one.

In most cases, the following copy constructor, which accepts an explicit MemoryManager instance, is recommended.

Parameters
theSourceThe source XToken instance.

◆ XToken() [5/5]

XToken::XToken ( const XToken theSource,
MemoryManager &  theMemoryManager 
)

Create an XToken from another one.

Parameters
theSourceThe source XToken instance.
theMemoryManagerThe MemoryManager instance.

◆ ~XToken()

virtual XToken::~XToken ( )
virtual

Member Function Documentation

◆ boolean() [1/2]

virtual bool XToken::boolean ( XPathExecutionContext executionContext) const
virtual

Cast result object to a boolean.

Parameters
executionContextThe current XPathExecutionContext
Returns
boolean value

Implements XObject.

◆ boolean() [2/2]

bool XToken::boolean ( ) const
inline

Definition at line 154 of file XToken.hpp.

◆ dereferenced()

virtual void XToken::dereferenced ( )
protectedvirtual

Reimplemented from XObject.

◆ getTypeString()

virtual const XalanDOMString& XToken::getTypeString ( ) const
virtual

Given a request type, return the equivalent string.

For diagnostic purposes.

Returns
string for type

Implements XObject.

◆ num() [1/2]

virtual double XToken::num ( XPathExecutionContext executionContext) const
virtual

Cast result object to a number.

Parameters
executionContextThe current XPathExecutionContext
Returns
numeric value

Reimplemented from XObject.

◆ num() [2/2]

double XToken::num ( ) const
inlinevirtual

Cast result object to a number.

This function does not have access to the current XPathExecutionContext, so the result may contain data from whitespace text nodes that might have been stripped otherwise.

Returns
numeric value

Reimplemented from XObject.

Definition at line 162 of file XToken.hpp.

◆ operator=()

XToken& XToken::operator= ( const XToken theRHS)
inline

Definition at line 144 of file XToken.hpp.

◆ ProcessXObjectTypeCallback() [1/2]

virtual void XToken::ProcessXObjectTypeCallback ( XObjectTypeCallback theCallbackObject)
virtual

Process a callback request for preferred type information.

Parameters
theCallbackObjectobject to call back

Implements XObject.

◆ ProcessXObjectTypeCallback() [2/2]

virtual void XToken::ProcessXObjectTypeCallback ( XObjectTypeCallback theCallbackObject) const
virtual

Process a callback request for preferred type information.

Parameters
theCallbackObjectobject to call back

Implements XObject.

◆ referenced()

virtual void XToken::referenced ( )
protectedvirtual

Reimplemented from XObject.

◆ set() [1/2]

void XToken::set ( const XalanDOMString theString,
double  theNumber 
)

Set the instance as a string in the token queue.

Parameters
theStringThe string data for the token. XToken will keep a point to this string, so it must be persistent.
theNumberThe numeric data for the token. This must be consistent with the lexical value in theString.

◆ set() [2/2]

void XToken::set ( double  theNumber,
const XalanDOMString theString 
)

Set the instance as a number in the token queue.

Parameters
theNumberThe numeric data for the token. This must be consistent with the lexical value in theString.
theStringThe string data for the token. XToken will keep a point to this string, so it must be persistent.

◆ str() [1/6]

virtual const XalanDOMString& XToken::str ( XPathExecutionContext executionContext) const
virtual

Cast result object to a string.

Parameters
executionContextThe current XPathExecutionContext
Returns
string value

Implements XObject.

◆ str() [2/6]

virtual const XalanDOMString& XToken::str ( ) const
virtual

Cast result object to a string.

This function does not have access to the current XPathExecutionContext, so the result may contain data from whitespace text nodes that might have been stripped otherwise.

Parameters
executionContextThe current XPathExecutionContext
Returns
string value

Implements XObject.

◆ str() [3/6]

virtual void XToken::str ( XPathExecutionContext executionContext,
FormatterListener formatterListener,
MemberFunctionPtr  function 
) const
virtual

Send the string value to a FormatterListener instance.

Parameters
executionContextThe current XPathExecutionContext
formatterListenerThe FormatterListener instance
functionA pointer to the member function of FormatterListener to call

Implements XObject.

◆ str() [4/6]

virtual void XToken::str ( FormatterListener formatterListener,
MemberFunctionPtr  function 
) const
virtual

Send the string value to a FormatterListener instance.

This function does not have access to the current XPathExecutionContext, so the result may contain data from whitespace text nodes that might have been stripped otherwise.

Parameters
formatterListenerThe FormatterListener instance
functionA pointer to the member function of FormatterListener to call

Implements XObject.

◆ str() [5/6]

virtual void XToken::str ( XPathExecutionContext executionContext,
XalanDOMString theBuffer 
) const
virtual

Append the string value directly a string.

Parameters
executionContextThe current XPathExecutionContext
theBufferThe buffer for the data

Implements XObject.

◆ str() [6/6]

virtual void XToken::str ( XalanDOMString theBuffer) const
virtual

Append the string value directly a string.

This function does not have access to the current XPathExecutionContext, so the result may contain data from whitespace text nodes that might have been stripped otherwise.

Parameters
theBufferThe buffer for the data

Implements XObject.

◆ stringLength() [1/2]

virtual double XToken::stringLength ( XPathExecutionContext executionContext) const
virtual

Get the length of the string value of the instance.

Returns
The length of the string value

Implements XObject.

◆ stringLength() [2/2]

double XToken::stringLength ( ) const
inline

Definition at line 170 of file XToken.hpp.


The documentation for this class was generated from the following file:

Interpreting class diagrams

Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.

Xalan-C++ XSLT Processor Version 1.11
Copyright © 1999-2012 The Apache Software Foundation.
All Rights Reserved.

Apache Logo