Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.10

XalanElemTextAllocator.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(XALANELEMTEXTALLOCATOR_INCLUDE_GUARD_12455133)
18 #define XALANELEMTEXTALLOCATOR_INCLUDE_GUARD_12455133
19 
20 
21 
22 // Base include file. Must be first.
24 
25 
26 
27 #include <xalanc/XSLT/ElemText.hpp>
28 
29 
30 
32 
33 
34 
35 XALAN_CPP_NAMESPACE_BEGIN
36 
37 
38 
40 {
41 public:
42 
44 
46 
48 
54  XalanElemTextAllocator(MemoryManagerType& theManager, size_type theBlockCount);
55 
57 
69  data_type*
70  create(
71  StylesheetConstructionContext& constructionContext,
72  Stylesheet& stylesheetTree,
73  const AttributeListType& atts,
74  int lineNumber,
75  int columnNumber);
76 
84  bool
85  destroy(data_type* theObject)
86  {
87  return m_allocator.destroyObject(theObject);
88  }
89 
93  bool
94  ownsObject(const data_type* theObject)
95  {
96  return m_allocator.ownsObject(theObject);
97  }
98 
102  void
104  {
105  m_allocator.reset();
106  }
107 
113  size_type
115  {
116  return m_allocator.getBlockCount();
117  }
118 
125  size_type
126  getBlockSize() const
127  {
128  return m_allocator.getBlockSize();
129  }
130 
131 private:
132 
133  // Not implemented...
135 
137  operator=(const XalanElemTextAllocator&);
138 
139  // Data members...
140  ArenaAllocatorType m_allocator;
141 };
142 
143 
144 
145 XALAN_CPP_NAMESPACE_END
146 
147 
148 
149 #endif // XALANELEMTEXTALLOCATOR_INCLUDE_GUARD_12455133
XERCES_CPP_NAMESPACE_QUALIFIER AttributeList AttributeListType
Definition: AttributeListImpl.hpp:39
XALAN_CPP_NAMESPACE_BEGIN typedef XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager MemoryManagerType
Definition: XalanMemoryManagement.hpp:39
ElemText data_type
Definition: XalanElemTextAllocator.hpp:43
ReusableArenaBlockType::size_type size_type
Definition: ReusableArenaAllocator.hpp:43
size_type getBlockSize() const
Get size of an ArenaBlock, that is, the number of objects in each block.
Definition: XalanElemTextAllocator.hpp:126
bool ownsObject(const data_type *theObject)
Determine if an object is owned by the allocator...
Definition: XalanElemTextAllocator.hpp:94
size_type getBlockCount() const
Get the number of ArenaBlocks currently allocated.
Definition: XalanElemTextAllocator.hpp:114
Definition: XalanElemTextAllocator.hpp:39
XALAN_CPP_NAMESPACE_BEGIN typedef size_t size_type
Definition: XalanMap.hpp:44
This primarily acts as a marker on the element stack to signal that whitespace should be preserved...
Definition: ElemText.hpp:38
#define XALAN_XSLT_EXPORT
Definition: XSLTDefinitions.hpp:25
Definition: StylesheetConstructionContext.hpp:73
void reset()
Delete all objects from the allocator.
Definition: XalanElemTextAllocator.hpp:103
This class represents the base stylesheet or an "import" stylesheet.
Definition: Stylesheet.hpp:84
bool destroy(data_type *theObject)
Destroy an instance previously created.
Definition: XalanElemTextAllocator.hpp:85
ArenaAllocatorType::size_type size_type
Definition: XalanElemTextAllocator.hpp:47
ReusableArenaAllocator< data_type > ArenaAllocatorType
Definition: XalanElemTextAllocator.hpp:45

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