4#ifndef TRAM_SDK_TEMPLATES_STACKPOOL_H
5#define TRAM_SDK_TEMPLATES_STACKPOOL_H
20 first =
static_cast<T*
>(::operator
new(initialSize *
sizeof(T)));
24 StackPool(std::string name,
size_t max_size, std::initializer_list<T> list) :
StackPool(name, max_size) {
25 for (
const auto& entry : list) {
32 std::cout <<
"StackPool " <<
poolName <<
" out of space!" << std::endl;
Definition: stackpool.h:13
StackPool(std::string name, size_t initialSize)
Definition: stackpool.h:15
T * last
Definition: stackpool.h:60
size_t maxSize
Definition: stackpool.h:58
T * begin()
Definition: stackpool.h:52
void Reset()
Definition: stackpool.h:45
T * AddNew(size_t units)
Definition: stackpool.h:30
size_t poolSize
Definition: stackpool.h:57
size_t size()
Definition: stackpool.h:51
T * first
Definition: stackpool.h:59
T * end()
Definition: stackpool.h:53
StackPool(std::string name, size_t max_size, std::initializer_list< T > list)
Definition: stackpool.h:24
std::string poolName
Definition: stackpool.h:56