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  

XalanElemLiteralResultAllocator.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(XALANELEMLITERALRESULTALLOCATOR_INCLUDE_GUARD_12455133)
00018 #define XALANELEMLITERALRESULTALLOCATOR_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/ElemLiteralResult.hpp>
00028 
00029 
00030 
00031 #include <xalanc/PlatformSupport/ArenaAllocator.hpp>
00032 
00033 
00034 
00035 XALAN_CPP_NAMESPACE_BEGIN
00036 
00037 
00038 
00039 class XALAN_XSLT_EXPORT XalanElemLiteralResultAllocator
00040 {
00041 public:
00042 
00043     typedef ElemLiteralResult                   data_type;
00044 
00045 #if defined(XALAN_NO_DEFAULT_TEMPLATE_ARGUMENTS)
00046     typedef ArenaBlock<data_type>               ArenaBlockType;
00047     typedef ArenaAllocator<data_type,
00048                            ArenaBlockType>      ArenaAllocatorType;
00049 #else
00050     typedef ArenaAllocator<data_type>           ArenaAllocatorType;
00051 #endif
00052 
00053     typedef ArenaAllocatorType::size_type       size_type;
00054 
00060     XalanElemLiteralResultAllocator(MemoryManagerType&  theManager, size_type       theBlockCount);
00061 
00062     ~XalanElemLiteralResultAllocator();
00063     
00076     data_type*
00077     create(
00078             StylesheetConstructionContext&  constructionContext,
00079             Stylesheet&                     stylesheetTree,
00080             const XalanDOMChar*             name,
00081             const AttributeListType&        atts,
00082             int                             lineNumber,
00083             int                             columnNumber);
00084 
00088     bool
00089     ownsObject(const data_type*     theObject)
00090     {
00091         return m_allocator.ownsObject(theObject);
00092     }
00093     
00097     void
00098     reset()
00099     {
00100         m_allocator.reset();
00101     }
00102 
00108     size_type
00109     getBlockCount() const
00110     {
00111         return m_allocator.getBlockCount();
00112     }
00113 
00120     size_type
00121     getBlockSize() const
00122     {
00123         return m_allocator.getBlockSize();
00124     }
00125 
00126 private:
00127 
00128     // Not implemented...
00129     XalanElemLiteralResultAllocator(const XalanElemLiteralResultAllocator&);
00130 
00131     XalanElemLiteralResultAllocator&
00132     operator=(const XalanElemLiteralResultAllocator&);
00133 
00134     // Data members...
00135     ArenaAllocatorType  m_allocator;
00136 };
00137 
00138 
00139 
00140 XALAN_CPP_NAMESPACE_END
00141 
00142 
00143 
00144 #endif  // XALANELEMLITERALRESULTALLOCATOR_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