Myra Canyon  v0.0.1-768
network control
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Json::BatchAllocator< AllocatedType, objectPerAllocation > Class Template Reference
Collaboration diagram for Json::BatchAllocator< AllocatedType, objectPerAllocation >:

Classes

struct  BatchInfo
 

Public Member Functions

 BatchAllocator (unsigned int objectsPerPage=255)
 
 ~BatchAllocator ()
 
AllocatedType * allocate ()
 allocate space for an array of objectPerAllocation object. More...
 
void release (AllocatedType *object)
 Release the object. More...
 

Private Member Functions

 BatchAllocator (const BatchAllocator &)
 
void operator= (const BatchAllocator &)
 

Static Private Member Functions

static BatchInfoallocateBatch (unsigned int objectsPerPage)
 

Private Attributes

BatchInfobatches_
 
BatchInfocurrentBatch_
 
AllocatedType * freeHead_
 Head of a single linked list within the allocated space of freeed object. More...
 
unsigned int objectsPerPage_
 

Constructor & Destructor Documentation

template<typename AllocatedType , const unsigned int objectPerAllocation>
Json::BatchAllocator< AllocatedType, objectPerAllocation >::BatchAllocator ( unsigned int  objectsPerPage = 255)
inline

Here is the call graph for this function:

template<typename AllocatedType , const unsigned int objectPerAllocation>
Json::BatchAllocator< AllocatedType, objectPerAllocation >::~BatchAllocator ( )
inline
template<typename AllocatedType , const unsigned int objectPerAllocation>
Json::BatchAllocator< AllocatedType, objectPerAllocation >::BatchAllocator ( const BatchAllocator< AllocatedType, objectPerAllocation > &  )
private

Member Function Documentation

template<typename AllocatedType , const unsigned int objectPerAllocation>
AllocatedType* Json::BatchAllocator< AllocatedType, objectPerAllocation >::allocate ( )
inline

allocate space for an array of objectPerAllocation object.

Warning
it is the responsability of the caller to call objects constructors.

Here is the call graph for this function:

template<typename AllocatedType , const unsigned int objectPerAllocation>
static BatchInfo* Json::BatchAllocator< AllocatedType, objectPerAllocation >::allocateBatch ( unsigned int  objectsPerPage)
inlinestaticprivate

Here is the caller graph for this function:

template<typename AllocatedType , const unsigned int objectPerAllocation>
void Json::BatchAllocator< AllocatedType, objectPerAllocation >::operator= ( const BatchAllocator< AllocatedType, objectPerAllocation > &  )
private
template<typename AllocatedType , const unsigned int objectPerAllocation>
void Json::BatchAllocator< AllocatedType, objectPerAllocation >::release ( AllocatedType *  object)
inline

Release the object.

Warning
it is the responsability of the caller to actually destruct the object.

Member Data Documentation

template<typename AllocatedType , const unsigned int objectPerAllocation>
BatchInfo* Json::BatchAllocator< AllocatedType, objectPerAllocation >::batches_
private
template<typename AllocatedType , const unsigned int objectPerAllocation>
BatchInfo* Json::BatchAllocator< AllocatedType, objectPerAllocation >::currentBatch_
private
template<typename AllocatedType , const unsigned int objectPerAllocation>
AllocatedType* Json::BatchAllocator< AllocatedType, objectPerAllocation >::freeHead_
private

Head of a single linked list within the allocated space of freeed object.

template<typename AllocatedType , const unsigned int objectPerAllocation>
unsigned int Json::BatchAllocator< AllocatedType, objectPerAllocation >::objectsPerPage_
private

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