Iterator for iterating over entities matching the query.
More...
#include <vecs.h>
|
|
using | iterator_category = std::forward_iterator_tag |
| |
| using | value_type |
| |
|
using | difference_type = std::ptrdiff_t |
| |
| using | pointer |
| |
|
using | reference = value_type |
| |
|
| | Iterator (typename QueryComponents::iterator current, typename QueryComponents::iterator end) |
| | Constructs an iterator for the query.
|
| |
| Iterator & | operator++ () |
| | Advances the iterator to the next entity.
|
| |
| reference | operator* () const |
| | Dereferences the iterator to access the current entity's components.
|
| |
| bool | operator!= (const Iterator &other) const |
| | Compares two iterators for inequality.
|
| |
template<typename... Components>
class vecs::Query< Components >::Iterator
Iterator for iterating over entities matching the query.
The Iterator class provides a way to iterate through the entities that match the specified components.
◆ pointer
template<typename... Components>
Initial value: std::tuple<
typename QueryTypeTraits<Components>::IterationPointerType...>
◆ value_type
template<typename... Components>
Initial value:
std::tuple<typename QueryTypeTraits<Components>::IterationType...>
◆ Iterator()
template<typename... Components>
| vecs::Query< Components >::Iterator::Iterator |
( |
typename QueryComponents::iterator | current, |
|
|
typename QueryComponents::iterator | end ) |
|
inline |
Constructs an iterator for the query.
- Parameters
-
| current | The starting iterator position. |
| end | The end iterator position. |
◆ operator!=()
template<typename... Components>
Compares two iterators for inequality.
- Parameters
-
| other | The iterator to compare against. |
- Returns
- True if the iterators are not equal, otherwise false.
◆ operator*()
template<typename... Components>
| reference vecs::Query< Components >::Iterator::operator* |
( |
| ) |
const |
|
inline |
Dereferences the iterator to access the current entity's components.
- Returns
- A tuple containing references to the entity's components.
◆ operator++()
template<typename... Components>
Advances the iterator to the next entity.
- Returns
- Reference to the iterator after increment.
The documentation for this class was generated from the following file: