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  

XStringAllocator.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(XSTRINGALLOCATOR_INCLUDE_GUARD_1357924680)
00018 #define XSTRINGALLOCATOR_INCLUDE_GUARD_1357924680
00019 
00020 
00021 
00022 // Base include file.  Must be first.
00023 #include <xalanc/XPath/XPathDefinitions.hpp>
00024 
00025 
00026 
00027 #include <xalanc/XPath/XString.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 XStringAllocator
00040 {
00041 public:
00042 
00043     typedef XString         string_type;
00044 
00045     typedef ReusableArenaAllocator<string_type>     ArenaAllocatorType;
00046     typedef ArenaAllocatorType::size_type           size_type;
00047 
00053     XStringAllocator(MemoryManagerType&  theManager, size_type  theBlockCount);
00054 
00055     ~XStringAllocator();
00056 
00064     string_type*
00065     createString(const XalanDOMString&  theString);
00066 
00074     string_type*
00075     createString(const XalanDOMChar*    theString);
00076 
00085     string_type*
00086     createString(
00087             const XalanDOMChar*     theString,
00088             unsigned int            theLength);
00089 
00093     bool
00094     destroy(string_type*    theString);
00095 
00099     bool
00100     ownsObject(const string_type*   theObject)
00101     {
00102         return m_allocator.ownsObject(theObject);
00103     }
00104 
00108     void 
00109     reset();
00110 
00117     size_type
00118     getBlockCount() const
00119     {
00120         return m_allocator.getBlockCount();
00121     }
00122 
00128     size_type
00129     getBlockSize() const
00130     {
00131         return m_allocator.getBlockSize();
00132     }
00133 
00134 private:
00135 
00136     // Not implemented...
00137     XStringAllocator(const XStringAllocator&);
00138 
00139     XStringAllocator&
00140     operator=(const XStringAllocator&);
00141 
00142     // Data members...
00143     ArenaAllocatorType  m_allocator;
00144 };
00145 
00146 
00147 
00148 XALAN_CPP_NAMESPACE_END
00149 
00150 
00151 
00152 #endif  // XSTRINGALLOCATOR_INCLUDE_GUARD_1357924680

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