Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.10

XalanElemTextLiteralAllocator.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(XALANELEMTEXTLITERALALLOCATOR_INCLUDE_GUARD_12455133)
18 #define XALANELEMTEXTLITERALALLOCATOR_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 
45 #if defined(XALAN_NO_DEFAULT_TEMPLATE_ARGUMENTS)
46  typedef ArenaBlock<data_type> ArenaBlockType;
47  typedef ArenaAllocator<data_type,
48  ArenaBlockType> ArenaAllocatorType;
49 #else
51 #endif
52 
54 
60  XalanElemTextLiteralAllocator(MemoryManagerType& theManager, size_type theBlockCount);
61 
63 
79  data_type*
80  create(
81  StylesheetConstructionContext& constructionContext,
82  Stylesheet& stylesheetTree,
83  int lineNumber,
84  int columnNumber,
85  const XalanDOMChar* ch,
88  bool preserveSpace,
89  bool disableOutputEscaping);
90 
94  bool
95  ownsObject(const data_type* theObject)
96  {
97  return m_allocator.ownsObject(theObject);
98  }
99 
103  void
105  {
106  m_allocator.reset();
107  }
108 
114  size_type
116  {
117  return m_allocator.getBlockCount();
118  }
119 
126  size_type
127  getBlockSize() const
128  {
129  return m_allocator.getBlockSize();
130  }
131 
132 private:
133 
134  // Not implemented...
136 
138  operator=(const XalanElemTextLiteralAllocator&);
139 
140  // Data members...
141  ArenaAllocatorType m_allocator;
142 };
143 
144 
145 
146 XALAN_CPP_NAMESPACE_END
147 
148 
149 
150 #endif // XALANELEMTEXTLITERALALLOCATOR_INCLUDE_GUARD_12455133
void reset()
Delete all objects from the allocator.
Definition: XalanElemTextLiteralAllocator.hpp:104
XALAN_CPP_NAMESPACE_BEGIN typedef XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager MemoryManagerType
Definition: XalanMemoryManagement.hpp:39
Definition: ArenaBlock.hpp:36
size_type getBlockSize() const
Get size of an ArenaBlock, that is, the number of objects in each block.
Definition: XalanElemTextLiteralAllocator.hpp:127
Definition: ArenaAllocator.hpp:45
Definition: ElemTextLiteral.hpp:38
XALAN_CPP_NAMESPACE_BEGIN typedef size_t size_type
Definition: XalanMap.hpp:44
ElemTextLiteral data_type
Definition: XalanElemTextLiteralAllocator.hpp:43
ArenaAllocator< data_type > ArenaAllocatorType
Definition: XalanElemTextLiteralAllocator.hpp:50
#define XALAN_XSLT_EXPORT
Definition: XSLTDefinitions.hpp:25
XalanDOMString::size_type length(const XalanDOMString &theString)
Get the length of a XalanDOMString.
Definition: DOMStringHelper.hpp:277
Definition: StylesheetConstructionContext.hpp:73
This class represents the base stylesheet or an "import" stylesheet.
Definition: Stylesheet.hpp:84
ArenaAllocatorType::size_type size_type
Definition: XalanElemTextLiteralAllocator.hpp:53
unsigned int size_type
Definition: XalanDOMString.hpp:53
size_type getBlockCount() const
Get the number of ArenaBlocks currently allocated.
Definition: XalanElemTextLiteralAllocator.hpp:115
bool ownsObject(const data_type *theObject)
Determine if an object is owned by the allocator...
Definition: XalanElemTextLiteralAllocator.hpp:95
Definition: XalanElemTextLiteralAllocator.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