Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.10

XalanSourceTreeDocumentAllocator.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(XALANSOURCETREEDOCUMENTALLOCATOR_INCLUDE_GUARD_12455133)
18 #define XALANSOURCETREEDOCUMENTALLOCATOR_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 
47 
48  enum { eDefaultAttributeAllocatorBlockSize = XalanSourceTreeDocument::eDefaultAttributeAllocatorBlockSize,
49  eDefaultAttributeNSAllocatorBlockSize = XalanSourceTreeDocument::eDefaultAttributeNSAllocatorBlockSize,
52  eDefaultElementNSAllocatorBlockSize = XalanSourceTreeDocument::eDefaultElementNSAllocatorBlockSize,
60  eDefaultValuesStringPoolBucketCount = XalanSourceTreeDocument::eDefaultValuesStringPoolBucketCount,
61  eDefaultValuesStringPoolBucketSize = XalanSourceTreeDocument::eDefaultValuesStringPoolBucketSize };
62 
66 
73 
75 
89  data_type*
90  create(
91  bool fPoolAllText = true,
92  block_size_type theNamesStringPoolBlockSize = eDefaultNamesStringPoolBlockSize,
93  bucket_count_type theNamesStringPoolBucketCount = eDefaultNamesStringPoolBucketCount,
94  bucket_size_type theNamesStringPoolBucketSize = eDefaultNamesStringPoolBucketSize,
95  block_size_type theValuesStringPoolBlockSize = eDefaultValuesStringPoolBlockSize,
96  bucket_count_type theValuesStringPoolBucketCount = eDefaultValuesStringPoolBucketCount,
97  bucket_size_type theValuesStringPoolBucketSize = eDefaultValuesStringPoolBucketSize);
98 
113  data_type*
114  create(
115  size_type theAttributeBlockSize,
116  size_type theAttributeNSBlockSize,
117  size_type theCommentBlockSize,
118  size_type theElementBlockSize,
119  size_type theElementNSBlockSize,
120  size_type thePIBlockSize,
121  size_type theTextBlockSize,
122  size_type theTextIWSBlockSize,
123  bool fPoolAllText = true);
124 
128  bool
129  destroy(data_type* theObject);
130 
134  bool
135  ownsObject(const data_type* theObject)
136  {
137  return m_allocator.ownsObject(theObject);
138  }
139 
143  void
144  reset();
145 
151  size_type
153  {
154  return m_allocator.getBlockCount();
155  }
156 
163  size_type
164  getBlockSize() const
165  {
166  return m_allocator.getBlockSize();
167  }
168 
169 private:
170 
171  // Not implemented...
173 
175  operator=(const XalanSourceTreeDocumentAllocator&);
176 
177  // Data members...
178  ArenaAllocatorType m_allocator;
179 };
180 
181 
182 
183 XALAN_CPP_NAMESPACE_END
184 
185 
186 
187 #endif // XALANSOURCETREEDOCUMENTALLOCATOR_INCLUDE_GUARD_12455133
size_type getBlockSize() const
Get size of an ArenaBlock, that is, the number of objects in each block.
Definition: XalanSourceTreeDocumentAllocator.hpp:164
Definition: XalanSourceTreeDocument.hpp:107
XALAN_CPP_NAMESPACE_BEGIN typedef XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager MemoryManagerType
Definition: XalanMemoryManagement.hpp:39
Definition: XalanSourceTreeDocument.hpp:106
Definition: XalanSourceTreeDocument.hpp:109
Definition: XalanSourceTreeDocument.hpp:102
ReusableArenaBlockType::size_type size_type
Definition: ReusableArenaAllocator.hpp:43
ArenaAllocatorType::size_type size_type
Definition: XalanSourceTreeDocumentAllocator.hpp:46
Definition: XalanSourceTreeDocument.hpp:105
XalanSourceTreeDocument::bucket_count_type bucket_count_type
Definition: XalanSourceTreeDocumentAllocator.hpp:64
ReusableArenaAllocator< data_type > ArenaAllocatorType
Definition: XalanSourceTreeDocumentAllocator.hpp:45
XalanSourceTreeDocument::bucket_size_type bucket_size_type
Definition: XalanSourceTreeDocumentAllocator.hpp:65
Definition: XalanSourceTreeDocument.hpp:114
Definition: XalanSourceTreeDocument.hpp:111
XalanDOMStringPool::block_size_type block_size_type
Definition: XalanSourceTreeDocument.hpp:119
Definition: XalanSourceTreeDocument.hpp:115
XALAN_CPP_NAMESPACE_BEGIN typedef size_t size_type
Definition: XalanMap.hpp:44
Definition: XalanSourceTreeDocumentAllocator.hpp:39
XalanDOMStringPool::bucket_size_type bucket_size_type
Definition: XalanSourceTreeDocument.hpp:121
XalanDOMStringPool::bucket_count_type bucket_count_type
Definition: XalanSourceTreeDocument.hpp:120
Definition: XalanSourceTreeDocument.hpp:108
size_type getBlockCount() const
Get the number of ArenaBlocks currently allocated.
Definition: XalanSourceTreeDocumentAllocator.hpp:152
#define XALAN_XSLT_EXPORT
Definition: XSLTDefinitions.hpp:25
Definition: XalanSourceTreeDocument.hpp:110
Definition: XalanSourceTreeDocument.hpp:104
Definition: XalanSourceTreeDocument.hpp:112
Definition: XalanSourceTreeDocument.hpp:73
XalanSourceTreeDocument::block_size_type block_size_type
Definition: XalanSourceTreeDocumentAllocator.hpp:63
bool ownsObject(const data_type *theObject)
Determine if an object is owned by the allocator...
Definition: XalanSourceTreeDocumentAllocator.hpp:135
Definition: XalanSourceTreeDocument.hpp:113
XalanSourceTreeDocument data_type
Definition: XalanSourceTreeDocumentAllocator.hpp:43
Definition: XalanSourceTreeDocument.hpp:103

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