Crimson Engine 1.0.0
A high-performance C++20 game engine prototype showcasing a custom ECS, Vulkan renderer, and ImGui editor.
Loading...
Searching...
No Matches
Registry::View< Components >::Iterator Struct Reference

Iterator over the entities matching the View filters. More...

#include <Registry.hpp>

Public Member Functions

void advance ()
 Helper to advance iterator to next matching entity.
bool operator!= (const Iterator &other) const
 Check iterator inequality.
void operator++ ()
 Move iterator forward.
auto operator* () const
 Dereferences the iterator to a tuple containing the entity and its component references.

Public Attributes

Registry & registry
const std::vector< Entity > & entities
size_t index

Detailed Description

template<typename... Components>
struct Registry::View< Components >::Iterator

Iterator over the entities matching the View filters.

Member Function Documentation

◆ advance()

template<typename... Components>
void Registry::View< Components >::Iterator::advance ( )
inline

Helper to advance iterator to next matching entity.

◆ operator!=()

template<typename... Components>
bool Registry::View< Components >::Iterator::operator!= ( const Iterator & other) const
inline

Check iterator inequality.

◆ operator*()

template<typename... Components>
auto Registry::View< Components >::Iterator::operator* ( ) const
inline

Dereferences the iterator to a tuple containing the entity and its component references.

Returns
A tuple of (Entity, T&...).

◆ operator++()

template<typename... Components>
void Registry::View< Components >::Iterator::operator++ ( )
inline

Move iterator forward.

Member Data Documentation

◆ entities

template<typename... Components>
const std::vector<Entity>& Registry::View< Components >::Iterator::entities

◆ index

template<typename... Components>
size_t Registry::View< Components >::Iterator::index

◆ registry

template<typename... Components>
Registry& Registry::View< Components >::Iterator::registry

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