Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.10

XPathAllocator.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(XPATHALLOCATOR_INCLUDE_GUARD_135792455)
18 #define XPATHALLOCATOR_INCLUDE_GUARD_135792455
19 
20 
21 
22 // Base include file. Must be first.
24 
25 
26 
28 
29 
30 
31 #include <xalanc/XPath/XPath.hpp>
32 
33 
34 
35 XALAN_CPP_NAMESPACE_BEGIN
36 
37 
38 
40 {
41 public:
42 
43  typedef XPath object_type;
44 
45 #if defined(XALAN_NO_DEFAULT_TEMPLATE_ARGUMENTS)
46  typedef ArenaBlock<object_type> ArenaBlockType;
47 
49  ArenaBlockType> ArenaAllocatorType;
50 #else
52 #endif
53 
55 
61  XPathAllocator(MemoryManagerType& theManager, size_type theBlockCount);
62 
63  ~XPathAllocator();
64 
71  create();
72 
76  bool
77  ownsObject(const object_type* theObject)
78  {
79  return m_allocator.ownsObject(theObject);
80  }
81 
85  void
86  reset();
87 
93  size_type
94  getBlockCount() const
95  {
96  return m_allocator.getBlockCount();
97  }
98 
104  size_type
105  getBlockSize() const
106  {
107  return m_allocator.getBlockSize();
108  }
109 
110 private:
111 
112  // Not implemented...
114 
116  operator=(const XPathAllocator&);
117 
118  // Data members...
119  ArenaAllocatorType m_allocator;
120 };
121 
122 
123 
124 XALAN_CPP_NAMESPACE_END
125 
126 
127 
128 #endif // XNUMBERALLOCATOR_INCLUDE_GUARD_135792455
ArenaAllocatorType::size_type size_type
Definition: XPathAllocator.hpp:54
XALAN_CPP_NAMESPACE_BEGIN typedef XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager MemoryManagerType
Definition: XalanMemoryManagement.hpp:39
Definition: ArenaBlock.hpp:36
ArenaAllocator< object_type > ArenaAllocatorType
Definition: XPathAllocator.hpp:51
XPath object_type
Definition: XPathAllocator.hpp:43
Definition: XPath.hpp:62
size_type getBlockSize() const
Get the number of blocks currently allocated.
Definition: XPathAllocator.hpp:105
Definition: ArenaAllocator.hpp:45
XALAN_CPP_NAMESPACE_BEGIN typedef size_t size_type
Definition: XalanMap.hpp:44
size_type getBlockCount() const
Get the number of objects in each block.
Definition: XPathAllocator.hpp:94
bool ownsObject(const object_type *theObject)
Determine if an object is owned by the allocator...
Definition: XPathAllocator.hpp:77
#define XALAN_XPATH_EXPORT
Definition: XPathDefinitions.hpp:33
Definition: XPathAllocator.hpp:39
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