EnTT 3.15.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 {
26};
27
28template<typename Type, typename Entity = entity, typename = void>
29struct component_traits;
30
31template<typename Entity = entity, typename = std::allocator<Entity>>
32class basic_sparse_set;
33
34template<typename Type, typename = entity, typename = std::allocator<Type>, typename = void>
35class basic_storage;
36
37template<typename, typename>
38class basic_sigh_mixin;
39
40template<typename, typename>
41class basic_reactive_mixin;
42
43template<typename Entity = entity, typename = std::allocator<Entity>>
44class basic_registry;
45
46template<typename, typename, typename = void>
48
49template<typename Type, typename = std::allocator<Type *>>
51
52template<typename, typename, typename>
54
55template<typename>
56class basic_organizer;
57
58template<typename, typename...>
59class basic_handle;
60
61template<typename>
62class basic_snapshot;
63
64template<typename>
66
67template<typename>
69
72
77template<typename Type>
79
84template<typename Type>
86
91template<typename Type>
93
96
99
102
105
110template<typename... Args>
112
117template<typename... Args>
119
122
125
128
131
134
139template<typename... Type>
140struct exclude_t final: type_list<Type...> {
142 explicit constexpr exclude_t() = default;
143};
144
149template<typename... Type>
150inline constexpr exclude_t<Type...> exclude{};
151
156template<typename... Type>
157struct get_t final: type_list<Type...> {
159 explicit constexpr get_t() = default;
160};
161
166template<typename... Type>
167inline constexpr get_t<Type...> get{};
168
173template<typename... Type>
174struct owned_t final: type_list<Type...> {
176 explicit constexpr owned_t() = default;
177};
178
183template<typename... Type>
184inline constexpr owned_t<Type...> owned{};
185
191template<typename... Type, template<typename...> class Op>
192struct type_list_transform<get_t<Type...>, Op> {
195};
196
202template<typename... Type, template<typename...> class Op>
207
213template<typename... Type, template<typename...> class Op>
214struct type_list_transform<owned_t<Type...>, Op> {
217};
218
225template<typename Type, typename Entity = entity, typename Allocator = std::allocator<Type>, typename = void>
230
232struct reactive final {};
233
239template<typename Entity, typename Allocator>
240struct storage_type<reactive, Entity, Allocator> {
243};
244
249template<typename... Args>
250using storage_type_t = typename storage_type<Args...>::type;
251
258template<typename Type, typename Entity = entity, typename Allocator = std::allocator<std::remove_const_t<Type>>>
262};
263
268template<typename... Args>
269using storage_for_t = typename storage_for<Args...>::type;
270
276template<typename Get, typename Exclude = exclude_t<>>
278
285template<typename Owned, typename Get = get_t<>, typename Exclude = exclude_t<>>
287
288} // namespace entt
289
290#endif
Utility class for continuous loading.
Definition snapshot.hpp:306
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:394
Generic runtime view.
Mixin type used to add signal support to storage types.
Definition mixin.hpp:57
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
Storage implementation.
Definition storage.hpp:229
View implementation.
Definition fwd.hpp:47
EnTT default namespace.
Definition dense_map.hpp:22
basic_handle< const registry, Args... > const_handle_view
Alias declaration for the most common use case.
Definition fwd.hpp:118
entity
Default entity identifier.
Definition fwd.hpp:14
typename storage_type< Args... >::type storage_type_t
Helper type.
Definition fwd.hpp:250
typename constness_as< To, From >::type constness_as_t
Alias template to facilitate the transcription of the constness.
basic_organizer< registry > organizer
Alias declaration for the most common use case.
Definition fwd.hpp:98
typename type_list_transform< List, Op >::type type_list_transform_t
Helper type.
basic_view< type_list_transform_t< Get, storage_for >, type_list_transform_t< Exclude, storage_for > > view
Alias declaration for the most common use case.
Definition fwd.hpp:277
basic_handle< registry > handle
Alias declaration for the most common use case.
Definition fwd.hpp:101
constexpr exclude_t< Type... > exclude
Variable template for exclusion lists.
Definition fwd.hpp:150
std::uint32_t id_type
Alias declaration for type identifiers.
Definition fwd.hpp:29
basic_handle< registry, Args... > handle_view
Alias declaration for the most common use case.
Definition fwd.hpp:111
basic_reactive_mixin< Type, basic_registry< typename Type::entity_type, typename Type::base_type::allocator_type > > reactive_mixin
Alias declaration for the most common use case.
Definition fwd.hpp:92
basic_group< type_list_transform_t< Owned, storage_for >, type_list_transform_t< Get, storage_for >, type_list_transform_t< Exclude, storage_for > > group
Alias declaration for the most common use case.
Definition fwd.hpp:286
constexpr get_t< Type... > get
Variable template for lists of observed elements.
Definition fwd.hpp:167
typename storage_for< Args... >::type storage_for_t
Helper type.
Definition fwd.hpp:269
basic_registry<> registry
Alias declaration for the most common use case.
Definition fwd.hpp:95
deletion_policy
Storage deletion policy.
Definition fwd.hpp:17
@ swap_only
Swap-only deletion policy.
Definition fwd.hpp:23
@ swap_and_pop
Swap-and-pop deletion policy.
Definition fwd.hpp:19
@ in_place
In-place deletion policy.
Definition fwd.hpp:21
@ unspecified
Unspecified deletion policy.
Definition fwd.hpp:25
basic_runtime_view< const sparse_set > const_runtime_view
Alias declaration for the most common use case.
Definition fwd.hpp:133
constexpr owned_t< Type... > owned
Variable template for lists of owned elements.
Definition fwd.hpp:184
basic_sigh_mixin< Type, basic_registry< typename Type::entity_type, typename Type::base_type::allocator_type > > sigh_mixin
Alias declaration for the most common use case.
Definition fwd.hpp:85
basic_runtime_view< sparse_set > runtime_view
Alias declaration for the most common use case.
Definition fwd.hpp:130
basic_snapshot< registry > snapshot
Alias declaration for the most common use case.
Definition fwd.hpp:121
basic_continuous_loader< registry > continuous_loader
Alias declaration for the most common use case.
Definition fwd.hpp:127
basic_handle< const registry > const_handle
Alias declaration for the most common use case.
Definition fwd.hpp:104
basic_sparse_set<> sparse_set
Alias declaration for the most common use case.
Definition fwd.hpp:71
basic_storage< Type > storage
Alias declaration for the most common use case.
Definition fwd.hpp:78
basic_snapshot_loader< registry > snapshot_loader
Alias declaration for the most common use case.
Definition fwd.hpp:124
Alias for exclusion lists.
Definition fwd.hpp:140
constexpr exclude_t()=default
Default constructor.
Alias for lists of observed elements.
Definition fwd.hpp:157
constexpr get_t()=default
Default constructor.
Alias for lists of owned elements.
Definition fwd.hpp:174
constexpr owned_t()=default
Default constructor.
Empty value type for reactive storage types.
Definition fwd.hpp:232
constness_as_t< storage_type_t< std::remove_const_t< Type >, Entity, Allocator >, Type > type
Type-to-storage conversion result.
Definition fwd.hpp:261
reactive_mixin< basic_storage< reactive, Entity, Allocator > > type
Type-to-storage conversion result.
Definition fwd.hpp:242
Provides a common way to define storage types.
Definition fwd.hpp:226
sigh_mixin< basic_storage< Type, Entity, Allocator > > type
Type-to-storage conversion result.
Definition fwd.hpp:228
exclude_t< typename Op< Type >::type... > type
Resulting exclude list after applying the transform function.
Definition fwd.hpp:205
get_t< typename Op< Type >::type... > type
Resulting get list after applying the transform function.
Definition fwd.hpp:194
owned_t< typename Op< Type >::type... > type
Resulting owned list after applying the transform function.
Definition fwd.hpp:216
Primary template isn't defined on purpose.
A class to use to push around lists of types, nothing more.