ClassChunker< T > Class Template Reference#include <dataChunker.h>
Inheritance diagram for ClassChunker< T >: ![]() Detailed Description
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 () |
Private Attributes | |
| S32 | mElementSize |
| the size of each element, or the size of a pointer, whichever is greater | |
| T * | mFreeListHead |
| a pointer to a linked list of freed elements for reuse | |
| ClassChunker< T >::ClassChunker | ( | S32 | size = DataChunker::ChunkSize |
) | [inline] |
| T* ClassChunker< T >::alloc | ( | ) | [inline] |
Allocates and properly constructs in place a new element.
| void ClassChunker< T >::free | ( | T * | elem | ) | [inline] |
Properly destructs and frees an element allocated with the alloc method.
| void ClassChunker< T >::freeBlocks | ( | ) | [inline] |
S32 ClassChunker< T >::mElementSize [private] |
the size of each element, or the size of a pointer, whichever is greater
T* ClassChunker< T >::mFreeListHead [private] |
a pointer to a linked list of freed elements for reuse