|
TemplateTNL::ClassChunker< T > class Reference
TNL::ClassChunker< T > Class Template Reference#include <tnlDataChunker.h>
Inheritance diagram for TNL::ClassChunker< T >: Detailed Descriptiontemplate<class T>
Templatized data chunker class with proper construction and destruction of its elements.
|
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
|