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  

XalanElemEmptyAllocator.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(XALANELEMEMPTYALLOCATOR_INCLUDE_GUARD_12455133)
00018 #define XALANELEMEMPTYALLOCATOR_INCLUDE_GUARD_12455133
00019 
00020 
00021 
00022 // Base include file.  Must be first.
00023 #include <xalanc/XSLT/XSLTDefinitions.hpp>
00024 
00025 
00026 
00027 #include <xalanc/XSLT/ElemEmpty.hpp>
00028 
00029 
00030 
00031 #include <xalanc/PlatformSupport/ReusableArenaAllocator.hpp>
00032 
00033 
00034 
00035 XALAN_CPP_NAMESPACE_BEGIN
00036 
00037 
00038 
00039 class XALAN_XSLT_EXPORT XalanElemEmptyAllocator
00040 {
00041 public:
00042 
00043     typedef ElemEmpty                           data_type;
00044 
00045     typedef ReusableArenaAllocator<data_type>   ArenaAllocatorType;
00046 
00047     typedef ArenaAllocatorType::size_type       size_type;
00048 
00054     XalanElemEmptyAllocator(MemoryManagerType&  theManager, size_type       theBlockCount);
00055 
00056     ~XalanElemEmptyAllocator();
00057     
00069     data_type*
00070     create(
00071             StylesheetConstructionContext&  constructionContext,
00072             Stylesheet&                     stylesheetTree,
00073             int                             lineNumber,
00074             int                             columnNumber,
00075             const XalanDOMString*           elementName = 0);
00076 
00084     data_type*
00085     create(
00086             StylesheetConstructionContext&  constructionContext,
00087             Stylesheet&                     stylesheetTree,
00088             const XalanDOMString*           elementName = 0);
00089 
00097     bool
00098     destroy(data_type*  theObject)
00099     {
00100         return m_allocator.destroyObject(theObject);
00101     }
00102 
00106     bool
00107     ownsObject(const data_type*     theObject)
00108     {
00109         return m_allocator.ownsObject(theObject);
00110     }
00111     
00115     void
00116     reset()
00117     {
00118         m_allocator.reset();
00119     }
00120 
00126     size_type
00127     getBlockCount() const
00128     {
00129         return m_allocator.getBlockCount();
00130     }
00131 
00138     size_type
00139     getBlockSize() const
00140     {
00141         return m_allocator.getBlockSize();
00142     }
00143 
00144 private:
00145 
00146     // Not implemented...
00147     XalanElemEmptyAllocator(const XalanElemEmptyAllocator&);
00148 
00149     XalanElemEmptyAllocator&
00150     operator=(const XalanElemEmptyAllocator&);
00151 
00152     // Data members...
00153     ArenaAllocatorType  m_allocator;
00154 };
00155 
00156 
00157 
00158 XALAN_CPP_NAMESPACE_END
00159 
00160 
00161 
00162 #endif  // XALANELEMEMPTYALLOCATOR_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