|
co_ecs 0.9.0
Cobalt ECS
|
Container for archetypes, holds a map from component set to archetype. More...
#include <archetype.hpp>
Public Types | |
| using | storage_type = detail::hash_map<component_set, std::unique_ptr<archetype>, component_set_hasher> |
| Underlying container storage type. | |
| using | iterator = storage_type::iterator |
| using | const_iterator = storage_type::const_iterator |
| using | value_type = storage_type::value_type |
| using | key_type = storage_type::key_type |
| using | mapped_type = storage_type::mapped_type |
Public Member Functions | |
| auto | ensure_archetype (const component_meta_set &components) -> archetype * |
| Get or create an archetype given the component meta set. | |
| template<component... Components> | |
| auto | ensure_archetype () -> archetype * |
| Get or create an archetype matching the passed Components types. | |
| template<component... Components> | |
| auto | ensure_archetype_added (const archetype *anchor_archetype) -> archetype * |
| Get or create an archetype by adding new Components to an anchor archetype. | |
| template<component... Components> | |
| auto | ensure_archetype_removed (const archetype *anchor_archetype) -> archetype * |
| Get or create an archetype by removing Components from an anchor archetype. | |
| auto | begin () noexcept -> iterator |
| Returns iterator to the beginning of archetypes container. | |
| auto | end () noexcept -> iterator |
| Returns an iterator to the end of archetypes container. | |
| auto | begin () const noexcept -> const_iterator |
| Returns iterator to the beginning of archetypes container. | |
| auto | end () const noexcept -> const_iterator |
| Returns an iterator to the end of archetypes container. | |
| auto | size () const noexcept -> std::size_t |
| Returns the number of archetypes. | |
Container for archetypes, holds a map from component set to archetype.
| using co_ecs::archetypes::const_iterator = storage_type::const_iterator |
| using co_ecs::archetypes::iterator = storage_type::iterator |
| using co_ecs::archetypes::key_type = storage_type::key_type |
| using co_ecs::archetypes::mapped_type = storage_type::mapped_type |
| using co_ecs::archetypes::storage_type = detail::hash_map<component_set, std::unique_ptr<archetype>, component_set_hasher> |
Underlying container storage type.
| using co_ecs::archetypes::value_type = storage_type::value_type |
|
inlinenoexcept |
Returns iterator to the beginning of archetypes container.
|
inlinenoexcept |
Returns iterator to the beginning of archetypes container.
|
inlinenoexcept |
Returns an iterator to the end of archetypes container.
|
inlinenoexcept |
Returns an iterator to the end of archetypes container.
|
inline |
Get or create an archetype matching the passed Components types.
| Components | Component types |
|
inline |
Get or create an archetype given the component meta set.
| components | Components meta set |
|
inline |
Get or create an archetype by adding new Components to an anchor archetype.
| Components | Components to add |
| anchor_archetype | Anchor archetype |
|
inline |
Get or create an archetype by removing Components from an anchor archetype.
| Components | Components to remove |
| anchor_archetype | Anchor archetype |
|
inlinenoexcept |
Returns the number of archetypes.