Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.8

Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

XNumberAllocator.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(XNUMBERALLOCATOR_INCLUDE_GUARD_135792455)
00018 #define XNUMBERALLOCATOR_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/XPath/XNumber.hpp>
00028 
00029 
00030 
00031 #include <xalanc/PlatformSupport/ReusableArenaAllocator.hpp>
00032 
00033 
00034 
00035 XALAN_CPP_NAMESPACE_BEGIN
00036 
00037 
00038 
00039 class XALAN_XPATH_EXPORT XNumberAllocator
00040 {
00041 public:
00042 
00043     typedef XNumber         number_type;
00044 
00045     typedef ReusableArenaAllocator<number_type>     ArenaAllocatorType;
00046     typedef ArenaAllocatorType::size_type           size_type;
00047 
00053     XNumberAllocator(size_type  theBlockCount);
00054 
00055     ~XNumberAllocator();
00056 
00064     number_type*
00065     createNumber(double     theNumber);
00066 
00074     number_type*
00075     clone(const XNumber&    value);
00076 
00080     bool
00081     destroy(number_type*    theNumber);
00082 
00086     bool
00087     ownsObject(const number_type*   theObject)
00088     {
00089         return m_allocator.ownsObject(theObject);
00090     }
00091 
00095     void
00096     reset();
00097 
00104     size_type
00105     getBlockCount() const
00106     {
00107         return m_allocator.getBlockCount();
00108     }
00109 
00115     size_type
00116     getBlockSize() const
00117     {
00118         return m_allocator.getBlockSize();
00119     }
00120 
00121 private:
00122 
00123     // Not implemented...
00124     XNumberAllocator(const XNumberAllocator&);
00125 
00126     XNumberAllocator&
00127     operator=(const XNumberAllocator&);
00128 
00129     // Data members...
00130     ArenaAllocatorType  m_allocator;
00131 };
00132 
00133 
00134 
00135 XALAN_CPP_NAMESPACE_END
00136 
00137 
00138 
00139 #endif  // XNUMBERALLOCATOR_INCLUDE_GUARD_135792455

Interpreting class diagrams

Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.

Xalan-C++ XSLT Processor Version 1.8
Copyright © 1999-2004 The Apache Software Foundation. All Rights Reserved.