Xalan-C++ API Reference 1.12.0
XObject.hpp
Go to the documentation of this file.
1/*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 */
18#if !defined(XOBJECT_HEADER_GUARD_1357924680)
19#define XOBJECT_HEADER_GUARD_1357924680
20
21
22
23// Base include file. Must be first.
25
26
27
29
30
31
35
36
37
39
40
41
45
46
47
48namespace XALAN_CPP_NAMESPACE {
49
50
51
52class MutableNodeRefList;
53class NodeRefListBase;
54class XalanDocumentFragment;
55class XObjectFactory;
56class XObjectTypeCallback;
57
58
59
60/**
61 * Class to hold XPath return types.
62 */
64{
65public:
66
67 friend class XObjectPtr;
68
70
71 /**
72 * Enumeration of possible object types
73 */
74 enum eObjectType { eTypeNull = 0,
75 eTypeUnknown = 1,
76 eTypeBoolean = 2,
77 eTypeNumber = 3,
78 eTypeString = 4,
79 eTypeNodeSet = 5,
80 eTypeResultTreeFrag = 6,
81 eTypeUserDefined = 7,
82 // These next types are implementation-specific, and
83 // are never returned by getType().
84 eTypeStringReference = 8,
85 eTypeStringAdapter = 9,
86 eTypeStringCached = 10,
87 eTypeXTokenNumberAdapter = 11,
88 eTypeXTokenStringAdapter = 12,
89 eTypeNodeSetNodeProxy = 13,
90 eUnknown
91 };
92
93 /**
94 * Perform static initialization. See class XPathInit.
95 *
96 * @param theMemoryManager The MemoryManager instance.
97 */
98 static void
100
101 /**
102 * Perform static shut down. See class XPathInit.
103 */
104 static void
106
107 /**
108 * Create an XObject.
109 *
110 * @param theObjectType The enum for the type of the object.
111 * @param theMemoryManager The MemoryManager instance.
112 */
115 MemoryManager& theMemoryManager);
116
117 /**
118 * Given a request type, return the equivalent string.
119 * For diagnostic purposes.
120 *
121 * @return string for type
122 */
123 virtual const XalanDOMString&
124 getTypeString() const = 0;
125
126 /**
127 * Cast result object to a number.
128 *
129 * @param executionContext The current XPathExecutionContext
130 * @return numeric value
131 */
132 virtual double
134
135 /**
136 * Cast result object to a number.
137 *
138 * This function does not have access to the current
139 * XPathExecutionContext, so the result may contain data
140 * from whitespace text nodes that might have been stripped
141 * otherwise.
142 *
143 * @return numeric value
144 */
145 virtual double
146 num() const;
147
148 /**
149 * Cast result object to a boolean.
150 *
151 * @param executionContext The current XPathExecutionContext
152 * @return boolean value
153 */
154 virtual bool
156
157 /**
158 * Cast result object to a string.
159 *
160 * @param executionContext The current XPathExecutionContext
161 * @return string value
162 */
163 virtual const XalanDOMString&
165
166 /**
167 * Cast result object to a string.
168 *
169 * This function does not have access to the current
170 * XPathExecutionContext, so the result may contain data
171 * from whitespace text nodes that might have been stripped
172 * otherwise.
173 *
174 * @param executionContext The current XPathExecutionContext
175 * @return string value
176 */
177 virtual const XalanDOMString&
178 str() const = 0;
179
181
182 /**
183 * Send the string value to a FormatterListener instance.
184 *
185 * @param executionContext The current XPathExecutionContext
186 * @param formatterListener The FormatterListener instance
187 * @param function A pointer to the member function of FormatterListener to call
188 */
189 virtual void
193 MemberFunctionPtr function) const = 0;
194
195 /**
196 * Send the string value to a FormatterListener instance.
197 *
198 * This function does not have access to the current
199 * XPathExecutionContext, so the result may contain data
200 * from whitespace text nodes that might have been stripped
201 * otherwise.
202 *
203 * @param formatterListener The FormatterListener instance
204 * @param function A pointer to the member function of FormatterListener to call
205 */
206 virtual void
209 MemberFunctionPtr function) const = 0;
210
211 /**
212 * Append the string value directly a string
213 *
214 * @param executionContext The current XPathExecutionContext
215 * @param theBuffer The buffer for the data
216 */
217 virtual void
220 XalanDOMString& theBuffer) const = 0;
221
222 /**
223 * Append the string value directly a string
224 *
225 * This function does not have access to the current
226 * XPathExecutionContext, so the result may contain data
227 * from whitespace text nodes that might have been stripped
228 * otherwise.
229 *
230 * @param theBuffer The buffer for the data
231 */
232 virtual void
234
235 /**
236 * Get the length of the string value of the instance.
237 *
238 * @return The length of the string value
239 */
240 virtual double
242
243 /**
244 * Cast result object to a result tree fragment.
245 *
246 * @param executionContext The current XPathExecutionContext
247 * @return result tree fragment
248 */
249 virtual const XalanDocumentFragment&
250 rtree() const;
251
252 /**
253 * Cast result object to a nodelist
254 *
255 * This function does not have access to the current
256 * XPathExecutionContext, so the result may contain data
257 * from whitespace text nodes that might have been stripped
258 * otherwise.
259 *
260 * @param executionContext The current XPathExecutionContext
261 * @return node list
262 */
263 virtual const NodeRefListBase&
264 nodeset() const;
265
266 /**
267 * Process a callback request for preferred type information.
268 *
269 * @param theCallbackObject object to call back
270 */
271 virtual void
273
274 /**
275 * Process a callback request for preferred type information.
276 *
277 * @param theCallbackObject object to call back
278 */
279 virtual void
281
282 /**
283 * Tell if two objects are functionally equal.
284 *
285 * @param theRHS object to compare
286 * @param executionContext the current execution context
287 * @return true if they are equal
288 */
289 bool
291 const XObject& theRHS,
293
294 /**
295 * Tell if two objects are functionally not equal.
296 *
297 * @param theRHS object to compare
298 * @param executionContext the current execution context
299 * @return true if they are equal
300 */
301 bool
303 const XObject& theRHS,
305
306 /**
307 * Tell if one object is less than the other.
308 *
309 * @param theRHS object to compare
310 * @return true if they are equal
311 */
312 bool
314 const XObject& theRHS,
316
317 /**
318 * Tell if one object is less than or equal
319 * the other.
320 *
321 * @param theRHS object to compare
322 * @return true if they are equal
323 */
324 bool
326 const XObject& theRHS,
328
329 /**
330 * Tell if one object is greater than the other.
331 *
332 * @param theRHS object to compare
333 * @return true if they are equal
334 */
335 bool
337 const XObject& theRHS,
339
340 /**
341 * Tell if one object is greater than or equal
342 * the other.
343 *
344 * @param theRHS object to compare
345 * @return true if they are equal
346 */
347 bool
349 const XObject& theRHS,
351
352 /**
353 * Tell what kind of class this is.
354 *
355 * @return numeric type value
356 */
358 getType() const
359 {
360 return m_objectType;
361 }
362
363 /**
364 * Static conversion function. Returns the boolean value
365 * of the supplied double.
366 *
367 * @param theString The double to convert.
368 *
369 * @return bool value
370 */
371 static bool
373 {
374 return !DoubleSupport::isNaN(theNumber) && !DoubleSupport::equal(theNumber, 0.0);
375 }
376
377 /**
378 * Static conversion function. Returns the boolean value
379 * of the supplied XalanDOMString.
380 *
381 * @param theString The XalanDOMString to convert.
382 * @return bool value
383 */
384 static bool
386 {
387 return theString.length() == 0 ? false : true;
388 }
389
390 /**
391 * Static conversion function. Returns the boolean value
392 * of the supplied NodeRefListBase.
393 *
394 * @param theNodeList The NodeRefListBase to convert.
395 * @return bool value
396 */
397 static bool
399 {
400 return theNodeList.getLength() == 0 ? false : true;
401 }
402
403 /**
404 * Static conversion function. Returns a reference to a
405 * XalanDOMString instance with the string value of the
406 * boolean.
407 *
408 * @param theBool The boolean value to convert.
409 * @return The string value of the boolean
410 */
411 static const XalanDOMString&
413 {
414 return theBool == true ? s_trueString : s_falseString;
415 }
416
417 /**
418 * Static conversion function. Appends the supplied boolean
419 * value to a string.
420 *
421 * @param theBool The boolean value to convert.
422 * @param theString The string value of the provided boolean value.
423 */
424 static void
426 bool theBool,
428 {
429 theString.append(theBool == true ? s_trueString : s_falseString);
430 }
431
432 /**
433 * Static conversion function. Calls the supplied FormatterListener
434 * member function with the string value of the boolean.
435 *
436 * @param theBool The boolean value to convert.
437 * @param formatterListener The FormatterListener instance.
438 * @param function The FormatterListener member function to call.
439 */
440 static void
442 bool theBool,
444 MemberFunctionPtr function)
445 {
446 if(theBool == true)
447 {
448 (formatterListener.*function)(s_trueString.c_str(), s_trueString.length());
449 }
450 else
451 {
452 (formatterListener.*function)(s_falseString.c_str(), s_falseString.length());
453 }
454 }
455
456 /**
457 * Static conversion function. Append the string value of the
458 * double to the supplied XalanDOMString parameter.
459 *
460 * @param theNumber The double to convert.
461 * @param theString The output XalanDOMString.
462 */
463 static void
470
471 /**
472 * Static conversion function. Calls the supplied FormatterListener
473 * member function with the string value of the double.
474 *
475 * @param theNumber The double to convert.
476 * @param formatterListener The FormatterListener instance.
477 * @param function The FormatterListener member function to call.
478 */
479 static void
481 double theNumber,
483 MemberFunctionPtr function)
484 {
485 DOMStringHelper::NumberToCharacters(theNumber, formatterListener, function);
486 }
487
488 /**
489 * Static conversion function. Append the string value of the
490 * XalanNode to the supplied XalanDOMString parameter.
491 *
492 * @deprecated This function is deprecated and should not be used.
493 *
494 * @param theNode The XalanNode to convert.
495 * @param theString The output XalanDOMString.
496 */
497 static void
499 const XalanNode& theNode,
501 {
502 DOMServices::getNodeData(theNode, theString);
503 }
504
505 /**
506 * Static conversion function. Calls the supplied FormatterListener
507 * member function with the string value of the XalanNode.
508 *
509 * @deprecated This function is deprecated and should not be used.
510 *
511 * @param theNode The XalanNode to convert.
512 * @param formatterListener The FormatterListener instance.
513 * @param function The FormatterListener member function to call.
514 */
515 static void
517 const XalanNode& theNode,
519 MemberFunctionPtr function)
520 {
521 DOMServices::getNodeData(theNode, formatterListener, function);
522 }
523
524 /**
525 * Static conversion function. Append the string value of the
526 * NodeRefListBase to the supplied XalanDOMString parameter.
527 *
528 * @deprecated This function is deprecated and should not be used.
529 *
530 * @param theNodeList The NodeRefListBase to convert.
531 * @param theString The output XalanDOMString.
532 */
533 static void
537 {
538 if (theNodeList.getLength() > 0)
539 {
540 assert(theNodeList.item(0) != 0);
541
542 string(*theNodeList.item(0), theString);
543 }
544 }
545
546 /**
547 * Static conversion function. Calls the supplied FormatterListener
548 * member function with the string value of the NodeRefListBase.
549 *
550 * @deprecated This function is deprecated and should not be used.
551 *
552 * @param theNodeList The NodeRefListBase to convert.
553 * @param formatterListener The FormatterListener instance.
554 * @param function The FormatterListener member function to call.
555 */
556 static void
560 MemberFunctionPtr function)
561 {
562 if (theNodeList.getLength() > 0)
563 {
564 assert(theNodeList.item(0) != 0);
565
566 DOMServices::getNodeData(*theNodeList.item(0), formatterListener, function);
567 }
568 }
569
570 /**
571 * Static conversion function. Append the string value of the
572 * XalanNode to the supplied XalanDOMString parameter.
573 *
574 * @param theNode The XalanNode to convert.
575 * @param theExecutionContext The current XPathExecutionContext.
576 * @param theString The output XalanDOMString.
577 */
578 static void
586
587 /**
588 * Static conversion function. Calls the supplied FormatterListener
589 * member function with the string value of the XalanNode.
590 *
591 * @param theNode The XalanNode to convert.
592 * @param theExecutionContext The current XPathExecutionContext.
593 * @param formatterListener The FormatterListener instance.
594 * @param function The FormatterListener member function to call.
595 */
596 static void
598 const XalanNode& theNode,
601 MemberFunctionPtr function)
602 {
603 DOMServices::getNodeData(
604 theNode,
607 function);
608 }
609
610 /**
611 * Static conversion function. Append the string value of the
612 * NodeRefListBase to the supplied XalanDOMString parameter.
613 *
614 * @param theNodeList The NodeRefListBase to convert.
615 * @param theExecutionContext The current XPathExecutionContext.
616 * @param theString The output XalanDOMString.
617 */
618 static void
623 {
624 if (theNodeList.getLength() > 0)
625 {
626 assert(theNodeList.item(0) != 0);
627
628 string(*theNodeList.item(0), theExecutionContext, theString);
629 }
630 }
631
632 /**
633 * Static conversion function. Calls the supplied FormatterListener
634 * member function with the string value of the NodeRefListBase.
635 *
636 * @param theNodeList The NodeRefListBase to convert.
637 * @param theExecutionContext The current XPathExecutionContext.
638 * @param formatterListener The FormatterListener instance.
639 * @param function The FormatterListener member function to call.
640 */
641 static void
646 MemberFunctionPtr function)
647 {
648 if (theNodeList.getLength() > 0)
649 {
650 assert(theNodeList.item(0) != 0);
651
652 DOMServices::getNodeData(
653 *theNodeList.item(0),
656 function);
657 }
658 }
659
660 /**
661 * Calls the supplied FormatterListener member function with
662 * the string.
663 *
664 * @param theString The XalanDOMString to convert.
665 * @param formatterListener The FormatterListener instance.
666 * @param function The FormatterListener member function to call.
667 */
668 static void
672 MemberFunctionPtr function)
673 {
675 theString.length();
676
677 if (theLength != 0)
678 {
680
681 (formatterListener.*function)(
682 theString.c_str(),
684 }
685 }
686
687 /**
688 * Static conversion function.
689 *
690 * @return bool value
691 */
692 static double
694 {
695 return theBoolean == true ? 1.0 : 0.0;
696 }
697
698 static double
701 MemoryManager& theManager)
702 {
703 return DoubleSupport::toDouble(theString, theManager);
704 }
705
706 /**
707 * Static conversion function.
708 *
709 * @return The number value of the node list
710 */
711 static double
715
716 /**
717 * Static conversion function.
718 *
719 * @return The number value of the node
720 */
721 static double
724 const XalanNode& theNode);
725
726
727 // All XObject instances are controlled by an instance of an XObjectFactory.
728 friend class XObjectFactory;
729
730 void
732 {
733 m_factory = theFactory;
734 }
735
736 // Base class for all XObject exceptions...
738 {
739 public:
740
743 MemoryManager& theManager);
744
747 MemoryManager& theManager,
748 const Locator* theLocator);
749
751
752 virtual
754
755 virtual const XalanDOMChar*
756 getType() const;
757
758 private:
759
760 static const XalanDOMChar s_type[];
761 };
762
764 {
765 public:
766
768 MemoryManager& memoryManager,
770 const XalanDOMString& toType,
772
774
775 virtual
777
778 virtual const XalanDOMChar*
779 getType() const;
780
781 private:
782
783 static const XalanDOMChar s_type[];
784
785 static const XalanDOMString&
786 formatErrorString(
788 const XalanDOMString& toType,
790 };
791
792protected:
793
794 /**
795 * Create an XObject from another XObject.
796 *
797 * The recommended copy constructor is the next
798 * overload, that accepts an explicit MemoryManager
799 * instance.
800 *
801 * @param source The source for the copy
802 */
804
805 /**
806 * Create an XObject from another XObject.
807 *
808 * @param source The source for the copy
809 * @param theMemoryManager The MemoryManager instance.
810 */
812 const XObject& source,
813 MemoryManager& theManager);
814
815 /**
816 * Get the MemoryManager for this instance.
817 *
818 * @return The MemoryManager.
819 */
820 MemoryManager&
822 {
823 assert(m_memoryManager != 0);
824
825 return *m_memoryManager;
826 }
827
828 void
830
831 /**
832 * Tell what kind of class this is.
833 *
834 * @return numeric type value
835 */
836 virtual eObjectType
837 getRealType() const;
838
839 virtual void
841
842 virtual void
844
845 virtual
847
849
851
853
855
857
859
861
863
864private:
865
866 // Not implemented...
867 XObject&
868 operator=(const XObject&);
869
870
871 eObjectType m_objectType;
872
873 XObjectFactory* m_factory;
874
875 mutable MemoryManager* m_memoryManager;
876};
877
878
879
880/**
881 * Class to hold XObjectPtr return types.
882 */
884{
885public:
886
887 friend bool operator==(const XObjectPtr&, const XObjectPtr&);
888 friend bool operator<(const XObjectPtr&, const XObjectPtr&);
889
890 /**
891 * Create an XObjectPtr.
892 */
893 explicit
895 m_xobjectPtr(theXObject)
896 {
897 XalanReferenceCountedObject::addReference(theXObject);
898 }
899
901 m_xobjectPtr(theSource.m_xobjectPtr)
902 {
903 XalanReferenceCountedObject::addReference(m_xobjectPtr);
904 };
905
908 {
909 if (m_xobjectPtr != theRHS.m_xobjectPtr)
910 {
911 XalanReferenceCountedObject::removeReference(m_xobjectPtr);
912
913 m_xobjectPtr = theRHS.m_xobjectPtr;
914
915 XalanReferenceCountedObject::addReference(m_xobjectPtr);
916 }
917
918 return *this;
919 }
920
922 {
923 XalanReferenceCountedObject::removeReference(m_xobjectPtr);
924 };
925
926 void
928 {
929 XObject* const xobjectPtr = m_xobjectPtr;
930
931 m_xobjectPtr = 0;
932
933 XalanReferenceCountedObject::removeReference(xobjectPtr);
934 }
935
936 bool
937 null() const
938 {
939 return m_xobjectPtr == 0 ? true : false;
940 }
941
942 const XObject&
943 operator*() const
944 {
945 return *m_xobjectPtr;
946 };
947
948 XObject&
950 {
951 return *m_xobjectPtr;
952 };
953
954 const XObject*
956 {
957 return m_xobjectPtr;
958 };
959
960 XObject*
962 {
963 return m_xobjectPtr;
964 };
965
966 const XObject*
967 get() const
968 {
969 return m_xobjectPtr;
970 };
971
972 XObject*
974 {
975 return m_xobjectPtr;
976 };
977
978private:
979
980 XObject* m_xobjectPtr;
981};
982
983
984
985inline bool
987 const XObjectPtr& theLHS,
988 const XObjectPtr& theRHS)
989{
990 return theLHS.m_xobjectPtr == theRHS.m_xobjectPtr;
991}
992
993
994
995inline bool
997 const XObjectPtr& theLHS,
998 const XObjectPtr& theRHS)
999{
1000 return !(theLHS == theRHS);
1001}
1002
1003
1004
1005inline bool
1006operator<(
1007 const XObjectPtr& theLHS,
1008 const XObjectPtr& theRHS)
1009{
1010 return theLHS.m_xobjectPtr < theRHS.m_xobjectPtr;
1011}
1012
1013
1014
1015}
1016
1017
1018
1019#endif // XOBJECT_HEADER_GUARD_1357924680
#define XALAN_XPATH_EXPORT
#define XALAN_CPP_NAMESPACE
Xalan-C++ namespace, including major and minor version.
A SAX-based formatter interface for the XSL processor.
Local implementation of NodeRefList.
This class handles the creation of XObjects and manages their lifetime.
Class to hold XObjectPtr return types.
Definition XObject.hpp:884
XObjectPtr & operator=(const XObjectPtr &theRHS)
Definition XObject.hpp:907
XObject & operator*()
Definition XObject.hpp:949
const XObject * operator->() const
Definition XObject.hpp:955
bool null() const
Definition XObject.hpp:937
XObject * get()
Definition XObject.hpp:973
const XObject & operator*() const
Definition XObject.hpp:943
XObject * operator->()
Definition XObject.hpp:961
XObjectPtr(const XObjectPtr &theSource)
Definition XObject.hpp:900
XObjectPtr(XObject *theXObject=0)
Create an XObjectPtr.
Definition XObject.hpp:894
const XObject * get() const
Definition XObject.hpp:967
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)
XObjectException(const XalanDOMString &theMessage, MemoryManager &theManager)
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.
Definition XObject.hpp:64
static void string(const XalanNode &theNode, FormatterListener &formatterListener, MemberFunctionPtr function)
Static conversion function.
Definition XObject.hpp:516
static bool boolean(double theNumber)
Static conversion function.
Definition XObject.hpp:372
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.
Definition XObject.hpp:398
virtual void str(FormatterListener &formatterListener, MemberFunctionPtr function) const =0
Send the string value to a FormatterListener instance.
eObjectType
Enumeration of possible object types.
Definition XObject.hpp:74
static void string(const XalanNode &theNode, XalanDOMString &theString)
Static conversion function.
Definition XObject.hpp:498
virtual ~XObject()
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.
Definition XObject.hpp:597
static const XalanDOMString s_emptyString
Definition XObject.hpp:848
static void terminate()
Perform static shut down.
void setFactory(XObjectFactory *theFactory)
Definition XObject.hpp:731
virtual const NodeRefListBase & nodeset() const
Cast result object to a nodelist.
static const XalanDOMString & s_resultTreeFragmentString
Definition XObject.hpp:858
eObjectType getType() const
Tell what kind of class this is.
Definition XObject.hpp:358
XObject(eObjectType theObjectType, MemoryManager &theMemoryManager)
Create an XObject.
virtual void dereferenced()
static void string(double theNumber, XalanDOMString &theString)
Static conversion function.
Definition XObject.hpp:464
static const XalanDOMString & s_trueString
Definition XObject.hpp:862
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.
Definition XObject.hpp:385
static const XalanDOMString & s_falseString
Definition XObject.hpp:852
XPathExecutionContext::GetCachedString GetCachedString
Definition XObject.hpp:69
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.
Definition XObject.hpp:693
static const XalanDOMString & s_numberString
Definition XObject.hpp:856
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
Definition XObject.hpp:860
static double number(const XalanDOMString &theString, MemoryManager &theManager)
Definition XObject.hpp:699
MemoryManager & getMemoryManager() const
Get the MemoryManager for this instance.
Definition XObject.hpp:821
virtual bool boolean(XPathExecutionContext &executionContext) const =0
Cast result object to a boolean.
static void string(const NodeRefListBase &theNodeList, XalanDOMString &theString)
Static conversion function.
Definition XObject.hpp:534
static void string(const NodeRefListBase &theNodeList, FormatterListener &formatterListener, MemberFunctionPtr function)
Static conversion function.
Definition XObject.hpp:557
static void string(bool theBool, FormatterListener &formatterListener, MemberFunctionPtr function)
Static conversion function.
Definition XObject.hpp:441
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.
Definition XObject.hpp:425
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.
Definition XObject.hpp:619
static void string(const XalanDOMString &theString, FormatterListener &formatterListener, MemberFunctionPtr function)
Calls the supplied FormatterListener member function with the string.
Definition XObject.hpp:669
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
Definition XObject.hpp:854
static void string(const XalanNode &theNode, XPathExecutionContext &theExecutionContext, XalanDOMString &theString)
Static conversion function.
Definition XObject.hpp:579
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.
Definition XObject.hpp:412
static void string(double theNumber, FormatterListener &formatterListener, MemberFunctionPtr function)
Static conversion function.
Definition XObject.hpp:480
static const XalanDOMString & s_booleanString
Definition XObject.hpp:850
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.
Definition XObject.hpp:642
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.