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 
48 namespace XALAN_CPP_NAMESPACE {
49 
50 
51 
52 class MutableNodeRefList;
53 class NodeRefListBase;
54 class XalanDocumentFragment;
55 class XObjectFactory;
56 class XObjectTypeCallback;
57 
58 
59 
60 /**
61  * Class to hold XPath return types.
62  */
64 {
65 public:
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
99  initialize(MemoryManager& theMemoryManager);
100 
101  /**
102  * Perform static shut down. See class XPathInit.
103  */
104  static void
105  terminate();
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  */
113  XObject(
114  eObjectType theObjectType,
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
133  num(XPathExecutionContext& executionContext) const;
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
155  boolean(XPathExecutionContext& executionContext) const = 0;
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&
164  str(XPathExecutionContext& executionContext) const = 0;
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 
180  typedef void (FormatterListener::*MemberFunctionPtr)(const XMLCh* const, const FormatterListener::size_type);
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
190  str(
191  XPathExecutionContext& executionContext,
192  FormatterListener& formatterListener,
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
207  str(
208  FormatterListener& formatterListener,
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
218  str(
219  XPathExecutionContext& executionContext,
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
233  str(XalanDOMString& theBuffer) const = 0;
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
241  stringLength(XPathExecutionContext& executionContext) const = 0;
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
272  ProcessXObjectTypeCallback(XObjectTypeCallback& theCallbackObject) = 0;
273 
274  /**
275  * Process a callback request for preferred type information.
276  *
277  * @param theCallbackObject object to call back
278  */
279  virtual void
280  ProcessXObjectTypeCallback(XObjectTypeCallback& theCallbackObject) const = 0;
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
290  equals(
291  const XObject& theRHS,
292  XPathExecutionContext& executionContext) const;
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
302  notEquals(
303  const XObject& theRHS,
304  XPathExecutionContext& executionContext) const;
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
313  lessThan(
314  const XObject& theRHS,
315  XPathExecutionContext& executionContext) const;
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
325  lessThanOrEquals(
326  const XObject& theRHS,
327  XPathExecutionContext& executionContext) const;
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
336  greaterThan(
337  const XObject& theRHS,
338  XPathExecutionContext& executionContext) const;
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
348  greaterThanOrEquals(
349  const XObject& theRHS,
350  XPathExecutionContext& executionContext) const;
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
372  boolean(double theNumber)
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
385  boolean(const XalanDOMString& theString)
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
398  boolean(const NodeRefListBase& theNodeList)
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&
412  string(bool theBool)
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,
427  XalanDOMString& theString)
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,
443  FormatterListener& formatterListener,
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
465  double theNumber,
466  XalanDOMString& theString)
467  {
468  NumberToDOMString(theNumber, theString);
469  }
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,
482  FormatterListener& formatterListener,
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,
500  XalanDOMString& theString)
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,
518  FormatterListener& formatterListener,
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
535  const NodeRefListBase& theNodeList,
536  XalanDOMString& theString)
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
558  const NodeRefListBase& theNodeList,
559  FormatterListener& formatterListener,
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
580  const XalanNode& theNode,
581  XPathExecutionContext& theExecutionContext,
582  XalanDOMString& theString)
583  {
584  DOMServices::getNodeData(theNode, theExecutionContext, theString);
585  }
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,
599  XPathExecutionContext& theExecutionContext,
600  FormatterListener& formatterListener,
601  MemberFunctionPtr function)
602  {
603  DOMServices::getNodeData(
604  theNode,
605  theExecutionContext,
606  formatterListener,
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
620  const NodeRefListBase& theNodeList,
621  XPathExecutionContext& theExecutionContext,
622  XalanDOMString& theString)
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
643  const NodeRefListBase& theNodeList,
644  XPathExecutionContext& theExecutionContext,
645  FormatterListener& formatterListener,
646  MemberFunctionPtr function)
647  {
648  if (theNodeList.getLength() > 0)
649  {
650  assert(theNodeList.item(0) != 0);
651 
652  DOMServices::getNodeData(
653  *theNodeList.item(0),
654  theExecutionContext,
655  formatterListener,
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
670  const XalanDOMString& theString,
671  FormatterListener& formatterListener,
672  MemberFunctionPtr function)
673  {
674  const XalanDOMString::size_type theLength =
675  theString.length();
676 
677  if (theLength != 0)
678  {
679  assert(theLength == static_cast<FormatterListener::size_type>(theLength));
680 
681  (formatterListener.*function)(
682  theString.c_str(),
683  static_cast<FormatterListener::size_type>(theLength));
684  }
685  }
686 
687  /**
688  * Static conversion function.
689  *
690  * @return bool value
691  */
692  static double
693  number(bool theBoolean)
694  {
695  return theBoolean == true ? 1.0 : 0.0;
696  }
697 
698  static double
700  const XalanDOMString& theString,
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
712  number(
713  XPathExecutionContext& executionContext,
714  const NodeRefListBase& theNodeList);
715 
716  /**
717  * Static conversion function.
718  *
719  * @return The number value of the node
720  */
721  static double
722  number(
723  XPathExecutionContext& executionContext,
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 
742  const XalanDOMString& theMessage,
743  MemoryManager& theManager);
744 
746  const XalanDOMString& theMessage,
747  MemoryManager& theManager,
748  const Locator* theLocator);
749 
750  XObjectException(const XObjectException& other) ;
751 
752  virtual
753  ~XObjectException();
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,
769  const XalanDOMString& fromType,
770  const XalanDOMString& toType,
771  XalanDOMString& buffer);
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(
787  const XalanDOMString& fromType,
788  const XalanDOMString& toType,
789  XalanDOMString& theResult);
790  };
791 
792 protected:
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  */
803  XObject(const XObject&);
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  */
811  XObject(
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
829  throwInvalidConversionException(const XalanDOMString& theTargetType) const;
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
840  referenced();
841 
842  virtual void
843  dereferenced();
844 
845  virtual
846  ~XObject();
847 
849 
851 
853 
855 
857 
859 
861 
863 
864 private:
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 {
885 public:
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
894  XObjectPtr(XObject* theXObject = 0) :
895  m_xobjectPtr(theXObject)
896  {
897  XalanReferenceCountedObject::addReference(theXObject);
898  }
899 
900  XObjectPtr(const XObjectPtr& theSource) :
901  m_xobjectPtr(theSource.m_xobjectPtr)
902  {
903  XalanReferenceCountedObject::addReference(m_xobjectPtr);
904  };
905 
906  XObjectPtr&
907  operator=(const XObjectPtr& theRHS)
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*
955  operator->() const
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*
973  get()
974  {
975  return m_xobjectPtr;
976  };
977 
978 private:
979 
980  XObject* m_xobjectPtr;
981 };
982 
983 
984 
985 inline bool
987  const XObjectPtr& theLHS,
988  const XObjectPtr& theRHS)
989 {
990  return theLHS.m_xobjectPtr == theRHS.m_xobjectPtr;
991 }
992 
993 
994 
995 inline bool
997  const XObjectPtr& theLHS,
998  const XObjectPtr& theRHS)
999 {
1000  return !(theLHS == theRHS);
1001 }
1002 
1003 
1004 
1005 inline bool
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
xalanc::XObject::string
static void string(bool theBool, XalanDOMString &theString)
Static conversion function.
Definition: XObject.hpp:425
xalanc::XObjectPtr::~XObjectPtr
~XObjectPtr()
Definition: XObject.hpp:921
xalanc::XObject::getType
eObjectType getType() const
Tell what kind of class this is.
Definition: XObject.hpp:358
xalanc::XObject::s_falseString
static const XalanDOMString & s_falseString
Definition: XObject.hpp:852
XALAN_CPP_NAMESPACE
#define XALAN_CPP_NAMESPACE
Xalan-C++ namespace, including major and minor version.
Definition: XalanVersion.hpp:76
DOMServices.hpp
xalanc::XalanNode
Definition: XalanNode.hpp:38
xalanc::XObject::string
static const XalanDOMString & string(bool theBool)
Static conversion function.
Definition: XObject.hpp:412
xalanc::XObject::string
static void string(const XalanNode &theNode, FormatterListener &formatterListener, MemberFunctionPtr function)
Static conversion function.
Definition: XObject.hpp:516
xalanc::XObjectPtr::operator=
XObjectPtr & operator=(const XObjectPtr &theRHS)
Definition: XObject.hpp:907
xalanc::XObject::number
static double number(bool theBoolean)
Static conversion function.
Definition: XObject.hpp:693
XalanDOMString.hpp
xalanc::XObjectPtr::operator->
const XObject * operator->() const
Definition: XObject.hpp:955
xalanc::operator<
bool operator<(const XObjectPtr &theLHS, const XObjectPtr &theRHS)
Definition: XObject.hpp:1006
xalanc::XObject::string
static void string(bool theBool, FormatterListener &formatterListener, MemberFunctionPtr function)
Static conversion function.
Definition: XObject.hpp:441
xalanc::XObjectPtr::XObjectPtr
XObjectPtr(XObject *theXObject=0)
Create an XObjectPtr.
Definition: XObject.hpp:894
FormatterListener.hpp
xalanc::XObjectPtr::operator*
const XObject & operator*() const
Definition: XObject.hpp:943
xalanc::size_type
size_t size_type
Definition: XalanMap.hpp:46
xalanc::XObject::string
static void string(double theNumber, FormatterListener &formatterListener, MemberFunctionPtr function)
Static conversion function.
Definition: XObject.hpp:480
xalanc::XObject::string
static void string(const XalanNode &theNode, XalanDOMString &theString)
Static conversion function.
Definition: XObject.hpp:498
xalanc::XalanDOMString::append
XalanDOMString & append(const XalanDOMString &theSource)
Definition: XalanDOMString.hpp:484
xalanc::equals
equals(const XalanDOMChar *theLHS, const XalanDOMChar *theRHS, XalanDOMString::size_type theLength)
Compare the contents of two arrays for equality.
xalanc::XObject::s_stringString
static const XalanDOMString & s_stringString
Definition: XObject.hpp:860
XALAN_XPATH_EXPORT
#define XALAN_XPATH_EXPORT
Definition: XPathDefinitions.hpp:35
xalanc::operator==
bool operator==(const XObjectPtr &theLHS, const XObjectPtr &theRHS)
Definition: XObject.hpp:986
xalanc::XObjectPtr::XObjectPtr
XObjectPtr(const XObjectPtr &theSource)
Definition: XObject.hpp:900
xalanc::XObject::s_numberString
static const XalanDOMString & s_numberString
Definition: XObject.hpp:856
xalanc::FormatterListener::size_type
XalanSize_t size_type
Definition: FormatterListener.hpp:63
xalanc::XObjectPtr
Class to hold XObjectPtr return types.
Definition: XObject.hpp:883
xalanc::XObject::eObjectType
eObjectType
Enumeration of possible object types.
Definition: XObject.hpp:74
xalanc::XObject::s_nodesetString
static const XalanDOMString & s_nodesetString
Definition: XObject.hpp:854
xalanc::XObject::string
static void string(const NodeRefListBase &theNodeList, XPathExecutionContext &theExecutionContext, XalanDOMString &theString)
Static conversion function.
Definition: XObject.hpp:619
xalanc::XObjectTypeCallback
The purpose of this class is to provide a way to get the "preferred" or closest matching type for XOb...
Definition: XObjectTypeCallback.hpp:54
xalanc::XalanXPathException
Definition: XalanXPathException.hpp:46
xalanc::XObject::boolean
static bool boolean(const XalanDOMString &theString)
Static conversion function.
Definition: XObject.hpp:385
xalanc::XalanDOMString::length
size_type length() const
Definition: XalanDOMString.hpp:209
xalanc::XObject::getMemoryManager
MemoryManager & getMemoryManager() const
Get the MemoryManager for this instance.
Definition: XObject.hpp:821
xalanc::XObject::setFactory
void setFactory(XObjectFactory *theFactory)
Definition: XObject.hpp:731
xalanc::XObjectPtr::release
void release()
Definition: XObject.hpp:927
xalanc::XObject::XObjectException
Definition: XObject.hpp:737
xalanc::XObject::string
static void string(double theNumber, XalanDOMString &theString)
Static conversion function.
Definition: XObject.hpp:464
xalanc::XObject::string
static void string(const XalanNode &theNode, XPathExecutionContext &theExecutionContext, XalanDOMString &theString)
Static conversion function.
Definition: XObject.hpp:579
xalanc::XObject
Class to hold XPath return types.
Definition: XObject.hpp:63
xalanc::XObject::boolean
static bool boolean(double theNumber)
Static conversion function.
Definition: XObject.hpp:372
xalanc::XObject::XObjectInvalidConversionException
Definition: XObject.hpp:763
xalanc::XPathExecutionContext::GetCachedString
Definition: XPathExecutionContext.hpp:448
xalanc::NodeRefListBase::getLength
virtual size_type getLength() const =0
Determine the number of nodes in the list.
DoubleSupport.hpp
xalanc::XObject::boolean
static bool boolean(const NodeRefListBase &theNodeList)
Static conversion function.
Definition: XObject.hpp:398
xalanc::XObjectPtr::operator->
XObject * operator->()
Definition: XObject.hpp:961
xalanc::NumberToDOMString
NumberToDOMString(double theValue, XalanDOMString &theResult)
Converts a double value into a XalanDOMString.
xalanc::XObject::string
static void string(const NodeRefListBase &theNodeList, XPathExecutionContext &theExecutionContext, FormatterListener &formatterListener, MemberFunctionPtr function)
Static conversion function.
Definition: XObject.hpp:642
xalanc::XObject::string
static void string(const NodeRefListBase &theNodeList, FormatterListener &formatterListener, MemberFunctionPtr function)
Static conversion function.
Definition: XObject.hpp:557
XPathExecutionContext.hpp
xalanc::NodeRefListBase::item
virtual XalanNode * item(size_type index) const =0
Returns the indexth item in the collection.
xalanc::XObject::string
static void string(const XalanDOMString &theString, FormatterListener &formatterListener, MemberFunctionPtr function)
Calls the supplied FormatterListener member function with the string.
Definition: XObject.hpp:669
xalanc::XObject::s_resultTreeFragmentString
static const XalanDOMString & s_resultTreeFragmentString
Definition: XObject.hpp:858
xalanc::XObject::GetCachedString
XPathExecutionContext::GetCachedString GetCachedString
Definition: XObject.hpp:69
NodeRefListBase.hpp
xalanc::XalanDOMString::c_str
const XalanDOMChar * c_str() const
Definition: XalanDOMString.hpp:344
xalanc::XObject::number
static double number(const XalanDOMString &theString, MemoryManager &theManager)
Definition: XObject.hpp:699
xalanc::XObject::s_booleanString
static const XalanDOMString & s_booleanString
Definition: XObject.hpp:850
xalanc::FormatterListener
A SAX-based formatter interface for the XSL processor.
Definition: FormatterListener.hpp:56
xalanc::XPathExecutionContext
Definition: XPathExecutionContext.hpp:82
xalanc::NodeRefListBase
Local implementation of NodeRefList.
Definition: NodeRefListBase.hpp:44
xalanc::XalanReferenceCountedObject
Class to hold reference count information.
Definition: XalanReferenceCountedObject.hpp:35
xalanc::XObject::s_emptyString
static const XalanDOMString s_emptyString
Definition: XObject.hpp:848
xalanc::operator!=
bool operator!=(const XObjectPtr &theLHS, const XObjectPtr &theRHS)
Definition: XObject.hpp:996
xalanc::XalanDOMString::size_type
XalanSize_t size_type
Definition: XalanDOMString.hpp:57
xalanc::XObjectPtr::operator*
XObject & operator*()
Definition: XObject.hpp:949
xalanc::XObject::string
static void string(const XalanNode &theNode, XPathExecutionContext &theExecutionContext, FormatterListener &formatterListener, MemberFunctionPtr function)
Static conversion function.
Definition: XObject.hpp:597
xalanc::XObject::string
static void string(const NodeRefListBase &theNodeList, XalanDOMString &theString)
Static conversion function.
Definition: XObject.hpp:534
xalanc::XObjectPtr::get
XObject * get()
Definition: XObject.hpp:973
xalanc::XalanDOMString
Definition: XalanDOMString.hpp:45
xalanc::XalanDocumentFragment
Definition: XalanDocumentFragment.hpp:32
xalanc::XObjectFactory
This class handles the creation of XObjects and manages their lifetime.
Definition: XObjectFactory.hpp:53
XalanReferenceCountedObject.hpp
xalanc::XObject::s_trueString
static const XalanDOMString & s_trueString
Definition: XObject.hpp:862
XalanXPathException.hpp
xalanc::XObjectPtr::get
const XObject * get() const
Definition: XObject.hpp:967
XPathDefinitions.hpp