Class to hold XPath return types. More...
#include <XObject.hpp>
Inherits XalanReferenceCountedObject.
Inherited by XBoolean, XNodeSetBase, XNumberBase, XResultTreeFrag, XStringBase, XToken, and XUnknown.
Classes | |
class | XObjectException |
class | XObjectInvalidConversionException |
Public Types | |
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) |
Public Member Functions | |
XObject (eObjectType theObjectType, MemoryManager &theMemoryManager) | |
Create an XObject. More... | |
virtual const XalanDOMString & | getTypeString () const =0 |
Given a request type, return the equivalent string. More... | |
virtual double | num (XPathExecutionContext &executionContext) const |
Cast result object to a number. More... | |
virtual double | num () const |
Cast result object to a number. More... | |
virtual bool | boolean (XPathExecutionContext &executionContext) const =0 |
Cast result object to a boolean. More... | |
virtual const XalanDOMString & | str (XPathExecutionContext &executionContext) const =0 |
Cast result object to a string. More... | |
virtual const XalanDOMString & | str () const =0 |
Cast result object to a string. More... | |
virtual void | str (XPathExecutionContext &executionContext, FormatterListener &formatterListener, MemberFunctionPtr function) const =0 |
Send the string value to a FormatterListener instance. More... | |
virtual void | str (FormatterListener &formatterListener, MemberFunctionPtr function) const =0 |
Send the string value to a FormatterListener instance. More... | |
virtual void | str (XPathExecutionContext &executionContext, XalanDOMString &theBuffer) const =0 |
Append the string value directly a string. More... | |
virtual void | str (XalanDOMString &theBuffer) const =0 |
Append the string value directly a string. More... | |
virtual double | stringLength (XPathExecutionContext &executionContext) const =0 |
Get the length of the string value of the instance. More... | |
virtual const XalanDocumentFragment & | rtree () const |
Cast result object to a result tree fragment. More... | |
virtual const NodeRefListBase & | nodeset () const |
Cast result object to a nodelist. More... | |
virtual void | ProcessXObjectTypeCallback (XObjectTypeCallback &theCallbackObject)=0 |
Process a callback request for preferred type information. More... | |
virtual void | ProcessXObjectTypeCallback (XObjectTypeCallback &theCallbackObject) const =0 |
Process a callback request for preferred type information. 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) |
Static Public Member Functions | |
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 XalanDOMString & | string (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... | |
Protected Member Functions | |
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 void | referenced () |
virtual void | dereferenced () |
virtual | ~XObject () |
![]() | |
XalanReferenceCountedObject () | |
Create a XalanReferenceCountedObject. More... | |
virtual | ~XalanReferenceCountedObject () |
virtual XalanSize_t | getReferenceCount () const |
Static Protected Attributes | |
static const XalanDOMString | s_emptyString |
static const XalanDOMString & | s_booleanString |
static const XalanDOMString & | s_falseString |
static const XalanDOMString & | s_nodesetString |
static const XalanDOMString & | s_numberString |
static const XalanDOMString & | s_resultTreeFragmentString |
static const XalanDOMString & | s_stringString |
static const XalanDOMString & | s_trueString |
Friends | |
class | XObjectPtr |
class | XObjectFactory |
Additional Inherited Members | |
![]() | |
static void | addReference (XalanReferenceCountedObject *theInstance) |
Increment reference count. More... | |
static void | removeReference (XalanReferenceCountedObject *theInstance) |
Decrement reference count. More... | |
Class to hold XPath return types.
Definition at line 63 of file XObject.hpp.
Definition at line 69 of file XObject.hpp.
typedef void(FormatterListener::* XObject::MemberFunctionPtr) (const XMLCh *const, const FormatterListener::size_type) |
Definition at line 180 of file XObject.hpp.
enum XObject::eObjectType |
Enumeration of possible object types.
Definition at line 74 of file XObject.hpp.
XObject::XObject | ( | eObjectType | theObjectType, |
MemoryManager & | theMemoryManager | ||
) |
Create an XObject.
theObjectType | The enum for the type of the object. |
theMemoryManager | The MemoryManager instance. |
|
protected |
|
protected |
|
protectedvirtual |
|
pure virtual |
Cast result object to a boolean.
executionContext | The current XPathExecutionContext |
Implemented in XToken, XResultTreeFrag, XUnknown, XStringBase, XBoolean, XNumberBase, and XNodeSetBase.
|
inlinestatic |
Static conversion function.
Returns the boolean value of the supplied double.
theString | The double to convert. |
Definition at line 372 of file XObject.hpp.
|
inlinestatic |
Static conversion function.
Returns the boolean value of the supplied XalanDOMString.
theString | The XalanDOMString to convert. |
Definition at line 385 of file XObject.hpp.
|
inlinestatic |
Static conversion function.
Returns the boolean value of the supplied NodeRefListBase.
theNodeList | The NodeRefListBase to convert. |
Definition at line 398 of file XObject.hpp.
|
protectedvirtual |
Implements XalanReferenceCountedObject.
Reimplemented in XToken, and XResultTreeFrag.
bool XObject::equals | ( | const XObject & | theRHS, |
XPathExecutionContext & | executionContext | ||
) | const |
Tell if two objects are functionally equal.
theRHS | object to compare |
executionContext | the current execution context |
|
inlineprotected |
Get the MemoryManager for this instance.
Definition at line 821 of file XObject.hpp.
|
protectedvirtual |
Tell what kind of class this is.
Reimplemented in XTokenNumberAdapter, XTokenStringAdapter, XNodeSetNodeProxy, XStringAdapter, XStringCached, and XStringReference.
|
inline |
Tell what kind of class this is.
Definition at line 358 of file XObject.hpp.
|
pure virtual |
Given a request type, return the equivalent string.
For diagnostic purposes.
Implemented in XToken, XResultTreeFrag, XUnknown, XStringBase, XBoolean, XNumberBase, and XNodeSetBase.
bool XObject::greaterThan | ( | const XObject & | theRHS, |
XPathExecutionContext & | executionContext | ||
) | const |
Tell if one object is greater than the other.
theRHS | object to compare |
bool XObject::greaterThanOrEquals | ( | const XObject & | theRHS, |
XPathExecutionContext & | executionContext | ||
) | const |
Tell if one object is greater than or equal the other.
theRHS | object to compare |
|
static |
Perform static initialization.
See class XPathInit.
theMemoryManager | The MemoryManager instance. |
bool XObject::lessThan | ( | const XObject & | theRHS, |
XPathExecutionContext & | executionContext | ||
) | const |
Tell if one object is less than the other.
theRHS | object to compare |
bool XObject::lessThanOrEquals | ( | const XObject & | theRHS, |
XPathExecutionContext & | executionContext | ||
) | const |
Tell if one object is less than or equal the other.
theRHS | object to compare |
|
virtual |
Cast result object to a nodelist.
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.
executionContext | The current XPathExecutionContext |
Reimplemented in XNodeSetBase, XNodeSet, and XNodeSetNodeProxy.
bool XObject::notEquals | ( | const XObject & | theRHS, |
XPathExecutionContext & | executionContext | ||
) | const |
Tell if two objects are functionally not equal.
theRHS | object to compare |
executionContext | the current execution context |
|
virtual |
Cast result object to a number.
executionContext | The current XPathExecutionContext |
Reimplemented in XToken, XResultTreeFrag, XUnknown, XStringBase, XTokenNumberAdapter, XBoolean, XTokenStringAdapter, XNumberBase, XNumber, and XNodeSetBase.
|
virtual |
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.
Reimplemented in XToken, XResultTreeFrag, XUnknown, XTokenNumberAdapter, XTokenStringAdapter, and XNumber.
|
inlinestatic |
|
inlinestatic |
Definition at line 699 of file XObject.hpp.
|
static |
Static conversion function.
|
static |
Static conversion function.
|
pure virtual |
Process a callback request for preferred type information.
theCallbackObject | object to call back |
Implemented in XResultTreeFrag, XToken, XUnknown, XStringBase, XBoolean, XNodeSetBase, and XNumberBase.
|
pure virtual |
Process a callback request for preferred type information.
theCallbackObject | object to call back |
Implemented in XResultTreeFrag, XToken, XUnknown, XStringBase, XBoolean, XNodeSetBase, and XNumberBase.
|
protectedvirtual |
Implements XalanReferenceCountedObject.
Reimplemented in XToken.
|
virtual |
Cast result object to a result tree fragment.
executionContext | The current XPathExecutionContext |
Reimplemented in XResultTreeFrag, XStringBase, and XNodeSetBase.
|
inline |
Definition at line 731 of file XObject.hpp.
|
pure virtual |
Cast result object to a string.
executionContext | The current XPathExecutionContext |
Implemented in XToken, XResultTreeFrag, XUnknown, XString, XStringBase, XTokenNumberAdapter, XBoolean, XNumberBase, XTokenStringAdapter, XNodeSetBase, XNumber, XStringAdapter, XStringCached, and XStringReference.
|
pure 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.
executionContext | The current XPathExecutionContext |
Implemented in XToken, XResultTreeFrag, XUnknown, XString, XStringBase, XTokenNumberAdapter, XBoolean, XNumberBase, XTokenStringAdapter, XNodeSetBase, XNumber, XStringAdapter, XStringCached, and XStringReference.
|
pure virtual |
Send the string value to a FormatterListener instance.
executionContext | The current XPathExecutionContext |
formatterListener | The FormatterListener instance |
function | A pointer to the member function of FormatterListener to call |
Implemented in XToken, XResultTreeFrag, XUnknown, XString, XStringBase, XTokenNumberAdapter, XBoolean, XNumberBase, XTokenStringAdapter, XNodeSetBase, XNumber, XStringAdapter, XStringCached, and XStringReference.
|
pure 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.
formatterListener | The FormatterListener instance |
function | A pointer to the member function of FormatterListener to call |
Implemented in XToken, XResultTreeFrag, XUnknown, XString, XStringBase, XTokenNumberAdapter, XBoolean, XNumberBase, XTokenStringAdapter, XNodeSetBase, XNumber, XStringAdapter, XStringCached, and XStringReference.
|
pure virtual |
Append the string value directly a string.
executionContext | The current XPathExecutionContext |
theBuffer | The buffer for the data |
Implemented in XToken, XResultTreeFrag, XUnknown, XString, XStringBase, XTokenNumberAdapter, XBoolean, XNumberBase, XTokenStringAdapter, XNodeSetBase, XNumber, XStringAdapter, XStringCached, and XStringReference.
|
pure 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.
theBuffer | The buffer for the data |
Implemented in XToken, XResultTreeFrag, XUnknown, XString, XStringBase, XTokenNumberAdapter, XBoolean, XNumberBase, XTokenStringAdapter, XNodeSetBase, XNumber, XStringAdapter, XStringCached, and XStringReference.
|
inlinestatic |
Static conversion function.
Returns a reference to a XalanDOMString instance with the string value of the boolean.
theBool | The boolean value to convert. |
Definition at line 412 of file XObject.hpp.
|
inlinestatic |
Static conversion function.
Appends the supplied boolean value to a string.
theBool | The boolean value to convert. |
theString | The string value of the provided boolean value. |
Definition at line 425 of file XObject.hpp.
|
inlinestatic |
Static conversion function.
Calls the supplied FormatterListener member function with the string value of the boolean.
theBool | The boolean value to convert. |
formatterListener | The FormatterListener instance. |
function | The FormatterListener member function to call. |
Definition at line 441 of file XObject.hpp.
|
inlinestatic |
Static conversion function.
Append the string value of the double to the supplied XalanDOMString parameter.
theNumber | The double to convert. |
theString | The output XalanDOMString. |
Definition at line 464 of file XObject.hpp.
|
inlinestatic |
Static conversion function.
Calls the supplied FormatterListener member function with the string value of the double.
theNumber | The double to convert. |
formatterListener | The FormatterListener instance. |
function | The FormatterListener member function to call. |
Definition at line 480 of file XObject.hpp.
|
inlinestatic |
Static conversion function.
Append the string value of the XalanNode to the supplied XalanDOMString parameter.
theNode | The XalanNode to convert. |
theString | The output XalanDOMString. |
Definition at line 498 of file XObject.hpp.
|
inlinestatic |
Static conversion function.
Calls the supplied FormatterListener member function with the string value of the XalanNode.
theNode | The XalanNode to convert. |
formatterListener | The FormatterListener instance. |
function | The FormatterListener member function to call. |
Definition at line 516 of file XObject.hpp.
|
inlinestatic |
Static conversion function.
Append the string value of the NodeRefListBase to the supplied XalanDOMString parameter.
theNodeList | The NodeRefListBase to convert. |
theString | The output XalanDOMString. |
Definition at line 534 of file XObject.hpp.
|
inlinestatic |
Static conversion function.
Calls the supplied FormatterListener member function with the string value of the NodeRefListBase.
theNodeList | The NodeRefListBase to convert. |
formatterListener | The FormatterListener instance. |
function | The FormatterListener member function to call. |
Definition at line 557 of file XObject.hpp.
|
inlinestatic |
Static conversion function.
Append the string value of the XalanNode to the supplied XalanDOMString parameter.
theNode | The XalanNode to convert. |
theExecutionContext | The current XPathExecutionContext. |
theString | The output XalanDOMString. |
Definition at line 579 of file XObject.hpp.
|
inlinestatic |
Static conversion function.
Calls the supplied FormatterListener member function with the string value of the XalanNode.
theNode | The XalanNode to convert. |
theExecutionContext | The current XPathExecutionContext. |
formatterListener | The FormatterListener instance. |
function | The FormatterListener member function to call. |
Definition at line 597 of file XObject.hpp.
|
inlinestatic |
Static conversion function.
Append the string value of the NodeRefListBase to the supplied XalanDOMString parameter.
theNodeList | The NodeRefListBase to convert. |
theExecutionContext | The current XPathExecutionContext. |
theString | The output XalanDOMString. |
Definition at line 619 of file XObject.hpp.
|
inlinestatic |
Static conversion function.
Calls the supplied FormatterListener member function with the string value of the NodeRefListBase.
theNodeList | The NodeRefListBase to convert. |
theExecutionContext | The current XPathExecutionContext. |
formatterListener | The FormatterListener instance. |
function | The FormatterListener member function to call. |
Definition at line 642 of file XObject.hpp.
|
inlinestatic |
Calls the supplied FormatterListener member function with the string.
theString | The XalanDOMString to convert. |
formatterListener | The FormatterListener instance. |
function | The FormatterListener member function to call. |
Definition at line 669 of file XObject.hpp.
|
pure virtual |
Get the length of the string value of the instance.
Implemented in XToken, XResultTreeFrag, XUnknown, XString, XStringBase, XBoolean, XTokenNumberAdapter, XNumberBase, XTokenStringAdapter, XNodeSetBase, XNumber, XStringAdapter, XStringCached, and XStringReference.
|
static |
Perform static shut down.
See class XPathInit.
|
protected |
|
friend |
Definition at line 728 of file XObject.hpp.
|
friend |
Definition at line 67 of file XObject.hpp.
|
staticprotected |
Definition at line 850 of file XObject.hpp.
|
staticprotected |
Definition at line 848 of file XObject.hpp.
|
staticprotected |
Definition at line 852 of file XObject.hpp.
|
staticprotected |
Definition at line 854 of file XObject.hpp.
|
staticprotected |
Definition at line 856 of file XObject.hpp.
|
staticprotected |
Definition at line 858 of file XObject.hpp.
|
staticprotected |
Definition at line 860 of file XObject.hpp.
|
staticprotected |
Definition at line 862 of file XObject.hpp.
Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.
Xalan-C++ XSLT Processor Version 1.11 |
|