EnTT 3.13.0
Loading...
Searching...
No Matches
Classes | Typedefs | Enumerations | Functions | Variables
entt Namespace Reference

EnTT default namespace. More...

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-is policy. More...
 
struct  as_ref_t
 Empty class type used to request the as ref 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...
 
struct  basic_collector
 Collector. More...
 
struct  basic_collector< matcher< type_list< Reject... >, type_list< Require... >, Rule... >, Other... >
 Collector. More...
 
struct  basic_collector<>
 Collector. 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...
 
struct  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_observer
 Observer. 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_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
 Basic sparse set implementation. More...
 
class  basic_storage
 Basic storage implementation. More...
 
class  basic_storage< Entity, Entity, Allocator >
 Swap-only entity storage specialization. More...
 
class  basic_storage< Type, Entity, Allocator, std::enable_if_t< component_traits< Type >::page_size==0u > >
 Default constructor. More...
 
class  basic_storage_view
 Basic storage view implementation. More...
 
class  basic_view
 View implementation. More...
 
class  basic_view< get_t< Get >, exclude_t<>, std::void_t< std::enable_if_t<!Get::traits_type::in_place_delete > > >
 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. More...
 
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, std::void_t< decltype(Type::_entt_enum_as_bitmask)> >
 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 components. More...
 
class  ident
 Type integral identifiers. More...
 
struct  identity
 Identity function object (waiting for C++20). 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...
 
class  iota_iterator
 Plain iota iterator (waiting for C++20). More...
 
struct  is_applicable
 Same as std::is_invocable, but with tuples. More...
 
struct  is_applicable< Func, const Tuple< Args... > >
 Same as std::is_invocable, but with tuples. More...
 
struct  is_applicable< Func, Tuple< Args... > >
 Same as std::is_invocable, but with tuples. More...
 
struct  is_applicable_r
 Same as std::is_invocable_r, but with tuples for arguments. More...
 
struct  is_applicable_r< Ret, Func, std::tuple< Args... > >
 Same as std::is_invocable_r, but with tuples for arguments. More...
 
struct  is_complete
 Provides the member constant value to true if a given type is complete, false otherwise. More...
 
struct  is_complete< Type, std::void_t< decltype(sizeof(Type))> >
 Provides the member constant value to true if a given type is complete, false otherwise. More...
 
struct  is_ebco_eligible
 Provides the member constant value 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 to true if a given type is equality comparable, false otherwise. More...
 
struct  is_equality_comparable< const Type >
 Provides the member constant value to true if a given type is equality comparable, false otherwise. More...
 
struct  is_iterator
 Provides the member constant value to true if a given type is an iterator, false otherwise. More...
 
struct  is_iterator< Type, std::enable_if_t<!std::is_void_v< std::remove_cv_t< std::remove_pointer_t< Type > > > > >
 Provides the member constant value to true if a given type is an iterator, false otherwise. More...
 
struct  is_meta_pointer_like
 Provides the member constant value to true if a given type is a pointer-like type from the point of view of the meta system, 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< std::shared_ptr< Type > >
 Makes std::shared_ptrs of any type pointer-like types for the meta system. More...
 
struct  is_meta_pointer_like< std::unique_ptr< Type, Args... > >
 Makes std::unique_ptrs of any type pointer-like types for the meta system. More...
 
struct  is_meta_pointer_like< Type * >
 Makes plain pointers pointer-like types for the meta system. More...
 
struct  is_meta_pointer_like< Type(*)[N]>
 Partial specialization used to reject pointers to arrays. More...
 
struct  is_meta_policy
 Provides the member constant value to true if a type also is a meta policy, false otherwise. More...
 
struct  is_transparent
 Provides the member constant value to true if Type::is_transparent is valid and denotes a type, false otherwise. More...
 
struct  is_transparent< Type, std::void_t< typename Type::is_transparent > >
 Provides the member constant value to true if Type::is_transparent is valid and denotes a type, false otherwise. More...
 
struct  is_tuple
 Provides the member constant value 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...
 
struct  matcher
 Grouping matcher. More...
 
class  member_class
 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< dense_map< Args... > >
 Meta associative container traits for dense_maps of any type. More...
 
struct  meta_associative_container_traits< dense_set< Args... > >
 Meta associative container traits for dense_sets of any type. More...
 
struct  meta_associative_container_traits< std::map< Args... > >
 Meta associative container traits for std::maps of any type. More...
 
struct  meta_associative_container_traits< std::set< Args... > >
 Meta associative container traits for std::sets of any type. More...
 
struct  meta_associative_container_traits< std::unordered_map< Args... > >
 Meta associative container traits for std::unordered_maps of any type. More...
 
struct  meta_associative_container_traits< std::unordered_set< Args... > >
 Meta associative container traits for std::unordered_sets of any type. More...
 
struct  meta_class_template_tag
 Utility class to disambiguate class templates. More...
 
class  meta_ctx
 Opaque meta context type. More...
 
class  meta_ctx_arg_t
 Disambiguation tag for constructors and the like. More...
 
struct  meta_data
 Opaque wrapper for data members. More...
 
class  meta_factory
 Basic 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...
 
struct  meta_handle
 Opaque pointers to instances of any type. More...
 
struct  meta_prop
 Opaque wrapper for properties of any type. 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< std::array< Type, N > >
 Meta sequence container traits for std::arrays of any type. More...
 
struct  meta_sequence_container_traits< std::deque< Args... > >
 Meta sequence container traits for std::deques of any type. More...
 
struct  meta_sequence_container_traits< std::list< Args... > >
 Meta sequence container traits for std::lists of any type. More...
 
struct  meta_sequence_container_traits< std::vector< Args... > >
 Meta sequence container traits for std::vectors of any type. 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 given function or member function. 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 components. 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...
 
class  process
 Base class for processes. More...
 
struct  process_adaptor
 Adaptor for lambdas and functors to turn them into processes. More...
 
struct  radix_sort
 Function object for performing LSD radix sort. 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. More...
 
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. More...
 
struct  size_of
 A type-only sizeof wrapper that returns 0 where sizeof complains. More...
 
struct  size_of< Type, std::void_t< decltype(sizeof(Type))> >
 A type-only sizeof wrapper that returns 0 where sizeof complains. More...
 
struct  std_sort
 Function object to wrap std::sort in a class type. More...
 
struct  storage_for
 
struct  storage_type
 Provides a common way to define storage types. More...
 
struct  tombstone_t
 Tombstone object for all identifiers.
More...
 
struct  type_hash
 Type hash. More...
 
struct  type_identity
 Identity type trait. 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 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 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 generate 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 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 to true if a value list contains a given value, false otherwise. More...
 
class  value_list_diff
 Primary template isn't defined on purpose. More...
 
class  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...
 

Typedefs

using id_type = std::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 >
using type_identity_t = typename type_identity< Type >::type
 Helper type.
 
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 = std::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<std::size_t Index, typename List >
using type_list_element_t = typename type_list_element< Index, List >::type
 Helper type.
 
template<typename... List>
using type_list_cat_t = typename type_list_cat< List... >::type
 Helper type.
 
template<typename List >
using type_list_unique_t = typename type_list_unique< List >::type
 Helper type.
 
template<typename... List>
using type_list_diff_t = typename type_list_diff< List... >::type
 Helper type.
 
template<typename List , template< typename... > class Op>
using type_list_transform_t = typename type_list_transform< List, Op >::type
 Helper type.
 
template<std::size_t Index, typename List >
using value_list_element_t = typename value_list_element< Index, List >::type
 Helper type.
 
template<typename... List>
using value_list_cat_t = typename value_list_cat< List... >::type
 Helper type.
 
template<typename Type >
using value_list_unique_t = typename value_list_unique< Type >::type
 Helper type.
 
template<typename... List>
using value_list_diff_t = typename value_list_diff< List... >::type
 Helper type.
 
template<typename To , typename From >
using constness_as_t = typename constness_as< To, From >::type
 Alias template to facilitate the transcription of the constness.
 
template<typename Member >
using member_class_t = typename member_class< Member >::type
 Helper type.
 
template<std::size_t Index, typename Candidate >
using nth_argument_t = typename 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.
 
using registry = basic_registry<>
 Alias declaration for the most common use case.
 
using observer = basic_observer< 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 = typename storage_type< Args... >::type
 Helper type.
 
template<typename... Args>
using storage_for_t = typename 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 , typename Exclude >
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.
 
using meta_any_policy = any_policy
 Possible modes of a meta any object.
 
template<typename Type , typename 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 = typename 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 scheduler = basic_scheduler<>
 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 : std::uint8_t { owner , ref , cref }
 Possible modes of an any object. More...
 
enum class  entity : id_type
 Default entity identifier. More...
 
enum class  deletion_policy : std::uint8_t { swap_and_pop = 0u , in_place = 1u , swap_only = 2u }
 Storage deletion policy. More...
 

Functions

template<typename Type , std::size_t Len, std::size_t Align>
Type any_cast (const basic_any< Len, Align > &data) noexcept
 Performs type-safe access to the contained object.
 
template<typename Type , std::size_t Len, std::size_t Align>
Type any_cast (basic_any< Len, Align > &data) noexcept
 Performs type-safe access to the contained object.
 
template<typename Type , std::size_t Len, std::size_t Align>
Type any_cast (basic_any< Len, Align > &&data) noexcept
 Performs type-safe access to the contained object.
 
template<typename Type , std::size_t Len, std::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 , std::size_t Len, std::size_t Align>
Type * any_cast (basic_any< Len, Align > *data) noexcept
 Performs type-safe access to the contained object.
 
template<typename Type , std::size_t Len = basic_any<>::length, std::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<std::size_t Len = basic_any<>::length, std::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<typename Type , typename Other >
 compressed_pair (Type &&, Other &&) -> compressed_pair< std::decay_t< Type >, std::decay_t< Other > >
 Deduction guide.
 
template<typename First , typename Second >
constexpr void swap (compressed_pair< First, Second > &lhs, compressed_pair< First, Second > &rhs)
 Swaps two compressed pair objects.
 
template<typename Char >
 basic_hashed_string (const Char *str, const std::size_t len) -> basic_hashed_string< Char >
 Deduction guide.
 
template<typename Char , std::size_t N>
 basic_hashed_string (const Char(&str)[N]) -> basic_hashed_string< Char >
 Deduction guide.
 
template<typename Char >
constexpr bool operator== (const basic_hashed_string< Char > &lhs, const basic_hashed_string< Char > &rhs) noexcept
 Compares two hashed strings.
 
template<typename Char >
constexpr bool operator!= (const basic_hashed_string< Char > &lhs, const basic_hashed_string< Char > &rhs) noexcept
 Compares two hashed strings.
 
template<typename Char >
constexpr bool operator< (const basic_hashed_string< Char > &lhs, const basic_hashed_string< Char > &rhs) noexcept
 Compares two hashed strings.
 
template<typename Char >
constexpr bool operator<= (const basic_hashed_string< Char > &lhs, const basic_hashed_string< Char > &rhs) noexcept
 Compares two hashed strings.
 
template<typename Char >
constexpr bool operator> (const basic_hashed_string< Char > &lhs, const basic_hashed_string< Char > &rhs) noexcept
 Compares two hashed strings.
 
template<typename Char >
constexpr bool operator>= (const basic_hashed_string< Char > &lhs, const basic_hashed_string< Char > &rhs) noexcept
 Compares two hashed strings.
 
constexpr hashed_string operator""_hs (const char *str, std::size_t) noexcept
 User defined literal for hashed strings.
 
constexpr hashed_wstring operator""_hws (const wchar_t *str, std::size_t) noexcept
 User defined literal for hashed wstrings.
 
template<typename Type >
constexpr bool operator== (const iota_iterator< Type > &lhs, const iota_iterator< Type > &rhs) noexcept
 Comparison operator.
 
template<typename Type >
constexpr bool operator!= (const iota_iterator< Type > &lhs, const iota_iterator< Type > &rhs) noexcept
 Comparison operator.
 
constexpr bool is_power_of_two (const std::size_t value) noexcept
 Checks whether a value is a power of two or not (waiting for C++20 and std::has_single_bit).
 
constexpr std::size_t next_power_of_two (const std::size_t value) noexcept
 Computes the smallest power of two greater than or equal to a value (waiting for C++20 and std::bit_ceil).
 
constexpr std::size_t fast_mod (const std::size_t value, const std::size_t mod) noexcept
 Fast module utility function (powers of two only).
 
template<typename Type >
constexpr auto to_address (Type &&ptr) noexcept
 Unwraps fancy pointers, does nothing otherwise (waiting for C++20).
 
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 std::unique_ptr to use allocators (waiting for C++20).
 
template<typename Type , typename Allocator , typename... Args>
constexpr auto uses_allocator_construction_args (const Allocator &allocator, Args &&...args) noexcept
 Uses-allocator construction utility (waiting for C++20).
 
template<typename Type , typename Allocator , typename... Args>
constexpr Type make_obj_using_allocator (const Allocator &allocator, Args &&...args)
 Uses-allocator construction utility (waiting for C++20).
 
template<typename Type , typename Allocator , typename... Args>
constexpr Type * uninitialized_construct_using_allocator (Type *value, const Allocator &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< std::remove_reference_t< std::remove_cv_t< Func > > >
 Deduction guide.
 
constexpr bool operator== (const type_info &lhs, const type_info &rhs) noexcept
 Compares the contents of two type info objects.
 
constexpr bool operator!= (const type_info &lhs, const type_info &rhs) noexcept
 Compares the contents of two type info objects.
 
constexpr bool operator< (const type_info &lhs, const type_info &rhs) noexcept
 Compares two type info objects.
 
constexpr bool operator<= (const type_info &lhs, const type_info &rhs) noexcept
 Compares two type info objects.
 
constexpr bool operator> (const type_info &lhs, const type_info &rhs) noexcept
 Compares two type info objects.
 
constexpr bool operator>= (const type_info &lhs, const type_info &rhs) noexcept
 Compares two type info objects.
 
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 (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<typename Entity >
constexpr bool operator== (const Entity entity, const null_t other) noexcept
 Compares a null object and an identifier of any type.
 
template<typename Entity >
constexpr bool operator!= (const Entity entity, const null_t other) noexcept
 Compares a null object and an identifier of any type.
 
template<typename Entity >
constexpr bool operator== (const Entity entity, const tombstone_t other) noexcept
 Compares a tombstone object and an identifier of any type.
 
template<typename Entity >
constexpr bool operator!= (const Entity entity, const tombstone_t other) noexcept
 Compares a tombstone object and an identifier of any type.
 
template<typename... Args, typename... Other>
bool operator== (const basic_handle< Args... > &lhs, const basic_handle< Other... > &rhs) noexcept
 Compares two handles.
 
template<typename... Args, typename... Other>
bool operator!= (const basic_handle< Args... > &lhs, const basic_handle< Other... > &rhs) noexcept
 Compares two handles.
 
template<auto Member, typename Registry = std::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>
auto to_entity (const basic_storage< Args... > &storage, const typename basic_storage< Args... >::value_type &instance) -> typename basic_storage< Args... >::entity_type
 Returns the entity associated with a given component.
 
template<typename... Args, typename Component >
basic_registry< Args... >::entity_type to_entity (const basic_registry< Args... > &reg, const Component &instance)
 Returns the entity part once converted to the underlying type.
 
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 (std::tuple< Get &... >, std::tuple< Exclude &... >={}) -> basic_view< get_t< Get... >, exclude_t< Exclude... > >
 Deduction guide.
 
template<typename Graph , typename Writer >
void dot (std::ostream &out, const Graph &graph, Writer writer)
 Outputs a graph in dot format.
 
template<typename Graph >
void dot (std::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.
 
template<typename Type >
auto meta (meta_ctx &ctx) noexcept
 Utility function to use for reflection.
 
template<typename Type >
auto meta () noexcept
 Utility function to use for reflection.
 
void meta_reset (meta_ctx &ctx, const id_type id) noexcept
 Resets a type and all its parts.
 
void meta_reset (const id_type id) 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.
 
template<typename Type >
meta_any forward_as_meta (const meta_ctx &ctx, Type &&value)
 Forwards its argument and avoids copies for lvalue references.
 
template<typename Type >
meta_any forward_as_meta (Type &&value)
 Forwards its argument and avoids copies for lvalue references.
 
bool operator!= (const meta_prop &lhs, const meta_prop &rhs) noexcept
 Checks if two objects refer to the same type.
 
bool operator!= (const meta_data &lhs, const meta_data &rhs) noexcept
 Checks if two objects refer to the same type.
 
bool operator!= (const meta_func &lhs, const meta_func &rhs) noexcept
 Checks if two objects refer to the same type.
 
bool operator!= (const meta_type &lhs, const meta_type &rhs) noexcept
 Checks if two objects refer to the same type.
 
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 decltype(internal::meta_context::value)::const_iterator > resolve (const meta_ctx &ctx) noexcept
 Returns a range to use to visit all meta types.
 
meta_range< meta_type, typename decltype(internal::meta_context::value)::const_iterator > resolve () noexcept
 Returns a range to use to visit all meta types.
 
meta_type resolve (const meta_ctx &ctx, const id_type id) noexcept
 Returns the meta type associated with a given identifier, if any.
 
meta_type resolve (const id_type id) 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<typename Policy = as_is_t, typename Type >
std::enable_if_t< is_meta_policy_v< Policy >, meta_anymeta_dispatch (const meta_ctx &ctx, Type &&value)
 Wraps a value depending on the given policy.
 
template<typename Policy = as_is_t, typename Type >
std::enable_if_t< is_meta_policy_v< Policy >, meta_anymeta_dispatch (Type &&value)
 Wraps a value depending on the given policy.
 
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, typename Policy = as_is_t>
std::enable_if_t< is_meta_policy_v< Policy >, meta_anymeta_getter (const meta_ctx &ctx, meta_handle instance)
 Gets the value of a given variable.
 
template<typename Type , auto Data, typename Policy = as_is_t>
std::enable_if_t< is_meta_policy_v< Policy >, meta_anymeta_getter (meta_handle instance)
 Gets the value of a given variable.
 
template<typename Type , typename Policy = as_is_t, typename Candidate >
std::enable_if_t< is_meta_policy_v< Policy >, meta_anymeta_invoke (const meta_ctx &ctx, meta_handle instance, Candidate &&candidate, meta_any *const args)
 Tries to invoke an object given a list of erased parameters.
 
template<typename Type , typename Policy = as_is_t, typename Candidate >
std::enable_if_t< is_meta_policy_v< Policy >, meta_anymeta_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, typename Policy = as_is_t>
std::enable_if_t< is_meta_policy_v< Policy >, meta_anymeta_invoke (const meta_ctx &ctx, meta_handle instance, meta_any *const args)
 Tries to invoke a function given a list of erased parameters.
 
template<typename Type , auto Candidate, typename Policy = as_is_t>
std::enable_if_t< is_meta_policy_v< Policy >, meta_anymeta_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_is_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 , typename Policy = as_is_t, typename Candidate >
std::enable_if_t< is_meta_policy_v< Policy >, meta_anymeta_construct (Candidate &&candidate, meta_any *const args)
 Tries to construct an instance given a list of erased parameters.
 
template<typename Type , auto Candidate, typename Policy = as_is_t>
std::enable_if_t< is_meta_policy_v< Policy >, meta_anymeta_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, typename Policy = as_is_t>
std::enable_if_t< is_meta_policy_v< Policy >, meta_anymeta_construct (meta_any *const args)
 Tries to construct an instance given a list of erased parameters.
 
template<std::size_t Member, typename Poly , typename... Args>
decltype(auto) poly_call (Poly &&self, Args &&...args)
 Shortcut for calling poly_base<Type>::invoke.
 
template<typename Lhs , typename Rhs >
bool operator== (const resource< Lhs > &lhs, const resource< Rhs > &rhs) noexcept
 Compares two handles.
 
template<typename Lhs , typename Rhs >
bool operator!= (const resource< Lhs > &lhs, const resource< Rhs > &rhs) noexcept
 Compares two handles.
 
template<typename Lhs , typename Rhs >
bool operator< (const resource< Lhs > &lhs, const resource< Rhs > &rhs) noexcept
 Compares two handles.
 
template<typename Lhs , typename Rhs >
bool operator> (const resource< Lhs > &lhs, const resource< Rhs > &rhs) noexcept
 Compares two handles.
 
template<typename Lhs , typename Rhs >
bool operator<= (const resource< Lhs > &lhs, const resource< Rhs > &rhs) noexcept
 Compares two handles.
 
template<typename Lhs , typename Rhs >
bool operator>= (const resource< Lhs > &lhs, const resource< Rhs > &rhs) noexcept
 Compares two handles.
 
template<typename Ret , typename... Args>
bool operator!= (const delegate< Ret(Args...)> &lhs, const delegate< Ret(Args...)> &rhs) noexcept
 Compares the contents of two delegates.
 
template<auto Candidate>
 delegate (connect_arg_t< Candidate >) -> delegate< std::remove_pointer_t< internal::function_pointer_t< decltype(Candidate)> > >
 Deduction guide.
 
template<auto Candidate, typename Type >
 delegate (connect_arg_t< Candidate >, Type &&) -> delegate< std::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.
 

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<std::size_t N>
constexpr choice_t< N > choice {}
 Variable template for the choice trick.
 
template<typename Type >
constexpr std::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 std::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<std::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 std::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 components.
 
template<typename... Type>
constexpr owned_t< Type... > owned {}
 Variable template for lists of owned components.
 
constexpr basic_collector collector {}
 Variable template used to ease the definition of collectors.
 
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 = typedef basic_any<>

Alias declaration for the most common use case.

Definition at line 16 of file fwd.hpp.

◆ const_handle

using entt::const_handle = typedef basic_handle<const registry>

Alias declaration for the most common use case.

Definition at line 94 of file fwd.hpp.

◆ const_handle_view

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

Alias declaration for the most common use case.

Template Parameters
ArgsOther template parameters.

Definition at line 108 of file fwd.hpp.

◆ const_runtime_view

Alias declaration for the most common use case.

Definition at line 123 of file fwd.hpp.

◆ constness_as_t

template<typename To , typename From >
using entt::constness_as_t = typedef typename 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 844 of file type_traits.hpp.

◆ continuous_loader

Alias declaration for the most common use case.

Definition at line 117 of file fwd.hpp.

◆ dispatcher

Alias declaration for the most common use case.

Definition at line 28 of file fwd.hpp.

◆ flow

using entt::flow = typedef basic_flow<>

Alias declaration for the most common use case.

Definition at line 23 of file fwd.hpp.

◆ group

template<typename Owned , typename Get , typename Exclude >
using entt::group = typedef 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 262 of file fwd.hpp.

◆ handle

Alias declaration for the most common use case.

Definition at line 91 of file fwd.hpp.

◆ handle_view

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

Alias declaration for the most common use case.

Template Parameters
ArgsOther template parameters.

Definition at line 101 of file fwd.hpp.

◆ hashed_string

Aliases for common character types.

Definition at line 297 of file hashed_string.hpp.

◆ hashed_wstring

using entt::hashed_wstring = typedef basic_hashed_string<wchar_t>

Aliases for common character types.

Definition at line 300 of file hashed_string.hpp.

◆ id_type

using entt::id_type = typedef std::uint32_t

Alias declaration for type identifiers.

Definition at line 13 of file fwd.hpp.

◆ integral_constant

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

Wraps a static constant.

Template Parameters
ValueA static constant.

Definition at line 96 of file type_traits.hpp.

◆ member_class_t

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

Helper type.

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

Definition at line 873 of file type_traits.hpp.

◆ meta_any_policy

Possible modes of a meta any object.

Definition at line 178 of file meta.hpp.

◆ meta_function_helper_t

template<typename Type , typename Candidate >
using entt::meta_function_helper_t = typedef typename 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 152 of file utility.hpp.

◆ meta_range

template<typename Type , typename It >
using entt::meta_range = typedef 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 139 of file range.hpp.

◆ nth_argument_t

template<std::size_t Index, typename Candidate >
using entt::nth_argument_t = typedef typename 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 905 of file type_traits.hpp.

◆ observer

Alias declaration for the most common use case.

Definition at line 85 of file fwd.hpp.

◆ organizer

Alias declaration for the most common use case.

Definition at line 88 of file fwd.hpp.

◆ poly

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

Alias declaration for the most common use case.

Template Parameters
ConceptConcept descriptor.

Definition at line 16 of file fwd.hpp.

◆ registry

using entt::registry = typedef basic_registry<>

Alias declaration for the most common use case.

Definition at line 82 of file fwd.hpp.

◆ runtime_view

Alias declaration for the most common use case.

Definition at line 120 of file fwd.hpp.

◆ scheduler

using entt::scheduler = typedef basic_scheduler<>

Alias declaration for the most common use case.

Definition at line 16 of file fwd.hpp.

◆ sigh_mixin

template<typename Type >
using entt::sigh_mixin = typedef 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 79 of file fwd.hpp.

◆ snapshot

Alias declaration for the most common use case.

Definition at line 111 of file fwd.hpp.

◆ snapshot_loader

Alias declaration for the most common use case.

Definition at line 114 of file fwd.hpp.

◆ sparse_set

Alias declaration for the most common use case.

Definition at line 65 of file fwd.hpp.

◆ storage

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

Alias declaration for the most common use case.

Template Parameters
TypeType of objects assigned to the entities.

Definition at line 72 of file fwd.hpp.

◆ storage_for_t

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

Helper type.

Template Parameters
ArgsArguments to forward.

Definition at line 245 of file fwd.hpp.

◆ storage_type_t

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

Helper type.

Template Parameters
ArgsArguments to forward.

Definition at line 226 of file fwd.hpp.

◆ tag

template<id_type Value>
using entt::tag = typedef 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 103 of file type_traits.hpp.

◆ type_identity_t

template<typename Type >
using entt::type_identity_t = typedef typename type_identity<Type>::type

Helper type.

Template Parameters
TypeA type.

Definition at line 54 of file type_traits.hpp.

◆ type_list_cat_t

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

Helper type.

Template Parameters
ListType lists to concatenate.

Definition at line 251 of file type_traits.hpp.

◆ type_list_diff_t

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

Helper type.

Template Parameters
ListType lists between which to compute the difference.

Definition at line 334 of file type_traits.hpp.

◆ type_list_element_t

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

Helper type.

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

Definition at line 148 of file type_traits.hpp.

◆ type_list_transform_t

template<typename List , template< typename... > class Op>
using entt::type_list_transform_t = typedef typename 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 357 of file type_traits.hpp.

◆ type_list_unique_t

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

Helper type.

Template Parameters
ListType list.

Definition at line 286 of file type_traits.hpp.

◆ unpack_as_type

template<typename Type , typename >
using entt::unpack_as_type = typedef 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 81 of file type_traits.hpp.

◆ value_list_cat_t

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

Helper type.

Template Parameters
ListValue lists to concatenate.

Definition at line 515 of file type_traits.hpp.

◆ value_list_diff_t

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

Helper type.

Template Parameters
ListValue lists between which to compute the difference.

Definition at line 598 of file type_traits.hpp.

◆ value_list_element_t

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

Helper type.

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

Definition at line 404 of file type_traits.hpp.

◆ value_list_unique_t

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

Helper type.

Template Parameters
TypeA value list.

Definition at line 547 of file type_traits.hpp.

◆ view

template<typename Get , typename Exclude = exclude_t<>>
using entt::view = typedef 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 253 of file fwd.hpp.

Enumeration Type Documentation

◆ any_policy

enum class entt::any_policy : std::uint8_t
strong

Possible modes of an any object.

Enumerator
owner 

Default mode, the object owns the contained element.

ref 

Aliasing mode, the object points to a non-const element.

cref 

Const aliasing mode, the object points to a const element.

Definition at line 33 of file any.hpp.

◆ deletion_policy

enum class entt::deletion_policy : std::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.

Definition at line 16 of file fwd.hpp.

◆ entity

enum class entt::entity : id_type
strong

Default entity identifier.

Definition at line 13 of file fwd.hpp.

Function Documentation

◆ allocate_unique()

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

Allows std::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 148 of file memory.hpp.

◆ any_cast() [1/5]

template<typename Type , std::size_t Len, std::size_t Align>
Type entt::any_cast ( basic_any< Len, Align > &&  data)
noexcept

Performs type-safe access to the contained object.

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

Definition at line 451 of file any.hpp.

◆ any_cast() [2/5]

template<typename Type , std::size_t Len, std::size_t Align>
Type entt::any_cast ( basic_any< Len, Align > &  data)
noexcept

Performs type-safe access to the contained object.

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

Definition at line 442 of file any.hpp.

◆ any_cast() [3/5]

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

Performs type-safe access to the contained object.

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

Definition at line 474 of file any.hpp.

◆ any_cast() [4/5]

template<typename Type , std::size_t Len, std::size_t Align>
Type entt::any_cast ( const basic_any< Len, Align > &  data)
noexcept

Performs type-safe access to the contained object.

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

Definition at line 434 of file any.hpp.

◆ any_cast() [5/5]

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

Performs type-safe access to the contained object.

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

Definition at line 467 of file any.hpp.

◆ basic_hashed_string() [1/2]

template<typename Char >
entt::basic_hashed_string ( const Char *  str,
const std::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 , std::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 ( std::tuple< Get &... >  ,
std::tuple< Exclude &... >  = {} 
) -> basic_view< get_t< Get... >, exclude_t< Exclude... > >

Deduction guide.

Template Parameters
GetTypes of components iterated by the view.
ExcludeTypes of components 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< std::decay_t< Type >, std::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.

◆ delegate() [1/3]

template<auto Candidate>
entt::delegate ( connect_arg_t< Candidate >  ) -> delegate< std::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< std::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 ( std::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 52 of file dot.hpp.

◆ dot() [2/2]

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

Outputs a graph in dot format.

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

Definition at line 19 of file dot.hpp.

◆ fast_mod()

constexpr std::size_t entt::fast_mod ( const std::size_t  value,
const std::size_t  mod 
)
inlineconstexprnoexcept

Fast module utility function (powers of two only).

Parameters
valueA value for which to calculate the modulus.
modModulus, it must be a power of two.
Returns
The common remainder.

Definition at line 47 of file memory.hpp.

◆ forward_apply()

template<typename Func >
entt::forward_apply ( Func  ) -> forward_apply< std::remove_reference_t< std::remove_cv_t< Func > > >

Deduction guide.

Template Parameters
FuncType of underlying invocable object.

◆ forward_as_any()

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

Forwards its argument and avoids copies for lvalue references.

Template Parameters
LenSize of the storage 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 507 of file any.hpp.

◆ forward_as_meta() [1/2]

template<typename Type >
meta_any entt::forward_as_meta ( const meta_ctx ctx,
Type &&  value 
)

Forwards its argument and avoids copies for lvalue references.

Template Parameters
TypeType of argument to use to construct the new instance.
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 637 of file meta.hpp.

◆ forward_as_meta() [2/2]

template<typename Type >
meta_any entt::forward_as_meta ( Type &&  value)

Forwards its argument and avoids copies for lvalue references.

Template Parameters
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 648 of file meta.hpp.

◆ invoke()

template<auto Member, typename Registry = std::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 a component of the given type.
RegistryBasic registry type.
Parameters
regA registry that contains the given entity and its components.
enttEntity from which to get the component.

Definition at line 108 of file helper.hpp.

◆ is_power_of_two()

constexpr bool entt::is_power_of_two ( const std::size_t  value)
inlineconstexprnoexcept

Checks whether a value is a power of two or not (waiting for C++20 and std::has_single_bit).

Parameters
valueA value that may or may not be a power of two.
Returns
True if the value is a power of two, false otherwise.

Definition at line 20 of file memory.hpp.

◆ make_any()

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

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 storage 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 494 of file any.hpp.

◆ make_obj_using_allocator()

template<typename Type , typename Allocator , typename... Args>
constexpr Type entt::make_obj_using_allocator ( const Allocator &  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.
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 newly created object of the given type.

Definition at line 258 of file memory.hpp.

◆ meta() [1/2]

template<typename Type >
auto entt::meta ( )
noexcept

Utility function to use for reflection.

This is the point from which everything starts.
By invoking this function with a type that is not yet reflected, a meta type is created to which it will be possible to attach meta objects through a dedicated factory.

Template Parameters
TypeType to reflect.
Returns
A meta factory for the given type.

Definition at line 484 of file factory.hpp.

◆ meta() [2/2]

template<typename Type >
auto entt::meta ( meta_ctx ctx)
noexcept

Utility function to use for reflection.

This is the point from which everything starts.
By invoking this function with a type that is not yet reflected, a meta type is created to which it will be possible to attach meta objects through a dedicated factory.

Template Parameters
TypeType to reflect.
Parameters
ctxThe context into which to construct meta types.
Returns
A meta factory for the given type.

Definition at line 465 of file factory.hpp.

◆ meta_construct() [1/6]

template<typename Type , typename Policy = as_is_t, typename Candidate >
std::enable_if_t< is_meta_policy_v< Policy >, meta_any > entt::meta_construct ( Candidate &&  candidate,
meta_any *const  args 
)

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 496 of file utility.hpp.

◆ meta_construct() [2/6]

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

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 478 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 
)

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 446 of file utility.hpp.

◆ meta_construct() [4/6]

template<typename Type , auto Candidate, typename Policy = as_is_t>
std::enable_if_t< is_meta_policy_v< Policy >, meta_any > entt::meta_construct ( const meta_ctx ctx,
meta_any *const  args 
)

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 515 of file utility.hpp.

◆ meta_construct() [5/6]

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

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 458 of file utility.hpp.

◆ meta_construct() [6/6]

template<typename Type , auto Candidate, typename Policy = as_is_t>
std::enable_if_t< is_meta_policy_v< Policy >, meta_any > entt::meta_construct ( meta_any *const  args)

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 528 of file utility.hpp.

◆ meta_dispatch() [1/2]

template<typename Policy = as_is_t, typename Type >
std::enable_if_t< is_meta_policy_v< Policy >, meta_any > entt::meta_dispatch ( const meta_ctx ctx,
Type &&  value 
)

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 168 of file utility.hpp.

◆ meta_dispatch() [2/2]

template<typename Policy = as_is_t, typename Type >
std::enable_if_t< is_meta_policy_v< Policy >, meta_any > entt::meta_dispatch ( Type &&  value)

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 189 of file utility.hpp.

◆ meta_getter() [1/2]

template<typename Type , auto Data, typename Policy = as_is_t>
std::enable_if_t< is_meta_policy_v< Policy >, meta_any > entt::meta_getter ( const meta_ctx ctx,
meta_handle  instance 
)

Gets the value of a given variable.

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 variable is associated.
DataThe actual variable to get.
PolicyOptional policy (no policy set by default).
Parameters
ctxThe context from which to search for meta types.
instanceAn opaque instance of the underlying type, if required.
Returns
A meta any containing the value of the underlying variable.

Definition at line 275 of file utility.hpp.

◆ meta_getter() [2/2]

template<typename Type , auto Data, typename Policy = as_is_t>
std::enable_if_t< is_meta_policy_v< Policy >, meta_any > entt::meta_getter ( meta_handle  instance)

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 312 of file utility.hpp.

◆ meta_invoke() [1/4]

template<typename Type , typename Policy = as_is_t, typename Candidate >
std::enable_if_t< is_meta_policy_v< Policy >, meta_any > entt::meta_invoke ( const meta_ctx ctx,
meta_handle  instance,
Candidate &&  candidate,
meta_any *const  args 
)

Tries to invoke an object 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).
Parameters
ctxThe context from which to search for meta types.
Template Parameters
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 379 of file utility.hpp.

◆ meta_invoke() [2/4]

template<typename Type , auto Candidate, typename Policy = as_is_t>
std::enable_if_t< is_meta_policy_v< Policy >, meta_any > entt::meta_invoke ( const meta_ctx ctx,
meta_handle  instance,
meta_any *const  args 
)

Tries to invoke a function 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.
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 414 of file utility.hpp.

◆ meta_invoke() [3/4]

template<typename Type , typename Policy = as_is_t, typename Candidate >
std::enable_if_t< is_meta_policy_v< Policy >, meta_any > entt::meta_invoke ( meta_handle  instance,
Candidate &&  candidate,
meta_any *const  args 
)

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 394 of file utility.hpp.

◆ meta_invoke() [4/4]

template<typename Type , auto Candidate, typename Policy = as_is_t>
std::enable_if_t< is_meta_policy_v< Policy >, meta_any > entt::meta_invoke ( meta_handle  instance,
meta_any *const  args 
)

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 428 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 548 of file factory.hpp.

◆ meta_reset() [2/6]

void entt::meta_reset ( )
inlinenoexcept

Resets all meta types.

See also
meta_reset

Definition at line 568 of file factory.hpp.

◆ meta_reset() [3/6]

void entt::meta_reset ( const id_type  id)
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
idUnique identifier.

Definition at line 523 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 536 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 559 of file factory.hpp.

◆ meta_reset() [6/6]

void entt::meta_reset ( meta_ctx ctx,
const id_type  id 
)
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
idUnique identifier.
ctxThe context from which to reset meta types.

Definition at line 500 of file factory.hpp.

◆ meta_setter()

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

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 226 of file utility.hpp.

◆ next_power_of_two()

constexpr std::size_t entt::next_power_of_two ( const std::size_t  value)
inlineconstexprnoexcept

Computes the smallest power of two greater than or equal to a value (waiting for C++20 and std::bit_ceil).

Parameters
valueThe value to use.
Returns
The smallest power of two greater than or equal to the given value.

Definition at line 30 of file memory.hpp.

◆ operator!=() [1/12]

template<typename... Args, typename... Other>
bool entt::operator!= ( const basic_handle< Args... > &  lhs,
const basic_handle< Other... > &  rhs 
)
noexcept

Compares two handles.

Template Parameters
ArgsScope of the first handle.
OtherScope of the second handle.
Parameters
lhsA valid handle.
rhsA valid handle.
Returns
False if both handles refer to the same registry and the same entity, true otherwise.

Definition at line 371 of file handle.hpp.

◆ operator!=() [2/12]

template<typename Char >
constexpr bool entt::operator!= ( const basic_hashed_string< Char > &  lhs,
const basic_hashed_string< Char > &  rhs 
)
constexprnoexcept

Compares two hashed strings.

Template Parameters
CharCharacter type.
Parameters
lhsA valid hashed string.
rhsA valid hashed string.
Returns
True if the two hashed strings differ, false otherwise.

Definition at line 241 of file hashed_string.hpp.

◆ operator!=() [3/12]

template<typename Ret , typename... Args>
bool entt::operator!= ( const delegate< Ret(Args...)> &  lhs,
const delegate< Ret(Args...)> &  rhs 
)
noexcept

Compares the contents of two delegates.

Template Parameters
RetReturn type of a function type.
ArgsTypes of arguments of a function type.
Parameters
lhsA valid delegate object.
rhsA valid delegate object.
Returns
True if the two contents differ, false otherwise.

Definition at line 311 of file delegate.hpp.

◆ operator!=() [4/12]

template<typename Entity >
constexpr bool entt::operator!= ( const Entity  entity,
const null_t  other 
)
constexprnoexcept

Compares a null object and an identifier of any type.

Template Parameters
EntityType of identifier.
Parameters
entityIdentifier with which to compare.
otherA null object yet to be converted.
Returns
True if the two elements differ, false otherwise.

Definition at line 272 of file entity.hpp.

◆ operator!=() [5/12]

template<typename Entity >
constexpr bool entt::operator!= ( const Entity  entity,
const tombstone_t  other 
)
constexprnoexcept

Compares a tombstone object and an identifier of any type.

Template Parameters
EntityType of identifier.
Parameters
entityIdentifier with which to compare.
otherA tombstone object yet to be converted.
Returns
True if the two elements differ, false otherwise.

Definition at line 352 of file entity.hpp.

◆ operator!=() [6/12]

template<typename Type >
constexpr bool entt::operator!= ( const iota_iterator< Type > &  lhs,
const iota_iterator< Type > &  rhs 
)
constexprnoexcept

Comparison operator.

Template Parameters
TypeValue type of the iota iterator.
Parameters
lhsA properly initialized iota iterator.
rhsA properly initialized iota iterator.
Returns
True if the two iterators differ, false otherwise.

Definition at line 131 of file iterator.hpp.

◆ operator!=() [7/12]

bool entt::operator!= ( const meta_data lhs,
const meta_data rhs 
)
inlinenoexcept

Checks if two objects refer to the same type.

Parameters
lhsAn object, either valid or not.
rhsAn object, either valid or not.
Returns
False if the objects refer to the same node, true otherwise.

Definition at line 952 of file meta.hpp.

◆ operator!=() [8/12]

bool entt::operator!= ( const meta_func lhs,
const meta_func rhs 
)
inlinenoexcept

Checks if two objects refer to the same type.

Parameters
lhsAn object, either valid or not.
rhsAn object, either valid or not.
Returns
False if the objects refer to the same node, true otherwise.

Definition at line 1087 of file meta.hpp.

◆ operator!=() [9/12]

bool entt::operator!= ( const meta_prop lhs,
const meta_prop rhs 
)
inlinenoexcept

Checks if two objects refer to the same type.

Parameters
lhsAn object, either valid or not.
rhsAn object, either valid or not.
Returns
False if the objects refer to the same node, true otherwise.

Definition at line 832 of file meta.hpp.

◆ operator!=() [10/12]

bool entt::operator!= ( const meta_type lhs,
const meta_type rhs 
)
inlinenoexcept

Checks if two objects refer to the same type.

Parameters
lhsAn object, either valid or not.
rhsAn object, either valid or not.
Returns
False if the objects refer to the same node, true otherwise.

Definition at line 1550 of file meta.hpp.

◆ operator!=() [11/12]

template<typename Lhs , typename Rhs >
bool entt::operator!= ( const resource< Lhs > &  lhs,
const resource< Rhs > &  rhs 
)
noexcept

Compares two handles.

Template Parameters
LhsType of resource managed by the first handle.
RhsType of resource managed by the second handle.
Parameters
lhsA valid handle.
rhsA valid handle.
Returns
False if both handles refer to the same resource, true otherwise.

Definition at line 185 of file resource.hpp.

◆ operator!=() [12/12]

constexpr bool entt::operator!= ( const type_info lhs,
const type_info rhs 
)
inlineconstexprnoexcept

Compares the contents of two type info objects.

Parameters
lhsA type info object.
rhsA type info object.
Returns
True if the two type info objects differ, false otherwise.

Definition at line 190 of file type_info.hpp.

◆ operator""_hs()

constexpr hashed_string entt::literals::operator""_hs ( const char *  str,
std::size_t   
)
constexprnoexcept

User defined literal for hashed strings.

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

Definition at line 309 of file hashed_string.hpp.

◆ operator""_hws()

constexpr hashed_wstring entt::literals::operator""_hws ( const wchar_t *  str,
std::size_t   
)
constexprnoexcept

User defined literal for hashed wstrings.

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

Definition at line 318 of file hashed_string.hpp.

◆ operator+() [1/2]

template<typename... Type, typename... Other>
constexpr 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 209 of file type_traits.hpp.

◆ operator+() [2/2]

template<auto... Value, auto... Other>
constexpr 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 473 of file type_traits.hpp.

◆ operator<() [1/3]

template<typename Char >
constexpr bool entt::operator< ( const basic_hashed_string< Char > &  lhs,
const basic_hashed_string< Char > &  rhs 
)
constexprnoexcept

Compares two hashed strings.

Template Parameters
CharCharacter type.
Parameters
lhsA valid hashed string.
rhsA valid hashed string.
Returns
True if the first element is less than the second, false otherwise.

Definition at line 253 of file hashed_string.hpp.

◆ operator<() [2/3]

template<typename Lhs , typename Rhs >
bool entt::operator< ( const resource< Lhs > &  lhs,
const resource< Rhs > &  rhs 
)
noexcept

Compares two handles.

Template Parameters
LhsType of resource managed by the first handle.
RhsType of resource managed by the second handle.
Parameters
lhsA valid handle.
rhsA valid handle.
Returns
True if the first handle is less than the second, false otherwise.

Definition at line 198 of file resource.hpp.

◆ operator<() [3/3]

constexpr bool entt::operator< ( const type_info lhs,
const type_info rhs 
)
constexprnoexcept

Compares two type info objects.

Parameters
lhsA valid type info object.
rhsA valid type info object.
Returns
True if the first element is less than the second, false otherwise.

Definition at line 200 of file type_info.hpp.

◆ operator<=() [1/3]

template<typename Char >
constexpr bool entt::operator<= ( const basic_hashed_string< Char > &  lhs,
const basic_hashed_string< Char > &  rhs 
)
constexprnoexcept

Compares two hashed strings.

Template Parameters
CharCharacter type.
Parameters
lhsA valid hashed string.
rhsA valid hashed string.
Returns
True if the first element is less than or equal to the second, false otherwise.

Definition at line 266 of file hashed_string.hpp.

◆ operator<=() [2/3]

template<typename Lhs , typename Rhs >
bool entt::operator<= ( const resource< Lhs > &  lhs,
const resource< Rhs > &  rhs 
)
noexcept

Compares two handles.

Template Parameters
LhsType of resource managed by the first handle.
RhsType of resource managed by the second handle.
Parameters
lhsA valid handle.
rhsA valid handle.
Returns
True if the first handle is less than or equal to the second, false otherwise.

Definition at line 225 of file resource.hpp.

◆ operator<=() [3/3]

constexpr bool entt::operator<= ( const type_info lhs,
const type_info rhs 
)
constexprnoexcept

Compares two type info objects.

Parameters
lhsA valid type info object.
rhsA valid type info object.
Returns
True if the first element is less than or equal to the second, false otherwise.

Definition at line 211 of file type_info.hpp.

◆ operator==() [1/7]

template<typename... Args, typename... Other>
bool entt::operator== ( const basic_handle< Args... > &  lhs,
const basic_handle< Other... > &  rhs 
)
noexcept

Compares two handles.

Template Parameters
ArgsScope of the first handle.
OtherScope of the second handle.
Parameters
lhsA valid handle.
rhsA valid handle.
Returns
True if both handles refer to the same registry and the same entity, false otherwise.

Definition at line 357 of file handle.hpp.

◆ operator==() [2/7]

template<typename Char >
constexpr bool entt::operator== ( const basic_hashed_string< Char > &  lhs,
const basic_hashed_string< Char > &  rhs 
)
constexprnoexcept

Compares two hashed strings.

Template Parameters
CharCharacter type.
Parameters
lhsA valid hashed string.
rhsA valid hashed string.
Returns
True if the two hashed strings are identical, false otherwise.

Definition at line 229 of file hashed_string.hpp.

◆ operator==() [3/7]

template<typename Entity >
constexpr bool entt::operator== ( const Entity  entity,
const null_t  other 
)
constexprnoexcept

Compares a null object and an identifier of any type.

Template Parameters
EntityType of identifier.
Parameters
entityIdentifier with which to compare.
otherA null object yet to be converted.
Returns
False if the two elements differ, true otherwise.

Definition at line 260 of file entity.hpp.

◆ operator==() [4/7]

template<typename Entity >
constexpr bool entt::operator== ( const Entity  entity,
const tombstone_t  other 
)
constexprnoexcept

Compares a tombstone object and an identifier of any type.

Template Parameters
EntityType of identifier.
Parameters
entityIdentifier with which to compare.
otherA tombstone object yet to be converted.
Returns
False if the two elements differ, true otherwise.

Definition at line 340 of file entity.hpp.

◆ operator==() [5/7]

template<typename Type >
constexpr bool entt::operator== ( const iota_iterator< Type > &  lhs,
const iota_iterator< Type > &  rhs 
)
constexprnoexcept

Comparison operator.

Template Parameters
TypeValue type of the iota iterator.
Parameters
lhsA properly initialized iota iterator.
rhsA properly initialized iota iterator.
Returns
True if the two iterators are identical, false otherwise.

Definition at line 119 of file iterator.hpp.

◆ operator==() [6/7]

template<typename Lhs , typename Rhs >
bool entt::operator== ( const resource< Lhs > &  lhs,
const resource< Rhs > &  rhs 
)
noexcept

Compares two handles.

Template Parameters
LhsType of resource managed by the first handle.
RhsType of resource managed by the second handle.
Parameters
lhsA valid handle.
rhsA valid handle.
Returns
True if both handles refer to the same resource, false otherwise.

Definition at line 172 of file resource.hpp.

◆ operator==() [7/7]

constexpr bool entt::operator== ( const type_info lhs,
const type_info rhs 
)
inlineconstexprnoexcept

Compares the contents of two type info objects.

Parameters
lhsA type info object.
rhsA type info object.
Returns
True if the two type info objects are identical, false otherwise.

Definition at line 180 of file type_info.hpp.

◆ operator>() [1/3]

template<typename Char >
constexpr bool entt::operator> ( const basic_hashed_string< Char > &  lhs,
const basic_hashed_string< Char > &  rhs 
)
constexprnoexcept

Compares two hashed strings.

Template Parameters
CharCharacter type.
Parameters
lhsA valid hashed string.
rhsA valid hashed string.
Returns
True if the first element is greater than the second, false otherwise.

Definition at line 279 of file hashed_string.hpp.

◆ operator>() [2/3]

template<typename Lhs , typename Rhs >
bool entt::operator> ( const resource< Lhs > &  lhs,
const resource< Rhs > &  rhs 
)
noexcept

Compares two handles.

Template Parameters
LhsType of resource managed by the first handle.
RhsType of resource managed by the second handle.
Parameters
lhsA valid handle.
rhsA valid handle.
Returns
True if the first handle is greater than the second, false otherwise.

Definition at line 211 of file resource.hpp.

◆ operator>() [3/3]

constexpr bool entt::operator> ( const type_info lhs,
const type_info rhs 
)
constexprnoexcept

Compares two type info objects.

Parameters
lhsA valid type info object.
rhsA valid type info object.
Returns
True if the first element is greater than the second, false otherwise.

Definition at line 222 of file type_info.hpp.

◆ operator>=() [1/3]

template<typename Char >
constexpr bool entt::operator>= ( const basic_hashed_string< Char > &  lhs,
const basic_hashed_string< Char > &  rhs 
)
constexprnoexcept

Compares two hashed strings.

Template Parameters
CharCharacter type.
Parameters
lhsA valid hashed string.
rhsA valid hashed string.
Returns
True if the first element is greater than or equal to the second, false otherwise.

Definition at line 292 of file hashed_string.hpp.

◆ operator>=() [2/3]

template<typename Lhs , typename Rhs >
bool entt::operator>= ( const resource< Lhs > &  lhs,
const resource< Rhs > &  rhs 
)
noexcept

Compares two handles.

Template Parameters
LhsType of resource managed by the first handle.
RhsType of resource managed by the second handle.
Parameters
lhsA valid handle.
rhsA valid handle.
Returns
True if the first handle is greater than or equal to the second, false otherwise.

Definition at line 239 of file resource.hpp.

◆ operator>=() [3/3]

constexpr bool entt::operator>= ( const type_info lhs,
const type_info rhs 
)
constexprnoexcept

Compares two type info objects.

Parameters
lhsA valid type info object.
rhsA valid type info object.
Returns
True if the first element is greater than or equal to the second, false otherwise.

Definition at line 233 of file type_info.hpp.

◆ overload() [1/2]

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

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 45 of file utility.hpp.

◆ overload() [2/2]

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

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 34 of file utility.hpp.

◆ overloaded()

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

Deduction guide.

Template Parameters
FuncTypes of function objects.

◆ poly_call()

template<std::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 172 of file poly.hpp.

◆ propagate_on_container_copy_assignment()

template<typename Allocator >
constexpr 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 74 of file memory.hpp.

◆ propagate_on_container_move_assignment()

template<typename Allocator >
constexpr 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 87 of file memory.hpp.

◆ propagate_on_container_swap()

template<typename Allocator >
constexpr 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 100 of file memory.hpp.

◆ resolve() [1/8]

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

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 decltype(internal::meta_context::value)::const_iterator > entt::resolve ( )
inlinenoexcept

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  id)
inlinenoexcept

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

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

Definition at line 75 of file resolve.hpp.

◆ resolve() [4/8]

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

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 decltype(internal::meta_context::value)::const_iterator > entt::resolve ( const meta_ctx ctx)
inlinenoexcept

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  id 
)
inlinenoexcept

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

Parameters
ctxThe context from which to search for meta types.
idUnique 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 
)
inlinenoexcept

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 85 of file resolve.hpp.

◆ resolve() [8/8]

meta_type entt::resolve ( const type_info info)
inlinenoexcept

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 96 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 >
constexpr void entt::swap ( compressed_pair< First, Second > &  lhs,
compressed_pair< First, Second > &  rhs 
)
inlineconstexpr

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 239 of file compressed_pair.hpp.

◆ to_address()

template<typename Type >
constexpr auto entt::to_address ( Type &&  ptr)
constexprnoexcept

Unwraps fancy pointers, does nothing otherwise (waiting for C++20).

Template Parameters
TypePointer type.
Parameters
ptrFancy or raw pointer.
Returns
A raw pointer that represents the address of the original pointer.

Definition at line 59 of file memory.hpp.

◆ to_entity() [1/3]

template<typename... Args, typename Component >
basic_registry< Args... >::entity_type entt::to_entity ( const basic_registry< Args... > &  reg,
const Component &  instance 
)

Returns the entity part once converted to the underlying type.

Template Parameters
ArgsRegistry type template parameters.
ComponentType of component.
Parameters
regA registry that contains the given entity and its components.
instanceA valid component instance.
Returns
The entity associated with the given component.

Definition at line 151 of file helper.hpp.

◆ to_entity() [2/3]

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

Returns the entity associated with a given component.

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

Definition at line 128 of file helper.hpp.

◆ to_entity() [3/3]

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

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 181 of file entity.hpp.

◆ to_integral()

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

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 170 of file entity.hpp.

◆ to_version()

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

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 192 of file entity.hpp.

◆ type_id() [1/2]

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

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 249 of file type_info.hpp.

◆ type_id() [2/2]

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

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 260 of file type_info.hpp.

◆ uninitialized_construct_using_allocator()

template<typename Type , typename Allocator , typename... Args>
constexpr Type * entt::uninitialized_construct_using_allocator ( Type *  value,
const Allocator &  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.
AllocatorType of allocator used to manage memory and elements.
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 277 of file memory.hpp.

◆ unwrap_tuple()

template<typename Type >
constexpr 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 45 of file tuple.hpp.

◆ uses_allocator_construction_args()

template<typename Type , typename Allocator , typename... Args>
constexpr auto entt::uses_allocator_construction_args ( const Allocator &  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.
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
The arguments needed to create an object of the given type.

Definition at line 240 of file memory.hpp.

Variable Documentation

◆ choice

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

Variable template for the choice trick.

Template Parameters
NNumber of choices available.

Definition at line 33 of file type_traits.hpp.

◆ collector

constexpr basic_collector entt::collector {}
inlineconstexpr

Variable template used to ease the definition of collectors.

Definition at line 109 of file observer.hpp.

◆ connect_arg

template<auto Candidate>
constexpr 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 >
constexpr 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 24 of file enum.hpp.

◆ exclude

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

Variable template for exclusion lists.

Template Parameters
TypeList of types.

Definition at line 140 of file fwd.hpp.

◆ get

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

Variable template for lists of observed components.

Template Parameters
TypeList of types.

Definition at line 157 of file fwd.hpp.

◆ is_applicable_r_v

template<typename Ret , typename Func , typename Args >
constexpr 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 652 of file type_traits.hpp.

◆ is_applicable_v

template<typename Func , typename Args >
constexpr 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 628 of file type_traits.hpp.

◆ is_complete_v

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

Helper variable template.

Template Parameters
TypeThe type to test.

Definition at line 671 of file type_traits.hpp.

◆ is_ebco_eligible_v

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

Helper variable template.

Template Parameters
TypeThe type to test.

Definition at line 719 of file type_traits.hpp.

◆ is_equality_comparable_v

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

Helper variable template.

Template Parameters
TypeThe type to test.

Definition at line 818 of file type_traits.hpp.

◆ is_iterator_v

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

Helper variable template.

Template Parameters
TypeThe type to test.

Definition at line 703 of file type_traits.hpp.

◆ is_meta_pointer_like_v

template<typename Type >
constexpr 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 >
constexpr bool entt::is_meta_policy_v = is_meta_policy<Type>::value
inlineconstexpr

Helper variable template.

Template Parameters
TypeType to check.

Definition at line 54 of file policy.hpp.

◆ is_transparent_v

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

Helper variable template.

Template Parameters
TypeThe type to test.

Definition at line 738 of file type_traits.hpp.

◆ is_tuple_v

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

Helper variable template.

Template Parameters
TypeThe type to test.

Definition at line 35 of file tuple.hpp.

◆ meta_ctx_arg

constexpr meta_ctx_arg_t entt::meta_ctx_arg {}
inlineconstexpr

Constant of type meta_context_arg_t used to disambiguate calls.

Definition at line 31 of file context.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 52 of file monostate.hpp.

◆ null

constexpr 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 363 of file entity.hpp.

◆ owned

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

Variable template for lists of owned components.

Template Parameters
TypeList of types.

Definition at line 174 of file fwd.hpp.

◆ size_of_v

template<typename Type >
constexpr std::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 73 of file type_traits.hpp.

◆ tombstone

constexpr 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 372 of file entity.hpp.

◆ type_list_contains_v

template<typename List , typename Type >
constexpr 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 312 of file type_traits.hpp.

◆ type_list_index_v

template<typename Type , typename List >
constexpr std::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 200 of file type_traits.hpp.

◆ unpack_as_value

template<auto Value, typename >
constexpr 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 89 of file type_traits.hpp.

◆ value_list_contains_v

template<typename List , auto Value>
constexpr 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 573 of file type_traits.hpp.

◆ value_list_element_v

template<std::size_t Index, typename List >
constexpr 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 412 of file type_traits.hpp.

◆ value_list_index_v

template<auto Value, typename List >
constexpr std::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 464 of file type_traits.hpp.