ImagoEngine
A C++ 2D game engine built on a sparse-set ECS, with scenes, scheduled systems, events, and action-based input
Loading...
Searching...
No Matches
Imago::ECS::BondHandle< Components >::Iterator Class Reference

Public Member Functions

 Iterator (const std::vector< Entity > *entities, size_t index)
 Construct a new Iterator object.
Entity operator* () const
 Dereference the Iterator to access the current element.
Iterator & operator++ ()
 Advances the Iterator to the next element which is just _index + 1.
bool operator!= (const Iterator &other) const
 Compare the indices of the two Iterators.

Constructor & Destructor Documentation

◆ Iterator()

template<typename... Components>
Imago::ECS::BondHandle< Components >::Iterator::Iterator ( const std::vector< Entity > * entities,
size_t index )
inline

Construct a new Iterator object.

Parameters
entitiesThe entity array to read from.
indexwWhere this specific Iterator points to at construction

Member Function Documentation

◆ operator!=()

template<typename... Components>
bool Imago::ECS::BondHandle< Components >::Iterator::operator!= ( const Iterator & other) const
inline

Compare the indices of the two Iterators.

Parameters
otherIterator to compare with
Returns
true if the indices are not the same.
false if the indices are the same.

◆ operator*()

template<typename... Components>
Entity Imago::ECS::BondHandle< Components >::Iterator::operator* ( ) const
inline

Dereference the Iterator to access the current element.

Returns
Entity that is at the current index.

◆ operator++()

template<typename... Components>
Iterator & Imago::ECS::BondHandle< Components >::Iterator::operator++ ( )
inline

Advances the Iterator to the next element which is just _index + 1.

Returns
Reference to the Iterator after going to the next element.

The documentation for this class was generated from the following file: