Nui Engine
A game engine framework
|
Iterator class to allow easy iteration over entities with components. More...
#include <Entity.h>
Public Member Functions | |
EntityComponentIterator (Context *context, U64 index, bool isEnd, bool includePendingDestroy) | |
Initializes the iterator with necessary information. | |
U64 | GetIndex () const noexcept |
Gets the index of the current entity in the iteration. | |
bool | IncludePendingDestroy () const noexcept |
Whether the iterator should include pending destruction entities. | |
Context * | GetContext () const noexcept |
Gets the ECS context associated with the iterator. | |
bool | IsEnd () const noexcept |
Checks if the iterator is at the end. | |
Entity * | GetEntity () const noexcept |
Gets the current entity held by the iterator. | |
Entity * | operator* () const noexcept |
Gets the current entity held by the iterator. | |
bool | operator== (const EntityComponentIterator< Types... > &other) const |
Checks if two iterators are equal. | |
bool | operator!= (const EntityComponentIterator< Types... > &other) const |
Checks if two iterators are not equal. | |
EntityComponentIterator< Types... > & | operator++ () |
Moves the iterator to the next entity and skips over entities based on input criteria. | |
Iterator class to allow easy iteration over entities with components.
...Types | Types of components to include in the iteration |
|
inline |
Initializes the iterator with necessary information.
context | Pointer to the ECS Context |
index | Starting index for iteration |
isEnd | Flag indicating if the iterator is at the end |
includePendingDestroy | Flag indicating if the iterator should include pending destruction entities |
|
inlinenoexcept |
Gets the ECS context associated with the iterator.
|
inlinenoexcept |
Gets the current entity held by the iterator.
|
inlinenoexcept |
Gets the index of the current entity in the iteration.
|
inlinenoexcept |
Whether the iterator should include pending destruction entities.
|
inlinenoexcept |
Checks if the iterator is at the end.
|
inline |
Checks if two iterators are not equal.
other | Other iterator |
|
inlinenoexcept |
Gets the current entity held by the iterator.
|
inline |
Moves the iterator to the next entity and skips over entities based on input criteria.
|
inline |
Checks if two iterators are equal.
other | Other iterator |