|
co_ecs 0.9.0
Cobalt ECS
|
Component set holds a set of components metadata. More...
#include <component.hpp>
Public Types | |
| using | size_type = std::size_t |
| using | storage_type = std::vector<component_meta> |
| using | value_type = typename storage_type::value_type |
| using | const_iterator = typename storage_type::const_iterator |
Public Member Functions | |
| template<component T> | |
| constexpr void | insert () |
| Insert component of type T. | |
| template<component T> | |
| constexpr void | erase () |
| Erase component of type T. | |
| template<component T> | |
| auto | contains () const -> bool |
| Check if component of type T is present in the set. | |
| void | insert (const value_type &meta) |
| Inserts component into the set. | |
| void | erase (component_id_t id) |
| Erases component from the set. | |
| auto | contains (component_id_t id) const -> bool |
| Check if component is present in the set. | |
| auto | size () const noexcept -> size_type |
| Returns how many components in the set. | |
| auto | begin () const noexcept -> const_iterator |
| Return const iterator to beginning of the set. | |
| auto | end () const noexcept -> const_iterator |
| Return const iterator to the end of the set. | |
| auto | cbegin () const noexcept -> const_iterator |
| Return const iterator to beginning of the set. | |
| auto | cend () const noexcept -> const_iterator |
| Return const iterator to the end of the set. | |
| auto | operator== (const component_meta_set &rhs) const noexcept -> bool |
| Equality operator. | |
| auto | ids () const noexcept -> const component_set & |
| Return a bitset of components. | |
Static Public Member Functions | |
| template<component... Args> | |
| static auto | create () -> component_meta_set |
| Construct component set from given component types. | |
Component set holds a set of components metadata.
| using co_ecs::component_meta_set::const_iterator = typename storage_type::const_iterator |
| using co_ecs::component_meta_set::size_type = std::size_t |
| using co_ecs::component_meta_set::storage_type = std::vector<component_meta> |
| using co_ecs::component_meta_set::value_type = typename storage_type::value_type |
|
inlinenoexcept |
Return const iterator to beginning of the set.
|
inlinenoexcept |
Return const iterator to beginning of the set.
|
inlinenoexcept |
Return const iterator to the end of the set.
|
inline |
Check if component of type T is present in the set.
| T | Component type |
|
inline |
Check if component is present in the set.
| id | Component ID |
|
inlinestatic |
Construct component set from given component types.
| Args | Components type parameter pack |
|
inlinenoexcept |
Return const iterator to the end of the set.
|
inlineconstexpr |
Erase component of type T.
| T | Component type |
|
inline |
Erases component from the set.
| id | Component ID |
|
inlinenoexcept |
Return a bitset of components.
|
inlineconstexpr |
Insert component of type T.
| T | Component type |
|
inline |
Inserts component into the set.
| meta | Component meta |
|
inlinenoexcept |
Equality operator.
| rhs | Right hand side |
|
inlinenoexcept |
Returns how many components in the set.