|
Frobby 0.10.0
|
#include <LocalArray.h>
Public Member Functions | |
| LocalArray (const size_t sizeParam) | |
| T & | operator[] (const size_t i) const |
| T * | begin () const |
| T * | end () const |
| size_t | size () const |
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.