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(XTOKENNUMBERADAPTERALLOCATOR_INCLUDE_GUARD_1357924680) 00018 #define XTOKENNUMBERADAPTERALLOCATOR_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/XTokenNumberAdapter.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 XTokenNumberAdapterAllocator 00040 { 00041 public: 00042 00043 typedef XTokenNumberAdapter object_type; 00044 00045 typedef ReusableArenaAllocator<object_type> ArenaAllocatorType; 00046 typedef ArenaAllocatorType::size_type size_type; 00047 00053 XTokenNumberAdapterAllocator(MemoryManagerType& theManager, size_type theBlockCount); 00054 00055 ~XTokenNumberAdapterAllocator(); 00056 00064 object_type* 00065 create(const XToken& theXToken); 00066 00067 00071 bool 00072 destroy(object_type* theObject); 00073 00077 bool 00078 ownsObject(const object_type* theObject) 00079 { 00080 return m_allocator.ownsObject(theObject); 00081 } 00082 00086 void 00087 reset(); 00088 00095 size_type 00096 getBlockCount() const 00097 { 00098 return m_allocator.getBlockCount(); 00099 } 00100 00106 size_type 00107 getBlockSize() const 00108 { 00109 return m_allocator.getBlockSize(); 00110 } 00111 00112 private: 00113 00114 // Not implemented... 00115 XTokenNumberAdapterAllocator(const XTokenNumberAdapterAllocator&); 00116 00117 XTokenNumberAdapterAllocator& 00118 operator=(const XTokenNumberAdapterAllocator&); 00119 00120 // Data members... 00121 ArenaAllocatorType m_allocator; 00122 }; 00123 00124 00125 00126 XALAN_CPP_NAMESPACE_END 00127 00128 00129 00130 #endif // XTOKENNUMBERADAPTERALLOCATOR_INCLUDE_GUARD_1357924680
Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.
Xalan-C++ XSLT Processor Version 1.10 |
|