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  

XPathAllocator.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(XPATHALLOCATOR_INCLUDE_GUARD_135792455)
00018 #define XPATHALLOCATOR_INCLUDE_GUARD_135792455
00019 
00020 
00021 
00022 // Base include file.  Must be first.
00023 #include <xalanc/XPath/XPathDefinitions.hpp>
00024 
00025 
00026 
00027 #include <xalanc/PlatformSupport/ArenaAllocator.hpp>
00028 
00029 
00030 
00031 #include <xalanc/XPath/XPath.hpp>
00032 
00033 
00034 
00035 XALAN_CPP_NAMESPACE_BEGIN
00036 
00037 
00038 
00039 class XALAN_XPATH_EXPORT XPathAllocator
00040 {
00041 public:
00042 
00043     typedef XPath                           object_type;
00044 
00045 #if defined(XALAN_NO_DEFAULT_TEMPLATE_ARGUMENTS)
00046     typedef ArenaBlock<object_type>         ArenaBlockType;
00047 
00048     typedef ArenaAllocator<object_type,
00049                            ArenaBlockType>  ArenaAllocatorType;
00050 #else
00051     typedef ArenaAllocator<object_type>     ArenaAllocatorType;
00052 #endif
00053 
00054     typedef ArenaAllocatorType::size_type   size_type;
00055 
00061     XPathAllocator(MemoryManagerType&      theManager, size_type    theBlockCount);
00062 
00063     ~XPathAllocator();
00064 
00070     object_type*
00071     create();
00072 
00076     bool
00077     ownsObject(const object_type*   theObject)
00078     {
00079         return m_allocator.ownsObject(theObject);
00080     }
00081     
00085     void
00086     reset();
00087 
00093     size_type
00094     getBlockCount() const
00095     {
00096         return m_allocator.getBlockCount();
00097     }
00098 
00104     size_type
00105     getBlockSize() const
00106     {
00107         return m_allocator.getBlockSize();
00108     }
00109 
00110 private:
00111 
00112     // Not implemented...
00113     XPathAllocator(const XPathAllocator&);
00114 
00115     XPathAllocator&
00116     operator=(const XPathAllocator&);
00117 
00118     // Data members...
00119     ArenaAllocatorType  m_allocator;
00120 };
00121 
00122 
00123 
00124 XALAN_CPP_NAMESPACE_END
00125 
00126 
00127 
00128 #endif  // XNUMBERALLOCATOR_INCLUDE_GUARD_135792455

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