Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.10

XalanElemEmptyAllocator.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(XALANELEMEMPTYALLOCATOR_INCLUDE_GUARD_12455133)
18 #define XALANELEMEMPTYALLOCATOR_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 
44 
46 
48 
54  XalanElemEmptyAllocator(MemoryManagerType& theManager, size_type theBlockCount);
55 
57 
69  data_type*
70  create(
71  StylesheetConstructionContext& constructionContext,
72  Stylesheet& stylesheetTree,
73  int lineNumber,
74  int columnNumber,
75  const XalanDOMString* elementName = 0);
76 
84  data_type*
85  create(
86  StylesheetConstructionContext& constructionContext,
87  Stylesheet& stylesheetTree,
88  const XalanDOMString* elementName = 0);
89 
97  bool
98  destroy(data_type* theObject)
99  {
100  return m_allocator.destroyObject(theObject);
101  }
102 
106  bool
107  ownsObject(const data_type* theObject)
108  {
109  return m_allocator.ownsObject(theObject);
110  }
111 
115  void
117  {
118  m_allocator.reset();
119  }
120 
126  size_type
128  {
129  return m_allocator.getBlockCount();
130  }
131 
138  size_type
139  getBlockSize() const
140  {
141  return m_allocator.getBlockSize();
142  }
143 
144 private:
145 
146  // Not implemented...
148 
150  operator=(const XalanElemEmptyAllocator&);
151 
152  // Data members...
153  ArenaAllocatorType m_allocator;
154 };
155 
156 
157 
158 XALAN_CPP_NAMESPACE_END
159 
160 
161 
162 #endif // XALANELEMEMPTYALLOCATOR_INCLUDE_GUARD_12455133
XALAN_CPP_NAMESPACE_BEGIN typedef XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager MemoryManagerType
Definition: XalanMemoryManagement.hpp:39
ReusableArenaBlockType::size_type size_type
Definition: ReusableArenaAllocator.hpp:43
ReusableArenaAllocator< data_type > ArenaAllocatorType
Definition: XalanElemEmptyAllocator.hpp:45
size_type getBlockCount() const
Get the number of ArenaBlocks currently allocated.
Definition: XalanElemEmptyAllocator.hpp:127
void reset()
Delete all objects from the allocator.
Definition: XalanElemEmptyAllocator.hpp:116
ElemEmpty data_type
Definition: XalanElemEmptyAllocator.hpp:43
size_type getBlockSize() const
Get size of an ArenaBlock, that is, the number of objects in each block.
Definition: XalanElemEmptyAllocator.hpp:139
bool ownsObject(const data_type *theObject)
Determine if an object is owned by the allocator...
Definition: XalanElemEmptyAllocator.hpp:107
XALAN_CPP_NAMESPACE_BEGIN typedef size_t size_type
Definition: XalanMap.hpp:44
ArenaAllocatorType::size_type size_type
Definition: XalanElemEmptyAllocator.hpp:47
#define XALAN_XSLT_EXPORT
Definition: XSLTDefinitions.hpp:25
Simple empty elem to push on the stack when nothing else got pushed, so that pop() works correctly...
Definition: ElemEmpty.hpp:38
Definition: XalanElemEmptyAllocator.hpp:39
Definition: XalanDOMString.hpp:42
bool destroy(data_type *theObject)
Destroy an instance previously created.
Definition: XalanElemEmptyAllocator.hpp:98
Definition: StylesheetConstructionContext.hpp:73
This class represents the base stylesheet or an "import" stylesheet.
Definition: Stylesheet.hpp:84

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