EnTT 4.0.0
Loading...
Searching...
No Matches
entt Namespace Reference

EnTT default namespace. More...

Namespaces

namespace  stl
 Custom EnTT namespace for the standard template library.

Classes

class  adjacency_matrix
 Basic implementation of a directed adjacency matrix. More...
struct  adl_meta_pointer_like
 Fake ADL based lookup function for meta pointer-like types. More...
struct  allocation_deleter
 Deleter for allocator-aware unique pointers (waiting for C++20). More...
struct  as_cref_t
 Empty class type used to request the as cref policy. More...
class  as_group
 Converts a registry to a group. More...
struct  as_is_t
 Empty class type used to request the as auto policy. More...
struct  as_ref_t
 Empty class type used to request the as ref policy. More...
struct  as_value_t
 Empty class type used to request the as-is policy. More...
class  as_view
 Converts a registry to a view. More...
struct  as_void_t
 Empty class type used to request the as void policy. More...
class  basic_any
 A SBO friendly, type-safe container for single values of any type. More...
class  basic_common_view
 Basic storage view implementation. More...
class  basic_continuous_loader
 Utility class for continuous loading. More...
class  basic_dispatcher
 Basic dispatcher implementation. More...
class  basic_entt_traits
 Common basic entity traits implementation. More...
class  basic_flow
 Utility class for creating task graphs. More...
class  basic_group
 Group. More...
class  basic_group< owned_t< Owned... >, get_t< Get... >, exclude_t< Exclude... > >
 Owning group. More...
class  basic_group< owned_t<>, get_t< Get... >, exclude_t< Exclude... > >
 Non-owning group. More...
class  basic_handle
 Non-owning handle to an entity. More...
class  basic_hashed_string
 Zero overhead unique identifier. More...
struct  basic_meta_associative_container_traits
 General purpose implementation of meta associative container traits. More...
struct  basic_meta_sequence_container_traits
 General purpose implementation of meta sequence container traits. More...
class  basic_organizer
 Utility class for creating a static task graph. More...
class  basic_poly
 Static polymorphism made simple and within everyone's reach. More...
class  basic_process
 Base class for processes. More...
class  basic_reactive_mixin
 Mixin type used to add reactive support to storage types. More...
class  basic_registry
 Fast and reliable entity-component system. More...
class  basic_runtime_view
 Generic runtime view. More...
class  basic_scheduler
 Cooperative scheduler for processes. More...
class  basic_sigh_mixin
 Mixin type used to add signal support to storage types. More...
class  basic_snapshot
 Utility class to create snapshots from a registry. More...
class  basic_snapshot_loader
 Utility class to restore a snapshot as a whole. More...
class  basic_sparse_set
 Sparse set implementation. More...
class  basic_storage
 Storage implementation. More...
class  basic_storage< Entity, Entity, Allocator >
 Swap-only entity storage specialization. More...
class  basic_storage< Type, Entity, Allocator >
 Default constructor. More...
class  basic_storage_view
 Basic storage view implementation. More...
class  basic_table
 Basic table implementation. More...
class  basic_view
 View implementation. More...
class  basic_view< get_t< Get >, exclude_t<> >
 Storage view specialization. More...
class  basic_view< get_t< Get... >, exclude_t< Exclude... > >
 General purpose view. More...
struct  choice_t
 Utility class to disambiguate overloaded functions. More...
struct  choice_t< 0 >
 Utility class to disambiguate overloaded functions. More...
struct  component_traits
 Common way to access various properties of components. More...
class  compressed_pair
 A compressed pair. More...
struct  connect_arg_t
 Disambiguation tag for constructors and the like. More...
class  connection
 Connection class. More...
struct  constness_as
 Transcribes the constness of a type to another type. More...
struct  constness_as< To, const From >
 Transcribes the constness of a type to another type. More...
class  delegate
 Basic delegate implementation. More...
class  delegate< Ret(Args...)>
 Utility class to use to send around functions and members.
class  dense_map
 Associative container for key-value pairs with unique keys. More...
class  dense_set
 Associative container for unique objects of a given type. More...
struct  directed_tag
 Undirected graph category tag. More...
class  emitter
 General purpose event emitter. More...
struct  entt_traits
 Entity traits. More...
struct  enum_as_bitmask
 Enable bitmask support for enum classes. More...
struct  enum_as_bitmask< Type >
 Enable bitmask support for enum classes. More...
struct  exclude_t
 Alias for exclusion lists. More...
class  family
 Dynamic identifier generator. More...
struct  forward_apply
 Utility class to forward-and-apply tuple objects. More...
struct  get_t
 Alias for lists of observed elements. More...
class  ident
 Type integral identifiers. More...
struct  input_iterator_pointer
 Helper type to use as pointer with input iterators. More...
struct  insertion_sort
 Function object for performing insertion sort. More...
struct  iota_iterator
 Plain iota iterator (waiting for C++20). More...
struct  is_applicable
 Same as stl::is_invocable, but with tuples. More...
struct  is_applicable< Func, const Tuple< Args... > >
 Same as stl::is_invocable, but with tuples. More...
struct  is_applicable< Func, Tuple< Args... > >
 Same as stl::is_invocable, but with tuples. More...
struct  is_applicable_r
 Same as stl::is_invocable_r, but with tuples for arguments. More...
struct  is_applicable_r< Ret, Func, stl::tuple< Args... > >
 Same as stl::is_invocable_r, but with tuples for arguments. More...
struct  is_complete
 Provides the member constant value equal to true if a given type is complete, false otherwise. More...
struct  is_complete< Type >
 Provides the member constant value equal to true if a given type is complete, false otherwise. More...
struct  is_ebco_eligible
 Provides the member constant value equal to true if a given type is both an empty and non-final class, false otherwise. More...
struct  is_equality_comparable
 Provides the member constant value equal to true if a given type is equality comparable, false otherwise. More...
struct  is_equality_comparable< const Type >
 Provides the member constant value equal to true if a given type is equality comparable, false otherwise. More...
struct  is_iterator
 Provides the member constant value equal to true if a given type is an iterator, false otherwise. More...
struct  is_iterator< Type >
 Provides the member constant value equal to true if a given type is an iterator, false otherwise. More...
struct  is_meta_pointer_like
 Provides the member constant value equal to true if a given type is a pointer-like type, false otherwise. More...
struct  is_meta_pointer_like< const Type >
 Partial specialization to ensure that const pointer-like types are also accepted. More...
struct  is_meta_pointer_like< stl::shared_ptr< Type > >
 Makes stl::shared_ptrs of any type pointer-like types for the meta system. More...
struct  is_meta_pointer_like< stl::unique_ptr< Type, Args... > >
 Makes stl::unique_ptrs of any type pointer-like types for the meta system. More...
struct  is_meta_pointer_like< Type >
 Specialization for self-proclaimed meta pointer like types. More...
struct  is_meta_policy
 Provides the member constant value equal to true if a type also is a meta policy, false otherwise. More...
struct  is_transparent
 Provides the member constant value equal to true if Type::is_transparent is valid and denotes a type, false otherwise. More...
struct  is_transparent< Type >
 Provides the member constant value equal to true if Type::is_transparent is valid and denotes a type, false otherwise. More...
struct  is_tuple
 Provides the member constant value equal to true if a given type is a tuple, false otherwise. More...
struct  is_tuple< stl::tuple< Args... > >
 Provides the member constant value equal to true if a given type is a tuple, false otherwise. More...
struct  iterable_adaptor
 Utility class to create an iterable object from a pair of iterators. More...
class  locator
 Service locator, nothing more. More...
class  member_class
 Primary template isn't defined on purpose. More...
class  member_class< Member >
 Extracts the class of a non-static member object or function. More...
class  meta_any
 Opaque wrapper for values of any type. More...
class  meta_associative_container
 Proxy object for associative containers. More...
struct  meta_associative_container_traits
 Traits class template to be specialized to enable support for meta associative containers. More...
struct  meta_associative_container_traits< Type >
 Traits for meta associative container like types. More...
struct  meta_base
 Opaque wrapper for base types. More...
struct  meta_class_template_tag
 Utility class to disambiguate class templates. More...
struct  meta_ctx
 Opaque meta context type. More...
struct  meta_ctx_arg_t
 Disambiguation tag for constructors and the like. More...
struct  meta_custom
 Opaque wrapper for user defined data of any type. More...
struct  meta_data
 Opaque wrapper for data members. More...
class  meta_factory
 Meta factory to be used for reflection purposes. More...
struct  meta_func
 Opaque wrapper for member functions. More...
struct  meta_function_descriptor
 Primary template isn't defined on purpose. More...
struct  meta_function_descriptor< Type, Ret Class::* >
 Meta function descriptor. More...
struct  meta_function_descriptor< Type, Ret(*)()>
 Meta function descriptor. More...
struct  meta_function_descriptor< Type, Ret(*)(MaybeType, Args...)>
 Meta function descriptor. More...
struct  meta_function_descriptor< Type, Ret(Class::*)(Args...) const >
 Meta function descriptor. More...
struct  meta_function_descriptor< Type, Ret(Class::*)(Args...)>
 Meta function descriptor. More...
struct  meta_function_descriptor_traits
 Meta function descriptor traits. More...
class  meta_function_helper
 Meta function helper. More...
class  meta_handle
 Opaque pointers to instances of any type. More...
struct  meta_object
 Common opaque wrapper for meta objects. More...
class  meta_sequence_container
 Proxy object for sequence containers. More...
struct  meta_sequence_container_traits
 Traits class template to be specialized to enable support for meta sequence containers. More...
struct  meta_sequence_container_traits< Type >
 Traits meta sequence container like types. More...
struct  meta_template_traits
 Traits class template to be specialized to enable support for meta template information. More...
struct  meta_template_traits< Clazz< Args... > >
 General purpose traits class for generating meta template information. More...
class  meta_type
 Opaque wrapper for types. More...
struct  monostate
 Minimal implementation of the monostate pattern. More...
class  nth_argument
 Extracts the n-th argument of a callable type. More...
struct  null_t
 Null object for all identifiers. More...
struct  overloaded
 Helper type for visitors. More...
struct  owned_t
 Alias for lists of owned elements. More...
struct  poly_base
 Poly base class used to inject functionalities into concepts. More...
struct  poly_inspector
 Inspector class used to infer the type of the virtual table. More...
class  poly_vtable
 Static virtual table factory. More...
struct  radix_sort
 Function object for performing LSD radix sort. More...
struct  reactive
 Empty value type for reactive storage types. More...
class  resource
 Basic resource handle. More...
class  resource_cache
 Basic cache for resources of any type. More...
struct  resource_loader
 Transparent loader for shared resources. More...
struct  scoped_connection
 Scoped connection class. More...
class  sigh
 Unmanaged signal handler. More...
class  sigh< Ret(Args...), Allocator >
 Unmanaged signal handler.
struct  sigh_helper
 Primary template isn't defined on purpose. More...
struct  sigh_helper< Registry >
 Signal connection helper for registries. More...
struct  sigh_helper< Registry, Type >
 Signal connection helper for registries. More...
class  sink
 Sink class. More...
class  sink< sigh< Ret(Args...), Allocator > >
 Sink class.
struct  size_of
 A type-only sizeof wrapper that returns 0 where sizeof complains. More...
struct  size_of< Type >
 A type-only sizeof wrapper that returns 0 where sizeof complains. More...
struct  std_sort
 Function object to wrap stl::sort in a class type. More...
struct  storage_for
struct  storage_type
 Provides a common way to define storage types. More...
struct  storage_type< reactive, Entity, Allocator >
struct  tombstone_t
 Tombstone object for all identifiers. More...
struct  type_hash
 Type hash. More...
struct  type_index
 Type sequential identifier. More...
struct  type_info
 Implementation specific information about a type. More...
struct  type_list
 A class to use to push around lists of types, nothing more. More...
struct  type_list_cat
 Primary template isn't defined on purpose. More...
struct  type_list_cat< type_list< Type... > >
 Concatenates multiple type lists. More...
struct  type_list_cat< type_list< Type... >, type_list< Other... >, List... >
 Concatenates multiple type lists. More...
struct  type_list_cat<>
 Concatenates multiple type lists. More...
struct  type_list_contains
 Provides the member constant value equal to true if a type list contains a given type, false otherwise. More...
struct  type_list_contains< type_list< Type... >, Other >
 Provides the member constant value equal to true if a type list contains a given type, false otherwise. More...
struct  type_list_diff
 Primary template isn't defined on purpose. More...
struct  type_list_diff< type_list< Type... >, type_list< Other... > >
 Computes the difference between two type lists. More...
struct  type_list_element
 Primary template isn't defined on purpose. More...
struct  type_list_element< 0u, type_list< First, Other... > >
 Provides compile-time indexed access to the types of a type list. More...
struct  type_list_element< Index, type_list< First, Other... > >
 Provides compile-time indexed access to the types of a type list. More...
struct  type_list_index
 Primary template isn't defined on purpose. More...
struct  type_list_index< Type, type_list< First, Other... > >
 Provides compile-time type access to the types of a type list. More...
struct  type_list_index< Type, type_list< Type, Other... > >
 Provides compile-time type access to the types of a type list. More...
struct  type_list_index< Type, type_list<> >
 Provides compile-time type access to the types of a type list. More...
struct  type_list_transform
 Primary template isn't defined on purpose. More...
struct  type_list_transform< exclude_t< Type... >, Op >
 Applies a given function to an exclude list and generate a new list. More...
struct  type_list_transform< get_t< Type... >, Op >
 Applies a given function to a get list and generate a new list. More...
struct  type_list_transform< owned_t< Type... >, Op >
 Applies a given function to an owned list and generate a new list. More...
struct  type_list_transform< type_list< Type... >, Op >
 Applies a given function to a type list and generates a new list. More...
struct  type_list_unique
 Removes duplicates types from a type list. More...
struct  type_name
 Type name. More...
struct  undirected_tag
 Directed graph category tag. More...
struct  value_list
 A class to use to push around lists of constant values, nothing more. More...
struct  value_list_cat
 Primary template isn't defined on purpose. More...
struct  value_list_cat< value_list< Value... > >
 Concatenates multiple value lists. More...
struct  value_list_cat< value_list< Value... >, value_list< Other... >, List... >
 Concatenates multiple value lists. More...
struct  value_list_cat<>
 Concatenates multiple value lists. More...
struct  value_list_contains
 Provides the member constant value equal to true if a value list contains a given value, false otherwise. More...
struct  value_list_contains< value_list< Value... >, Other >
 Provides the member constant value equal to true if a value list contains a given value, false otherwise. More...
struct  value_list_diff
 Primary template isn't defined on purpose. More...
struct  value_list_diff< value_list< Value... >, value_list< Other... > >
 Computes the difference between two value lists. More...
struct  value_list_element
 Primary template isn't defined on purpose. More...
struct  value_list_element< 0u, value_list< Value, Other... > >
 Provides compile-time indexed access to the types of a type list. More...
struct  value_list_element< Index, value_list< Value, Other... > >
 Provides compile-time indexed access to the values of a value list. More...
struct  value_list_index
 Primary template isn't defined on purpose. More...
struct  value_list_index< Value, value_list< First, Other... > >
 Provides compile-time type access to the values of a value list. More...
struct  value_list_index< Value, value_list< Value, Other... > >
 Provides compile-time type access to the values of a value list. More...
struct  value_list_index< Value, value_list<> >
 Provides compile-time type access to the values of a value list. More...
struct  value_list_unique
 Primary template isn't defined on purpose. More...
struct  value_list_unique< value_list< Value, Other... > >
 Removes duplicates values from a value list. More...
struct  value_list_unique< value_list<> >
 Removes duplicates values from a value list. More...
struct  y_combinator
 Basic implementation of a y-combinator. More...

Concepts

concept  cvref_unqualified
 Specifies that a type is not a cv-qualified reference.
concept  enum_bitmask
 Specifies that an enum class supports bitmask operations.
concept  entity_like
 Specifies that a type is an entity-like type.
concept  meta_policy
 Specifies whether a type is a meta policy.

Typedefs

template<typename... Type>
using table = basic_table<stl::vector<Type>...>
 Alias declaration for the most common use case.
using id_type = stl::uint32_t
 Alias declaration for type identifiers.
using any = basic_any<>
 Alias declaration for the most common use case.
using hashed_string = basic_hashed_string<char>
 Aliases for common character types.
using hashed_wstring = basic_hashed_string<wchar_t>
 Aliases for common character types.
template<typename Type, typename>
using unpack_as_type = Type
 Using declaration to be used to repeat the same type a number of times equal to the size of a given parameter pack.
template<auto Value>
using integral_constant = stl::integral_constant<decltype(Value), Value>
 Wraps a static constant.
template<id_type Value>
using tag = integral_constant<Value>
 Alias template to facilitate the creation of named values.
template<stl::size_t Index, typename List>
using type_list_element_t = type_list_element<Index, List>::type
 Helper type.
template<typename... List>
using type_list_cat_t = type_list_cat<List...>::type
 Helper type.
template<typename List>
using type_list_unique_t = type_list_unique<List>::type
 Helper type.
template<typename... List>
using type_list_diff_t = type_list_diff<List...>::type
 Helper type.
template<typename List, template< typename... > class Op>
using type_list_transform_t = type_list_transform<List, Op>::type
 Helper type.
template<stl::size_t Index, typename List>
using value_list_element_t = value_list_element<Index, List>::type
 Helper type.
template<typename... List>
using value_list_cat_t = value_list_cat<List...>::type
 Helper type.
template<typename Type>
using value_list_unique_t = value_list_unique<Type>::type
 Helper type.
template<typename... List>
using value_list_diff_t = value_list_diff<List...>::type
 Helper type.
template<typename To, typename From>
using constness_as_t = constness_as<To, From>::type
 Alias template to facilitate the transcription of the constness.
template<typename Member>
using member_class_t = member_class<Member>::type
 Helper type.
template<stl::size_t Index, typename Candidate>
using nth_argument_t = nth_argument<Index, Candidate>::type
 Helper type.
using sparse_set = basic_sparse_set<>
 Alias declaration for the most common use case.
template<typename Type>
using storage = basic_storage<Type>
 Alias declaration for the most common use case.
template<typename Type>
using sigh_mixin = basic_sigh_mixin<Type, basic_registry<typename Type::entity_type, typename Type::base_type::allocator_type>>
 Alias declaration for the most common use case.
template<typename Type>
using reactive_mixin = basic_reactive_mixin<Type, basic_registry<typename Type::entity_type, typename Type::base_type::allocator_type>>
 Alias declaration for the most common use case.
using registry = basic_registry<>
 Alias declaration for the most common use case.
using organizer = basic_organizer<registry>
 Alias declaration for the most common use case.
using handle = basic_handle<registry>
 Alias declaration for the most common use case.
using const_handle = basic_handle<const registry>
 Alias declaration for the most common use case.
template<typename... Args>
using handle_view = basic_handle<registry, Args...>
 Alias declaration for the most common use case.
template<typename... Args>
using const_handle_view = basic_handle<const registry, Args...>
 Alias declaration for the most common use case.
using snapshot = basic_snapshot<registry>
 Alias declaration for the most common use case.
using snapshot_loader = basic_snapshot_loader<registry>
 Alias declaration for the most common use case.
using continuous_loader = basic_continuous_loader<registry>
 Alias declaration for the most common use case.
using runtime_view = basic_runtime_view<sparse_set>
 Alias declaration for the most common use case.
using const_runtime_view = basic_runtime_view<const sparse_set>
 Alias declaration for the most common use case.
template<typename... Args>
using storage_type_t = storage_type<Args...>::type
 Helper type.
template<typename... Args>
using storage_for_t = storage_for<Args...>::type
 Helper type.
template<typename Get, typename Exclude = exclude_t<>>
using view = basic_view<type_list_transform_t<Get, storage_for>, type_list_transform_t<Exclude, storage_for>>
 Alias declaration for the most common use case.
template<typename Owned, typename Get = get_t<>, typename Exclude = exclude_t<>>
using group = basic_group<type_list_transform_t<Owned, storage_for>, type_list_transform_t<Get, storage_for>, type_list_transform_t<Exclude, storage_for>>
 Alias declaration for the most common use case.
using flow = basic_flow<>
 Alias declaration for the most common use case.
template<typename Type, stl::forward_iterator It>
using meta_range = iterable_adaptor<internal::meta_range_iterator<Type, It>>
 Iterable range to use to iterate all types of meta objects.
template<typename Type, typename Candidate>
using meta_function_helper_t = meta_function_helper<Type, Candidate>::type
 Helper type.
template<typename Concept>
using poly = basic_poly<Concept>
 Alias declaration for the most common use case.
using process = basic_process<stl::uint32_t>
 Alias declaration for the most common use case.
using scheduler = basic_scheduler<stl::uint32_t>
 Alias declaration for the most common use case.
using dispatcher = basic_dispatcher<>
 Alias declaration for the most common use case.

Enumerations

enum class  any_policy : stl::uint8_t {
  empty , dynamic , embedded , ref ,
  cref
}
 Possible modes of an any object. More...
enum class  entity : id_type
 Default entity identifier. More...
enum class  deletion_policy : stl::uint8_t { swap_and_pop = 0u , in_place = 1u , swap_only = 2u , unspecified = swap_and_pop }
 Storage deletion policy. More...

Functions

template<typename Type, stl::size_t Len, stl::size_t Align>
stl::remove_const_t< Type > any_cast (const basic_any< Len, Align > &data) noexcept
 Performs type-safe access to the contained object.
template<typename Type, stl::size_t Len, stl::size_t Align>
stl::remove_const_t< Type > any_cast (basic_any< Len, Align > &data) noexcept
 Performs type-safe access to the contained object.
template<typename Type, stl::size_t Len, stl::size_t Align>
stl::remove_const_t< Type > any_cast (basic_any< Len, Align > &&data) noexcept
 Performs type-safe access to the contained object.
template<typename Type, stl::size_t Len, stl::size_t Align>
const Type * any_cast (const basic_any< Len, Align > *data) noexcept
 Performs type-safe access to the contained object.
template<typename Type, stl::size_t Len, stl::size_t Align>
Type * any_cast (basic_any< Len, Align > *data) noexcept
 Performs type-safe access to the contained object.
template<typename Type, stl::size_t Len = basic_any<>::length, stl::size_t Align = basic_any<Len>::alignment, typename... Args>
basic_any< Len, Align > make_any (Args &&...args)
 Constructs a wrapper from a given type, passing it all arguments.
template<stl::size_t Len = basic_any<>::length, stl::size_t Align = basic_any<Len>::alignment, typename Type>
basic_any< Len, Align > forward_as_any (Type &&value)
 Forwards its argument and avoids copies for lvalue references.
template<stl::unsigned_integral Type>
constexpr Type fast_mod (const Type value, const stl::size_t mod) noexcept
 Fast module utility function (powers of two only).
template<typename Type, typename Other>
 compressed_pair (Type &&, Other &&) -> compressed_pair< stl::decay_t< Type >, stl::decay_t< Other > >
 Deduction guide.
template<typename First, typename Second>
constexpr void swap (compressed_pair< First, Second > &lhs, compressed_pair< First, Second > &rhs) noexcept
 Swaps two compressed pair objects.
template<typename Char>
 basic_hashed_string (const Char *str, stl::size_t len) -> basic_hashed_string< Char >
 Deduction guide.
template<typename Char, stl::size_t N>
 basic_hashed_string (const Char(&str)[N]) -> basic_hashed_string< Char >
 Deduction guide.
constexpr hashed_string operator""_hs (const char *str, stl::size_t) noexcept
 User defined literal for hashed strings.
constexpr hashed_wstring operator""_hws (const wchar_t *str, stl::size_t) noexcept
 User defined literal for hashed wstrings.
template<typename Allocator>
constexpr void propagate_on_container_copy_assignment (Allocator &lhs, Allocator &rhs) noexcept
 Utility function to design allocation-aware containers.
template<typename Allocator>
constexpr void propagate_on_container_move_assignment (Allocator &lhs, Allocator &rhs) noexcept
 Utility function to design allocation-aware containers.
template<typename Allocator>
constexpr void propagate_on_container_swap (Allocator &lhs, Allocator &rhs) noexcept
 Utility function to design allocation-aware containers.
template<typename Type, typename Allocator, typename... Args>
constexpr auto allocate_unique (Allocator &allocator, Args &&...args)
 Allows stl::unique_ptr to use allocators (waiting for C++20).
template<typename Type, typename... Args>
constexpr auto uses_allocator_construction_args (const auto &allocator, Args &&...args) noexcept
 Uses-allocator construction utility (waiting for C++20).
template<typename Type, typename... Args>
constexpr Type make_obj_using_allocator (const auto &allocator, Args &&...args)
 Uses-allocator construction utility (waiting for C++20).
template<typename Type, typename... Args>
constexpr Type * uninitialized_construct_using_allocator (Type *value, const auto &allocator, Args &&...args)
 Uses-allocator construction utility (waiting for C++20).
template<typename Type>
constexpr decltype(auto) unwrap_tuple (Type &&value) noexcept
 Utility function to unwrap tuples of a single element.
template<typename Func>
 forward_apply (Func) -> forward_apply< stl::remove_cvref_t< Func > >
 Deduction guide.
template<typename Type>
const type_infotype_id () noexcept
 Returns the type info object associated to a given type.
template<typename Type>
const type_infotype_id (const Type &) noexcept
 Returns the type info object associated to a given type.
template<typename... Type, typename... Other>
constexpr type_list< Type..., Other... > operator+ (type_list< Type... >, type_list< Other... >)
 Concatenates multiple type lists.
template<auto... Value, auto... Other>
constexpr value_list< Value..., Other... > operator+ (value_list< Value... >, value_list< Other... >)
 Concatenates multiple value lists.
template<typename Type, typename Class>
constexpr auto overload (Type Class::*member) noexcept
 Constant utility to disambiguate overloaded members of a class.
template<typename Func>
constexpr auto overload (Func *func) noexcept
 Constant utility to disambiguate overloaded functions.
template<typename... Func>
 overloaded (Func...) -> overloaded< Func... >
 Deduction guide.
template<typename Entity>
constexpr entt_traits< Entity >::entity_type to_integral (const Entity value) noexcept
 Converts an entity to its underlying type.
template<typename Entity>
constexpr entt_traits< Entity >::entity_type to_entity (const Entity value) noexcept
 Returns the entity part once converted to the underlying type.
template<typename Entity>
constexpr entt_traits< Entity >::version_type to_version (const Entity value) noexcept
 Returns the version part once converted to the underlying type.
template<auto Member, typename Registry = stl::decay_t<nth_argument_t<0u, decltype(Member)>>>
void invoke (Registry &reg, const typename Registry::entity_type entt)
 Helper to create a listener that directly invokes a member function.
template<typename... Args>
basic_storage< Args... >::entity_type to_entity (const basic_storage< Args... > &storage, const typename basic_storage< Args... >::value_type &instance)
 Returns the entity associated with a given element.
template<typename Registry>
 sigh_helper (Registry &) -> sigh_helper< Registry >
 Deduction guide.
template<typename... Type>
 basic_view (Type &...storage) -> basic_view< get_t< Type... >, exclude_t<> >
 Deduction guide.
template<typename... Get, typename... Exclude>
 basic_view (stl::tuple< Get &... >, stl::tuple< Exclude &... >={}) -> basic_view< get_t< Get... >, exclude_t< Exclude... > >
 Deduction guide.
template<typename Graph>
requires stl::derived_from<typename Graph::graph_category, directed_tag>
void dot (stl::ostream &out, const Graph &graph, stl::invocable< stl::ostream &, typename Graph::vertex_type > auto writer)
 Outputs a graph in dot format.
template<typename Graph>
void dot (stl::ostream &out, const Graph &graph)
 Outputs a graph in dot format.
template<typename Type>
decltype(auto) dereference_meta_pointer_like (const Type &value)
 ADL based lookup function for dereferencing meta pointer-like types.
void meta_reset (meta_ctx &ctx, const id_type alias) noexcept
 Resets a type and all its parts.
void meta_reset (const id_type alias) noexcept
 Resets a type and all its parts.
template<typename Type>
void meta_reset (meta_ctx &ctx) noexcept
 Resets a type and all its parts.
template<typename Type>
void meta_reset () noexcept
 Resets a type and all its parts.
void meta_reset (meta_ctx &ctx) noexcept
 Resets all meta types.
void meta_reset () noexcept
 Resets all meta types.
meta_any forward_as_meta (const meta_ctx &ctx, auto &&value)
 Forwards its argument and avoids copies for lvalue references.
meta_any forward_as_meta (auto &&value)
 Forwards its argument and avoids copies for lvalue references.
template<typename Type>
meta_type resolve (const meta_ctx &ctx) noexcept
 Returns the meta type associated with a given type.
template<typename Type>
meta_type resolve () noexcept
 Returns the meta type associated with a given type.
meta_range< meta_type, typename internal::meta_context::bucket_type::const_iterator > resolve (const meta_ctx &ctx) noexcept
 Returns a range to use to visit all meta types.
meta_range< meta_type, typename internal::meta_context::bucket_type::const_iterator > resolve () noexcept
 Returns a range to use to visit all meta types.
meta_type resolve (const meta_ctx &ctx, const id_type alias) noexcept
 Returns the meta type associated with a given identifier, if any.
meta_type resolve (const id_type alias) noexcept
 Returns the meta type associated with a given identifier, if any.
meta_type resolve (const meta_ctx &ctx, const type_info &info) noexcept
 Returns the meta type associated with a given type info object.
meta_type resolve (const type_info &info) noexcept
 Returns the meta type associated with a given type info object.
template<meta_policy Policy = as_value_t, typename Type>
meta_any meta_dispatch (const meta_ctx &ctx, Type &&value)
 Wraps a value depending on the given policy.
template<meta_policy Policy = as_value_t, typename Type>
meta_any meta_dispatch (Type &&value)
 Wraps a value depending on the given policy.
template<typename Type>
meta_type meta_arg (const meta_ctx &ctx, const stl::size_t index) noexcept
 Returns the meta type of the i-th element of a list of arguments.
template<typename Type>
meta_type meta_arg (const stl::size_t index) noexcept
 Returns the meta type of the i-th element of a list of arguments.
template<typename Type, auto Data>
bool meta_setter (meta_handle instance, meta_any *const args)
 Sets the value of a given variable.
template<typename Type, auto Data>
bool meta_setter (meta_handle instance, meta_any value)
 Sets the value of a given variable.
template<typename Type, auto Data, meta_policy Policy = as_value_t>
meta_any meta_getter (meta_handle instance, meta_any *const args)
 Gets the value of a given variable.
template<typename Type, auto Data, meta_policy Policy = as_value_t>
meta_any meta_getter (meta_handle instance)
 Gets the value of a given variable.
template<typename Type, meta_policy Policy = as_value_t, typename Candidate>
meta_any meta_invoke (meta_handle instance, Candidate &&candidate, meta_any *const args)
 Tries to invoke an object given a list of erased parameters.
template<typename Type, auto Candidate, meta_policy Policy = as_value_t>
meta_any meta_invoke (meta_handle instance, meta_any *const args)
 Tries to invoke a function given a list of erased parameters.
template<typename Type, typename... Args>
meta_any meta_construct (const meta_ctx &ctx, meta_any *const args)
 Tries to construct an instance given a list of erased parameters.
template<typename Type, typename... Args>
meta_any meta_construct (meta_any *const args)
 Tries to construct an instance given a list of erased parameters.
template<typename Type, typename Policy = as_value_t, typename Candidate>
meta_any meta_construct (const meta_ctx &ctx, Candidate &&candidate, meta_any *const args)
 Tries to construct an instance given a list of erased parameters.
template<typename Type, meta_policy Policy = as_value_t, typename Candidate>
meta_any meta_construct (Candidate &&candidate, meta_any *const args)
 Tries to construct an instance given a list of erased parameters.
template<typename Type, auto Candidate, meta_policy Policy = as_value_t>
meta_any meta_construct (const meta_ctx &ctx, meta_any *const args)
 Tries to construct an instance given a list of erased parameters.
template<typename Type, auto Candidate, meta_policy Policy = as_value_t>
meta_any meta_construct (meta_any *const args)
 Tries to construct an instance given a list of erased parameters.
template<stl::size_t Member, typename Poly, typename... Args>
decltype(auto) poly_call (Poly &&self, Args &&...args)
 Shortcut for calling poly_base<Type>::invoke.
template<auto Candidate>
 delegate (connect_arg_t< Candidate >) -> delegate< stl::remove_pointer_t< internal::function_pointer_t< decltype(Candidate)> > >
 Deduction guide.
template<auto Candidate, typename Type>
 delegate (connect_arg_t< Candidate >, Type &&) -> delegate< stl::remove_pointer_t< internal::function_pointer_t< decltype(Candidate), Type > > >
 Deduction guide.
template<typename Ret, typename... Args>
 delegate (Ret(*)(const void *, Args...), const void *=nullptr) -> delegate< Ret(Args...)>
 Deduction guide.
template<typename Ret, typename... Args, typename Allocator>
 sink (sigh< Ret(Args...), Allocator > &) -> sink< sigh< Ret(Args...), Allocator > >
 Deduction guide.
template<typename Type, typename Entity, typename Allocator>
void davey (const meta_ctx &ctx, const basic_storage< Type, Entity, Allocator > &storage)
 ImGui-based introspection tool for storage types.
template<typename Type, typename Entity, typename Allocator>
void davey (const basic_storage< Type, Entity, Allocator > &storage)
 ImGui-based introspection tool for storage types.
template<typename... Get, typename... Exclude>
void davey (const meta_ctx &ctx, const basic_view< get_t< Get... >, exclude_t< Exclude... > > &view)
 ImGui-based introspection tool for view types.
template<typename... Get, typename... Exclude>
void davey (const basic_view< get_t< Get... >, exclude_t< Exclude... > > &view)
 ImGui-based introspection tool for view types.
template<typename Entity, typename Allocator>
void davey (const meta_ctx &ctx, const basic_registry< Entity, Allocator > &registry)
 ImGui-based introspection tool for registry types.
template<typename Entity, typename Allocator>
void davey (const basic_registry< Entity, Allocator > &registry)
 ImGui-based introspection tool for registry types.

Variables

template<typename Type>
constexpr bool enum_as_bitmask_v = enum_as_bitmask<Type>::value
 Helper variable template.
template<id_type Value>
monostate< Value > monostate_v {}
 Helper variable template.
template<typename Type>
constexpr bool is_tuple_v = is_tuple<Type>::value
 Helper variable template.
template<stl::size_t N>
constexpr choice_t< N > choice {}
 Variable template for the choice trick.
template<typename Type>
constexpr stl::size_t size_of_v = size_of<Type>::value
 Helper variable template.
template<auto Value, typename>
constexpr auto unpack_as_value = Value
 Helper variable template to be used to repeat the same value a number of times equal to the size of a given parameter pack.
template<typename Type, typename List>
constexpr stl::size_t type_list_index_v = type_list_index<Type, List>::value
 Helper variable template.
template<typename List, typename Type>
constexpr bool type_list_contains_v = type_list_contains<List, Type>::value
 Helper variable template.
template<stl::size_t Index, typename List>
constexpr auto value_list_element_v = value_list_element<Index, List>::value
 Helper type.
template<auto Value, typename List>
constexpr stl::size_t value_list_index_v = value_list_index<Value, List>::value
 Helper variable template.
template<typename List, auto Value>
constexpr bool value_list_contains_v = value_list_contains<List, Value>::value
 Helper variable template.
template<typename Func, typename Args>
constexpr bool is_applicable_v = is_applicable<Func, Args>::value
 Helper variable template.
template<typename Ret, typename Func, typename Args>
constexpr bool is_applicable_r_v = is_applicable_r<Ret, Func, Args>::value
 Helper variable template.
template<typename Type>
constexpr bool is_complete_v = is_complete<Type>::value
 Helper variable template.
template<typename Type>
constexpr bool is_iterator_v = is_iterator<Type>::value
 Helper variable template.
template<typename Type>
constexpr bool is_ebco_eligible_v = is_ebco_eligible<Type>::value
 Helper variable template.
template<typename Type>
constexpr bool is_transparent_v = is_transparent<Type>::value
 Helper variable template.
template<typename Type>
constexpr bool is_equality_comparable_v = is_equality_comparable<Type>::value
 Helper variable template.
constexpr null_t null {}
 Compile-time constant for null entities.
constexpr tombstone_t tombstone {}
 Compile-time constant for tombstone entities.
template<typename... Type>
constexpr exclude_t< Type... > exclude {}
 Variable template for exclusion lists.
template<typename... Type>
constexpr get_t< Type... > get {}
 Variable template for lists of observed elements.
template<typename... Type>
constexpr owned_t< Type... > owned {}
 Variable template for lists of owned elements.
constexpr stl::size_t meta_dynamic_extent = (stl::numeric_limits<stl::size_t>::max)()
 Used to identicate that a sequence container has not a fixed size.
constexpr meta_ctx_arg_t meta_ctx_arg {}
 Constant of type meta_context_arg_t used to disambiguate calls.
template<typename Type>
constexpr bool is_meta_policy_v = is_meta_policy<Type>::value
 Helper variable template.
template<typename Type>
constexpr auto is_meta_pointer_like_v = is_meta_pointer_like<Type>::value
 Helper variable template.
template<auto Candidate>
constexpr connect_arg_t< Candidate > connect_arg {}
 Constant of type connect_arg_t used to disambiguate calls.

Detailed Description

EnTT default namespace.

Typedef Documentation

◆ any

using entt::any = basic_any<>

Alias declaration for the most common use case.

Definition at line 32 of file fwd.hpp.

◆ const_handle

Alias declaration for the most common use case.

Definition at line 105 of file fwd.hpp.

◆ const_handle_view

template<typename... Args>
using entt::const_handle_view = basic_handle<const registry, Args...>

Alias declaration for the most common use case.

Template Parameters
ArgsOther template parameters.

Definition at line 119 of file fwd.hpp.

◆ const_runtime_view

Alias declaration for the most common use case.

Definition at line 134 of file fwd.hpp.

◆ constness_as_t

template<typename To, typename From>
using entt::constness_as_t = constness_as<To, From>::type

Alias template to facilitate the transcription of the constness.

Template Parameters
ToThe type to which to transcribe the constness.
FromThe type from which to transcribe the constness.

Definition at line 826 of file type_traits.hpp.

◆ continuous_loader

Alias declaration for the most common use case.

Definition at line 128 of file fwd.hpp.

◆ dispatcher

Alias declaration for the most common use case.

Definition at line 28 of file fwd.hpp.

◆ flow

Alias declaration for the most common use case.

Definition at line 24 of file fwd.hpp.

◆ group

template<typename Owned, typename Get = get_t<>, typename Exclude = exclude_t<>>
using entt::group = basic_group<type_list_transform_t<Owned, storage_for>, type_list_transform_t<Get, storage_for>, type_list_transform_t<Exclude, storage_for>>

Alias declaration for the most common use case.

Template Parameters
OwnedTypes of storage owned by the group.
GetTypes of storage observed by the group.
ExcludeTypes of storage used to filter the group.

Definition at line 287 of file fwd.hpp.

◆ handle

Alias declaration for the most common use case.

Definition at line 102 of file fwd.hpp.

◆ handle_view

template<typename... Args>
using entt::handle_view = basic_handle<registry, Args...>

Alias declaration for the most common use case.

Template Parameters
ArgsOther template parameters.

Definition at line 112 of file fwd.hpp.

◆ hashed_string

Aliases for common character types.

Definition at line 41 of file fwd.hpp.

◆ hashed_wstring

Aliases for common character types.

Definition at line 44 of file fwd.hpp.

◆ id_type

using entt::id_type = stl::uint32_t

Alias declaration for type identifiers.

Definition at line 29 of file fwd.hpp.

◆ integral_constant

template<auto Value>
using entt::integral_constant = stl::integral_constant<decltype(Value), Value>

Wraps a static constant.

Template Parameters
ValueA static constant.

Definition at line 78 of file type_traits.hpp.

◆ member_class_t

template<typename Member>
using entt::member_class_t = member_class<Member>::type

Helper type.

Template Parameters
MemberA pointer to a non-static member object or function.

Definition at line 858 of file type_traits.hpp.

◆ meta_function_helper_t

template<typename Type, typename Candidate>
using entt::meta_function_helper_t = meta_function_helper<Type, Candidate>::type

Helper type.

Template Parameters
TypeReflected type to which the meta function is associated.
CandidateThe actual function to associate with the reflected type.

Definition at line 153 of file utility.hpp.

◆ meta_range

template<typename Type, stl::forward_iterator It>
using entt::meta_range = iterable_adaptor<internal::meta_range_iterator<Type, It>>

Iterable range to use to iterate all types of meta objects.

Template Parameters
TypeType of meta objects returned.
ItType of forward iterator.

Definition at line 115 of file range.hpp.

◆ nth_argument_t

template<stl::size_t Index, typename Candidate>
using entt::nth_argument_t = nth_argument<Index, Candidate>::type

Helper type.

Template Parameters
IndexThe index of the argument to extract.
CandidateA valid function, member function or data member type.

Definition at line 893 of file type_traits.hpp.

◆ organizer

Alias declaration for the most common use case.

Definition at line 99 of file fwd.hpp.

◆ poly

template<typename Concept>
using entt::poly = basic_poly<Concept>

Alias declaration for the most common use case.

Template Parameters
ConceptConcept descriptor.

Definition at line 17 of file fwd.hpp.

◆ process

using entt::process = basic_process<stl::uint32_t>

Alias declaration for the most common use case.

Definition at line 13 of file fwd.hpp.

◆ reactive_mixin

template<typename Type>
using entt::reactive_mixin = basic_reactive_mixin<Type, basic_registry<typename Type::entity_type, typename Type::base_type::allocator_type>>

Alias declaration for the most common use case.

Template Parameters
TypeUnderlying storage type.

Definition at line 93 of file fwd.hpp.

◆ registry

Alias declaration for the most common use case.

Definition at line 96 of file fwd.hpp.

◆ runtime_view

Alias declaration for the most common use case.

Definition at line 131 of file fwd.hpp.

◆ scheduler

using entt::scheduler = basic_scheduler<stl::uint32_t>

Alias declaration for the most common use case.

Definition at line 19 of file fwd.hpp.

◆ sigh_mixin

template<typename Type>
using entt::sigh_mixin = basic_sigh_mixin<Type, basic_registry<typename Type::entity_type, typename Type::base_type::allocator_type>>

Alias declaration for the most common use case.

Template Parameters
TypeUnderlying storage type.

Definition at line 86 of file fwd.hpp.

◆ snapshot

Alias declaration for the most common use case.

Definition at line 122 of file fwd.hpp.

◆ snapshot_loader

Alias declaration for the most common use case.

Definition at line 125 of file fwd.hpp.

◆ sparse_set

Alias declaration for the most common use case.

Definition at line 72 of file fwd.hpp.

◆ storage

template<typename Type>
using entt::storage = basic_storage<Type>

Alias declaration for the most common use case.

Template Parameters
TypeElement type.

Definition at line 79 of file fwd.hpp.

◆ storage_for_t

template<typename... Args>
using entt::storage_for_t = storage_for<Args...>::type

Helper type.

Template Parameters
ArgsArguments to forward.

Definition at line 270 of file fwd.hpp.

◆ storage_type_t

template<typename... Args>
using entt::storage_type_t = storage_type<Args...>::type

Helper type.

Template Parameters
ArgsArguments to forward.

Definition at line 251 of file fwd.hpp.

◆ table

template<typename... Type>
using entt::table = basic_table<stl::vector<Type>...>

Alias declaration for the most common use case.

Template Parameters
TypeElement types.

Definition at line 34 of file fwd.hpp.

◆ tag

template<id_type Value>
using entt::tag = integral_constant<Value>

Alias template to facilitate the creation of named values.

Template Parameters
ValueA constant value at least convertible to id_type.

Definition at line 85 of file type_traits.hpp.

◆ type_list_cat_t

template<typename... List>
using entt::type_list_cat_t = type_list_cat<List...>::type

Helper type.

Template Parameters
ListType lists to concatenate.

Definition at line 233 of file type_traits.hpp.

◆ type_list_diff_t

template<typename... List>
using entt::type_list_diff_t = type_list_diff<List...>::type

Helper type.

Template Parameters
ListType lists between which to compute the difference.

Definition at line 316 of file type_traits.hpp.

◆ type_list_element_t

template<stl::size_t Index, typename List>
using entt::type_list_element_t = type_list_element<Index, List>::type

Helper type.

Template Parameters
IndexIndex of the type to return.
ListType list to search into.

Definition at line 130 of file type_traits.hpp.

◆ type_list_transform_t

template<typename List, template< typename... > class Op>
using entt::type_list_transform_t = type_list_transform<List, Op>::type

Helper type.

Template Parameters
ListType list.
OpUnary operation as template class with a type member named type.

Definition at line 340 of file type_traits.hpp.

◆ type_list_unique_t

template<typename List>
using entt::type_list_unique_t = type_list_unique<List>::type

Helper type.

Template Parameters
ListType list.

Definition at line 268 of file type_traits.hpp.

◆ unpack_as_type

template<typename Type, typename>
using entt::unpack_as_type = Type

Using declaration to be used to repeat the same type a number of times equal to the size of a given parameter pack.

Template Parameters
TypeA type to repeat.

Definition at line 63 of file type_traits.hpp.

◆ value_list_cat_t

template<typename... List>
using entt::value_list_cat_t = value_list_cat<List...>::type

Helper type.

Template Parameters
ListValue lists to concatenate.

Definition at line 498 of file type_traits.hpp.

◆ value_list_diff_t

template<typename... List>
using entt::value_list_diff_t = value_list_diff<List...>::type

Helper type.

Template Parameters
ListValue lists between which to compute the difference.

Definition at line 578 of file type_traits.hpp.

◆ value_list_element_t

template<stl::size_t Index, typename List>
using entt::value_list_element_t = value_list_element<Index, List>::type

Helper type.

Template Parameters
IndexIndex of the type to return.
ListValue list to search into.

Definition at line 387 of file type_traits.hpp.

◆ value_list_unique_t

template<typename Type>
using entt::value_list_unique_t = value_list_unique<Type>::type

Helper type.

Template Parameters
TypeA value list.

Definition at line 530 of file type_traits.hpp.

◆ view

template<typename Get, typename Exclude = exclude_t<>>
using entt::view = basic_view<type_list_transform_t<Get, storage_for>, type_list_transform_t<Exclude, storage_for>>

Alias declaration for the most common use case.

Template Parameters
GetTypes of storage iterated by the view.
ExcludeTypes of storage used to filter the view.

Definition at line 278 of file fwd.hpp.

Enumeration Type Documentation

◆ any_policy

enum class entt::any_policy : stl::uint8_t
strong

Possible modes of an any object.

Enumerator
empty 

Default mode, no element available.

dynamic 

Owning mode, dynamically allocated element.

embedded 

Owning mode, embedded element.

ref 

Aliasing mode, non-const reference.

cref 

Const aliasing mode, const reference.

Definition at line 11 of file fwd.hpp.

◆ deletion_policy

enum class entt::deletion_policy : stl::uint8_t
strong

Storage deletion policy.

Enumerator
swap_and_pop 

Swap-and-pop deletion policy.

in_place 

In-place deletion policy.

swap_only 

Swap-only deletion policy.

unspecified 

Unspecified deletion policy.

Definition at line 18 of file fwd.hpp.

◆ entity

enum class entt::entity : id_type
strong

Default entity identifier.

Definition at line 15 of file fwd.hpp.

Function Documentation

◆ allocate_unique()

template<typename Type, typename Allocator, typename... Args>
auto entt::allocate_unique ( Allocator & allocator,
Args &&... args )
constexpr

Allows stl::unique_ptr to use allocators (waiting for C++20).

Template Parameters
TypeType of object to allocate for and to construct.
AllocatorType of allocator used to manage memory and elements.
ArgsTypes of arguments to use to construct the object.
Parameters
allocatorThe allocator to use.
argsParameters to use to construct the object.
Returns
A properly initialized unique pointer with a custom deleter.

Definition at line 94 of file memory.hpp.

◆ any_cast() [1/5]

template<typename Type, stl::size_t Len, stl::size_t Align>
stl::remove_const_t< Type > entt::any_cast ( basic_any< Len, Align > && data)
nodiscardnoexcept

Performs type-safe access to the contained object.

Template Parameters
TypeType to which conversion is required.
LenSize of the buffer reserved for the small buffer optimization.
AlignAlignment requirement.
Parameters
dataTarget any object.
Returns
The element converted to the requested type.

Definition at line 563 of file any.hpp.

◆ any_cast() [2/5]

template<typename Type, stl::size_t Len, stl::size_t Align>
stl::remove_const_t< Type > entt::any_cast ( basic_any< Len, Align > & data)
nodiscardnoexcept

Performs type-safe access to the contained object.

Template Parameters
TypeType to which conversion is required.
LenSize of the buffer reserved for the small buffer optimization.
AlignAlignment requirement.
Parameters
dataTarget any object.
Returns
The element converted to the requested type.

Definition at line 553 of file any.hpp.

◆ any_cast() [3/5]

template<typename Type, stl::size_t Len, stl::size_t Align>
Type * entt::any_cast ( basic_any< Len, Align > * data)
nodiscardnoexcept

Performs type-safe access to the contained object.

Template Parameters
TypeType to which conversion is required.
LenSize of the buffer reserved for the small buffer optimization.
AlignAlignment requirement.
Parameters
dataTarget any object.
Returns
The element converted to the requested type.

Definition at line 585 of file any.hpp.

◆ any_cast() [4/5]

template<typename Type, stl::size_t Len, stl::size_t Align>
stl::remove_const_t< Type > entt::any_cast ( const basic_any< Len, Align > & data)
nodiscardnoexcept

Performs type-safe access to the contained object.

Template Parameters
TypeType to which conversion is required.
LenSize of the buffer reserved for the small buffer optimization.
AlignAlignment requirement.
Parameters
dataTarget any object.
Returns
The element converted to the requested type.

Definition at line 545 of file any.hpp.

◆ any_cast() [5/5]

template<typename Type, stl::size_t Len, stl::size_t Align>
const Type * entt::any_cast ( const basic_any< Len, Align > * data)
nodiscardnoexcept

Performs type-safe access to the contained object.

Template Parameters
TypeType to which conversion is required.
LenSize of the buffer reserved for the small buffer optimization.
AlignAlignment requirement.
Parameters
dataTarget any object.
Returns
The element converted to the requested type.

Definition at line 579 of file any.hpp.

◆ basic_hashed_string() [1/2]

template<typename Char>
entt::basic_hashed_string ( const Char * str,
stl::size_t len ) -> basic_hashed_string< Char >

Deduction guide.

Template Parameters
CharCharacter type.
Parameters
strHuman-readable identifier.
lenLength of the string to hash.

◆ basic_hashed_string() [2/2]

template<typename Char, stl::size_t N>
entt::basic_hashed_string ( const Char(&) str[N]) -> basic_hashed_string< Char >

Deduction guide.

Template Parameters
CharCharacter type.
NNumber of characters of the identifier.
Parameters
strHuman-readable identifier.

◆ basic_view() [1/2]

template<typename... Get, typename... Exclude>
entt::basic_view ( stl::tuple< Get &... > ,
stl::tuple< Exclude &... > = {} ) -> basic_view< get_t< Get... >, exclude_t< Exclude... > >

Deduction guide.

Template Parameters
GetTypes of elements iterated by the view.
ExcludeTypes of elements used to filter the view.

◆ basic_view() [2/2]

template<typename... Type>
entt::basic_view ( Type &... storage) -> basic_view< get_t< Type... >, exclude_t<> >

Deduction guide.

Template Parameters
TypeType of storage classes used to create the view.
Parameters
storageThe storage for the types to iterate.

◆ compressed_pair()

template<typename Type, typename Other>
entt::compressed_pair ( Type && ,
Other &&  ) -> compressed_pair< stl::decay_t< Type >, stl::decay_t< Other > >

Deduction guide.

Template Parameters
TypeType of value to use to initialize the first element.
OtherType of value to use to initialize the second element.

◆ davey() [1/6]

template<typename Entity, typename Allocator>
void entt::davey ( const basic_registry< Entity, Allocator > & registry)

ImGui-based introspection tool for registry types.

Template Parameters
EntityRegistry entity type.
AllocatorRegistry allocator type.
Parameters
registryAn instance of the registry type.

Definition at line 337 of file davey.hpp.

◆ davey() [2/6]

template<typename Type, typename Entity, typename Allocator>
void entt::davey ( const basic_storage< Type, Entity, Allocator > & storage)

ImGui-based introspection tool for storage types.

Template Parameters
TypeStorage element type.
EntityStorage entity type.
AllocatorStorage allocator type.
Parameters
storageAn instance of the storage type.

Definition at line 258 of file davey.hpp.

◆ davey() [3/6]

template<typename... Get, typename... Exclude>
void entt::davey ( const basic_view< get_t< Get... >, exclude_t< Exclude... > > & view)

ImGui-based introspection tool for view types.

Template Parameters
GetTypes of storage iterated by the view.
ExcludeTypes of storage used to filter the view.
Parameters
viewAn instance of the view type.

Definition at line 281 of file davey.hpp.

◆ davey() [4/6]

template<typename Entity, typename Allocator>
void entt::davey ( const meta_ctx & ctx,
const basic_registry< Entity, Allocator > & registry )

ImGui-based introspection tool for registry types.

Template Parameters
EntityRegistry entity type.
AllocatorRegistry allocator type.
Parameters
ctxThe context from which to search for meta types.
registryAn instance of the registry type.

Definition at line 293 of file davey.hpp.

◆ davey() [5/6]

template<typename Type, typename Entity, typename Allocator>
void entt::davey ( const meta_ctx & ctx,
const basic_storage< Type, Entity, Allocator > & storage )

ImGui-based introspection tool for storage types.

Template Parameters
TypeStorage element type.
EntityStorage entity type.
AllocatorStorage allocator type.
Parameters
ctxThe context from which to search for meta types.
storageAn instance of the storage type.

Definition at line 246 of file davey.hpp.

◆ davey() [6/6]

template<typename... Get, typename... Exclude>
void entt::davey ( const meta_ctx & ctx,
const basic_view< get_t< Get... >, exclude_t< Exclude... > > & view )

ImGui-based introspection tool for view types.

Template Parameters
GetTypes of storage iterated by the view.
ExcludeTypes of storage used to filter the view.
Parameters
ctxThe context from which to search for meta types.
viewAn instance of the view type.

Definition at line 270 of file davey.hpp.

◆ delegate() [1/3]

template<auto Candidate>
entt::delegate ( connect_arg_t< Candidate > ) -> delegate< stl::remove_pointer_t< internal::function_pointer_t< decltype(Candidate)> > >

Deduction guide.

Template Parameters
CandidateFunction or member to connect to the delegate.

◆ delegate() [2/3]

template<auto Candidate, typename Type>
entt::delegate ( connect_arg_t< Candidate > ,
Type &&  ) -> delegate< stl::remove_pointer_t< internal::function_pointer_t< decltype(Candidate), Type > > >

Deduction guide.

Template Parameters
CandidateFunction or member to connect to the delegate.
TypeType of class or type of payload.

◆ delegate() [3/3]

template<typename Ret, typename... Args>
entt::delegate ( Ret(*  )(const void *, Args...),
const void * = nullptr ) -> delegate< Ret(Args...)>

Deduction guide.

Template Parameters
RetReturn type of a function type.
ArgsTypes of arguments of a function type.

◆ dereference_meta_pointer_like()

template<typename Type>
decltype(auto) entt::dereference_meta_pointer_like ( const Type & value)

ADL based lookup function for dereferencing meta pointer-like types.

Template Parameters
TypeElement type.
Parameters
valueA pointer-like object.
Returns
The value returned from the dereferenced pointer.

Definition at line 13 of file adl_pointer.hpp.

◆ dot() [1/2]

template<typename Graph>
void entt::dot ( stl::ostream & out,
const Graph & graph )

Outputs a graph in dot format.

Template Parameters
GraphGraph type, valid as long as it exposes edges and vertices.
Parameters
outA standard output stream.
graphThe graph to output.

Definition at line 50 of file dot.hpp.

◆ dot() [2/2]

template<typename Graph>
requires stl::derived_from<typename Graph::graph_category, directed_tag>
void entt::dot ( stl::ostream & out,
const Graph & graph,
stl::invocable< stl::ostream &, typename Graph::vertex_type > auto writer )

Outputs a graph in dot format.

Template Parameters
GraphGraph type, valid as long as it exposes edges and vertices.
Parameters
outA standard output stream.
graphThe graph to output.
writerVertex decorator object.

Definition at line 19 of file dot.hpp.

◆ fast_mod()

template<stl::unsigned_integral Type>
Type entt::fast_mod ( const Type value,
const stl::size_t mod )
nodiscardconstexprnoexcept

Fast module utility function (powers of two only).

Template Parameters
TypeUnsigned integer type.
Parameters
valueA value of unsigned integer type.
modModulus, it must be a power of two.
Returns
The common remainder.

Definition at line 19 of file bit.hpp.

◆ forward_apply()

template<typename Func>
entt::forward_apply ( Func ) -> forward_apply< stl::remove_cvref_t< Func > >

Deduction guide.

Template Parameters
FuncType of underlying invocable object.

◆ forward_as_any()

template<stl::size_t Len = basic_any<>::length, stl::size_t Align = basic_any<Len>::alignment, typename Type>
basic_any< Len, Align > entt::forward_as_any ( Type && value)
nodiscard

Forwards its argument and avoids copies for lvalue references.

Template Parameters
LenSize of the buffer reserved for the small buffer optimization.
AlignOptional alignment requirement.
TypeType of argument to use to construct the new instance.
Parameters
valueParameter to use to construct the instance.
Returns
A properly initialized and not necessarily owning wrapper.

Definition at line 617 of file any.hpp.

◆ forward_as_meta() [1/2]

meta_any entt::forward_as_meta ( auto && value)
nodiscard

Forwards its argument and avoids copies for lvalue references.

Parameters
valueParameter to use to construct the instance.
Returns
A properly initialized and not necessarily owning wrapper.

Definition at line 671 of file meta.hpp.

◆ forward_as_meta() [2/2]

meta_any entt::forward_as_meta ( const meta_ctx & ctx,
auto && value )
nodiscard

Forwards its argument and avoids copies for lvalue references.

Parameters
valueParameter to use to construct the instance.
ctxThe context from which to search for meta types.
Returns
A properly initialized and not necessarily owning wrapper.

Definition at line 662 of file meta.hpp.

◆ invoke()

template<auto Member, typename Registry = stl::decay_t<nth_argument_t<0u, decltype(Member)>>>
void entt::invoke ( Registry & reg,
const typename Registry::entity_type entt )

Helper to create a listener that directly invokes a member function.

Template Parameters
MemberMember function to invoke on an element of the given type.
RegistryBasic registry type.
Parameters
regA registry that contains the given entity and its elements.
enttEntity from which to get the element.

Definition at line 108 of file helper.hpp.

◆ make_any()

template<typename Type, stl::size_t Len = basic_any<>::length, stl::size_t Align = basic_any<Len>::alignment, typename... Args>
basic_any< Len, Align > entt::make_any ( Args &&... args)
nodiscard

Constructs a wrapper from a given type, passing it all arguments.

Template Parameters
TypeType of object to use to initialize the wrapper.
LenSize of the buffer reserved for the small buffer optimization.
AlignOptional alignment requirement.
ArgsTypes of arguments to use to construct the new instance.
Parameters
argsParameters to use to construct the instance.
Returns
A properly initialized wrapper for an object of the given type.

Definition at line 604 of file any.hpp.

◆ make_obj_using_allocator()

template<typename Type, typename... Args>
Type entt::make_obj_using_allocator ( const auto & allocator,
Args &&... args )
constexpr

Uses-allocator construction utility (waiting for C++20).

Primarily intended for internal use. Creates an object of a given type by means of uses-allocator construction.

Template Parameters
TypeType of object to create.
ArgsTypes of arguments to use to construct the object.
Parameters
allocatorThe allocator to use.
argsParameters to use to construct the object.
Returns
A newly created object of the given type.

Definition at line 201 of file memory.hpp.

◆ meta_arg() [1/2]

template<typename Type>
meta_type entt::meta_arg ( const meta_ctx & ctx,
const stl::size_t index )
nodiscardnoexcept

Returns the meta type of the i-th element of a list of arguments.

Template Parameters
TypeType list of the actual types of arguments.
Parameters
ctxThe context from which to search for meta types.
indexThe index of the element for which to return the meta type.
Returns
The meta type of the i-th element of the list of arguments.

Definition at line 252 of file utility.hpp.

◆ meta_arg() [2/2]

template<typename Type>
meta_type entt::meta_arg ( const stl::size_t index)
nodiscardnoexcept

Returns the meta type of the i-th element of a list of arguments.

Template Parameters
TypeType list of the actual types of arguments.
Parameters
indexThe index of the element for which to return the meta type.
Returns
The meta type of the i-th element of the list of arguments.

Definition at line 264 of file utility.hpp.

◆ meta_construct() [1/6]

template<typename Type, meta_policy Policy = as_value_t, typename Candidate>
meta_any entt::meta_construct ( Candidate && candidate,
meta_any *const args )
nodiscard

Tries to construct an instance given a list of erased parameters.

Template Parameters
TypeReflected type to which the object to invoke is associated.
PolicyOptional policy (no policy set by default).
CandidateThe type of the actual object to invoke.
Parameters
candidateThe actual object to invoke.
argsParameters to use to invoke the object.
Returns
A meta any containing the returned value, if any.

Definition at line 462 of file utility.hpp.

◆ meta_construct() [2/6]

template<typename Type, typename Policy = as_value_t, typename Candidate>
meta_any entt::meta_construct ( const meta_ctx & ctx,
Candidate && candidate,
meta_any *const args )
nodiscard

Tries to construct an instance given a list of erased parameters.

Warning
The context provided is used only for the return type.
It's up to the caller to bind the arguments to the right context(s).
Template Parameters
TypeReflected type to which the object to invoke is associated.
PolicyOptional policy (no policy set by default).
CandidateThe type of the actual object to invoke.
Parameters
ctxThe context from which to search for meta types.
candidateThe actual object to invoke.
argsParameters to use to invoke the object.
Returns
A meta any containing the returned value, if any.

Definition at line 442 of file utility.hpp.

◆ meta_construct() [3/6]

template<typename Type, typename... Args>
meta_any entt::meta_construct ( const meta_ctx & ctx,
meta_any *const args )
nodiscard

Tries to construct an instance given a list of erased parameters.

Warning
The context provided is used only for the return type.
It's up to the caller to bind the arguments to the right context(s).
Template Parameters
TypeActual type of the instance to construct.
ArgsTypes of arguments expected.
Parameters
ctxThe context from which to search for meta types.
argsParameters to use to construct the instance.
Returns
A meta any containing the new instance, if any.

Definition at line 410 of file utility.hpp.

◆ meta_construct() [4/6]

template<typename Type, auto Candidate, meta_policy Policy = as_value_t>
meta_any entt::meta_construct ( const meta_ctx & ctx,
meta_any *const args )
nodiscard

Tries to construct an instance given a list of erased parameters.

Warning
The context provided is used only for the return type.
It's up to the caller to bind the arguments to the right context(s).
Template Parameters
TypeReflected type to which the function is associated.
CandidateThe actual function to invoke.
PolicyOptional policy (no policy set by default).
Parameters
ctxThe context from which to search for meta types.
argsParameters to use to invoke the function.
Returns
A meta any containing the returned value, if any.

Definition at line 481 of file utility.hpp.

◆ meta_construct() [5/6]

template<typename Type, typename... Args>
meta_any entt::meta_construct ( meta_any *const args)
nodiscard

Tries to construct an instance given a list of erased parameters.

Template Parameters
TypeActual type of the instance to construct.
ArgsTypes of arguments expected.
Parameters
argsParameters to use to construct the instance.
Returns
A meta any containing the new instance, if any.

Definition at line 422 of file utility.hpp.

◆ meta_construct() [6/6]

template<typename Type, auto Candidate, meta_policy Policy = as_value_t>
meta_any entt::meta_construct ( meta_any *const args)
nodiscard

Tries to construct an instance given a list of erased parameters.

Template Parameters
TypeReflected type to which the function is associated.
CandidateThe actual function to invoke.
PolicyOptional policy (no policy set by default).
Parameters
argsParameters to use to invoke the function.
Returns
A meta any containing the returned value, if any.

Definition at line 494 of file utility.hpp.

◆ meta_dispatch() [1/2]

template<meta_policy Policy = as_value_t, typename Type>
meta_any entt::meta_dispatch ( const meta_ctx & ctx,
Type && value )
nodiscard

Wraps a value depending on the given policy.

This function always returns a wrapped value in the requested context.
Therefore, if the passed value is itself a wrapped object with a different context, it undergoes a rebinding to the requested context.

Template Parameters
PolicyOptional policy (no policy set by default).
TypeType of value to wrap.
Parameters
ctxThe context from which to search for meta types.
valueValue to wrap.
Returns
A meta any containing the returned value, if any.

Definition at line 169 of file utility.hpp.

◆ meta_dispatch() [2/2]

template<meta_policy Policy = as_value_t, typename Type>
meta_any entt::meta_dispatch ( Type && value)
nodiscard

Wraps a value depending on the given policy.

Template Parameters
PolicyOptional policy (no policy set by default).
TypeType of value to wrap.
Parameters
valueValue to wrap.
Returns
A meta any containing the returned value, if any.

Definition at line 190 of file utility.hpp.

◆ meta_getter() [1/2]

template<typename Type, auto Data, meta_policy Policy = as_value_t>
meta_any entt::meta_getter ( meta_handle instance)
nodiscard

Gets the value of a given variable.

Template Parameters
TypeReflected type to which the variable is associated.
DataThe actual variable to get.
PolicyOptional policy (no policy set by default).
Parameters
instanceAn opaque instance of the underlying type, if required.
Returns
A meta any containing the value of the underlying variable.

Definition at line 363 of file utility.hpp.

◆ meta_getter() [2/2]

template<typename Type, auto Data, meta_policy Policy = as_value_t>
meta_any entt::meta_getter ( meta_handle instance,
meta_any *const args )
nodiscard

Gets the value of a given variable.

Template Parameters
TypeReflected type to which the variable is associated.
DataThe actual variable to get.
PolicyOptional policy (no policy set by default).
Parameters
instanceAn opaque instance of the underlying type, if required.
argsParameters to use to set the variable.
Returns
A meta any containing the value of the underlying variable.

Definition at line 330 of file utility.hpp.

◆ meta_invoke() [1/2]

template<typename Type, meta_policy Policy = as_value_t, typename Candidate>
meta_any entt::meta_invoke ( meta_handle instance,
Candidate && candidate,
meta_any *const args )
nodiscard

Tries to invoke an object given a list of erased parameters.

Template Parameters
TypeReflected type to which the object to invoke is associated.
PolicyOptional policy (no policy set by default).
CandidateThe type of the actual object to invoke.
Parameters
instanceAn opaque instance of the underlying type, if required.
candidateThe actual object to invoke.
argsParameters to use to invoke the object.
Returns
A meta any containing the returned value, if any.

Definition at line 378 of file utility.hpp.

◆ meta_invoke() [2/2]

template<typename Type, auto Candidate, meta_policy Policy = as_value_t>
meta_any entt::meta_invoke ( meta_handle instance,
meta_any *const args )
nodiscard

Tries to invoke a function given a list of erased parameters.

Template Parameters
TypeReflected type to which the function is associated.
CandidateThe actual function to invoke.
PolicyOptional policy (no policy set by default).
Parameters
instanceAn opaque instance of the underlying type, if required.
argsParameters to use to invoke the function.
Returns
A meta any containing the returned value, if any.

Definition at line 392 of file utility.hpp.

◆ meta_reset() [1/6]

template<typename Type>
void entt::meta_reset ( )
noexcept

Resets a type and all its parts.

See also
meta_reset
Template Parameters
TypeType to reset.

Definition at line 630 of file factory.hpp.

◆ meta_reset() [2/6]

void entt::meta_reset ( )
inlinenoexcept

Resets all meta types.

See also
meta_reset

Definition at line 650 of file factory.hpp.

◆ meta_reset() [3/6]

void entt::meta_reset ( const id_type alias)
inlinenoexcept

Resets a type and all its parts.

Resets a type and all its data members, member functions and properties, as well as its constructors, destructors and conversion functions if any.
Base classes aren't reset but the link between the two types is removed.

The type is also removed from the set of searchable types.

Parameters
aliasUnique identifier.

Definition at line 605 of file factory.hpp.

◆ meta_reset() [4/6]

template<typename Type>
void entt::meta_reset ( meta_ctx & ctx)
noexcept

Resets a type and all its parts.

See also
meta_reset
Template Parameters
TypeType to reset.
Parameters
ctxThe context from which to reset meta types.

Definition at line 618 of file factory.hpp.

◆ meta_reset() [5/6]

void entt::meta_reset ( meta_ctx & ctx)
inlinenoexcept

Resets all meta types.

See also
meta_reset
Parameters
ctxThe context from which to reset meta types.

Definition at line 641 of file factory.hpp.

◆ meta_reset() [6/6]

void entt::meta_reset ( meta_ctx & ctx,
const id_type alias )
inlinenoexcept

Resets a type and all its parts.

Resets a type and all its data members, member functions and properties, as well as its constructors, destructors and conversion functions if any.
Base classes aren't reset but the link between the two types is removed.

The type is also removed from the set of searchable types.

Parameters
aliasUnique identifier.
ctxThe context from which to reset meta types.

Definition at line 583 of file factory.hpp.

◆ meta_setter() [1/2]

template<typename Type, auto Data>
bool entt::meta_setter ( meta_handle instance,
meta_any *const args )
nodiscard

Sets the value of a given variable.

Template Parameters
TypeReflected type to which the variable is associated.
DataThe actual variable to set.
Parameters
instanceAn opaque instance of the underlying type, if required.
argsParameters to use to set the variable.
Returns
True in case of success, false otherwise.

Definition at line 277 of file utility.hpp.

◆ meta_setter() [2/2]

template<typename Type, auto Data>
bool entt::meta_setter ( meta_handle instance,
meta_any value )
nodiscard

Sets the value of a given variable.

Template Parameters
TypeReflected type to which the variable is associated.
DataThe actual variable to set.
Parameters
instanceAn opaque instance of the underlying type, if required.
valueParameter to use to set the variable.
Returns
True in case of success, false otherwise.

Definition at line 316 of file utility.hpp.

◆ operator""_hs()

hashed_string entt::literals::operator""_hs ( const char * str,
stl::size_t  )
nodiscardconstexprnoexcept

User defined literal for hashed strings.

Parameters
strThe literal without its suffix.
Returns
A properly initialized hashed string.

Definition at line 243 of file hashed_string.hpp.

◆ operator""_hws()

hashed_wstring entt::literals::operator""_hws ( const wchar_t * str,
stl::size_t  )
nodiscardconstexprnoexcept

User defined literal for hashed wstrings.

Parameters
strThe literal without its suffix.
Returns
A properly initialized hashed wstring.

Definition at line 252 of file hashed_string.hpp.

◆ operator+() [1/2]

template<typename... Type, typename... Other>
type_list< Type..., Other... > entt::operator+ ( type_list< Type... > ,
type_list< Other... >  )
constexpr

Concatenates multiple type lists.

Template Parameters
TypeTypes provided by the first type list.
OtherTypes provided by the second type list.
Returns
A type list composed by the types of both the type lists.

Definition at line 191 of file type_traits.hpp.

◆ operator+() [2/2]

template<auto... Value, auto... Other>
value_list< Value..., Other... > entt::operator+ ( value_list< Value... > ,
value_list< Other... >  )
constexpr

Concatenates multiple value lists.

Template Parameters
ValueValues provided by the first value list.
OtherValues provided by the second value list.
Returns
A value list composed by the values of both the value lists.

Definition at line 456 of file type_traits.hpp.

◆ overload() [1/2]

template<typename Func>
auto entt::overload ( Func * func)
nodiscardconstexprnoexcept

Constant utility to disambiguate overloaded functions.

Template Parameters
FuncFunction type of the desired overload.
Parameters
funcA valid pointer to a function.
Returns
Pointer to the function.

Definition at line 28 of file utility.hpp.

◆ overload() [2/2]

template<typename Type, typename Class>
auto entt::overload ( Type Class::* member)
nodiscardconstexprnoexcept

Constant utility to disambiguate overloaded members of a class.

Template Parameters
TypeType of the desired overload.
ClassType of class to which the member belongs.
Parameters
memberA valid pointer to a member.
Returns
Pointer to the member.

Definition at line 17 of file utility.hpp.

◆ overloaded()

template<typename... Func>
entt::overloaded ( Func... ) -> overloaded< Func... >

Deduction guide.

Template Parameters
FuncTypes of function objects.

◆ poly_call()

template<stl::size_t Member, typename Poly, typename... Args>
decltype(auto) entt::poly_call ( Poly && self,
Args &&... args )

Shortcut for calling poly_base<Type>::invoke.

Template Parameters
MemberIndex of the function to invoke.
PolyA fully defined poly object.
ArgsTypes of arguments to pass to the function.
Parameters
selfA reference to the poly object that made the call.
argsThe arguments to pass to the function.
Returns
The return value of the invoked function, if any.

Definition at line 177 of file poly.hpp.

◆ propagate_on_container_copy_assignment()

template<typename Allocator>
void entt::propagate_on_container_copy_assignment ( Allocator & lhs,
Allocator & rhs )
constexprnoexcept

Utility function to design allocation-aware containers.

Template Parameters
AllocatorType of allocator.
Parameters
lhsA valid allocator.
rhsAnother valid allocator.

Definition at line 20 of file memory.hpp.

◆ propagate_on_container_move_assignment()

template<typename Allocator>
void entt::propagate_on_container_move_assignment ( Allocator & lhs,
Allocator & rhs )
constexprnoexcept

Utility function to design allocation-aware containers.

Template Parameters
AllocatorType of allocator.
Parameters
lhsA valid allocator.
rhsAnother valid allocator.

Definition at line 33 of file memory.hpp.

◆ propagate_on_container_swap()

template<typename Allocator>
void entt::propagate_on_container_swap ( Allocator & lhs,
Allocator & rhs )
constexprnoexcept

Utility function to design allocation-aware containers.

Template Parameters
AllocatorType of allocator.
Parameters
lhsA valid allocator.
rhsAnother valid allocator.

Definition at line 46 of file memory.hpp.

◆ resolve() [1/8]

template<typename Type>
meta_type entt::resolve ( )
nodiscardnoexcept

Returns the meta type associated with a given type.

Template Parameters
TypeType to use to search for a meta type.
Returns
The meta type associated with the given type, if any.

Definition at line 32 of file resolve.hpp.

◆ resolve() [2/8]

meta_range< meta_type, typename internal::meta_context::bucket_type::const_iterator > entt::resolve ( )
inlinenodiscardnoexcept

Returns a range to use to visit all meta types.

Returns
An iterable range to use to visit all meta types.

Definition at line 50 of file resolve.hpp.

◆ resolve() [3/8]

meta_type entt::resolve ( const id_type alias)
inlinenodiscardnoexcept

Returns the meta type associated with a given identifier, if any.

Parameters
aliasUnique identifier.
Returns
The meta type associated with the given identifier, if any.

Definition at line 82 of file resolve.hpp.

◆ resolve() [4/8]

template<typename Type>
meta_type entt::resolve ( const meta_ctx & ctx)
nodiscardnoexcept

Returns the meta type associated with a given type.

Template Parameters
TypeType to use to search for a meta type.
Parameters
ctxThe context from which to search for meta types.
Returns
The meta type associated with the given type, if any.

Definition at line 21 of file resolve.hpp.

◆ resolve() [5/8]

meta_range< meta_type, typename internal::meta_context::bucket_type::const_iterator > entt::resolve ( const meta_ctx & ctx)
inlinenodiscardnoexcept

Returns a range to use to visit all meta types.

Parameters
ctxThe context from which to search for meta types.
Returns
An iterable range to use to visit all meta types.

Definition at line 41 of file resolve.hpp.

◆ resolve() [6/8]

meta_type entt::resolve ( const meta_ctx & ctx,
const id_type alias )
inlinenodiscardnoexcept

Returns the meta type associated with a given identifier, if any.

Parameters
ctxThe context from which to search for meta types.
aliasUnique identifier.
Returns
The meta type associated with the given identifier, if any.

Definition at line 60 of file resolve.hpp.

◆ resolve() [7/8]

meta_type entt::resolve ( const meta_ctx & ctx,
const type_info & info )
inlinenodiscardnoexcept

Returns the meta type associated with a given type info object.

Parameters
ctxThe context from which to search for meta types.
infoThe type info object of the requested type.
Returns
The meta type associated with the given type info object, if any.

Definition at line 92 of file resolve.hpp.

◆ resolve() [8/8]

meta_type entt::resolve ( const type_info & info)
inlinenodiscardnoexcept

Returns the meta type associated with a given type info object.

Parameters
infoThe type info object of the requested type.
Returns
The meta type associated with the given type info object, if any.

Definition at line 103 of file resolve.hpp.

◆ sigh_helper()

template<typename Registry>
entt::sigh_helper ( Registry & ) -> sigh_helper< Registry >

Deduction guide.

Template Parameters
RegistryBasic registry type.

◆ sink()

template<typename Ret, typename... Args, typename Allocator>
entt::sink ( sigh< Ret(Args...), Allocator > & ) -> sink< sigh< Ret(Args...), Allocator > >

Deduction guide.

It allows to deduce the signal handler type of a sink directly from the signal it refers to.

Template Parameters
RetReturn type of a function type.
ArgsTypes of arguments of a function type.
AllocatorType of allocator used to manage memory and elements.

◆ swap()

template<typename First, typename Second>
void entt::swap ( compressed_pair< First, Second > & lhs,
compressed_pair< First, Second > & rhs )
constexprnoexcept

Swaps two compressed pair objects.

Template Parameters
FirstThe type of the first element that the pairs store.
SecondThe type of the second element that the pairs store.
Parameters
lhsA valid compressed pair object.
rhsA valid compressed pair object.

Definition at line 245 of file compressed_pair.hpp.

◆ to_entity() [1/2]

template<typename... Args>
basic_storage< Args... >::entity_type entt::to_entity ( const basic_storage< Args... > & storage,
const typename basic_storage< Args... >::value_type & instance )

Returns the entity associated with a given element.

Warning
Currently, this function only works correctly with the default storage as it makes assumptions about how the elements are laid out.
Template Parameters
ArgsStorage type template parameters.
Parameters
storageA storage that contains the given element.
instanceA valid element instance.
Returns
The entity associated with the given element.

Definition at line 126 of file helper.hpp.

◆ to_entity() [2/2]

template<typename Entity>
entt_traits< Entity >::entity_type entt::to_entity ( const Entity value)
nodiscardconstexprnoexcept

Returns the entity part once converted to the underlying type.

Template Parameters
EntityThe value type.
Parameters
valueThe value to convert.
Returns
The integral representation of the entity part.

Definition at line 202 of file entity.hpp.

◆ to_integral()

template<typename Entity>
entt_traits< Entity >::entity_type entt::to_integral ( const Entity value)
nodiscardconstexprnoexcept

Converts an entity to its underlying type.

Template Parameters
EntityThe value type.
Parameters
valueThe value to convert.
Returns
The integral representation of the given value.

Definition at line 191 of file entity.hpp.

◆ to_version()

template<typename Entity>
entt_traits< Entity >::version_type entt::to_version ( const Entity value)
nodiscardconstexprnoexcept

Returns the version part once converted to the underlying type.

Template Parameters
EntityThe value type.
Parameters
valueThe value to convert.
Returns
The integral representation of the version part.

Definition at line 213 of file entity.hpp.

◆ type_id() [1/2]

template<typename Type>
const type_info & entt::type_id ( )
nodiscardnoexcept

Returns the type info object associated to a given type.

The returned element refers to an object with static storage duration.
The type doesn't need to be a complete type. If the type is a reference, the result refers to the referenced type. In all cases, top-level cv-qualifiers are ignored.

Template Parameters
TypeType for which to generate a type info object.
Returns
A reference to a properly initialized type info object.

Definition at line 215 of file type_info.hpp.

◆ type_id() [2/2]

template<typename Type>
const type_info & entt::type_id ( const Type & )
nodiscardnoexcept

Returns the type info object associated to a given type.

The returned element refers to an object with static storage duration.
The type doesn't need to be a complete type. If the type is a reference, the result refers to the referenced type. In all cases, top-level cv-qualifiers are ignored.

Template Parameters
TypeType for which to generate a type info object.
Returns
A reference to a properly initialized type info object.

Definition at line 226 of file type_info.hpp.

◆ uninitialized_construct_using_allocator()

template<typename Type, typename... Args>
Type * entt::uninitialized_construct_using_allocator ( Type * value,
const auto & allocator,
Args &&... args )
constexpr

Uses-allocator construction utility (waiting for C++20).

Primarily intended for internal use. Creates an object of a given type by means of uses-allocator construction at an uninitialized memory location.

Template Parameters
TypeType of object to create.
ArgsTypes of arguments to use to construct the object.
Parameters
valueMemory location in which to place the object.
allocatorThe allocator to use.
argsParameters to use to construct the object.
Returns
A pointer to the newly created object of the given type.

Definition at line 219 of file memory.hpp.

◆ unwrap_tuple()

template<typename Type>
decltype(auto) entt::unwrap_tuple ( Type && value)
constexprnoexcept

Utility function to unwrap tuples of a single element.

Template Parameters
TypeTuple type of any sizes.
Parameters
valueA tuple object of the given type.
Returns
The tuple itself if it contains more than one element, the first element otherwise.

Definition at line 40 of file tuple.hpp.

◆ uses_allocator_construction_args()

template<typename Type, typename... Args>
auto entt::uses_allocator_construction_args ( const auto & allocator,
Args &&... args )
constexprnoexcept

Uses-allocator construction utility (waiting for C++20).

Primarily intended for internal use. Prepares the argument list needed to create an object of a given type by means of uses-allocator construction.

Template Parameters
TypeType to return arguments for.
ArgsTypes of arguments to use to construct the object.
Parameters
allocatorThe allocator to use.
argsParameters to use to construct the object.
Returns
The arguments needed to create an object of the given type.

Definition at line 184 of file memory.hpp.

Variable Documentation

◆ choice

template<stl::size_t N>
choice_t<N> entt::choice {}
inlineconstexpr

Variable template for the choice trick.

Template Parameters
NNumber of choices available.

Definition at line 34 of file type_traits.hpp.

◆ connect_arg

template<auto Candidate>
connect_arg_t<Candidate> entt::connect_arg {}
inlineconstexpr

Constant of type connect_arg_t used to disambiguate calls.

Template Parameters
CandidateElement to connect (likely a free or member function).

Definition at line 42 of file fwd.hpp.

◆ enum_as_bitmask_v

template<typename Type>
bool entt::enum_as_bitmask_v = enum_as_bitmask<Type>::value
inlineconstexpr

Helper variable template.

Template Parameters
TypeThe enum class type for which to enable bitmask support.

Definition at line 29 of file enum.hpp.

◆ exclude

template<typename... Type>
exclude_t<Type...> entt::exclude {}
inlineconstexpr

Variable template for exclusion lists.

Template Parameters
TypeList of types.

Definition at line 151 of file fwd.hpp.

◆ get

template<typename... Type>
get_t<Type...> entt::get {}
inlineconstexpr

Variable template for lists of observed elements.

Template Parameters
TypeList of types.

Definition at line 168 of file fwd.hpp.

◆ is_applicable_r_v

template<typename Ret, typename Func, typename Args>
bool entt::is_applicable_r_v = is_applicable_r<Ret, Func, Args>::value
inlineconstexpr

Helper variable template.

Template Parameters
RetThe type to which the return type of the function should be convertible.
FuncA valid function type.
ArgsThe list of arguments to use to probe the function type.

Definition at line 632 of file type_traits.hpp.

◆ is_applicable_v

template<typename Func, typename Args>
bool entt::is_applicable_v = is_applicable<Func, Args>::value
inlineconstexpr

Helper variable template.

Template Parameters
FuncA valid function type.
ArgsThe list of arguments to use to probe the function type.

Definition at line 608 of file type_traits.hpp.

◆ is_complete_v

template<typename Type>
bool entt::is_complete_v = is_complete<Type>::value
inlineconstexpr

Helper variable template.

Template Parameters
TypeThe type to test.

Definition at line 652 of file type_traits.hpp.

◆ is_ebco_eligible_v

template<typename Type>
bool entt::is_ebco_eligible_v = is_ebco_eligible<Type>::value
inlineconstexpr

Helper variable template.

Template Parameters
TypeThe type to test.

Definition at line 700 of file type_traits.hpp.

◆ is_equality_comparable_v

template<typename Type>
bool entt::is_equality_comparable_v = is_equality_comparable<Type>::value
inlineconstexpr

Helper variable template.

Template Parameters
TypeThe type to test.

Definition at line 800 of file type_traits.hpp.

◆ is_iterator_v

template<typename Type>
bool entt::is_iterator_v = is_iterator<Type>::value
inlineconstexpr

Helper variable template.

Template Parameters
TypeThe type to test.

Definition at line 685 of file type_traits.hpp.

◆ is_meta_pointer_like_v

template<typename Type>
auto entt::is_meta_pointer_like_v = is_meta_pointer_like<Type>::value
inlineconstexpr

Helper variable template.

Template Parameters
TypePotentially pointer-like type.

Definition at line 50 of file type_traits.hpp.

◆ is_meta_policy_v

template<typename Type>
bool entt::is_meta_policy_v = is_meta_policy<Type>::value
inlineconstexpr

Helper variable template.

Template Parameters
TypeType to check.

Definition at line 70 of file policy.hpp.

◆ is_transparent_v

template<typename Type>
bool entt::is_transparent_v = is_transparent<Type>::value
inlineconstexpr

Helper variable template.

Template Parameters
TypeThe type to test.

Definition at line 720 of file type_traits.hpp.

◆ is_tuple_v

template<typename Type>
bool entt::is_tuple_v = is_tuple<Type>::value
inlineconstexpr

Helper variable template.

Template Parameters
TypeThe type to test.

Definition at line 30 of file tuple.hpp.

◆ meta_ctx_arg

meta_ctx_arg_t entt::meta_ctx_arg {}
inlineconstexpr

Constant of type meta_context_arg_t used to disambiguate calls.

Definition at line 39 of file fwd.hpp.

◆ meta_dynamic_extent

stl::size_t entt::meta_dynamic_extent = (stl::numeric_limits<stl::size_t>::max)()
inlineconstexpr

Used to identicate that a sequence container has not a fixed size.

Definition at line 33 of file fwd.hpp.

◆ monostate_v

template<id_type Value>
monostate<Value> entt::monostate_v {}
inline

Helper variable template.

Template Parameters
ValueValue used to differentiate between different variables.

Definition at line 56 of file monostate.hpp.

◆ null

null_t entt::null {}
inlineconstexpr

Compile-time constant for null entities.

There exist implicit conversions from this variable to identifiers of any allowed type. Similarly, there exist comparison operators between the null entity and any other identifier.

Definition at line 299 of file entity.hpp.

◆ owned

template<typename... Type>
owned_t<Type...> entt::owned {}
inlineconstexpr

Variable template for lists of owned elements.

Template Parameters
TypeList of types.

Definition at line 185 of file fwd.hpp.

◆ size_of_v

template<typename Type>
stl::size_t entt::size_of_v = size_of<Type>::value
inlineconstexpr

Helper variable template.

Template Parameters
TypeThe type of which to return the size.

Definition at line 55 of file type_traits.hpp.

◆ tombstone

tombstone_t entt::tombstone {}
inlineconstexpr

Compile-time constant for tombstone entities.

There exist implicit conversions from this variable to identifiers of any allowed type. Similarly, there exist comparison operators between the tombstone entity and any other identifier.

Definition at line 308 of file entity.hpp.

◆ type_list_contains_v

template<typename List, typename Type>
bool entt::type_list_contains_v = type_list_contains<List, Type>::value
inlineconstexpr

Helper variable template.

Template Parameters
ListType list.
TypeType to look for.

Definition at line 294 of file type_traits.hpp.

◆ type_list_index_v

template<typename Type, typename List>
stl::size_t entt::type_list_index_v = type_list_index<Type, List>::value
inlineconstexpr

Helper variable template.

Template Parameters
ListType list.
TypeType to look for and for which to return the index.

Definition at line 182 of file type_traits.hpp.

◆ unpack_as_value

template<auto Value, typename>
auto entt::unpack_as_value = Value
inlineconstexpr

Helper variable template to be used to repeat the same value a number of times equal to the size of a given parameter pack.

Template Parameters
ValueA value to repeat.

Definition at line 71 of file type_traits.hpp.

◆ value_list_contains_v

template<typename List, auto Value>
bool entt::value_list_contains_v = value_list_contains<List, Value>::value
inlineconstexpr

Helper variable template.

Template Parameters
ListValue list.
ValueValue to look for.

Definition at line 556 of file type_traits.hpp.

◆ value_list_element_v

template<stl::size_t Index, typename List>
auto entt::value_list_element_v = value_list_element<Index, List>::value
inlineconstexpr

Helper type.

Template Parameters
IndexIndex of the value to return.
ListValue list to search into.

Definition at line 395 of file type_traits.hpp.

◆ value_list_index_v

template<auto Value, typename List>
stl::size_t entt::value_list_index_v = value_list_index<Value, List>::value
inlineconstexpr

Helper variable template.

Template Parameters
ListValue list.
ValueValue to look for and for which to return the index.

Definition at line 447 of file type_traits.hpp.