Describe the problem you are trying to solve.
Currently the EcsEnum and EcsBitmask components in the meta addon have a constants field of type ecs_map_t that provides quick access to constants by value. While an application can the iterate map contents, this does not preserve the order in which constants were registered. This can be useful in scenarios like generating documentation or code generation.
Describe the solution you'd like
Add a vector (ecs_vec_t) alongside the ecs_map_t field that stores constants in the order they are registered, with tests that verify the order is correct.
Describe the problem you are trying to solve.
Currently the
EcsEnumandEcsBitmaskcomponents in the meta addon have aconstantsfield of typeecs_map_tthat provides quick access to constants by value. While an application can the iterate map contents, this does not preserve the order in which constants were registered. This can be useful in scenarios like generating documentation or code generation.Describe the solution you'd like
Add a vector (
ecs_vec_t) alongside theecs_map_tfield that stores constants in the order they are registered, with tests that verify the order is correct.