Xalan-C++ API Reference 1.12.0
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
39namespace XALAN_CPP_NAMESPACE {
40
41
42
44{
45public:
46
51
52 virtual
56
58 clone(MemoryManager& theManager) const
59 {
60 return XalanCopyConstruct(theManager, *this);
61 }
62
63protected:
64
65 virtual const XalanDOMString&
67 {
68 XalanMessageLoader::getMessage(
70 XalanMessages::EXSLTFunctionAcceptsOneArgument_1Param,
71 "node-set()");
72
73 return theBuffer;
74 }
75
76
77 virtual const XalanDOMString&
79 {
80 XalanMessageLoader::getMessage(
82 XalanMessages::InvalidArgumentType_1Param,
83 "node-set()");
84
85 return theResult;
86 }
87
88private:
89
90 // Not implemented...
92 operator=(const XalanEXSLTFunctionNodeSet&);
93
94 bool
96};
97
98
99
101{
102public:
103
105
107 Function(),
108 m_boolean(s_booleanString, theManager),
109 m_external(s_externalString, theManager),
110 m_nodeSet(s_nodeSetString, theManager),
111 m_number(s_numberString, theManager),
112 m_rtf(s_rtfString, theManager),
113 m_string(s_stringString, theManager)
114 {
115 }
116
117 // A dummy constructor for use internally. Do not use this one!!!!
118 XalanEXSLTFunctionObjectType(MemoryManager& theManager, int /* theDummy */) :
119 Function(),
120 m_boolean(theManager),
121 m_external(theManager),
122 m_nodeSet(theManager),
123 m_number(theManager),
124 m_rtf(theManager),
125 m_string(theManager)
126 {
127 }
128
129 virtual
133
134 // These methods are inherited from Function ...
135
136 virtual XObjectPtr
140 const XObjectArgVectorType& args,
141 const Locator* locator) const;
142
143 using ParentType::execute;
144
146 clone(MemoryManager& theManager) const
147 {
148 typedef XalanEXSLTFunctionObjectType ThisType;
149
150 XalanAllocationGuard theGuard(theManager, theManager.allocate(sizeof(ThisType)));
151
152 ThisType* const theResult =
153 new (theGuard.get()) ThisType(theManager);
154
156
157 return theResult;
158 }
159
160protected:
161
162
163
164 const XalanDOMString&
166
167private:
168
169 // Not implemented...
171
173 operator=(const XalanEXSLTFunctionObjectType&);
174
175 bool
177
178
179 // Data members...
180 const XalanDOMString m_boolean;
181 const XalanDOMString m_external;
182 const XalanDOMString m_nodeSet;
183 const XalanDOMString m_number;
184 const XalanDOMString m_rtf;
185 const XalanDOMString m_string;
186
187 static const XalanDOMChar s_booleanString[];
188 static const XalanDOMChar s_externalString[];
189 static const XalanDOMChar s_nodeSetString[];
190 static const XalanDOMChar s_numberString[];
191 static const XalanDOMChar s_rtfString[];
192 static const XalanDOMChar s_stringString[];
193};
194
195
196
197}
198
199
200
201#endif // EXSLT_COMMONIMPL_HEADER_GUARD_1357924680
#define XALAN_EXSLT_EXPORT
#define XALAN_CPP_NAMESPACE
Xalan-C++ namespace, including major and minor version.
XPath implementation of "node-set" function.
Class to hold XObjectPtr return types.
Definition XObject.hpp:884
virtual XalanEXSLTFunctionNodeSet * clone(MemoryManager &theManager) const
Create a copy of the function object.
virtual const XalanDOMString & getError(XalanDOMString &theBuffer) const
Get the error message to report when the function is called with the wrong number of arguments.
virtual const XalanDOMString & getInvalidArgumentTypeError(XalanDOMString &theResult) const
const XalanDOMString & getError(XalanDOMString &theResult) const
Get the error message to report when the function is called with the wrong number of arguments.
virtual XalanEXSLTFunctionObjectType * clone(MemoryManager &theManager) const
Create a copy of the function object.
XalanEXSLTFunctionObjectType(MemoryManager &theManager)
XalanEXSLTFunctionObjectType(MemoryManager &theManager, int)
virtual XObjectPtr execute(XPathExecutionContext &executionContext, XalanNode *context, const XObjectArgVectorType &args, const Locator *locator) const
Execute an XPath function object.
Type * XalanCopyConstruct(MemoryManager &theMemoryManager, const Type &theSource)
bool operator==(const XalanVector< Type > &theLHS, const XalanVector< Type > &theRHS)