Xalan-C++ API Reference  1.12.0
XalanEXSLTStringImpl.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(EXSLT_STRINGIMPL_HEADER_GUARD_1357924680)
19 #define EXSLT_STRINGIMPL_HEADER_GUARD_1357924680
20 
21 
22 
24 
25 
26 
28 
29 
30 
32 
33 
34 
35 namespace XALAN_CPP_NAMESPACE {
36 
37 
38 
40 {
41 public:
42 
44 
46  {
47  }
48 
49 
50  virtual
52  {
53  }
54 
55  // These methods are inherited from Function ...
56 
57  virtual XObjectPtr
58  execute(
59  XPathExecutionContext& executionContext,
60  XalanNode* context,
61  const XObjectArgVectorType& args,
62  const Locator* locator) const;
63 
64  using ParentType::execute;
65 
67  clone(MemoryManager& theManager) const
68  {
69  return XalanCopyConstruct(theManager, *this);
70  }
71 
72 protected:
73 
74  const XalanDOMString&
75  getError(XalanDOMString& theBuffer) const
76  {
77  return XalanMessageLoader::getMessage(
78  theBuffer,
79  XalanMessages::EXSLTFunctionAcceptsTwoOrThreeArguments_1Param,
80  "align()");
81  }
82 
83 private:
84 
85  // Not implemented...
87  operator=(const XalanEXSLTFunctionAlign&);
88 
89  bool
90  operator==(const XalanEXSLTFunctionAlign&) const;
91 
92 
93  // Data members...
94  static const XalanDOMChar s_centerString[];
95  static const XalanDOMChar s_rightString[];
96 };
97 
98 
99 
101 {
102 public:
103 
105 
107  Function()
108  {
109  }
110 
111  virtual
113  {
114  }
115 
116  // These methods are inherited from Function ...
117 
118  virtual XObjectPtr
119  execute(
120  XPathExecutionContext& executionContext,
121  XalanNode* context,
122  const XObjectArgVectorType& args,
123  const Locator* locator) const;
124 
125  using ParentType::execute;
126 
127  virtual XalanEXSLTFunctionConcat*
128  clone(MemoryManager& theManager) const
129  {
130  return XalanCopyConstruct(theManager, *this);
131  }
132 
133 protected:
134 
135  const XalanDOMString&
136  getError(XalanDOMString& theBuffer) const
137  {
138  return XalanMessageLoader::getMessage(
139  theBuffer,
140  XalanMessages::EXSLTFunctionAcceptsOneArgument_1Param,
141  "concat()");
142  }
143 
144 private:
145 
146  // Not implemented...
148  operator=(const XalanEXSLTFunctionConcat&);
149 
150  bool
151  operator==(const XalanEXSLTFunctionConcat&) const;
152 };
153 
154 
155 
157 {
158 public:
159 
161 
162  XalanEXSLTFunctionPadding(MemoryManager& theManager) :
163  Function(),
164  m_space(s_spaceString, theManager)
165  {
166  }
167 
168  // A dummy constructor for use internally. Do not use this one!!!!
170  MemoryManager& theManager,
171  int /* theDummy */) :
172  Function(),
173  m_space(theManager)
174  {
175  }
176 
178  const XalanEXSLTFunctionPadding& other,
179  MemoryManager& theManager) :
180  Function(other),
181  m_space(s_spaceString, theManager)
182  {
183  }
184 
185  virtual
187  {
188  }
189 
190  // These methods are inherited from Function ...
191 
192  virtual XObjectPtr
193  execute(
194  XPathExecutionContext& executionContext,
195  XalanNode* context,
196  const XObjectArgVectorType& args,
197  const Locator* locator) const;
198 
199  using ParentType::execute;
200 
202  clone(MemoryManager& theManager) const
203  {
204  return XalanCopyConstruct(theManager, *this, theManager);
205  }
206 
207 protected:
208 
209  const XalanDOMString&
210  getError(XalanDOMString& theBuffer) const
211  {
212  return XalanMessageLoader::getMessage(
213  theBuffer,
214  XalanMessages::EXSLTFunctionAccepts1Or2Argument_1Param,
215  "padding()");
216  }
217 
218 private:
219 
220  // Not implemented...
222 
224  operator=(const XalanEXSLTFunctionPadding&);
225 
226  bool
228 
229 
230  // Data members...
231  const XalanDOMString m_space;
232 
233  static const XalanDOMChar s_spaceString[];
234 };
235 
236 
238 {
239 public:
240 
242 
244  Function()
245  {
246  }
247 
248  virtual
250  {
251  }
252 
253  // These methods are inherited from Function ...
254 
255  virtual XObjectPtr
256  execute(
257  XPathExecutionContext& executionContext,
258  XalanNode* context,
259  const XObjectArgVectorType& args,
260  const Locator* locator) const;
261 
262  using ParentType::execute;
263 
265  clone(MemoryManager& theManager) const
266  {
267  return XalanCopyConstruct(theManager, *this);
268  }
269 
270 protected:
271 
272  const XalanDOMString&
273  getError(XalanDOMString& theBuffer) const
274  {
275  return XalanMessageLoader::getMessage(
276  theBuffer,
277  XalanMessages::EXSLTFunctionAcceptsTwoOrThreeArguments_1Param,
278  "encode-uri()");
279  }
280 
281  const XalanDOMString&
282  escapedOctet(
283  XalanDOMChar theChar,
284  XalanDOMString& theBuffer) const;
285 
286  static const XalanDOMChar s_reservedChars[];
288 
289  static const XalanDOMChar s_excludedChars[];
291 
292 private:
293 
294  // Not implemented...
296  operator=(const XalanEXSLTFunctionEncodeURI&);
297 
298  bool
300 };
301 
302 
303 
305 {
306 public:
307 
309 
311  Function()
312  {
313  }
314 
315  virtual
317  {
318  }
319 
320  // These methods are inherited from Function ...
321 
322  virtual XObjectPtr
323  execute(
324  XPathExecutionContext& executionContext,
325  XalanNode* context,
326  const XObjectArgVectorType& args,
327  const Locator* locator) const;
328 
329  using ParentType::execute;
330 
332  clone(MemoryManager& theManager) const
333  {
334  return XalanCopyConstruct(theManager, *this);
335  }
336 
337 protected:
338 
339  const XalanDOMString&
340  getError(XalanDOMString& theBuffer) const
341  {
342  return XalanMessageLoader::getMessage(
343  theBuffer,
344  XalanMessages::EXSLTFunctionAccepts1Or2Argument_1Param,
345  "decode-uri()");
346 
347  }
348 
349  XalanDOMChar
350  hexCharsToByte(
351  XPathExecutionContext& executionContext,
352  XalanNode* context,
353  const Locator* locator,
354  const XalanDOMChar highHexChar,
355  const XalanDOMChar lowHexChar) const;
356 
358 
359 private:
360 
361  // Not implemented...
363  operator=(const XalanEXSLTFunctionDecodeURI&);
364 
365  bool
367 };
368 
369 }
370 
371 
372 
373 #endif // EXSLT_STRINGIMPL_HEADER_GUARD_1357924680
xalanc::XalanEXSLTFunctionDecodeURI::s_octetSize
static const XalanDOMString::size_type s_octetSize
Definition: XalanEXSLTStringImpl.hpp:357
xalanc::XalanEXSLTFunctionAlign
Definition: XalanEXSLTStringImpl.hpp:39
XALAN_CPP_NAMESPACE
#define XALAN_CPP_NAMESPACE
Xalan-C++ namespace, including major and minor version.
Definition: XalanVersion.hpp:76
xalanc::XalanEXSLTFunctionDecodeURI::ParentType
Function ParentType
Definition: XalanEXSLTStringImpl.hpp:308
xalanc::XalanNode
Definition: XalanNode.hpp:38
xalanc::XalanEXSLTFunctionEncodeURI::s_reservedCharsSize
static const XalanDOMString::size_type s_reservedCharsSize
Definition: XalanEXSLTStringImpl.hpp:287
xalanc::XalanEXSLTFunctionPadding::XalanEXSLTFunctionPadding
XalanEXSLTFunctionPadding(MemoryManager &theManager, int)
Definition: XalanEXSLTStringImpl.hpp:169
xalanc::XalanEXSLTFunctionEncodeURI::ParentType
Function ParentType
Definition: XalanEXSLTStringImpl.hpp:241
xalanc::XalanEXSLTFunctionAlign::ParentType
Function ParentType
Definition: XalanEXSLTStringImpl.hpp:43
xalanc::XalanEXSLTFunctionEncodeURI::getError
const XalanDOMString & getError(XalanDOMString &theBuffer) const
Get the error message to report when the function is called with the wrong number of arguments.
Definition: XalanEXSLTStringImpl.hpp:273
XALAN_EXSLT_EXPORT
#define XALAN_EXSLT_EXPORT
Definition: XalanEXSLTDefinitions.hpp:35
xalanc::operator==
bool operator==(const XalanVector< Type > &theLHS, const XalanVector< Type > &theRHS)
Definition: XalanVector.hpp:1118
XalanMessageLoader.hpp
xalanc::XalanEXSLTFunctionPadding::getError
const XalanDOMString & getError(XalanDOMString &theBuffer) const
Get the error message to report when the function is called with the wrong number of arguments.
Definition: XalanEXSLTStringImpl.hpp:210
xalanc::XalanEXSLTFunctionPadding::clone
virtual XalanEXSLTFunctionPadding * clone(MemoryManager &theManager) const
Create a copy of the function object.
Definition: XalanEXSLTStringImpl.hpp:202
xalanc::XalanEXSLTFunctionDecodeURI::clone
virtual XalanEXSLTFunctionDecodeURI * clone(MemoryManager &theManager) const
Create a copy of the function object.
Definition: XalanEXSLTStringImpl.hpp:332
xalanc::XObjectPtr
Class to hold XObjectPtr return types.
Definition: XObject.hpp:883
xalanc::XalanEXSLTFunctionEncodeURI::XalanEXSLTFunctionEncodeURI
XalanEXSLTFunctionEncodeURI()
Definition: XalanEXSLTStringImpl.hpp:243
xalanc::XalanEXSLTFunctionConcat
Definition: XalanEXSLTStringImpl.hpp:100
xalanc::XalanEXSLTFunctionDecodeURI::XalanEXSLTFunctionDecodeURI
XalanEXSLTFunctionDecodeURI()
Definition: XalanEXSLTStringImpl.hpp:310
xalanc::XalanEXSLTFunctionPadding::~XalanEXSLTFunctionPadding
virtual ~XalanEXSLTFunctionPadding()
Definition: XalanEXSLTStringImpl.hpp:186
xalanc::XalanEXSLTFunctionConcat::XalanEXSLTFunctionConcat
XalanEXSLTFunctionConcat()
Definition: XalanEXSLTStringImpl.hpp:106
xalanc::XalanEXSLTFunctionDecodeURI::getError
const XalanDOMString & getError(XalanDOMString &theBuffer) const
Get the error message to report when the function is called with the wrong number of arguments.
Definition: XalanEXSLTStringImpl.hpp:340
xalanc::XalanEXSLTFunctionPadding::ParentType
Function ParentType
Definition: XalanEXSLTStringImpl.hpp:160
xalanc::XalanCopyConstruct
Type * XalanCopyConstruct(MemoryManager &theMemoryManager, const Type &theSource)
Definition: XalanMemoryManagement.hpp:450
xalanc::XalanEXSLTFunctionEncodeURI::s_excludedCharsSize
static const XalanDOMString::size_type s_excludedCharsSize
Definition: XalanEXSLTStringImpl.hpp:290
xalanc::Function
Definition: Function.hpp:57
xalanc::XalanEXSLTFunctionPadding::XalanEXSLTFunctionPadding
XalanEXSLTFunctionPadding(MemoryManager &theManager)
Definition: XalanEXSLTStringImpl.hpp:162
xalanc::XalanEXSLTFunctionConcat::clone
virtual XalanEXSLTFunctionConcat * clone(MemoryManager &theManager) const
Create a copy of the function object.
Definition: XalanEXSLTStringImpl.hpp:128
xalanc::XalanEXSLTFunctionConcat::ParentType
Function ParentType
Definition: XalanEXSLTStringImpl.hpp:104
xalanc::XalanEXSLTFunctionPadding
Definition: XalanEXSLTStringImpl.hpp:156
xalanc::XalanEXSLTFunctionDecodeURI::~XalanEXSLTFunctionDecodeURI
virtual ~XalanEXSLTFunctionDecodeURI()
Definition: XalanEXSLTStringImpl.hpp:316
xalanc::XalanEXSLTFunctionConcat::~XalanEXSLTFunctionConcat
virtual ~XalanEXSLTFunctionConcat()
Definition: XalanEXSLTStringImpl.hpp:112
xalanc::XalanEXSLTFunctionEncodeURI::~XalanEXSLTFunctionEncodeURI
virtual ~XalanEXSLTFunctionEncodeURI()
Definition: XalanEXSLTStringImpl.hpp:249
xalanc::XalanEXSLTFunctionAlign::XalanEXSLTFunctionAlign
XalanEXSLTFunctionAlign()
Definition: XalanEXSLTStringImpl.hpp:45
xalanc::XPathExecutionContext
Definition: XPathExecutionContext.hpp:82
XalanEXSLTDefinitions.hpp
xalanc::XalanEXSLTFunctionConcat::getError
const XalanDOMString & getError(XalanDOMString &theBuffer) const
Get the error message to report when the function is called with the wrong number of arguments.
Definition: XalanEXSLTStringImpl.hpp:136
xalanc::XalanEXSLTFunctionDecodeURI
Definition: XalanEXSLTStringImpl.hpp:304
xalanc::XalanDOMString::size_type
XalanSize_t size_type
Definition: XalanDOMString.hpp:57
xalanc::XalanEXSLTFunctionEncodeURI::clone
virtual XalanEXSLTFunctionEncodeURI * clone(MemoryManager &theManager) const
Create a copy of the function object.
Definition: XalanEXSLTStringImpl.hpp:265
xalanc::XalanEXSLTFunctionEncodeURI
Definition: XalanEXSLTStringImpl.hpp:237
xalanc::XalanEXSLTFunctionPadding::XalanEXSLTFunctionPadding
XalanEXSLTFunctionPadding(const XalanEXSLTFunctionPadding &other, MemoryManager &theManager)
Definition: XalanEXSLTStringImpl.hpp:177
xalanc::XalanDOMString
Definition: XalanDOMString.hpp:45
Function.hpp
xalanc::XalanEXSLTFunctionAlign::getError
const XalanDOMString & getError(XalanDOMString &theBuffer) const
Get the error message to report when the function is called with the wrong number of arguments.
Definition: XalanEXSLTStringImpl.hpp:75
xalanc::XalanEXSLTFunctionAlign::~XalanEXSLTFunctionAlign
virtual ~XalanEXSLTFunctionAlign()
Definition: XalanEXSLTStringImpl.hpp:51
xalanc::XalanEXSLTFunctionAlign::clone
virtual XalanEXSLTFunctionAlign * clone(MemoryManager &theManager) const
Create a copy of the function object.
Definition: XalanEXSLTStringImpl.hpp:67