HDK
|
#include <GA_TempBuffer.h>
Public Member Functions | |
GA_TempBuffer () | |
~GA_TempBuffer () | |
void | clear () |
Clear all entries. More... | |
GA_Size | entries () const |
How many elements in the buffer. More... | |
GA_Size | getCapacity () const |
Query the reserved capacity. More... | |
void | reserve (GA_Size size, bool setsize=false) |
Reserve storage. More... | |
void | append (const T &value) |
Append an element to the array. More... | |
void | setValue (GA_Size i, const T &value) |
Set an item in the buffer to the given value. More... | |
const T & | removeLast () |
Return the last entry and remove it from the list. More... | |
void | truncate (GA_Size sz) |
exint | removeMatchingItems (const T &value) |
void | removeIndex (exint index) |
const T * | data () const |
T * | data (GA_Size size) |
void | swap (GA_Size i0, GA_Size i1) |
const T & | getValue (GA_Size i) const |
const T & | operator() (GA_Size i) const |
const T & | last () const |
Template class to hold an array of temporary objects.
These arrays have a temporary buffer. When the buffer fills, the array will grow by allocating off the heap. The buffers are implemented for simple POD objects.
Definition at line 35 of file GA_TempBuffer.h.
|
inline |
Definition at line 38 of file GA_TempBuffer.h.
|
inline |
Definition at line 43 of file GA_TempBuffer.h.
|
inline |
Append an element to the array.
Definition at line 77 of file GA_TempBuffer.h.
|
inline |
Clear all entries.
Definition at line 49 of file GA_TempBuffer.h.
|
inline |
Definition at line 142 of file GA_TempBuffer.h.
|
inline |
Definition at line 143 of file GA_TempBuffer.h.
|
inline |
How many elements in the buffer.
Definition at line 61 of file GA_TempBuffer.h.
|
inline |
Query the reserved capacity.
Definition at line 64 of file GA_TempBuffer.h.
|
inline |
Return the value from the array
Definition at line 92 of file GA_TempBuffer.h.
|
inline |
Return the value from the array
Definition at line 98 of file GA_TempBuffer.h.
|
inline |
Return the value from the array
Definition at line 97 of file GA_TempBuffer.h.
|
inline |
Definition at line 134 of file GA_TempBuffer.h.
|
inline |
Return the last entry and remove it from the list.
Definition at line 106 of file GA_TempBuffer.h.
|
inline |
Definition at line 116 of file GA_TempBuffer.h.
|
inline |
Reserve storage.
Definition at line 67 of file GA_TempBuffer.h.
|
inline |
Set an item in the buffer to the given value.
Definition at line 85 of file GA_TempBuffer.h.
|
inline |
Definition at line 149 of file GA_TempBuffer.h.
|
inline |
Definition at line 112 of file GA_TempBuffer.h.