Drizzled Public API Documentation

Json::BatchAllocator< AllocatedType, objectPerAllocation > Class Template Reference

List of all members.

Classes

struct  BatchInfo

Public Types

typedef AllocatedType Type

Public Member Functions

 BatchAllocator (unsigned int objectsPerPage=255)
AllocatedType * allocate ()
void release (AllocatedType *object)

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.
unsigned int objectsPerPage_

Detailed Description

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

Definition at line 63 of file json_batchallocator.h.


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.

Definition at line 91 of file json_batchallocator.h.

References Json::BatchAllocator< AllocatedType, objectPerAllocation >::freeHead_.

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.

Definition at line 119 of file json_batchallocator.h.

References Json::BatchAllocator< AllocatedType, objectPerAllocation >::freeHead_.


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