Xalan-C++ API Reference  1.12.0
Public Types | Public Member Functions | List of all members
xalanc::XalanArrayAllocator< Type > Class Template Reference

#include <xalanc/PlatformSupport/XalanArrayAllocator.hpp>

Inheritance diagram for xalanc::XalanArrayAllocator< Type >:
[legend]

Public Types

enum  { eDefaultBlockSize = 500 }
 
typedef XalanVector< Type > VectorType
 
typedef VectorType::size_type size_type
 
typedef std::pair< size_type, VectorType * > ListEntryType
 
typedef XalanList< ListEntryTypeListType
 
typedef Type value_type
 
typedef ListType::iterator ListIteratorType
 

Public Member Functions

 XalanArrayAllocator (MemoryManager &theManager, size_type theBlockSize=eDefaultBlockSize)
 Constructor. More...
 
 ~XalanArrayAllocator ()
 
void clear ()
 Clear the instance, and release all allocated memory. More...
 
void reset ()
 Reset the instance, but keep all memory so it can be reused for allocations. More...
 
Type * allocate (size_type theCount)
 Allocate slots for the given number of Types instance and return the address of the slots. More...
 

Detailed Description

template<class Type>
class xalanc::XalanArrayAllocator< Type >

Definition at line 42 of file XalanArrayAllocator.hpp.

Member Typedef Documentation

◆ ListEntryType

template<class Type >
typedef std::pair<size_type, VectorType * > xalanc::XalanArrayAllocator< Type >::ListEntryType

Definition at line 49 of file XalanArrayAllocator.hpp.

◆ ListIteratorType

template<class Type >
typedef ListType::iterator xalanc::XalanArrayAllocator< Type >::ListIteratorType

Definition at line 54 of file XalanArrayAllocator.hpp.

◆ ListType

template<class Type >
typedef XalanList<ListEntryType> xalanc::XalanArrayAllocator< Type >::ListType

Definition at line 50 of file XalanArrayAllocator.hpp.

◆ size_type

template<class Type >
typedef VectorType::size_type xalanc::XalanArrayAllocator< Type >::size_type

Definition at line 47 of file XalanArrayAllocator.hpp.

◆ value_type

template<class Type >
typedef Type xalanc::XalanArrayAllocator< Type >::value_type

Definition at line 52 of file XalanArrayAllocator.hpp.

◆ VectorType

template<class Type >
typedef XalanVector<Type> xalanc::XalanArrayAllocator< Type >::VectorType

Definition at line 46 of file XalanArrayAllocator.hpp.

Member Enumeration Documentation

◆ anonymous enum

template<class Type >
anonymous enum
Enumerator
eDefaultBlockSize 

Definition at line 57 of file XalanArrayAllocator.hpp.

Constructor & Destructor Documentation

◆ XalanArrayAllocator()

template<class Type >
xalanc::XalanArrayAllocator< Type >::XalanArrayAllocator ( MemoryManager &  theManager,
size_type  theBlockSize = eDefaultBlockSize 
)
inline

Constructor.

Parameters
theBlockSizeThe block size when allocating.

Definition at line 64 of file XalanArrayAllocator.hpp.

◆ ~XalanArrayAllocator()

template<class Type >
xalanc::XalanArrayAllocator< Type >::~XalanArrayAllocator ( )
inline

Definition at line 72 of file XalanArrayAllocator.hpp.

Member Function Documentation

◆ allocate()

template<class Type >
Type* xalanc::XalanArrayAllocator< Type >::allocate ( size_type  theCount)
inline

Allocate slots for the given number of Types instance and return the address of the slots.

Parameters
theCountThe number of slots to allocate

Definition at line 134 of file XalanArrayAllocator.hpp.

◆ clear()

template<class Type >
void xalanc::XalanArrayAllocator< Type >::clear ( )
inline

Clear the instance, and release all allocated memory.

Definition at line 92 of file XalanArrayAllocator.hpp.

◆ reset()

template<class Type >
void xalanc::XalanArrayAllocator< Type >::reset ( )
inline

Reset the instance, but keep all memory so it can be reused for allocations.

This invalidates all previous allocations.

Definition at line 105 of file XalanArrayAllocator.hpp.


The documentation for this class was generated from the following file: