Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.10

XStringCachedAllocator.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(XSTRINGCACHEDALLOCATOR_INCLUDE_GUARD_1357924680)
18 #define XSTRINGCACHEDALLOCATOR_INCLUDE_GUARD_1357924680
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 
49 
55  XStringCachedAllocator(MemoryManagerType& theManager, size_type theBlockCount);
56 
58 
67  createString(GetAndReleaseCachedString& theValue);
68 
69 
73  bool
74  destroy(string_type* theString);
75 
79  bool
80  ownsObject(const string_type* theObject)
81  {
82  return m_allocator.ownsObject(theObject);
83  }
84 
88  void
89  reset();
90 
97  size_type
98  getBlockCount() const
99  {
100  return m_allocator.getBlockCount();
101  }
102 
108  size_type
109  getBlockSize() const
110  {
111  return m_allocator.getBlockSize();
112  }
113 
114 private:
115 
116  // Not implemented...
118 
120  operator=(const XStringCachedAllocator&);
121 
122  // Data members...
123  ArenaAllocatorType m_allocator;
124 };
125 
126 
127 
128 XALAN_CPP_NAMESPACE_END
129 
130 
131 
132 #endif // XSTRINGCACHEDALLOCATOR_INCLUDE_GUARD_1357924680
XALAN_CPP_NAMESPACE_BEGIN typedef XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager MemoryManagerType
Definition: XalanMemoryManagement.hpp:39
ReusableArenaAllocator< string_type > ArenaAllocatorType
Definition: XStringCachedAllocator.hpp:47
ArenaAllocatorType::size_type size_type
Definition: XStringCachedAllocator.hpp:48
ReusableArenaBlockType::size_type size_type
Definition: ReusableArenaAllocator.hpp:43
size_type getBlockSize() const
Get the number of ArenaBlocks currently allocated.
Definition: XStringCachedAllocator.hpp:109
bool ownsObject(const string_type *theObject)
Determine if an object is owned by the allocator...
Definition: XStringCachedAllocator.hpp:80
XStringCached string_type
Definition: XStringCachedAllocator.hpp:43
Definition: XStringCachedAllocator.hpp:39
XALAN_CPP_NAMESPACE_BEGIN typedef size_t size_type
Definition: XalanMap.hpp:44
Definition: XPathExecutionContext.hpp:430
Definition: XStringCached.hpp:39
string_type::GetAndReleaseCachedString GetAndReleaseCachedString
Definition: XStringCachedAllocator.hpp:45
#define XALAN_XPATH_EXPORT
Definition: XPathDefinitions.hpp:33
size_type getBlockCount() const
Get size of an ArenaBlock, that is, the number of objects in each block.
Definition: XStringCachedAllocator.hpp:98

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