## Xalan-C++ API Documentation

### The Xalan C++ XSLT Processor Version 1.9

Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

# XObject Class Reference

Class to hold XPath return types. More...

Inheritance diagram for XObject:

[legend]
Collaboration diagram for XObject:

[legend]
List of all members.

## Public Types

- typedef void(FormatterListener::* MemberFunctionPtr )(const XMLCh *const , const unsigned int)
- 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...

## Public Member Functions

- XObject (eObjectType theObjectType)
    Create an XObject.
- XObject (const XObject &source)
- virtual const XalanDOMString & getTypeString () const=0
    Given a request type, return the equivalent string.
- virtual double num () const
    Cast result object to a number.
- virtual bool boolean () const
    Cast result object to a boolean.
- virtual const XalanDOMString & str () const
    Cast result object to a string.
- virtual void str (FormatterListener &formatterListener, MemberFunctionPtr function) const=0
    Send the string value to a FormatterListener instance.
- virtual double stringLength () const=0
    Get the length of the string value of the instance..
- virtual void str (XalanDOMString &theBuffer) const
    Append the string value directly a string.
- virtual const XalanDocumentFragment & rtree () const
    Cast result object to a result tree fragment.
- virtual const NodeRefListBase & nodeset () const
    Cast result object to a nodelist.
- virtual void ProcessXObjectTypeCallback (XObjectTypeCallback &theCallbackObject)=0
    Process a callback request for preferred type information.
- virtual void ProcessXObjectTypeCallback (XObjectTypeCallback &theCallbackObject) const=0
    Process a callback request for preferred type information.
- bool equals (const XObject &theRHS, XPathExecutionContext &executionContext) const
    Tell if two objects are functionally equal.
- bool notEquals (const XObject &theRHS, XPathExecutionContext &executionContext) const
    Tell if two objects are functionally not equal.
- bool lessThan (const XObject &theRHS, XPathExecutionContext &executionContext) const
    Tell if one object is less than the other.
- bool lessThanOrEquals (const XObject &theRHS, XPathExecutionContext &executionContext) const
    Tell if one object is less than or equal the other.
- bool greaterThan (const XObject &theRHS, XPathExecutionContext &executionContext) const
    Tell if one object is greater than the other.
- bool greaterThanOrEquals (const XObject &theRHS, XPathExecutionContext &executionContext) const
    Tell if one object is greater than or equal the other.
- eObjectType getType () const
    Tell what kind of class this is.
- void setFactory (XObjectFactory *theFactory)

## Static Public Member Functions

- void initialize (MemoryManagerType &theManager)
    Perform static initialization.
- void terminate ()
    Perform static shut down.
- bool boolean (double theNumber)
    Static conversion function.
- bool boolean (const XalanDOMString &theString)
    Static conversion function.
- bool boolean (const NodeRefListBase &theNodeList)
    Static conversion function.
- const XalanDOMString & string (bool theBool)
    Static conversion function.
- void string (bool theBool, FormatterListener &formatterListener, MemberFunctionPtr function)
- void string (double theNumber, XalanDOMString &theString)
    Static conversion function.
- void string (double theNumber, FormatterListener &formatterListener, MemberFunctionPtr function)
- void string (const XalanNode &theNode, XalanDOMString &theString)
    Static conversion function.
- void string (const XalanNode &theNode, FormatterListener &formatterListener, MemberFunctionPtr function)
- void string (const NodeRefListBase &theNodeList, XalanDOMString &theString)
    Static conversion function.
- void string (const NodeRefListBase &theNodeList, FormatterListener &formatterListener, MemberFunctionPtr function)
- double number (bool theBoolean)
    Static conversion function.
- double number (const XalanDOMString &theString, MemoryManagerType &theManager)
- double number (XPathExecutionContext &executionContext, const NodeRefListBase &theNodeList)
    Static conversion function.
- double number (XPathExecutionContext &executionContext, const XalanNode &theNode)
    Static conversion function.

## Protected Member Functions

- virtual eObjectType getRealType () const
    Tell what kind of class this is.
- virtual void referenced ()
- virtual void dereferenced ()
- virtual ~XObject ()

## Static Protected Attributes

- const XalanDOMString s_emptyString
- const XalanDOMString & s_booleanString
- const XalanDOMString & s_falseString
- const XalanDOMString & s_nodesetString
- const XalanDOMString & s_numberString
- const XalanDOMString & s_resultTreeFragmentString
- const XalanDOMString & s_stringString
- const XalanDOMString & s_trueString

## Friends

- class XObjectPtr
- class XObjectFactory

## Detailed Description

Class to hold XPath return types.

## Member Typedef Documentation

typedef void(FormatterListener::* XObject::MemberFunctionPtr)(const XMLCh* const, const unsigned int)

## Member Enumeration Documentation

enum XObject::eObjectType

  | Enumeration of possible object types. Enumeration values:
  eTypeNull |
  eTypeUnknown |
  eTypeBoolean |
  eTypeNumber |
  eTypeString |
  eTypeNodeSet |
  eTypeResultTreeFrag |
  eTypeUserDefined |
  eTypeStringReference |
  eTypeStringAdapter |
  eTypeStringCached |
  eTypeXTokenNumberAdapter |
  eTypeXTokenStringAdapter |
  eTypeNodeSetNodeProxy |
  eUnknown |

## Constructor & Destructor Documentation

XObject::XObject | ( | eObjectType | theObjectType | ) |

  | Create an XObject. Parameters:
  theObjectType | The enum for the type of the object.

XObject::XObject | ( | const XObject & | source | ) |

virtual XObject::~XObject | ( |  | ) | `[protected, virtual]`

## Member Function Documentation

bool XObject::boolean | ( | const NodeRefListBase & | theNodeList | ) | `[static]`

| Static conversion function. Returns: bool value

bool XObject::boolean | ( | const XalanDOMString & | theString | ) | `[static]`

| Static conversion function. Returns: bool value

bool XObject::boolean | ( | double | theNumber | ) | `[static]`

| Static conversion function. Returns: bool value

virtual bool XObject::boolean | ( |  | ) | const`[virtual]`

| Cast result object to a boolean. Returns: boolean value Reimplemented in XBoolean, XNodeSetBase, XNull, XNumberBase, XStringBase, XToken, XUnknown, and XResultTreeFrag.

virtual void XObject::dereferenced | ( |  | ) | `[protected, virtual]`

| Implements XalanReferenceCountedObject. Reimplemented in XToken, and XResultTreeFrag.

bool XObject::equals | ( | const XObject & | theRHS,
|  | XPathExecutionContext & | executionContext
| ) | const

  | Tell if two objects are functionally equal. Parameters:
  theRHS | object to compare
  executionContext | the current execution context
Returns: true if they are equal

virtual eObjectType XObject::getRealType | ( |  | ) | const`[protected, virtual]`

| Tell what kind of class this is. Returns: numeric type value Reimplemented in XNodeSetNodeProxy, XStringAdapter, XStringCached, XStringReference, XTokenNumberAdapter, and XTokenStringAdapter.

eObjectType XObject::getType | ( |  | ) | const

| Tell what kind of class this is. Returns: numeric type value

virtual const XalanDOMString& XObject::getTypeString | ( |  | ) | const`[pure virtual]`

| Given a request type, return the equivalent string. For diagnostic purposes. Returns: string for type Implemented in XBoolean, XNodeSetBase, XNull, XNumberBase, XStringBase, XToken, XUnknown, and XResultTreeFrag.

bool XObject::greaterThan | ( | const XObject & | theRHS,
|  | XPathExecutionContext & | executionContext
| ) | const

  | Tell if one object is greater than the other. Parameters:
  theRHS | object to compare
Returns: true if they are equal

bool XObject::greaterThanOrEquals | ( | const XObject & | theRHS,
|  | XPathExecutionContext & | executionContext
| ) | const

  | Tell if one object is greater than or equal the other. Parameters:
  theRHS | object to compare
Returns: true if they are equal

void XObject::initialize | ( | MemoryManagerType & | theManager | ) | `[static]`

| Perform static initialization. See class XPathInit. Reimplemented in XUnknown.

bool XObject::lessThan | ( | const XObject & | theRHS,
|  | XPathExecutionContext & | executionContext
| ) | const

  | Tell if one object is less than the other. Parameters:
  theRHS | object to compare
Returns: true if they are equal

bool XObject::lessThanOrEquals | ( | const XObject & | theRHS,
|  | XPathExecutionContext & | executionContext
| ) | const

  | Tell if one object is less than or equal the other. Parameters:
  theRHS | object to compare
Returns: true if they are equal

virtual const NodeRefListBase& XObject::nodeset | ( |  | ) | const`[virtual]`

| Cast result object to a nodelist. Returns: node list Reimplemented in XNodeSet, XNodeSetBase, XNodeSetNodeProxy, and XResultTreeFrag.

bool XObject::notEquals | ( | const XObject & | theRHS,
|  | XPathExecutionContext & | executionContext
| ) | const

  | Tell if two objects are functionally not equal. Parameters:
  theRHS | object to compare
  executionContext | the current execution context
Returns: true if they are equal

virtual double XObject::num | ( |  | ) | const`[virtual]`

| Cast result object to a number. Returns: numeric value Reimplemented in XBoolean, XNodeSetBase, XNull, XNumber, XNumberBase, XStringBase, XToken, XTokenNumberAdapter, XTokenStringAdapter, XUnknown, and XResultTreeFrag.

double XObject::number | ( | XPathExecutionContext & | executionContext,
|  | const XalanNode & | theNode
| ) | `[static]`

| Static conversion function. Returns: The number value of the node

double XObject::number | ( | XPathExecutionContext & | executionContext,
|  | const NodeRefListBase & | theNodeList
| ) | `[static]`

| Static conversion function. Returns: The number value of the node list

double XObject::number | ( | const XalanDOMString & | theString,
|  | MemoryManagerType & | theManager
| ) | `[static]`

double XObject::number | ( | bool | theBoolean | ) | `[static]`

| Static conversion function. Returns: bool value

virtual void XObject::ProcessXObjectTypeCallback | ( | XObjectTypeCallback & | theCallbackObject | ) | const`[pure virtual]`

  | Process a callback request for preferred type information. Parameters:
  theCallbackObject | object to call back
Implemented in XBoolean, XNodeSetBase, XNull, XNumberBase, XStringBase, XToken, XUnknown, and XResultTreeFrag.

virtual void XObject::ProcessXObjectTypeCallback | ( | XObjectTypeCallback & | theCallbackObject | ) | `[pure virtual]`

  | Process a callback request for preferred type information. Parameters:
  theCallbackObject | object to call back
Implemented in XBoolean, XNodeSetBase, XNull, XNumberBase, XStringBase, XToken, XUnknown, and XResultTreeFrag.

virtual void XObject::referenced | ( |  | ) | `[protected, virtual]`

| Implements XalanReferenceCountedObject. Reimplemented in XToken.

virtual const XalanDocumentFragment& XObject::rtree | ( |  | ) | const`[virtual]`

| Cast result object to a result tree fragment. Returns: result tree fragment Reimplemented in XNodeSetBase, XStringBase, and XResultTreeFrag.

void XObject::setFactory | ( | XObjectFactory * | theFactory | ) |

virtual void XObject::str | ( | XalanDOMString & | theBuffer | ) | const`[virtual]`

  | Append the string value directly a string. Parameters:
  theBuffer | The buffer for the data
Reimplemented in XNodeSetBase, XNumber, XToken, XTokenNumberAdapter, XTokenStringAdapter, and XResultTreeFrag.

virtual void XObject::str | ( | FormatterListener & | formatterListener,
|  | MemberFunctionPtr | function
| ) | const`[pure virtual]`

  | Send the string value to a FormatterListener instance. Parameters:
  formatterListener | The FormatterListener instance
  function | A pointer to the member function of FormatterListener to call
Implemented in XBoolean, XNodeSetBase, XNull, XNumber, XNumberBase, XString, XStringAdapter, XStringBase, XStringCached, XStringReference, XToken, XTokenNumberAdapter, XTokenStringAdapter, XUnknown, and XResultTreeFrag.

virtual const XalanDOMString& XObject::str | ( |  | ) | const`[virtual]`

| Cast result object to a string. Returns: string value Reimplemented in XBoolean, XNodeSetBase, XNull, XNumber, XNumberBase, XString, XStringAdapter, XStringBase, XStringCached, XStringReference, XToken, XTokenNumberAdapter, XTokenStringAdapter, XUnknown, and XResultTreeFrag.

void XObject::string | ( | const NodeRefListBase & | theNodeList,
|  | FormatterListener & | formatterListener,
|  | MemberFunctionPtr | function
| ) | `[static]`

void XObject::string | ( | const NodeRefListBase & | theNodeList,
|  | XalanDOMString & | theString
| ) | `[static]`

| Static conversion function. Returns: The string value of the node list

void XObject::string | ( | const XalanNode & | theNode,
|  | FormatterListener & | formatterListener,
|  | MemberFunctionPtr | function
| ) | `[static]`

void XObject::string | ( | const XalanNode & | theNode,
|  | XalanDOMString & | theString
| ) | `[static]`

| Static conversion function. Returns: The string value of the node

void XObject::string | ( | double | theNumber,
|  | FormatterListener & | formatterListener,
|  | MemberFunctionPtr | function
| ) | `[static]`

void XObject::string | ( | double | theNumber,
|  | XalanDOMString & | theString
| ) | `[static]`

| Static conversion function. Returns: The string value of the number

void XObject::string | ( | bool | theBool,
|  | FormatterListener & | formatterListener,
|  | MemberFunctionPtr | function
| ) | `[static]`

const XalanDOMString& XObject::string | ( | bool | theBool | ) | `[static]`

| Static conversion function. Returns: The string value of the number

virtual double XObject::stringLength | ( |  | ) | const`[pure virtual]`

| Get the length of the string value of the instance.. Returns: The length of the string value Implemented in XBoolean, XNodeSetBase, XNull, XNumber, XNumberBase, XString, XStringAdapter, XStringBase, XStringCached, XStringReference, XToken, XTokenNumberAdapter, XTokenStringAdapter, XUnknown, and XResultTreeFrag.

void XObject::terminate | ( |  | ) | `[static]`

| Perform static shut down. See class XPathInit. Reimplemented in XNull, and XUnknown.

## Friends And Related Function Documentation

friend class XObjectFactory`[friend]`

friend class XObjectPtr`[friend]`

## Member Data Documentation

const XalanDOMString& XObject::s_booleanString`[static, protected]`

const XalanDOMString XObject::s_emptyString`[static, protected]`

const XalanDOMString& XObject::s_falseString`[static, protected]`

const XalanDOMString& XObject::s_nodesetString`[static, protected]`

const XalanDOMString& XObject::s_numberString`[static, protected]`

const XalanDOMString& XObject::s_resultTreeFragmentString`[static, protected]`

const XalanDOMString& XObject::s_stringString`[static, protected]`

const XalanDOMString& XObject::s_trueString`[static, protected]`

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

- XObject.hpp

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.9 Copyright © 1999-2004 The Apache Software Foundation. All Rights Reserved.