Classes | Public Types | Public Member Functions
Json::BatchAllocator< AllocatedType, objectPerAllocation > Class Template Reference

#include <json_batchallocator.h>

List of all members.

Classes

struct  BatchInfo

Public Types

typedef AllocatedType Type

Public Member Functions

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

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


Member Typedef Documentation

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

Constructor & Destructor Documentation

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

Member Function Documentation

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

allocate space for an array of objectPerAllocation object.

Warning:
it is the responsability of the caller to call objects constructors.
template<typename AllocatedType, const unsigned int objectPerAllocation>
void Json::BatchAllocator< AllocatedType, objectPerAllocation >::release ( AllocatedType *  object)

Release the object.

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

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