![]() |
ImagoEngine
A C++ 2D game engine built on a sparse-set ECS, with scenes, scheduled systems, events, and action-based input
|
The Survey takes Components as templated arguments and acts as an iterator over all entities with all component types. More...
#include <Imago/ECS/SurveyHandle.hpp>
Classes | |
| class | Iterator |
Public Member Functions | |
| SurveyHandle (const std::array< SparseSetBase *, sizeof...(Components)> &pools) | |
| Constructs a new Survey object by defining _pools and iterating through them to find the smallest pool. | |
| Iterator | begin () const |
| Returns an Iterator to the first element. | |
| Iterator | end () const |
| Returns an Iterator past the last element. | |
The Survey takes Components as templated arguments and acts as an iterator over all entities with all component types.
Survey defines an Iterator inner class so that iterating with for loops is safe. As it iterates it skips over any index that represents an Entity that is not in every single component pool.
| Components | to survey |
|
inlineexplicit |