Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.11


XalanEXSLTCommonImpl.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_COMMONIMPL_HEADER_GUARD_1357924680)
19 #define EXSLT_COMMONIMPL_HEADER_GUARD_1357924680
20 
21 
22 
24 
25 
26 
28 
29 
30 
32 
33 
34 
36 
37 
38 
39 XALAN_CPP_NAMESPACE_BEGIN
40 
41 
42 
44 {
45 public:
46 
48  FunctionNodeSet(true)
49  {
50  }
51 
52  virtual
54  {
55  }
56 
57 #if defined(XALAN_NO_COVARIANT_RETURN_TYPE)
58  virtual Function*
59 #else
61 #endif
62  clone(MemoryManager& theManager) const
63  {
64  return XalanCopyConstruct(theManager, *this);
65  }
66 
67 protected:
68 
69  virtual const XalanDOMString&
70  getError(XalanDOMString& theBuffer) const
71  {
73  theBuffer,
74  XalanMessages::EXSLTFunctionAcceptsOneArgument_1Param,
75  "node-set()");
76 
77  return theBuffer;
78  }
79 
80 
81  virtual const XalanDOMString&
83  {
85  theResult,
86  XalanMessages::InvalidArgumentType_1Param,
87  "node-set()");
88 
89  return theResult;
90  }
91 
92 private:
93 
94  // Not implemented...
96  operator=(const XalanEXSLTFunctionNodeSet&);
97 
98  bool
100 };
101 
102 
103 
105 {
106 public:
107 
109 
110  XalanEXSLTFunctionObjectType(MemoryManager& theManager) :
111  Function(),
112  m_boolean(s_booleanString, theManager),
113  m_external(s_externalString, theManager),
114  m_nodeSet(s_nodeSetString, theManager),
115  m_number(s_numberString, theManager),
116  m_rtf(s_rtfString, theManager),
117  m_string(s_stringString, theManager)
118  {
119  }
120 
121  // A dummy constructor for use internally. Do not use this one!!!!
122  XalanEXSLTFunctionObjectType(MemoryManager& theManager, int /* theDummy */) :
123  Function(),
124  m_boolean(theManager),
125  m_external(theManager),
126  m_nodeSet(theManager),
127  m_number(theManager),
128  m_rtf(theManager),
129  m_string(theManager)
130  {
131  }
132 
133  virtual
135  {
136  }
137 
138  // These methods are inherited from Function ...
139 
140  virtual XObjectPtr
141  execute(
142  XPathExecutionContext& executionContext,
143  XalanNode* context,
144  const XObjectArgVectorType& args,
145  const Locator* locator) const;
146 
147  using ParentType::execute;
148 
149 #if defined(XALAN_NO_COVARIANT_RETURN_TYPE)
150  virtual Function*
151 #else
153 #endif
154  clone(MemoryManager& theManager) const
155  {
156  typedef XalanEXSLTFunctionObjectType ThisType;
157 
158  XalanAllocationGuard theGuard(theManager, theManager.allocate(sizeof(ThisType)));
159 
160  ThisType* const theResult =
161  new (theGuard.get()) ThisType(theManager);
162 
163  theGuard.release();
164 
165  return theResult;
166  }
167 
168 protected:
169 
170 
171 
172  const XalanDOMString&
173  getError(XalanDOMString& theResult) const;
174 
175 private:
176 
177  // Not implemented...
179 
181  operator=(const XalanEXSLTFunctionObjectType&);
182 
183  bool
185 
186 
187  // Data members...
188  const XalanDOMString m_boolean;
189  const XalanDOMString m_external;
190  const XalanDOMString m_nodeSet;
191  const XalanDOMString m_number;
192  const XalanDOMString m_rtf;
193  const XalanDOMString m_string;
194 
195  static const XalanDOMChar s_booleanString[];
196  static const XalanDOMChar s_externalString[];
197  static const XalanDOMChar s_nodeSetString[];
198  static const XalanDOMChar s_numberString[];
199  static const XalanDOMChar s_rtfString[];
200  static const XalanDOMChar s_stringString[];
201 };
202 
203 
204 
205 XALAN_CPP_NAMESPACE_END
206 
207 
208 
209 #endif // EXSLT_COMMONIMPL_HEADER_GUARD_1357924680
virtual XalanEXSLTFunctionObjectType * clone(MemoryManager &theManager) const
Create a copy of the function object.
XPath implementation of "node-set" function.
virtual XalanEXSLTFunctionNodeSet * clone(MemoryManager &theManager) const
Create a copy of the function object.
static XalanDOMString & getMessage(XalanDOMString &theResultMessage, XalanMessages::Codes msgToLoad, const char *repText1, const char *repText2=0, const char *repText3=0, const char *repText4=0)
virtual const XalanDOMString & getInvalidArgumentTypeError(XalanDOMString &theResult) const
virtual const XalanDOMString & getError(XalanDOMString &theBuffer) const =0
Get the error message to report when the function is called with the wrong number of arguments...
Class to hold XObjectPtr return types.
Definition: XObject.hpp:883
Type * XalanCopyConstruct(MemoryManager &theMemoryManager, const Type &theSource)
virtual XObjectPtr execute(XPathExecutionContext &executionContext, XalanNode *context, const XObjectArgVectorType &args, const Locator *locator) const
Execute an XPath function object.
XalanEXSLTFunctionObjectType(MemoryManager &theManager, int)
XalanEXSLTFunctionObjectType(MemoryManager &theManager)
#define XALAN_EXSLT_EXPORT
bool operator==(const ElemAttributeSet &theLHS, const ElemAttributeSet &theRHS)
virtual const XalanDOMString & getError(XalanDOMString &theBuffer) const
Get the error message to report when the function is called with the wrong number of arguments...

Interpreting class diagrams

Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.

Xalan-C++ XSLT Processor Version 1.11
Copyright © 1999-2012 The Apache Software Foundation.
All Rights Reserved.

Apache Logo