SDEngine
Game Engine
Loading...
Searching...
No Matches
sd::ViewImpl< Components >::Iterator Struct Reference

#include <EntityManager.hpp>

+ Collaboration diagram for sd::ViewImpl< Components >::Iterator:

Public Types

using iterator_category = std::forward_iterator_tag
 
using value_type = std::tuple< Entity, Components &... >
 
using difference_type = std::ptrdiff_t
 
using pointer = void
 
using reference = value_type
 

Public Member Functions

 Iterator (EntityManager &em, const std::vector< Entity > *dense_entities, usize idx)
 
Iteratoroperator++ ()
 
bool operator== (const Iterator &other) const
 
bool operator!= (const Iterator &other) const
 
std::tuple< Entity, Components &... > operator* () const
 

Public Attributes

EntityManagermanager
 
const std::vector< Entity > * entities
 
usize index
 

Private Member Functions

void next ()
 
bool is_valid () const
 

Member Typedef Documentation

◆ difference_type

template<typename... Components>
using sd::ViewImpl< Components >::Iterator::difference_type = std::ptrdiff_t

◆ iterator_category

template<typename... Components>
using sd::ViewImpl< Components >::Iterator::iterator_category = std::forward_iterator_tag

◆ pointer

template<typename... Components>
using sd::ViewImpl< Components >::Iterator::pointer = void

◆ reference

template<typename... Components>
using sd::ViewImpl< Components >::Iterator::reference = value_type

◆ value_type

template<typename... Components>
using sd::ViewImpl< Components >::Iterator::value_type = std::tuple<Entity, Components&...>

Constructor & Destructor Documentation

◆ Iterator()

template<typename... Components>
ViewImpl::Iterator::Iterator ( EntityManager em,
const std::vector< Entity > *  dense_entities,
usize  idx 
)

Member Function Documentation

◆ is_valid()

template<typename... Components>
bool ViewImpl::Iterator::is_valid ( ) const
private

◆ next()

template<typename... Components>
void ViewImpl::Iterator::next ( )
private

◆ operator!=()

template<typename... Components>
bool sd::ViewImpl< Components >::Iterator::operator!= ( const Iterator other) const
inline

◆ operator*()

template<typename... Components>
std::tuple< Entity, Components &... > ViewImpl::Iterator::operator* ( ) const

◆ operator++()

template<typename... Components>
ViewImpl< Components... >::Iterator & ViewImpl::Iterator::operator++ ( )

◆ operator==()

template<typename... Components>
bool sd::ViewImpl< Components >::Iterator::operator== ( const Iterator other) const
inline

Member Data Documentation

◆ entities

template<typename... Components>
const std::vector<Entity>* sd::ViewImpl< Components >::Iterator::entities

◆ index

template<typename... Components>
usize sd::ViewImpl< Components >::Iterator::index

◆ manager

template<typename... Components>
EntityManager& sd::ViewImpl< Components >::Iterator::manager

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