Frobby
0.9.5
|
Emulates stack allocation of an array using an Arena. More...
#include <LocalArray.h>
Public Member Functions | |
LocalArray (const size_t sizeParam) | |
~LocalArray () | |
T & | operator[] (const size_t i) const |
T * | begin () const |
T * | end () const |
size_t | size () const |
Static Private Member Functions | |
static const pair< T *, T * > | gccWorkAround (const size_t size) |
Private Attributes | |
const size_t | _size |
const pair< T *, T * > | _range |
Emulates stack allocation of an array using an Arena.
The scoping rules of C++ ensure stack order allocation and deallocation if the Arena is only accessed using objects like this.
T is the type of the objects to make an array of.
ArenaSource is any type that has a public and static getArena function. That function must return a reference to the same Arena each time it is called. ArenaSource is useful for testing.
Definition at line 36 of file LocalArray.h.
|
inline |
Definition at line 38 of file LocalArray.h.
|
inline |
Definition at line 44 of file LocalArray.h.
|
inline |
Definition at line 54 of file LocalArray.h.
|
inline |
Definition at line 55 of file LocalArray.h.
|
inlinestaticprivate |
Definition at line 59 of file LocalArray.h.
|
inline |
Definition at line 49 of file LocalArray.h.
|
inline |
Definition at line 56 of file LocalArray.h.
|
private |
Definition at line 73 of file LocalArray.h.
|
private |
Definition at line 72 of file LocalArray.h.