18#if !defined(XOBJECT_HEADER_GUARD_1357924680)
19#define XOBJECT_HEADER_GUARD_1357924680
52class MutableNodeRefList;
54class XalanDocumentFragment;
56class XObjectTypeCallback;
80 eTypeResultTreeFrag = 6,
84 eTypeStringReference = 8,
85 eTypeStringAdapter = 9,
86 eTypeStringCached = 10,
87 eTypeXTokenNumberAdapter = 11,
88 eTypeXTokenStringAdapter = 12,
89 eTypeNodeSetNodeProxy = 13,
193 MemberFunctionPtr function)
const = 0;
209 MemberFunctionPtr function)
const = 0;
414 return theBool ==
true ? s_trueString : s_falseString;
444 MemberFunctionPtr function)
483 MemberFunctionPtr function)
519 MemberFunctionPtr function)
560 MemberFunctionPtr function)
601 MemberFunctionPtr function)
603 DOMServices::getNodeData(
646 MemberFunctionPtr function)
652 DOMServices::getNodeData(
672 MemberFunctionPtr function)
823 assert(m_memoryManager != 0);
825 return *m_memoryManager;
875 mutable MemoryManager* m_memoryManager;
897 XalanReferenceCountedObject::addReference(
theXObject);
903 XalanReferenceCountedObject::addReference(m_xobjectPtr);
909 if (m_xobjectPtr !=
theRHS.m_xobjectPtr)
911 XalanReferenceCountedObject::removeReference(m_xobjectPtr);
913 m_xobjectPtr =
theRHS.m_xobjectPtr;
915 XalanReferenceCountedObject::addReference(m_xobjectPtr);
923 XalanReferenceCountedObject::removeReference(m_xobjectPtr);
933 XalanReferenceCountedObject::removeReference(
xobjectPtr);
939 return m_xobjectPtr == 0 ?
true :
false;
945 return *m_xobjectPtr;
951 return *m_xobjectPtr;
#define XALAN_XPATH_EXPORT
#define XALAN_CPP_NAMESPACE
Xalan-C++ namespace, including major and minor version.
Local implementation of NodeRefList.
This class handles the creation of XObjects and manages their lifetime.
Class to hold XObjectPtr return types.
XObjectPtr & operator=(const XObjectPtr &theRHS)
const XObject * operator->() const
const XObject & operator*() const
XObjectPtr(const XObjectPtr &theSource)
XObjectPtr(XObject *theXObject=0)
Create an XObjectPtr.
const XObject * get() const
The purpose of this class is to provide a way to get the "preferred" or closest matching type for XOb...
virtual const XalanDOMChar * getType() const
Retrieve type of exception.
XObjectException(const XObjectException &other)
XObjectException(const XalanDOMString &theMessage, MemoryManager &theManager, const Locator *theLocator)
virtual ~XObjectException()
XObjectException(const XalanDOMString &theMessage, MemoryManager &theManager)
virtual ~XObjectInvalidConversionException()
virtual const XalanDOMChar * getType() const
Retrieve type of exception.
XObjectInvalidConversionException(const XObjectInvalidConversionException &other)
XObjectInvalidConversionException(MemoryManager &memoryManager, const XalanDOMString &fromType, const XalanDOMString &toType, XalanDOMString &buffer)
Class to hold XPath return types.
static void string(const XalanNode &theNode, FormatterListener &formatterListener, MemberFunctionPtr function)
Static conversion function.
static bool boolean(double theNumber)
Static conversion function.
static void initialize(MemoryManager &theMemoryManager)
Perform static initialization.
bool greaterThan(const XObject &theRHS, XPathExecutionContext &executionContext) const
Tell if one object is greater than the other.
static double number(XPathExecutionContext &executionContext, const NodeRefListBase &theNodeList)
Static conversion function.
bool equals(const XObject &theRHS, XPathExecutionContext &executionContext) const
Tell if two objects are functionally equal.
virtual void str(XPathExecutionContext &executionContext, XalanDOMString &theBuffer) const =0
Append the string value directly a string.
static bool boolean(const NodeRefListBase &theNodeList)
Static conversion function.
virtual void str(FormatterListener &formatterListener, MemberFunctionPtr function) const =0
Send the string value to a FormatterListener instance.
eObjectType
Enumeration of possible object types.
static void string(const XalanNode &theNode, XalanDOMString &theString)
Static conversion function.
virtual const XalanDOMString & str(XPathExecutionContext &executionContext) const =0
Cast result object to a string.
static void string(const XalanNode &theNode, XPathExecutionContext &theExecutionContext, FormatterListener &formatterListener, MemberFunctionPtr function)
Static conversion function.
static const XalanDOMString s_emptyString
static void terminate()
Perform static shut down.
void setFactory(XObjectFactory *theFactory)
virtual const NodeRefListBase & nodeset() const
Cast result object to a nodelist.
static const XalanDOMString & s_resultTreeFragmentString
eObjectType getType() const
Tell what kind of class this is.
XObject(eObjectType theObjectType, MemoryManager &theMemoryManager)
Create an XObject.
virtual void dereferenced()
static void string(double theNumber, XalanDOMString &theString)
Static conversion function.
static const XalanDOMString & s_trueString
virtual eObjectType getRealType() const
Tell what kind of class this is.
virtual const XalanDOMString & getTypeString() const =0
Given a request type, return the equivalent string.
static bool boolean(const XalanDOMString &theString)
Static conversion function.
static const XalanDOMString & s_falseString
XPathExecutionContext::GetCachedString GetCachedString
virtual void ProcessXObjectTypeCallback(XObjectTypeCallback &theCallbackObject)=0
Process a callback request for preferred type information.
bool notEquals(const XObject &theRHS, XPathExecutionContext &executionContext) const
Tell if two objects are functionally not equal.
static double number(bool theBoolean)
Static conversion function.
static const XalanDOMString & s_numberString
bool greaterThanOrEquals(const XObject &theRHS, XPathExecutionContext &executionContext) const
Tell if one object is greater than or equal the other.
virtual double num(XPathExecutionContext &executionContext) const
Cast result object to a number.
static const XalanDOMString & s_stringString
static double number(const XalanDOMString &theString, MemoryManager &theManager)
MemoryManager & getMemoryManager() const
Get the MemoryManager for this instance.
virtual bool boolean(XPathExecutionContext &executionContext) const =0
Cast result object to a boolean.
static void string(const NodeRefListBase &theNodeList, XalanDOMString &theString)
Static conversion function.
static void string(const NodeRefListBase &theNodeList, FormatterListener &formatterListener, MemberFunctionPtr function)
Static conversion function.
static void string(bool theBool, FormatterListener &formatterListener, MemberFunctionPtr function)
Static conversion function.
virtual void ProcessXObjectTypeCallback(XObjectTypeCallback &theCallbackObject) const =0
Process a callback request for preferred type information.
static void string(bool theBool, XalanDOMString &theString)
Static conversion function.
virtual const XalanDOMString & str() const =0
Cast result object to a string.
static void string(const NodeRefListBase &theNodeList, XPathExecutionContext &theExecutionContext, XalanDOMString &theString)
Static conversion function.
static void string(const XalanDOMString &theString, FormatterListener &formatterListener, MemberFunctionPtr function)
Calls the supplied FormatterListener member function with the string.
virtual void str(XPathExecutionContext &executionContext, FormatterListener &formatterListener, MemberFunctionPtr function) const =0
Send the string value to a FormatterListener instance.
bool lessThanOrEquals(const XObject &theRHS, XPathExecutionContext &executionContext) const
Tell if one object is less than or equal the other.
static const XalanDOMString & s_nodesetString
static void string(const XalanNode &theNode, XPathExecutionContext &theExecutionContext, XalanDOMString &theString)
Static conversion function.
bool lessThan(const XObject &theRHS, XPathExecutionContext &executionContext) const
Tell if one object is less than the other.
static const XalanDOMString & string(bool theBool)
Static conversion function.
static void string(double theNumber, FormatterListener &formatterListener, MemberFunctionPtr function)
Static conversion function.
static const XalanDOMString & s_booleanString
void throwInvalidConversionException(const XalanDOMString &theTargetType) const
virtual double stringLength(XPathExecutionContext &executionContext) const =0
Get the length of the string value of the instance.
static double number(XPathExecutionContext &executionContext, const XalanNode &theNode)
Static conversion function.
virtual void str(XalanDOMString &theBuffer) const =0
Append the string value directly a string.
XObject(const XObject &source, MemoryManager &theManager)
Create an XObject from another XObject.
static void string(const NodeRefListBase &theNodeList, XPathExecutionContext &theExecutionContext, FormatterListener &formatterListener, MemberFunctionPtr function)
Static conversion function.
virtual void referenced()
virtual const XalanDocumentFragment & rtree() const
Cast result object to a result tree fragment.
XObject(const XObject &)
Create an XObject from another XObject.
virtual double num() const
Cast result object to a number.
Class to hold reference count information.
bool operator==(const XalanVector< Type > &theLHS, const XalanVector< Type > &theRHS)
bool operator!=(const XalanVector< Type > &theLHS, const XalanVector< Type > &theRHS)
NumberToDOMString(double theValue, XalanDOMString &theResult)
Converts a double value into a XalanDOMString.