#include <nimble_expression_parser.h>
◆ MemoryManager()
ExpressionParsing::MemoryManager::MemoryManager |
( |
| ) |
|
|
inline |
MemoryBlock * first
Definition nimble_expression_parser.h:82
Definition nimble_expression_parser.h:75
◆ ~MemoryManager()
ExpressionParsing::MemoryManager::~MemoryManager |
( |
| ) |
|
|
inline |
101 {
104 DeletableObjectBaseClass** scan = current->
Pointers;
105 unsigned int count = current->count;
106 for (unsigned int i = 0; i < count; ++i) { delete *scan++; }
107 delete current;
108 current = next;
109 while (current) {
110 scan = current->Pointers;
111 next = current->next;
112 for (
unsigned int i = 0; i <
BlockSize; ++i) {
delete *scan++; }
113 delete current;
114 current = next;
115 }
116 }
static const unsigned int BlockSize
Definition nimble_expression_parser.h:73
DeletableObjectBaseClass * Pointers[BlockSize]
Definition nimble_expression_parser.h:76
MemoryBlock * next
Definition nimble_expression_parser.h:78
◆ New()
template<typename T, typename... In>
T * ExpressionParsing::MemoryManager::New |
( |
In... | inputs | ) |
|
|
inline |
87 {
88 T* pointer = new T(inputs...);
89 unsigned long insert_location =
first->count;
91 first->count = insert_location + 1;
92 first->Pointers[insert_location] = pointer;
93 } else {
96 first->Pointers[0] = pointer;
97 }
98 return pointer;
99 }
◆ BlockSize
const unsigned int ExpressionParsing::MemoryManager::BlockSize = 62 |
|
static |
◆ first
The documentation for this class was generated from the following file: