00001 /* 00002 * Licensed to the Apache Software Foundation (ASF) under one 00003 * or more contributor license agreements. See the NOTICE file 00004 * distributed with this work for additional information 00005 * regarding copyright ownership. The ASF licenses this file 00006 * to you under the Apache License, Version 2.0 (the "License"); 00007 * you may not use this file except in compliance with the License. 00008 * You may obtain a copy of the License at 00009 * 00010 * http://www.apache.org/licenses/LICENSE-2.0 00011 * 00012 * Unless required by applicable law or agreed to in writing, software 00013 * distributed under the License is distributed on an "AS IS" BASIS, 00014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00015 * See the License for the specific language governing permissions and 00016 * limitations under the License. 00017 */ 00018 00019 #if !defined(XERCESATTRIBUTEBRIDGEALLOCATOR_INCLUDE_GUARD_12455133) 00020 #define XERCESATTRIBUTEBRIDGEALLOCATOR_INCLUDE_GUARD_12455133 00021 00022 00023 00024 #include <xalanc/XercesParserLiaison/XercesParserLiaisonDefinitions.hpp> 00025 00026 00027 00028 #include <xalanc/PlatformSupport/ArenaAllocator.hpp> 00029 00030 00031 00032 #include <xalanc/XercesParserLiaison/Deprecated/XercesAttrBridge.hpp> 00033 00034 00035 00036 XALAN_CPP_NAMESPACE_BEGIN 00037 00038 00039 /** 00040 * This class is deprecated. 00041 * 00042 * @deprecated This class is part of the deprecated Xerces DOM bridge. 00043 */ 00044 class XALAN_XERCESPARSERLIAISON_EXPORT XercesAttributeBridgeAllocator 00045 { 00046 public: 00047 00048 typedef XercesAttrBridge ObjectType; 00049 00050 #if defined(XALAN_NO_DEFAULT_TEMPLATE_ARGUMENTS) 00051 typedef ArenaBlock<ObjectType> ArenaBlockType; 00052 00053 typedef ArenaAllocator<ObjectType, 00054 ArenaBlockType> ArenaAllocatorType; 00055 #else 00056 typedef ArenaAllocator<ObjectType> ArenaAllocatorType; 00057 #endif 00058 00059 typedef ArenaAllocatorType::size_type size_type; 00060 00061 /** 00062 * Construct an instance that will allocate blocks of the specified size. 00063 * 00064 * @param theBlockSize The block size. 00065 */ 00066 XercesAttributeBridgeAllocator(size_type theBlockCount); 00067 00068 ~XercesAttributeBridgeAllocator(); 00069 00070 /** 00071 * Create a XercesAttrBridge instance. 00072 * 00073 * @param theXercesAttr The Xerces attribute node 00074 * @param theNavigator The navigator for this instance. 00075 * 00076 * @return pointer to the instance 00077 */ 00078 ObjectType* 00079 create( 00080 const DOM_AttrType& theXercesAttr, 00081 const XercesBridgeNavigator& theNavigator); 00082 00083 /** 00084 * Delete all objects from allocator. 00085 */ 00086 void 00087 reset(); 00088 00089 /** 00090 * Get size of an ArenaBlock, that is, the number 00091 * of objects in each block. 00092 * 00093 * @return The size of the block 00094 */ 00095 size_type 00096 getBlockCount() const 00097 { 00098 return m_allocator.getBlockCount(); 00099 } 00100 00101 /** 00102 * Get the number of ArenaBlocks currently allocated. 00103 * 00104 * @return The number of blocks. 00105 */ 00106 size_type 00107 getBlockSize() const 00108 { 00109 return m_allocator.getBlockSize(); 00110 } 00111 00112 private: 00113 00114 // Not implemented... 00115 XercesAttributeBridgeAllocator(const XercesAttributeBridgeAllocator&); 00116 00117 XercesAttributeBridgeAllocator& 00118 operator=(const XercesAttributeBridgeAllocator&); 00119 00120 // Data members... 00121 ArenaAllocatorType m_allocator; 00122 }; 00123 00124 00125 00126 XALAN_CPP_NAMESPACE_END 00127 00128 00129 00130 #endif // XERCESATTRIBUTEBRIDGEALLOCATOR_INCLUDE_GUARD_12455133
Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.
Xalan-C++ XSLT Processor Version 1.11 |
|