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
76  ~XStringBase();
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
101  str(
102  XPathExecutionContext& executionContext,
103  FormatterListener& formatterListener,
104  MemberFunctionPtr function) const = 0;
105 
106  virtual void
107  str(
108  FormatterListener& formatterListener,
109  MemberFunctionPtr function) const = 0;
110 
111  virtual void
112  str(
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
126  ProcessXObjectTypeCallback(XObjectTypeCallback& theCallbackObject);
127 
128  virtual void
129  ProcessXObjectTypeCallback(XObjectTypeCallback& theCallbackObject) const;
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
XALAN_CPP_NAMESPACE
#define XALAN_CPP_NAMESPACE
Xalan-C++ namespace, including major and minor version.
Definition: XalanVersion.hpp:76
xalanc::XObjectResultTreeFragProxy
Definition: XObjectResultTreeFragProxy.hpp:45
xalanc::XStringBase::ParentType
XObject ParentType
Definition: XStringBase.hpp:46
XObjectResultTreeFragProxy.hpp
XALAN_XPATH_EXPORT
#define XALAN_XPATH_EXPORT
Definition: XPathDefinitions.hpp:35
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::XObject
Class to hold XPath return types.
Definition: XObject.hpp:63
xalanc::XStringBase
Definition: XStringBase.hpp:42
xalanc::FormatterListener
A SAX-based formatter interface for the XSL processor.
Definition: FormatterListener.hpp:56
xalanc::XPathExecutionContext
Definition: XPathExecutionContext.hpp:82
xalanc::XObjectResultTreeFragProxyText
Definition: XObjectResultTreeFragProxyText.hpp:42
xalanc::XalanDOMString
Definition: XalanDOMString.hpp:45
xalanc::XalanDocumentFragment
Definition: XalanDocumentFragment.hpp:32
XObject.hpp
XPathDefinitions.hpp