Classes | Public Types | Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
Json::BatchAllocator< AllocatedType, objectPerAllocation > Class Template Reference

Classes

struct  BatchInfo
 

Public Types

typedef AllocatedType Type
 

Public Member Functions

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

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_
 

Detailed Description

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

Definition at line 1113 of file jsoncpp.cpp.

Member Typedef Documentation

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

Definition at line 1116 of file jsoncpp.cpp.

Constructor & Destructor Documentation

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

Definition at line 1118 of file jsoncpp.cpp.

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

Definition at line 1129 of file jsoncpp.cpp.

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.

Definition at line 1141 of file jsoncpp.cpp.

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

Definition at line 1189 of file jsoncpp.cpp.

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.

Definition at line 1169 of file jsoncpp.cpp.

Member Data Documentation

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

Definition at line 1200 of file jsoncpp.cpp.

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

Definition at line 1201 of file jsoncpp.cpp.

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.

Definition at line 1203 of file jsoncpp.cpp.

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

Definition at line 1204 of file jsoncpp.cpp.


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


find_object_2d
Author(s): Mathieu Labbe
autogenerated on Mon Jun 10 2019 13:21:32