Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.10

Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

XalanSourceTreeElementANSAllocator.hpp

Go to the documentation of this file.
00001 /*
00002  * Copyright 1999-2004 The Apache Software Foundation.
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  *
00008  *     http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00017 #if !defined(XALANSOURCETREEELEMENTANSALLOCATOR_INCLUDE_GUARD_12455133)
00018 #define XALANSOURCETREEELEMENTANSALLOCATOR_INCLUDE_GUARD_12455133
00019 
00020 
00021 
00022 #include <xalanc/XalanSourceTree/XalanSourceTreeDefinitions.hpp>
00023 
00024 
00025 
00026 #include <xalanc/PlatformSupport/ArenaAllocator.hpp>
00027 
00028 
00029 
00030 #include <xalanc/XalanSourceTree/XalanSourceTreeElementANS.hpp>
00031 
00032 
00033 
00034 XALAN_CPP_NAMESPACE_BEGIN
00035 
00036 
00037 
00038 class XALAN_XALANSOURCETREE_EXPORT XalanSourceTreeElementANSAllocator
00039 {
00040 public:
00041 
00042     typedef XalanSourceTreeElementANS               ObjectType;
00043 
00044     typedef ObjectType::IndexType                   IndexType;
00045 
00046     typedef ObjectType::AttributesCountType         AttributesCountType;
00047 
00048 #if defined(XALAN_NO_DEFAULT_TEMPLATE_ARGUMENTS)
00049     typedef ArenaBlock<ObjectType>                  ArenaBlockType;
00050 
00051     typedef ArenaAllocator<ObjectType,
00052                            ArenaBlockType>          ArenaAllocatorType;
00053 #else
00054     typedef ArenaAllocator<ObjectType>              ArenaAllocatorType;
00055 #endif
00056 
00057     typedef ArenaAllocatorType::size_type           size_type;
00058 
00064     XalanSourceTreeElementANSAllocator(MemoryManagerType&  theManager, size_type    theBlockCount);
00065 
00066     ~XalanSourceTreeElementANSAllocator();
00067 
00085     ObjectType*
00086     create(
00087             const XalanDOMString&       theTagName,
00088             const XalanDOMString&       theLocalName,
00089             const XalanDOMString&       theNamespaceURI,
00090             const XalanDOMString&       thePrefix,
00091             XalanSourceTreeDocument*    theOwnerDocument,
00092             XalanSourceTreeAttr**       theAttributes,
00093             AttributesCountType         theAttributeCount,
00094             XalanNode*                  theParentNode = 0,
00095             XalanNode*                  thePreviousSibling = 0,
00096             XalanNode*                  theNextSibling = 0,
00097             IndexType                   theIndex = 0);
00098     
00102     void
00103     reset();
00104 
00111     size_type
00112     getBlockCount() const
00113     {
00114         return m_allocator.getBlockCount();
00115     }
00116 
00122     size_type
00123     getBlockSize() const
00124     {
00125         return m_allocator.getBlockSize();
00126     }
00127 
00128 private:
00129 
00130     // Not implemented...
00131     XalanSourceTreeElementANSAllocator(const XalanSourceTreeElementANSAllocator&);
00132 
00133     XalanSourceTreeElementANSAllocator&
00134     operator=(const XalanSourceTreeElementANSAllocator&);
00135 
00136     // Data members...
00137     ArenaAllocatorType  m_allocator;
00138 };
00139 
00140 
00141 
00142 XALAN_CPP_NAMESPACE_END
00143 
00144 
00145 
00146 #endif  // XALANSOURCETREEELEMENTANSALLOCATOR_INCLUDE_GUARD_12455133

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