![]() |
Spicy
|
#include <unit.h>
Public Member Functions | |
std::vector< unit::Item > | assignIndices (std::vector< unit::Item > items) |
Public Attributes | |
uint64_t | _next_index = 0 |
Mixin class to number all fields in sequential order.
This functionality is not implemented in Unit
since we want to use assignIndices
in a call to a base class's constructor before Unit
is fully constructed. Putting the counter _next_index
into Unit
would lead to it being initialized after Unit
's base class TypeBase
.
std::vector< type::unit::Item > type::detail::AssignIndices::assignIndices | ( | std::vector< unit::Item > | items | ) |
Helper function to recursively number all fields in the passed list in sequential order
items | the items to number |