EnTT 4.0.0
Loading...
Searching...
No Matches
fwd.hpp
1#ifndef ENTT_ENTITY_FWD_HPP
2#define ENTT_ENTITY_FWD_HPP
3
4#include "../config/config.h"
5#include "../core/concepts.hpp"
6#include "../core/fwd.hpp"
7#include "../core/type_traits.hpp"
8#include "../stl/cstdint.hpp"
9#include "../stl/memory.hpp"
10#include "../stl/type_traits.hpp"
11
12namespace entt {
13
15enum class entity : id_type {};
16
18enum class deletion_policy : stl::uint8_t {
27};
28
29template<cvref_unqualified Type, typename Entity = entity>
30struct component_traits;
31
32template<typename Entity = entity, typename = stl::allocator<Entity>>
33class basic_sparse_set;
34
35template<typename Type, typename = entity, typename = stl::allocator<Type>>
36class basic_storage;
37
38template<typename, typename>
39class basic_sigh_mixin;
40
41template<typename, typename>
42class basic_reactive_mixin;
43
44template<typename Entity = entity, typename = stl::allocator<Entity>>
45class basic_registry;
46
47template<typename, typename>
49
50template<typename Type, typename = stl::allocator<Type *>>
52
53template<typename, typename, typename>
55
56template<typename>
57class basic_organizer;
58
59template<typename, typename...>
60class basic_handle;
61
62template<typename>
63class basic_snapshot;
64
65template<typename>
67
68template<typename>
70
73
78template<typename Type>
80
85template<typename Type>
87
92template<typename Type>
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 ENTT_CONSTEVAL 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 ENTT_CONSTEVAL 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 ENTT_CONSTEVAL owned_t() = default;
178};
179
184template<typename... Type>
185inline constexpr owned_t<Type...> owned{};
186
192template<typename... Type, template<typename...> class Op>
193struct type_list_transform<get_t<Type...>, Op> {
196};
197
203template<typename... Type, template<typename...> class Op>
208
214template<typename... Type, template<typename...> class Op>
215struct type_list_transform<owned_t<Type...>, Op> {
218};
219
226template<typename Type, typename Entity = entity, typename Allocator = stl::allocator<Type>>
231
233struct reactive final {};
234
240template<typename Entity, typename Allocator>
241struct storage_type<reactive, Entity, Allocator> {
244};
245
250template<typename... Args>
252
259template<typename Type, typename Entity = entity, typename Allocator = stl::allocator<stl::remove_const_t<Type>>>
263};
264
269template<typename... Args>
271
277template<typename Get, typename Exclude = exclude_t<>>
279
286template<typename Owned, typename Get = get_t<>, typename Exclude = exclude_t<>>
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:90
Utility class for creating a static task graph.
Mixin type used to add reactive support to storage types.
Definition mixin.hpp:392
Generic runtime view.
Mixin type used to add signal support to storage types.
Definition mixin.hpp:60
Utility class to restore a snapshot as a whole.
Definition snapshot.hpp:173
Utility class to create snapshots from a registry.
Definition snapshot.hpp:45
Storage implementation.
Definition storage.hpp:208
View implementation.
Definition fwd.hpp:48
EnTT default namespace.
Definition dense_map.hpp:25
basic_handle< const registry, Args... > const_handle_view
Alias declaration for the most common use case.
Definition fwd.hpp:119
type_list_transform< List, Op >::type type_list_transform_t
Helper type.
entity
Default entity identifier.
Definition fwd.hpp:15
deletion_policy
Storage deletion policy.
Definition fwd.hpp:18
@ swap_only
Swap-only deletion policy.
Definition fwd.hpp:24
@ swap_and_pop
Swap-and-pop deletion policy.
Definition fwd.hpp:20
@ in_place
In-place deletion policy.
Definition fwd.hpp:22
@ unspecified
Unspecified deletion policy.
Definition fwd.hpp:26
basic_organizer< registry > organizer
Alias declaration for the most common use case.
Definition fwd.hpp:99
storage_for< Args... >::type storage_for_t
Helper type.
Definition fwd.hpp:270
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:278
basic_handle< registry > handle
Alias declaration for the most common use case.
Definition fwd.hpp:102
constexpr exclude_t< Type... > exclude
Variable template for exclusion lists.
Definition fwd.hpp:151
basic_handle< registry, Args... > handle_view
Alias declaration for the most common use case.
Definition fwd.hpp:112
storage_type< Args... >::type storage_type_t
Helper type.
Definition fwd.hpp:251
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:93
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:287
constexpr get_t< Type... > get
Variable template for lists of observed elements.
Definition fwd.hpp:168
basic_registry<> registry
Alias declaration for the most common use case.
Definition fwd.hpp:96
basic_runtime_view< const sparse_set > const_runtime_view
Alias declaration for the most common use case.
Definition fwd.hpp:134
constexpr owned_t< Type... > owned
Variable template for lists of owned elements.
Definition fwd.hpp:185
stl::uint32_t id_type
Alias declaration for type identifiers.
Definition fwd.hpp:29
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:86
basic_runtime_view< sparse_set > runtime_view
Alias declaration for the most common use case.
Definition fwd.hpp:131
basic_snapshot< registry > snapshot
Alias declaration for the most common use case.
Definition fwd.hpp:122
basic_continuous_loader< registry > continuous_loader
Alias declaration for the most common use case.
Definition fwd.hpp:128
basic_handle< const registry > const_handle
Alias declaration for the most common use case.
Definition fwd.hpp:105
basic_sparse_set<> sparse_set
Alias declaration for the most common use case.
Definition fwd.hpp:72
constness_as< To, From >::type constness_as_t
Alias template to facilitate the transcription of the constness.
basic_storage< Type > storage
Alias declaration for the most common use case.
Definition fwd.hpp:79
basic_snapshot_loader< registry > snapshot_loader
Alias declaration for the most common use case.
Definition fwd.hpp:125
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< stl::remove_const_t< Type >, Entity, Allocator >, Type > type
Type-to-storage conversion result.
Definition fwd.hpp:262
reactive_mixin< basic_storage< reactive, Entity, Allocator > > type
Type-to-storage conversion result.
Definition fwd.hpp:243
Provides a common way to define storage types.
Definition fwd.hpp:227
sigh_mixin< basic_storage< Type, Entity, Allocator > > type
Type-to-storage conversion result.
Definition fwd.hpp:229
exclude_t< typename Op< Type >::type... > type
Resulting exclude list after applying the transform function.
Definition fwd.hpp:206
get_t< typename Op< Type >::type... > type
Resulting get list after applying the transform function.
Definition fwd.hpp:195
owned_t< typename Op< Type >::type... > type
Resulting owned list after applying the transform function.
Definition fwd.hpp:217
Primary template isn't defined on purpose.
A class to use to push around lists of types, nothing more.