Xalan-C++ API Reference  1.12.0
XStringBase.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(XSTRINGBASE_HEADER_GUARD_1357924680)
19 #define XSTRINGBASE_HEADER_GUARD_1357924680
20 
21 
22 
23 // Base header file. Must be first.
25 
26 
27 
28 // Base class header file.
29 #include <xalanc/XPath/XObject.hpp>
31 
32 
33 
34 namespace XALAN_CPP_NAMESPACE {
35 
36 
37 
38 class XPathEnvSupport;
39 
40 
41 
43 {
44 public:
45 
47 
48  /**
49  * Construct an XStringBase object.
50  *
51  * @param theMemoryManager The MemoryManager instance.
52  */
53  XStringBase(MemoryManager& theMemoryManager);
54 
55  /**
56  * Construct an XStringBase object.
57  *
58  * @param theMemoryManager The MemoryManager instance.
59  * @param theExecutionContext The current XPathExecutionContext.
60  */
62  MemoryManager& theMemoryManager,
63  XPathExecutionContext& theExecutionContext);
64 
65  /**
66  * Construct an XStringBase object from another.
67  *
68  * @param source The source XStringBase instance.
69  * @param theMemoryManager The MemoryManager instance.
70  */
72  const XStringBase& source,
73  MemoryManager& theMemoryManager);
74 
75  virtual
77 
78 
79  // These methods are inherited from XObject ...
80 
81  virtual const XalanDOMString&
82  getTypeString() const;
83 
84  virtual double
85  num(XPathExecutionContext& executionContext) const;
86 
87  using ParentType::num;
88 
89  virtual bool
90  boolean(XPathExecutionContext& executionContext) const;
91 
92  using ParentType::str;
93 
94  virtual const XalanDOMString&
95  str(XPathExecutionContext& executionContext) const = 0;
96 
97  virtual const XalanDOMString&
98  str() const = 0;
99 
100  virtual void
102  XPathExecutionContext& executionContext,
103  FormatterListener& formatterListener,
104  MemberFunctionPtr function) const = 0;
105 
106  virtual void
108  FormatterListener& formatterListener,
109  MemberFunctionPtr function) const = 0;
110 
111  virtual void
113  XPathExecutionContext& executionContext,
114  XalanDOMString& theBuffer) const = 0;
115 
116  virtual void
117  str(XalanDOMString& theBuffer) const = 0;
118 
119  virtual double
120  stringLength(XPathExecutionContext& executionContext) const = 0;
121 
122  virtual const XalanDocumentFragment&
123  rtree() const;
124 
125  virtual void
127 
128  virtual void
130 
131 private:
132 
134 
135  // Not implemented
136  XStringBase(const XStringBase& source);
137 
138  XStringBase();
139 
140  mutable double m_cachedNumberValue;
141 
142  mutable XObjectResultTreeFragProxy m_resultTreeFrag;
143 };
144 
145 
146 
147 }
148 
149 
150 
151 #endif // XSTRINGBASE_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.
The purpose of this class is to provide a way to get the "preferred" or closest matching type for XOb...
Class to hold XPath return types.
Definition: XObject.hpp:64
virtual const XalanDOMString & getTypeString() const
Given a request type, return the equivalent string.
virtual bool boolean(XPathExecutionContext &executionContext) const
Cast result object to a boolean.
XStringBase(const XStringBase &source, MemoryManager &theMemoryManager)
Construct an XStringBase object from another.
XStringBase(MemoryManager &theMemoryManager, XPathExecutionContext &theExecutionContext)
Construct an XStringBase object.
virtual void str(XPathExecutionContext &executionContext, FormatterListener &formatterListener, MemberFunctionPtr function) const =0
Send the string value to a FormatterListener instance.
virtual double stringLength(XPathExecutionContext &executionContext) const =0
Get the length of the string value of the instance.
virtual ~XStringBase()
virtual void str(FormatterListener &formatterListener, MemberFunctionPtr function) const =0
Send the string value to a FormatterListener instance.
XStringBase(MemoryManager &theMemoryManager)
Construct an XStringBase object.
virtual void ProcessXObjectTypeCallback(XObjectTypeCallback &theCallbackObject) const
Process a callback request for preferred type information.
virtual const XalanDOMString & str() const =0
Cast result object to a string.
virtual double num(XPathExecutionContext &executionContext) const
Cast result object to a number.
virtual void str(XalanDOMString &theBuffer) const =0
Append the string value directly a string.
virtual void str(XPathExecutionContext &executionContext, XalanDOMString &theBuffer) const =0
Append the string value directly a string.
virtual const XalanDocumentFragment & rtree() const
Cast result object to a result tree fragment.
virtual void ProcessXObjectTypeCallback(XObjectTypeCallback &theCallbackObject)
Process a callback request for preferred type information.
virtual const XalanDOMString & str(XPathExecutionContext &executionContext) const =0
Cast result object to a string.