|
Bomberman
|
A view allowing one to easily access entities containing a set list of component. A view is always updated and only references to entities are kept. More...
#include <View.hpp>
Public Types | |
| using | iterator = ViewIterator< typename std::vector< entity_type >::iterator, Components... > |
Public Member Functions | |
| iterator | begin () |
| iterator | end () |
| std::size_t | size () const |
| ViewEntity< Components... > | front () |
| ViewEntity< Components... > | back () |
| const std::vector< std::type_index > & | getTypes () const override |
| The list of types that every entity of the view has. More... | |
| void | emplace_back (Entity &entity) override |
| void | erase (const Entity &entity) override |
| View (std::list< Entity > &scene) | |
| Construct a view from a list of entities. Those entities are never copied but references to them are kept internally. More... | |
| View (const View &)=delete | |
| Copying a view is not possible since a view must be managed by a scene. More... | |
| ~View () override=default | |
| A default destructor. More... | |
| View & | operator= (const View &)=delete |
| A view is not assignable. More... | |
Public Member Functions inherited from WAL::IView | |
| virtual | ~IView ()=default |
| A default destructor. More... | |
Private Types | |
| using | entity_type = std::tuple< std::reference_wrapper< Entity >, std::reference_wrapper< Components >... > |
Private Attributes | |
| std::vector< entity_type > | _entities = {} |
| The list of entities in the view. More... | |
| std::vector< std::type_index > | _types = {} |
| The list of types that every entity of the view has. More... | |
A view allowing one to easily access entities containing a set list of component. A view is always updated and only references to entities are kept.
|
private |
| using WAL::View< Components >::iterator = ViewIterator<typename std::vector<entity_type>::iterator, Components...> |
|
inlineexplicit |
Construct a view from a list of entities. Those entities are never copied but references to them are kept internally.
|
delete |
Copying a view is not possible since a view must be managed by a scene.
A default destructor.
|
inline |
|
inlineoverridevirtual |
Implements WAL::IView.
|
inlineoverridevirtual |
Implements WAL::IView.
|
inline |
|
inlineoverridevirtual |
The list of types that every entity of the view has.
Implements WAL::IView.
|
delete |
A view is not assignable.
|
inline |
|
private |
The list of entities in the view.
|
private |
The list of types that every entity of the view has.
1.8.17