19#if !defined(ARENAALLOCATOR_INCLUDE_GUARD_1357924680)
20#define ARENAALLOCATOR_INCLUDE_GUARD_1357924680
41template<
class ObjectType,
42#if defined(XALAN_NO_DEFAULT_TEMPLATE_ARGUMENTS)
45 class ArenaBlockType = ArenaBlock<ObjectType> >
63 MemoryManager& theManager,
65 m_blockSize(theBlockSize),
79 return m_blocks.getMemoryManager();
85 return m_blocks.getMemoryManager();
110 m_blockSize = theSize;
134 if (m_blocks.empty() ==
true ||
135 m_blocks.back()->blockAvailable() ==
false)
138 ArenaBlockType::create(
143 m_blocks.empty() ==
false &&
144 m_blocks.back() != 0 &&
145 m_blocks.back()->blockAvailable() ==
true);
147 return m_blocks.back()->allocateBlock();
160 m_blocks.empty() ==
false &&
161 m_blocks.back()->ownsBlock(theObject) ==
true);
163 m_blocks.back()->commitAllocation(theObject);
165 assert(m_blocks.back()->ownsObject(theObject) ==
true);
171 bool fResult =
false;
176 const const_reverse_iterator theEnd = this->m_blocks.rend();
178 const_reverse_iterator i = this->m_blocks.rbegin();
184 if ((*i)->ownsObject(theObject) ==
true)
#define XALAN_CPP_NAMESPACE
Xalan-C++ namespace, including major and minor version.
virtual bool ownsObject(const ObjectType *theObject) const
ArenaAllocator< ObjectType, ArenaBlockType > ThisType
virtual ~ArenaAllocator()
size_type getBlockSize() const
const MemoryManager & getMemoryManager() const
virtual void commitAllocation(ObjectType *theObject)
size_type getBlockCount() const
ArenaAllocator(MemoryManager &theManager, size_type theBlockSize)
virtual ObjectType * allocateBlock()
ArenaBlockType::size_type size_type
ArenaBlockListType m_blocks
XalanList< ArenaBlockType * > ArenaBlockListType
void setBlockSize(size_type theSize)
MemoryManager & getMemoryManager()
Xalan implementation of a doubly linked list.
const_reverse_iterator_ const_reverse_iterator
bool operator==(const XalanVector< Type > &theLHS, const XalanVector< Type > &theRHS)
Functor to delete objects, used in STL iteration algorithms.