Removed isAlive() calls from functions passed to ThreadPool, and instead use an
unordered_set prior to using ThreadPool to "cache" which entities are not alive.
This is so that if a function passed to ThreadPool modifies the ECManager (e.g.
creating a new entity), then there will be no data race from also calling
isAlive(). (Note that this does not protect against "deleting" entities from the
ECManager during use of ThreadPool. It is expected for the caller to do the
"deleting" after use of stored/called functions is finished.)
Use temporary structs instead of tuples.
Enforce max line width of 80 characters.
Fix warning related to ECTest.cpp .
Note that currently this commit appears to be unable to be built by GCC,
but compiles OK with Clang.
When reallocating more data, vector moves the original data to a new
buffer. Deque preserves the location of the original data, preventing
invalidated pointers to existing data when additional allocation is
required.
As an alternative to forMatchingSignatures, which calls the given
function on entities matching the given Components/Tags in the
signature, forMatchingIterable allows filtering entities by an iterable
of indices that corresponds to Components/Tags.
All functions called by EC/Manager now accept an additional parameter
as a void* to support user-provided data (or context) for functions
(useful when the function is not a lambda function and doesn't have any
other data stored with it).
EC/Manager and EC/Bitset can now handle types that are not known
(Components or Tags not in the given Components or Tags when created).
Manager::getEntityData now returns a pointer instead of a reference.
Functions passed to Manager::forMatchingFunction (and other similar fns)
should now accept Component fields as pointer types, not reference
types.
Fixed bug where if an entity is deleted during a multiple
signature/function call but matched a later signature/function, it would
still be called in that later function.
Minor fixes as well.
Entity IDs are now guaranteed to not change for a living entity.
Cleanup is replaced by using a std::unordered_set to store deleted
Entity IDs to be reclaimed on later calls to addEntity().