32template <
class ... TYPES>
62 void EraseRange(
const uint32_t start,
const uint32_t end);
85 void Set(
const uint32_t index, TYPES...);
88 const uint32_t
Size()
const;
111template<
class ... TYPES>
121template<
class ...TYPES>
124 this->objects = rhs.objects;
125 this->size = rhs.size;
132template<
class ...TYPES>
136 this->size = rhs.
size;
142template<
class ...TYPES>
151template<
class ...TYPES>
156 this->size = rhs.
size;
162template<
class ...TYPES>
166 this->objects = rhs.objects;
167 this->size = rhs.size;
174template<
class ...TYPES>
184template<
class ...TYPES>
inline void
194template<
class ...TYPES>
inline void
204template<
class ...TYPES>
inline void
208 this->size -= (end + 1) - start;
214template<
class ...TYPES>
224template<
class ...TYPES>
235template<
class ...TYPES>
246template<
class ...TYPES>
257template<
class ...TYPES>
262 return std::get<MEMBER>(this->objects)[index];
268template<
class ...TYPES>
273 return std::get<MEMBER>(this->objects)[index];
279template<
class ...TYPES>
284 std::get<MEMBER>(this->objects)[index] = type;
290template<
class ...TYPES>
295 return std::get<MEMBER>(this->objects);
301template<
class ...TYPES>
306 return std::get<MEMBER>(this->objects);
312template<
class ...TYPES>
void
321template<
class ...TYPES>
void
324 this->size = this->GetArray<0>().Size();
The ArrayAllocator provides a variadic list of types which is to be contained in the allocator and fe...
Definition arrayallocator.h:34
void Set(const uint32_t index, TYPES...)
set for each in tuple
Definition arrayallocator.h:313
void EraseIndex(const uint32_t id)
Erase element for each.
Definition arrayallocator.h:185
void UpdateSize()
Any reserve and direct array access might mess with the size.
Definition arrayallocator.h:322
void operator=(const ArrayAllocator< TYPES... > &rhs)
assign operator
Definition arrayallocator.h:153
void Reserve(uint32_t size)
grow capacity of arrays to size
Definition arrayallocator.h:226
const uint32_t Size() const
get number of used indices
Definition arrayallocator.h:216
void SetSize(uint32_t size)
set size of arrays to param size
Definition arrayallocator.h:237
~ArrayAllocator()
destructor
Definition arrayallocator.h:143
void operator=(ArrayAllocator< TYPES... > &&rhs)
move operator
Definition arrayallocator.h:164
uint32_t size
Definition arrayallocator.h:104
ArrayAllocator(ArrayAllocator< TYPES... > &&rhs)
move constructor
Definition arrayallocator.h:122
const tuple_array_t< MEMBER, TYPES... > & ConstGet(const uint32_t index) const
same as 32 bit get, but const
Definition arrayallocator.h:271
std::tuple< Util::Array< TYPES >... > objects
Definition arrayallocator.h:105
tuple_array_t< MEMBER, TYPES... > & Get(const uint32_t index)
get single item from resource
Definition arrayallocator.h:260
void Set(const uint32_t index, const tuple_array_t< MEMBER, TYPES... > &type)
set single item
Definition arrayallocator.h:282
void Clear()
clear entire allocator and start from scratch.
Definition arrayallocator.h:248
ArrayAllocator()
constructor
Definition arrayallocator.h:112
Util::Array< tuple_array_t< MEMBER, TYPES... > > & GetArray()
get array
Definition arrayallocator.h:304
void EraseRange(const uint32_t start, const uint32_t end)
erase range
Definition arrayallocator.h:205
void EraseIndexSwap(const uint32_t id)
Erase element for each.
Definition arrayallocator.h:195
uint32_t Alloc()
allocate a new resource
Definition arrayallocator.h:175
ArrayAllocator(const ArrayAllocator< TYPES... > &rhs)
copy constructor
Definition arrayallocator.h:133
const Util::Array< tuple_array_t< MEMBER, TYPES... > > & GetArray() const
get array const reference
Definition arrayallocator.h:293
Nebula's dynamic array class.
Definition array.h:60
A pinned array is an array which manages its own virtual memory.
Definition String.cs:6
void erase_range_for_each_in_tuple(std::tuple< Ts... > &tuple, uint32_t start, uint32_t end, std::index_sequence< Is... >)
Definition tupleutility.h:253
void erase_index_for_each_in_tuple(std::tuple< Ts... > &tuple, uint32_t i, std::index_sequence< Is... >)
Entry point for erasing an element.
Definition tupleutility.h:207
void reserve_for_each_in_tuple(std::tuple< Ts... > &tuple, uint32_t size, std::index_sequence< Is... >)
Entry point for reserving in each array.
Definition tupleutility.h:294
void alloc_for_each_in_tuple(std::tuple< Ts... > &tuple, std::index_sequence< Is... >)
Unpacks allocations for each member in a tuble.
Definition tupleutility.h:146
void clear_for_each_in_tuple(std::tuple< Ts... > &tuple, std::index_sequence< Is... >)
Unpacks allocations for each member in a tuple.
Definition tupleutility.h:166
void set_for_each_in_tuple(std::tuple< Ts... > &tuple, uint32_t i, std::index_sequence< Is... >, TYPES const &... values)
Entry point for setting values in each array at an index.
Definition tupleutility.h:274
get_template_type_t< std::tuple_element_t< MEMBER, std::tuple< Util::Array< TYPES >... > > > tuple_array_t
Get type of contained element in Util::Array stored in std::tuple.
Definition tupleutility.h:334
void erase_index_swap_for_each_in_tuple(std::tuple< Ts... > &tuple, uint32_t i, std::index_sequence< Is... >)
Entry point for erasing an element by swapping with the last and reducing size.
Definition tupleutility.h:231
void set_size_for_each_in_tuple(std::tuple< Ts... > &tuple, uint32_t size, std::index_sequence< Is... >)
Entry point for reserving in each array.
Definition tupleutility.h:314