#include <alloc_type.hpp>
Public Member Functions | |
ReusableBuffer () | |
Create a new buffer. | |
~ReusableBuffer () | |
Clear the buffer. | |
T * | Allocate (size_t count) |
Get buffer of at least count times T. | |
T * | ZeroAllocate (size_t count) |
Get buffer of at least count times T with zeroed memory. | |
FORCEINLINE const T * | GetBuffer () const |
Get the currently allocated buffer. | |
Private Attributes | |
T * | buffer |
The real data buffer. | |
size_t | count |
Number of T elements in the buffer. |
Every time Allocate or ZeroAllocate is called previous results of both functions will become invalid.
Definition at line 89 of file alloc_type.hpp.
T* ReusableBuffer< T >::Allocate | ( | size_t | count | ) | [inline] |
Get buffer of at least count times T.
calling this function invalidates any previous buffers given
count | the minimum buffer size |
Definition at line 107 of file alloc_type.hpp.
T* ReusableBuffer< T >::ZeroAllocate | ( | size_t | count | ) | [inline] |
Get buffer of at least count times T with zeroed memory.
calling this function invalidates any previous buffers given
count | the minimum buffer size |
Definition at line 124 of file alloc_type.hpp.
Referenced by SpriteLoader::Sprite::AllocateData().
FORCEINLINE const T* ReusableBuffer< T >::GetBuffer | ( | ) | const [inline] |
Get the currently allocated buffer.
Definition at line 140 of file alloc_type.hpp.