EnTT 3.14.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 "../config/config.h"
8#include "../core/fwd.hpp"
9#include "../core/type_traits.hpp"
10
11namespace entt {
12
14enum class entity : id_type {};
15
17enum class deletion_policy : std::uint8_t {
19 swap_and_pop = 0u,
21 in_place = 1u,
23 swap_only = 2u
24};
25
26template<typename Entity = entity, typename = std::allocator<Entity>>
27class basic_sparse_set;
28
29template<typename Type, typename = entity, typename = std::allocator<Type>, typename = void>
30class basic_storage;
31
32template<typename, typename>
33class basic_sigh_mixin;
34
35template<typename, typename>
36class basic_reactive_mixin;
37
38template<typename Entity = entity, typename = std::allocator<Entity>>
39class basic_registry;
40
41template<typename, typename, typename = void>
43
44template<typename Type, typename = std::allocator<Type *>>
46
47template<typename, typename, typename>
49
50template<typename, typename = std::allocator<void>>
51class basic_observer;
52
53template<typename>
54class basic_organizer;
55
56template<typename, typename...>
57class basic_handle;
58
59template<typename>
60class basic_snapshot;
61
62template<typename>
64
65template<typename>
67
70
75template<typename Type>
77
82template<typename Type>
84
89template<typename Type>
91
94
97
100
103
106
111template<typename... Args>
113
118template<typename... Args>
120
123
126
129
132
135
140template<typename... Type>
141struct exclude_t final: type_list<Type...> {
143 explicit constexpr exclude_t() = default;
144};
145
150template<typename... Type>
151inline constexpr exclude_t<Type...> exclude{};
152
157template<typename... Type>
158struct get_t final: type_list<Type...> {
160 explicit constexpr get_t() = default;
161};
162
167template<typename... Type>
168inline constexpr get_t<Type...> get{};
169
174template<typename... Type>
175struct owned_t final: type_list<Type...> {
177 explicit constexpr owned_t() = default;
178};
179
184template<typename... Type>
185inline constexpr owned_t<Type...> owned{};
186
192template<typename... Type, template<typename...> class Op>
197
203template<typename... Type, template<typename...> class Op>
208
214template<typename... Type, template<typename...> class Op>
219
226template<typename Type, typename Entity = entity, typename Allocator = std::allocator<Type>, typename = void>
231
233struct reactive final {};
234
240template<typename Entity, typename Allocator>
245
250template<typename... Args>
251using storage_type_t = typename storage_type<Args...>::type;
252
259template<typename Type, typename Entity = entity, typename Allocator = std::allocator<std::remove_const_t<Type>>>
264
269template<typename... Args>
270using storage_for_t = typename storage_for<Args...>::type;
271
277template<typename Get, typename Exclude = exclude_t<>>
279
286template<typename Owned, typename Get, typename Exclude>
288
289} // namespace entt
290
291#endif
Utility class for continuous loading.
Definition snapshot.hpp:303
Non-owning handle to an entity.
Definition handle.hpp:98
Utility class for creating a static task graph.
Mixin type used to add reactive support to storage types.
Definition mixin.hpp:389
Fast and reliable entity-component system.
Definition registry.hpp:234
Generic runtime view.
Mixin type used to add signal support to storage types.
Definition mixin.hpp:71
Utility class to restore a snapshot as a whole.
Definition snapshot.hpp:176
Utility class to create snapshots from a registry.
Definition snapshot.hpp:47
Sparse set implementation.
Storage implementation.
Definition storage.hpp:230
View implementation.
Definition fwd.hpp:42
EnTT default namespace.
Definition dense_map.hpp:22
entity
Default entity identifier.
Definition fwd.hpp:14
typename storage_type< Args... >::type storage_type_t
Helper type.
Definition fwd.hpp:251
constexpr Type make_obj_using_allocator(const Allocator &allocator, Args &&...args)
Uses-allocator construction utility (waiting for C++20).
Definition memory.hpp:219
typename constness_as< To, From >::type constness_as_t
Alias template to facilitate the transcription of the constness.
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:151
std::uint32_t id_type
Alias declaration for type identifiers.
Definition fwd.hpp:14
constexpr get_t< Type... > get
Variable template for lists of observed elements.
Definition fwd.hpp:168
typename storage_for< Args... >::type storage_for_t
Helper type.
Definition fwd.hpp:270
basic_registry<> registry
Alias declaration for the most common use case.
Definition fwd.hpp:93
deletion_policy
Storage deletion policy.
Definition fwd.hpp:17
@ swap_only
Swap-only deletion policy.
@ swap_and_pop
Swap-and-pop deletion policy.
@ in_place
In-place deletion policy.
constexpr owned_t< Type... > owned
Variable template for lists of owned elements.
Definition fwd.hpp:185
Alias for exclusion lists.
Definition fwd.hpp:141
constexpr exclude_t()=default
Default constructor.
Alias for lists of observed elements.
Definition fwd.hpp:158
constexpr get_t()=default
Default constructor.
Alias for lists of owned elements.
Definition fwd.hpp:175
constexpr owned_t()=default
Default constructor.
Empty value type for reactive storage types.
Definition fwd.hpp:233
constness_as_t< storage_type_t< std::remove_const_t< Type >, Entity, Allocator >, Type > type
Type-to-storage conversion result.
Definition fwd.hpp:262
Provides a common way to define storage types.
Definition fwd.hpp:227
Primary template isn't defined on purpose.
A class to use to push around lists of types, nothing more.