17 #if !defined(ARENABLOCKBASE_INCLUDE_GUARD_1357924680)
18 #define ARENABLOCKBASE_INCLUDE_GUARD_1357924680
28 #if !defined(XALAN_NO_SELECTIVE_TEMPLATE_INSTANTIATION)
33 XALAN_CPP_NAMESPACE_BEGIN
36 #if defined(XALAN_NO_SELECTIVE_TEMPLATE_INSTANTIATION)
39 class ArenaBlockAllocator
44 typedef ptrdiff_t difference_type;
45 typedef Type* pointer;
46 typedef const Type* const_pointer;
47 typedef Type& reference;
48 typedef const Type& const_reference;
49 typedef Type value_type;
52 m_memoryManager(theManager)
56 ~ArenaBlockAllocator()
63 return m_memoryManager;
71 return (pointer)m_memoryManager.allocate(size *
sizeof(Type));
81 m_memoryManager.deallocate(p);
88 ArenaBlockAllocator(
const ArenaBlockAllocator<Type>&);
90 ArenaBlockAllocator<Type>&
91 operator=(
const ArenaBlockAllocator<Type>&);
99 template<
class ObjectType,
100 #if defined(XALAN_NO_DEFAULT_TEMPLATE_ARGUMENTS)
103 class SizeType =
size_t>
111 #if defined(XALAN_NO_SELECTIVE_TEMPLATE_INSTANTIATION)
193 #if defined(XALAN_NEW_STD_ALLOCATOR)
199 assert(theBlockSize > 0);
220 const ObjectType* theObject,
230 XALAN_STD_QUALIFIER less<const ObjectType*> functor;
297 XALAN_CPP_NAMESPACE_END
301 #endif // !defined(ARENABLOCKBASE_INCLUDE_GUARD_1357924680)
ArenaBlockBase< ObjectType, SizeType > ThisType
Definition: ArenaBlockBase.hpp:109
~ArenaBlockBase()
Definition: ArenaBlockBase.hpp:204
XALAN_CPP_NAMESPACE_BEGIN typedef XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager MemoryManagerType
Definition: XalanMemoryManagement.hpp:39
MemoryManagerType & getMemoryManager()
Definition: ArenaBlockBase.hpp:120
size_type getBlockOffset(const ObjectType *theObject) const
Definition: ArenaBlockBase.hpp:252
XalanAllocator< ObjectType > AllocatorType
Definition: ArenaBlockBase.hpp:114
ObjectType * getBlockAddress(size_type theOffset) const
Definition: ArenaBlockBase.hpp:269
ObjectType * m_objectBlock
Definition: ArenaBlockBase.hpp:283
size_type getBlockSize() const
Definition: ArenaBlockBase.hpp:166
size_type getCountAllocated() const
Definition: ArenaBlockBase.hpp:154
bool ownsBlock(const ObjectType *theObject) const
Definition: ArenaBlockBase.hpp:180
ArenaBlockBase(MemoryManagerType &theManager, size_type theBlockSize)
Definition: ArenaBlockBase.hpp:187
bool isEmpty() const
Definition: ArenaBlockBase.hpp:142
XALAN_CPP_NAMESPACE_BEGIN typedef size_t size_type
Definition: XalanMap.hpp:44
void deallocate(pointer p, size_type)
Definition: XalanAllocator.hpp:80
size_type m_objectCount
Definition: ArenaBlockBase.hpp:279
AllocatorType m_allocator
Definition: ArenaBlockBase.hpp:277
bool isInBorders(const ObjectType *theObject, size_type rightBoundary) const
Definition: ArenaBlockBase.hpp:219
const size_type m_blockSize
Definition: ArenaBlockBase.hpp:281
MemoryManagerType & getMemoryManager()
Definition: XalanAllocator.hpp:54
Definition: ArenaBlockBase.hpp:105
bool blockAvailable() const
Definition: ArenaBlockBase.hpp:131
SizeType size_type
Definition: ArenaBlockBase.hpp:117