EnTT
3.1.0
src
entt
entity
component.hpp
1
#ifndef ENTT_ENTITY_COMPONENT_HPP
2
#define ENTT_ENTITY_COMPONENT_HPP
3
4
5
#include <type_traits>
6
#include "default_storage.hpp"
7
8
9
namespace
entt
{
10
11
12
template
<
typename
>
13
struct
component_traits
;
14
15
16
template
<
typename
Type,
typename
= std::
void
_t<>>
17
struct
component_pool
{
18
template
<
typename
Entity>
19
using
type
=
default_storage<Entity, Type>
;
20
};
21
22
23
template
<
typename
Type>
24
struct
component_pool
<Type, std::void_t<typename component_traits<Type>::pool_type>> {
25
template
<
typename
Entity>
26
using
type =
typename
component_traits<Type>::pool_type
;
27
};
28
29
30
template
<
typename
Entity,
typename
Type>
31
using
component_pool_t =
typename
component_pool<Type>::template
type<Entity>;
32
33
34
}
35
36
37
#endif // ENTT_ENTITY_COMPONENT_HPP
entt::default_storage
Default storage implementation.
Definition:
default_storage.hpp:51
entt::component_traits
Definition:
component.hpp:13
entt
EnTT default namespace.
Definition:
algorithm.hpp:10
entt::component_pool
Definition:
component.hpp:17
Generated by
1.8.13