R-Type  1.0.1.0
Rewrite of the R-Type game with networking ability
Loading...
Searching...
No Matches
uranus::ecs::View< Components > Class Template Reference

A view is a way to iterate over a set of entities that have a specific set of components. More...

#include <View.hpp>

Collaboration diagram for uranus::ecs::View< Components >:
[legend]

Data Structures

class  Iterator
 Iterator class for the view. More...
 

Public Types

using Tuple = std::tuple< size_t, Components &... >
 The tuple type that will be returned by the iterators.
 

Public Member Functions

 View (ecs::Registry &registry)
 Construct a new View object. More...
 
Iterator begin ()
 Get the begin iterator. More...
 
Iterator end ()
 Get the end iterator. More...
 

Private Attributes

Registry _registry
 The registry to iterate over.
 

Detailed Description

template<typename... Components>
class uranus::ecs::View< Components >

A view is a way to iterate over a set of entities that have a specific set of components.

Template Parameters
Componentsthe components that the entities must have

Constructor & Destructor Documentation

◆ View()

template<typename... Components>
uranus::ecs::View< Components >::View ( ecs::Registry registry)
inlineexplicit

Construct a new View object.

Parameters
registrythe registry to iterate over

Member Function Documentation

◆ begin()

template<typename... Components>
Iterator uranus::ecs::View< Components >::begin ( )
inline

Get the begin iterator.

Returns
the begin iterator

◆ end()

template<typename... Components>
Iterator uranus::ecs::View< Components >::end ( )
inline

Get the end iterator.

Returns
the end iterator

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