Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.10

XalanQNameByValueAllocator.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 
17 #if !defined(XALANQNAMEBYVALUEALLOCATOR_INCLUDE_GUARD_12455133)
18 #define XALANQNAMEBYVALUEALLOCATOR_INCLUDE_GUARD_12455133
19 
20 
21 
22 // Base include file. Must be first.
24 
25 
26 
28 
29 
30 
32 
33 
34 
35 XALAN_CPP_NAMESPACE_BEGIN
36 
37 
38 
40 {
41 public:
42 
46 
47 #if defined(XALAN_NO_DEFAULT_TEMPLATE_ARGUMENTS)
48  typedef ArenaBlock<data_type> ArenaBlockType;
49  typedef ArenaAllocator<data_type,
50  ArenaBlockType> ArenaAllocatorType;
51 #else
53 #endif
54 
56 
62  XalanQNameByValueAllocator(MemoryManagerType& theManager, size_type theBlockCount);
63 
65 
73  data_type*
74  create(const XalanQNameByValue& theSource);
75 
84  data_type*
85  create(
86  const XalanDOMString& theNamespaceURI,
87  const XalanDOMString& theLocalPart);
88 
99  data_type*
100  create(
101  const XalanDOMString& qname,
102  const NamespacesStackType& namespaces,
103  const LocatorType* locator = 0,
104  bool fUseDefault = false);
105 
116  data_type*
117  create(
118  const XalanDOMChar* qname,
119  const NamespacesStackType& namespaces,
120  const LocatorType* locator = 0,
121  bool fUseDefault = false);
122 
134  data_type*
135  create(
136  const XalanDOMString& qname,
137  const XalanElement* namespaceContext,
138  const XPathEnvSupport& envSupport,
139  const DOMSupport& domSupport,
140  const LocatorType* locator = 0);
141 
151  data_type*
152  create(
153  const XalanDOMString& qname,
154  const PrefixResolver* theResolver = 0,
155  const LocatorType* locator = 0);
156 
160  bool
161  ownsObject(const data_type* theObject)
162  {
163  return m_allocator.ownsObject(theObject);
164  }
165 
169  void
171  {
172  m_allocator.reset();
173  }
174 
180  size_type
182  {
183  return m_allocator.getBlockCount();
184  }
185 
192  size_type
193  getBlockSize() const
194  {
195  return m_allocator.getBlockSize();
196  }
197 
198 private:
199 
200  // Not implemented...
202 
204  operator=(const XalanQNameByValueAllocator&);
205 
206  // Data members...
207  ArenaAllocatorType m_allocator;
208 };
209 
210 
211 
212 XALAN_CPP_NAMESPACE_END
213 
214 
215 
216 #endif // XALANQNAMEBYVALUEALLOCATOR_INCLUDE_GUARD_12455133
XALAN_CPP_NAMESPACE_BEGIN typedef XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager MemoryManagerType
Definition: XalanMemoryManagement.hpp:39
Definition: DOMSupport.hpp:39
Definition: ArenaBlock.hpp:36
Definition: XalanElement.hpp:42
data_type::NamespacesStackType NamespacesStackType
Definition: XalanQNameByValueAllocator.hpp:44
size_type getBlockSize() const
Get size of an ArenaBlock, that is, the number of objects in each block.
Definition: XalanQNameByValueAllocator.hpp:193
Definition: ArenaAllocator.hpp:45
bool ownsObject(const data_type *theObject)
Determine if an object is owned by the allocator...
Definition: XalanQNameByValueAllocator.hpp:161
Definition: XPathEnvSupport.hpp:62
XALAN_CPP_NAMESPACE_BEGIN typedef size_t size_type
Definition: XalanMap.hpp:44
ArenaAllocatorType::size_type size_type
Definition: XalanQNameByValueAllocator.hpp:55
This class defines an interface for classes that resolve namespace prefixes to their URIs...
Definition: PrefixResolver.hpp:37
XalanQNameByValue data_type
Definition: XalanQNameByValueAllocator.hpp:43
XERCES_CPP_NAMESPACE_QUALIFIER Locator LocatorType
Definition: XalanQNameByValue.hpp:47
Definition: XalanQNameByValue.hpp:43
void reset()
Delete all objects from the allocator.
Definition: XalanQNameByValueAllocator.hpp:170
size_type getBlockCount() const
Get the number of ArenaBlocks currently allocated.
Definition: XalanQNameByValueAllocator.hpp:181
Definition: XalanDOMString.hpp:42
Definition: XalanQNameByValueAllocator.hpp:39
ArenaAllocator< data_type > ArenaAllocatorType
Definition: XalanQNameByValueAllocator.hpp:52
#define XALAN_XPATH_EXPORT
Definition: XPathDefinitions.hpp:33
data_type::LocatorType LocatorType
Definition: XalanQNameByValueAllocator.hpp:45
Xalan implementation of deque.
Definition: XalanDeque.hpp:160
ArenaBlockType::size_type size_type
Definition: ArenaAllocator.hpp:53

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