Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.10

XPathEnvSupportDefault.hpp
Go to the documentation of this file.
1 /*
2  * Copyright 1999-2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 #if !defined(XPATHENVSUPPORTDEFAULT_HEADER_GUARD_1357924680)
17 #define XPATHENVSUPPORTDEFAULT_HEADER_GUARD_1357924680
18 
19 
20 
21 // Base include file. Must be first.
24 
25 
27 
28 
30 
31 
32 XALAN_CPP_NAMESPACE_BEGIN
33 
36 
37 
38 
44 {
45 public:
46 
50 
55  static void
56  initialize(MemoryManagerType& theManager);
57 
61  static void
62  terminate();
63 
64 
66 
67  virtual
69 
72  {
73  return m_sourceDocs.getMemoryManager();
74  }
75 
76  // Interfaces to install and uninstall external functions globally.
77  // These calls are not thread-safe, and should happen during
78  // processing.
79 
87  static void
88  installExternalFunctionGlobal(
89  const XalanDOMString& theNamespace,
90  const XalanDOMString& functionName,
91  const Function& function);
92 
99  static void
100  uninstallExternalFunctionGlobal(
101  const XalanDOMString& theNamespace,
102  const XalanDOMString& functionName);
103 
104  // Interfaces to install and uninstall external functions in this instance.
105 
113  virtual void
114  installExternalFunctionLocal(
115  const XalanDOMString& theNamespace,
116  const XalanDOMString& functionName,
117  const Function& function);
118 
125  virtual void
126  uninstallExternalFunctionLocal(
127  const XalanDOMString& theNamespace,
128  const XalanDOMString& functionName);
129 
130 
131  // These interfaces are inherited from XPathEnvSupport...
132 
133  virtual XalanDocument*
134  parseXML(
135  MemoryManagerType& theManager,
136  const XalanDOMString& urlString,
137  const XalanDOMString& base);
138 
139  virtual XalanDocument*
140  getSourceDocument(const XalanDOMString& theURI) const;
141 
142  virtual void
143  setSourceDocument(
144  const XalanDOMString& theURI,
145  XalanDocument* theDocument);
146 
147  virtual const XalanDOMString&
148  findURIFromDoc(const XalanDocument* owner) const;
149 
150  virtual bool
151  elementAvailable(
152  const XalanDOMString& theNamespace,
153  const XalanDOMString& elementName) const;
154 
155  virtual bool
156  functionAvailable(
157  const XalanDOMString& theNamespace,
158  const XalanDOMString& functionName) const;
159 
160  virtual XObjectPtr
161  extFunction(
162  XPathExecutionContext& executionContext,
163  const XalanDOMString& theNamespace,
164  const XalanDOMString& functionName,
165  XalanNode* context,
166  const XObjectArgVectorType& argVec,
167  const LocatorType* locator) const;
168 
169  virtual bool
170  problem(
171  eSource where,
172  eClassification classification,
173  const PrefixResolver* resolver,
174  const XalanNode* sourceNode,
175  const XalanDOMString& msg,
176  const XalanDOMChar* uri,
177  int lineNo,
178  int charOffset) const;
179 
180  // These interfaces are inherited from Resettable...
181 
182  virtual void
183  reset();
184 
185  // Delete functor for table cleanup...
187  {
188  typedef FunctionTableType FunctionTableInnerType;
189  typedef NamespaceFunctionTablesType NamespaceFunctionTablesInnerType;
190 
198  void
199  operator()(const NamespaceFunctionTablesInnerType::value_type& thePair) const;
200  private:
201  MemoryManagerType& m_memMgr;
202  };
203 
204 protected:
205 
213  const Function*
214  findFunction(
215  const XalanDOMString& theNamespace,
216  const XalanDOMString& functionName) const;
217 
218 private:
219 
220  // These are not implemented...
222 
224  operator=(const XPathEnvSupportDefault&);
225 
226  bool
227  operator==(const XPathEnvSupportDefault&) const;
228 
242  static void
243  updateFunctionTable(
244  NamespaceFunctionTablesType& theTable,
245  const XalanDOMString& theNamespace,
246  const XalanDOMString& functionName,
247  const Function* function);
248 
257  const Function*
258  findFunction(
259  const NamespaceFunctionTablesType& theTable,
260  const XalanDOMString& theNamespace,
261  const XalanDOMString& functionName) const;
262 
263  // Data members...
264 
265  SourceDocsTableType m_sourceDocs;
266 
267  NamespaceFunctionTablesType m_externalFunctions;
268 
269  static NamespaceFunctionTablesType s_externalFunctions;
270 
271  static const XalanDOMString s_emptyString;
272 };
273 
274 XALAN_CPP_NAMESPACE_END
275 
276 
277 
278 #endif // XPATHENVSUPPORTDEFAULT_HEADER_GUARD_1357924680

Interpreting class diagrams

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

dot

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

Apache Logo