Customization point
Had an idea for a while to specify the underlying storage of a component (for example an unordered_map may be more performant for some data sets). This would be done by supplying a component_list with an unordered<T> as a template argument, which seems like a very clean way of doing it, but might be hard to implement.
On a similar vein, add a not option for get_entities and for_each, so one can ask for specific tags/components and also specify which tags/components not to have. So something like for_each<Position, Player, not<Inactive>> would fetch every player+position that does not have the Inactive tag. Not restricted to tags, could be components too.
Customization points are currently on hold until I gather a good way of customizing the containers. There is a lot to consider (custom containers? allocators? how about in-place construction of those?).
If you really care about customizing the containers used please comment, and to what extend you want customization.
The three places customization makes sense is:
- How components are stored
- How groupings are stored/allocated (don't forget there is an internal grouping with all entities in it)
- What
get_entitiesshould return
Again, it's a hard problem filled with various challenges that I won't tackle unless someone actually wants to use custom allocators/containers and can make an argument why it's useful.