#include <tnlDataChunker.h>
Inheritance diagram for TNL::ClassChunker< T >:
DataChunker just allocates space. This subclass actually constructs/destructs the elements. This class is appropriate for more complex classes.
Public Member Functions | |
ClassChunker (S32 size=DataChunker::ChunkSize) | |
T * | alloc () |
Allocates and properly constructs in place a new element. | |
void | free (T *elem) |
Properly destructs and frees an element allocated with the alloc method. | |
void | freeBlocks () |
free all pages currently allocated in the DataChunker | |
Private Attributes | |
S32 | numAllocated |
number of elements currently allocated through this ClassChunker | |
S32 | elementSize |
the size of each element, or the size of a pointer, whichever is greater | |
T * | freeListHead |
a pointer to a linked list of freed elements for reuse |
|
|
|
Allocates and properly constructs in place a new element.
|
|
Properly destructs and frees an element allocated with the alloc method.
|
|
free all pages currently allocated in the DataChunker
Reimplemented from TNL::DataChunker. |
|
number of elements currently allocated through this ClassChunker
|
|
the size of each element, or the size of a pointer, whichever is greater
|
|
a pointer to a linked list of freed elements for reuse
|