#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 82 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 100 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 117 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 133 of file alloc_type.hpp.
1.5.6