EnTT 3.13.0
Loading...
Searching...
No Matches
fwd.hpp
1#ifndef ENTT_ENTITY_FWD_HPP
2#define ENTT_ENTITY_FWD_HPP
3
4#include <cstdint>
5#include <memory>
6#include <type_traits>
7#include "../core/fwd.hpp"
8#include "../core/type_traits.hpp"
9
10namespace entt {
11
13enum class entity : id_type {};
14
16enum class deletion_policy : std::uint8_t {
18 swap_and_pop = 0u,
20 in_place = 1u,
22 swap_only = 2u
23};
24
25template<typename Entity = entity, typename = std::allocator<Entity>>
26class basic_sparse_set;
27
28template<typename Type, typename = entity, typename = std::allocator<Type>, typename = void>
29class basic_storage;
30
31template<typename, typename>
32class basic_sigh_mixin;
33
34template<typename Entity = entity, typename = std::allocator<Entity>>
35class basic_registry;
36
37template<typename, typename, typename = void>
39
40template<typename Type, typename = std::allocator<Type *>>
42
43template<typename, typename, typename>
45
46template<typename, typename Mask = std::uint32_t, typename = std::allocator<Mask>>
47class basic_observer;
48
49template<typename>
50class basic_organizer;
51
52template<typename, typename...>
53struct basic_handle;
54
55template<typename>
56class basic_snapshot;
57
58template<typename>
60
61template<typename>
63
66
71template<typename Type>
73
78template<typename Type>
80
83
86
89
92
95
100template<typename... Args>
102
107template<typename... Args>
109
112
115
118
121
124
129template<typename... Type>
130struct exclude_t final: type_list<Type...> {
132 explicit constexpr exclude_t() {}
133};
134
139template<typename... Type>
140inline constexpr exclude_t<Type...> exclude{};
141
146template<typename... Type>
147struct get_t final: type_list<Type...> {
149 explicit constexpr get_t() {}
150};
151
156template<typename... Type>
157inline constexpr get_t<Type...> get{};
158
163template<typename... Type>
164struct owned_t final: type_list<Type...> {
166 explicit constexpr owned_t() {}
167};
168
173template<typename... Type>
174inline constexpr owned_t<Type...> owned{};
175
181template<typename... Type, template<typename...> class Op>
182struct type_list_transform<get_t<Type...>, Op> {
185};
186
192template<typename... Type, template<typename...> class Op>
193struct type_list_transform<exclude_t<Type...>, Op> {
196};
197
203template<typename... Type, template<typename...> class Op>
204struct type_list_transform<owned_t<Type...>, Op> {
207};
208
215template<typename Type, typename Entity = entity, typename Allocator = std::allocator<Type>, typename = void>
219};
220
225template<typename... Args>
226using storage_type_t = typename storage_type<Args...>::type;
227
234template<typename Type, typename Entity = entity, typename Allocator = std::allocator<std::remove_const_t<Type>>>
238};
239
244template<typename... Args>
245using storage_for_t = typename storage_for<Args...>::type;
246
252template<typename Get, typename Exclude = exclude_t<>>
254
261template<typename Owned, typename Get, typename Exclude>
263
264} // namespace entt
265
266#endif
Utility class for continuous loading.
Definition snapshot.hpp:262
Utility class for creating a static task graph.
Fast and reliable entity-component system.
Definition registry.hpp:233
Generic runtime view.
Mixin type used to add signal support to storage types.
Definition mixin.hpp:29
Utility class to restore a snapshot as a whole.
Definition snapshot.hpp:150
Utility class to create snapshots from a registry.
Definition snapshot.hpp:47
Basic sparse set implementation.
Basic storage implementation.
Definition storage.hpp:229
View implementation.
Definition fwd.hpp:38
EnTT default namespace.
Definition dense_map.hpp:21
entity
Default entity identifier.
Definition fwd.hpp:13
std::uint32_t id_type
Alias declaration for type identifiers.
Definition fwd.hpp:13
typename type_list_transform< List, Op >::type type_list_transform_t
Helper type.
constexpr exclude_t< Type... > exclude
Variable template for exclusion lists.
Definition fwd.hpp:140
typename storage_for< Args... >::type storage_for_t
Helper type.
Definition fwd.hpp:245
typename constness_as< To, From >::type constness_as_t
Alias template to facilitate the transcription of the constness.
constexpr get_t< Type... > get
Variable template for lists of observed components.
Definition fwd.hpp:157
deletion_policy
Storage deletion policy.
Definition fwd.hpp:16
@ swap_only
Swap-only deletion policy.
@ swap_and_pop
Swap-and-pop deletion policy.
@ in_place
In-place deletion policy.
basic_registry<> registry
Alias declaration for the most common use case.
Definition fwd.hpp:82
constexpr owned_t< Type... > owned
Variable template for lists of owned components.
Definition fwd.hpp:174
typename storage_type< Args... >::type storage_type_t
Helper type.
Definition fwd.hpp:226
Non-owning handle to an entity.
Definition handle.hpp:97
Alias for exclusion lists.
Definition fwd.hpp:130
constexpr exclude_t()
Default constructor.
Definition fwd.hpp:132
Alias for lists of observed components.
Definition fwd.hpp:147
constexpr get_t()
Default constructor.
Definition fwd.hpp:149
Alias for lists of owned components.
Definition fwd.hpp:164
constexpr owned_t()
Default constructor.
Definition fwd.hpp:166
constness_as_t< storage_type_t< std::remove_const_t< Type >, Entity, Allocator >, Type > type
Type-to-storage conversion result.
Definition fwd.hpp:237
Provides a common way to define storage types.
Definition fwd.hpp:216
Primary template isn't defined on purpose.
A class to use to push around lists of types, nothing more.