co_ecs 0.9.0
Cobalt ECS
Loading...
Searching...
No Matches
component.hpp File Reference
#include <algorithm>
#include <bitset>
#include <cstdint>
#include <functional>
#include <numeric>
#include <stdexcept>
#include <co_ecs/detail/dynamic_bitset.hpp>
#include <co_ecs/detail/hash_map.hpp>
#include <co_ecs/detail/type_traits.hpp>
#include <co_ecs/type_meta.hpp>

Go to the source code of this file.

Classes

struct  co_ecs::const_component_reference< T >
 Struct to determine const-ness of component reference type. More...
 
struct  co_ecs::mutable_component_reference< T >
 Struct to determine mutability of component reference type. More...
 
struct  co_ecs::const_component_references< Args >
 Struct to determine whether all component references are const. More...
 
struct  co_ecs::component_meta
 Component metadata. Stores an ID, size, alignment, destructor, etc. More...
 
class  co_ecs::component_set
 Component set holds a set of component IDs. More...
 
class  co_ecs::component_set_hasher
 Component set hasher. More...
 
class  co_ecs::component_meta_set
 Component set holds a set of components metadata. More...
 

Namespaces

namespace  co_ecs
 
namespace  co_ecs::detail
 

Concepts

concept  co_ecs::component
 Component concept. The component must be a struct/class that can be move constructed and move assignable.
 
concept  co_ecs::component_reference
 Component reference concept. It should be a reference or const reference to C, where C satisfies component concept.
 

Typedefs

using co_ecs::component_id_t = std::uint32_t
 Type for component ID.
 
using co_ecs::component_id = detail::type_id<struct _component_family_t, component_id_t>
 Type for family used to generated component IDs.
 
template<component_reference T>
using co_ecs::decay_component_t = std::decay_t<T>
 Decay component; converts component_reference to component by removing cv-qualifiers and reference.
 

Variables

constexpr auto co_ecs::invalid_component_id = std::numeric_limits<component_id_t>::max()
 Invalid component ID.
 
template<component_reference T>
constexpr bool co_ecs::const_component_reference_v = const_component_reference<T>::value
 Returns true for const component references.
 
template<component_reference T>
constexpr bool co_ecs::mutable_component_reference_v = mutable_component_reference<T>::value
 Returns true for non-const component references.
 
template<component_reference... Args>
constexpr bool co_ecs::const_component_references_v = const_component_references<Args...>::value
 Returns true when all Args are const references.