Clementine
|
Fast and reliable entity-component system. More...
#include <entt.hpp>
Public Types | |
using | entity_type = Entity |
Underlying entity identifier. | |
using | version_type = typename traits_type::version_type |
Underlying version type. | |
using | size_type = std::size_t |
Unsigned integer type. | |
using | poly_storage = typename poly_storage_traits< Entity >::storage_type |
Poly storage type. | |
Public Member Functions | |
basic_registry ()=default | |
Default constructor. | |
basic_registry (basic_registry &&)=default | |
Default move constructor. | |
basic_registry & | operator= (basic_registry &&)=default |
Default move assignment operator. More... | |
template<typename Component > | |
void | prepare () |
Prepares a pool for the given type if required. More... | |
poly_storage | storage (const type_info info) |
Returns a poly storage for a given type. More... | |
poly_storage | storage (const type_info info) const |
Returns a poly storage for a given type. More... | |
template<typename Component > | |
size_type | size () const |
Returns the number of existing components of the given type. More... | |
size_type | size () const ENTT_NOEXCEPT |
Returns the number of entities created so far. More... | |
size_type | alive () const |
Returns the number of entities still in use. More... | |
template<typename... Component> | |
void | reserve (const size_type cap) |
Increases the capacity of the registry or of the pools for the given components. More... | |
void | reserve_pools (const size_t count) |
Reserves enough space to store count pools. More... | |
template<typename Component > | |
size_type | capacity () const |
Returns the capacity of the pool for the given component. More... | |
size_type | capacity () const ENTT_NOEXCEPT |
Returns the number of entities that a registry has currently allocated space for. More... | |
template<typename... Component> | |
void | shrink_to_fit () |
Requests the removal of unused capacity for the given components. More... | |
template<typename... Component> | |
bool | empty () const |
Checks whether the registry or the pools of the given components are empty. More... | |
template<typename Component > | |
const Component * | raw () const |
Direct access to the list of components of a given pool. More... | |
template<typename Component > | |
Component * | raw () |
Direct access to the list of components of a given pool. More... | |
template<typename Component > | |
const entity_type * | data () const |
Direct access to the list of entities of a given pool. More... | |
const entity_type * | data () const ENTT_NOEXCEPT |
Direct access to the list of entities of a registry. More... | |
entity_type | destroyed () const ENTT_NOEXCEPT |
Returns the head of the list of destroyed entities. More... | |
bool | valid (const entity_type entity) const |
Checks if an entity identifier refers to a valid entity. More... | |
version_type | current (const entity_type entity) const |
Returns the actual version for an entity identifier. More... | |
entity_type | create () |
Creates a new entity and returns it. More... | |
entity_type | create (const entity_type hint) |
Creates a new entity and returns it. More... | |
template<typename It > | |
void | create (It first, It last) |
Assigns each element in a range an entity. More... | |
template<typename It > | |
void | assign (It first, It last, const entity_type destroyed) |
Assigns entities to an empty registry. More... | |
void | destroy (const entity_type entity) |
Destroys an entity. More... | |
void | destroy (const entity_type entity, const version_type version) |
Destroys an entity. More... | |
template<typename It > | |
void | destroy (It first, It last) |
Destroys all the entities in a range. More... | |
template<typename Component , typename... Args> | |
decltype(auto) | emplace (const entity_type entity, Args &&... args) |
Assigns the given component to an entity. More... | |
template<typename Component , typename It > | |
void | insert (It first, It last, const Component &value={}) |
Assigns each entity in a range the given component. More... | |
template<typename Component , typename EIt , typename CIt > | |
void | insert (EIt first, EIt last, CIt from, CIt to) |
Assigns each entity in a range the given components. More... | |
template<typename Component , typename... Args> | |
decltype(auto) | emplace_or_replace (const entity_type entity, Args &&... args) |
Assigns or replaces the given component for an entity. More... | |
template<typename Component , typename... Func> | |
decltype(auto) | patch (const entity_type entity, Func &&... func) |
Patches the given component for an entity. More... | |
template<typename Component , typename... Args> | |
decltype(auto) | replace (const entity_type entity, Args &&... args) |
Replaces the given component for an entity. More... | |
template<typename... Component> | |
void | remove (const entity_type entity) |
Removes the given components from an entity. More... | |
template<typename... Component, typename It > | |
void | remove (It first, It last) |
Removes the given components from all the entities in a range. More... | |
template<typename... Component> | |
size_type | remove_if_exists (const entity_type entity) |
Removes the given components from an entity. More... | |
void | remove_all (const entity_type entity) |
Removes all the components from an entity and makes it orphaned. More... | |
template<typename... Component> | |
bool | has (const entity_type entity) const |
Checks if an entity has all the given components. More... | |
template<typename... Component> | |
bool | any (const entity_type entity) const |
Checks if an entity has at least one of the given components. More... | |
template<typename... Component> | |
decltype(auto) | get ([[maybe_unused]] const entity_type entity) const |
Returns references to the given components for an entity. More... | |
template<typename... Component> | |
decltype(auto) | get ([[maybe_unused]] const entity_type entity) |
Returns references to the given components for an entity. More... | |
template<typename Component , typename... Args> | |
decltype(auto) | get_or_emplace (const entity_type entity, Args &&... args) |
Returns a reference to the given component for an entity. More... | |
template<typename... Component> | |
auto | try_get ([[maybe_unused]] const entity_type entity) const |
Returns pointers to the given components for an entity. More... | |
template<typename... Component> | |
auto | try_get ([[maybe_unused]] const entity_type entity) |
Returns pointers to the given components for an entity. More... | |
template<typename... Component> | |
void | clear () |
Clears a whole registry or the pools for the given components. More... | |
template<typename Func > | |
void | each (Func func) const |
Iterates all the entities that are still in use. More... | |
bool | orphan (const entity_type entity) const |
Checks if an entity has components assigned. More... | |
template<typename Func > | |
void | orphans (Func func) const |
Iterates orphans and applies them the given function object. More... | |
template<typename Component > | |
auto | on_construct () |
Returns a sink object for the given component. More... | |
template<typename Component > | |
auto | on_update () |
Returns a sink object for the given component. More... | |
template<typename Component > | |
auto | on_destroy () |
Returns a sink object for the given component. More... | |
template<typename... Component, typename... Exclude> | |
basic_view< Entity, exclude_t< Exclude... >, Component... > | view (exclude_t< Exclude... >={}) const |
Returns a view for the given components. More... | |
template<typename... Component, typename... Exclude> | |
basic_view< Entity, exclude_t< Exclude... >, Component... > | view (exclude_t< Exclude... >={}) |
Returns a view for the given components. More... | |
template<typename ItComp , typename ItExcl = id_type *> | |
basic_runtime_view< Entity > | runtime_view (ItComp first, ItComp last, ItExcl from={}, ItExcl to={}) const |
Returns a runtime view for the given components. More... | |
template<typename... Owned, typename... Get, typename... Exclude> | |
basic_group< Entity, exclude_t< Exclude... >, get_t< Get... >, Owned... > | group (get_t< Get... >, exclude_t< Exclude... >={}) |
Returns a group for the given components. More... | |
template<typename... Owned, typename... Get, typename... Exclude> | |
basic_group< Entity, exclude_t< Exclude... >, get_t< Get... >, Owned... > | group_if_exists (get_t< Get... >, exclude_t< Exclude... >={}) const |
Returns a group for the given components. More... | |
template<typename... Owned, typename... Exclude> | |
basic_group< Entity, exclude_t< Exclude... >, get_t<>, Owned... > | group (exclude_t< Exclude... >={}) |
Returns a group for the given components. More... | |
template<typename... Owned, typename... Exclude> | |
basic_group< Entity, exclude_t< Exclude... >, get_t<>, Owned... > | group_if_exists (exclude_t< Exclude... >={}) const |
Returns a group for the given components. More... | |
template<typename... Component> | |
bool | sortable () const |
Checks whether the given components belong to any group. More... | |
template<typename... Owned, typename... Get, typename... Exclude> | |
bool | sortable (const basic_group< Entity, exclude_t< Exclude... >, get_t< Get... >, Owned... > &) ENTT_NOEXCEPT |
Checks whether a group can be sorted. More... | |
template<typename Component , typename Compare , typename Sort = std_sort, typename... Args> | |
void | sort (Compare compare, Sort algo=Sort{}, Args &&... args) |
Sorts the pool of entities for the given component. More... | |
template<typename To , typename From > | |
void | sort () |
Sorts two pools of components in the same way. More... | |
template<typename Func > | |
void | visit (entity_type entity, Func func) const |
Visits an entity and returns the type info for its components. More... | |
template<typename Func > | |
void | visit (Func func) const |
Visits a registry and returns the type info for its components. More... | |
template<typename Type , typename... Args> | |
Type & | set (Args &&... args) |
Binds an object to the context of the registry. More... | |
template<typename Type > | |
void | unset () |
Unsets a context variable if it exists. More... | |
template<typename Type , typename... Args> | |
Type & | ctx_or_set (Args &&... args) |
Binds an object to the context of the registry. More... | |
template<typename Type > | |
const Type * | try_ctx () const |
Returns a pointer to an object in the context of the registry. More... | |
template<typename Type > | |
Type * | try_ctx () |
Returns a pointer to an object in the context of the registry. More... | |
template<typename Type > | |
const Type & | ctx () const |
Returns a reference to an object in the context of the registry. More... | |
template<typename Type > | |
Type & | ctx () |
Returns a reference to an object in the context of the registry. More... | |
template<typename Func > | |
void | ctx (Func func) const |
Visits a registry and returns the type info for its context variables. More... | |
Static Public Member Functions | |
static entity_type | entity (const entity_type entity) ENTT_NOEXCEPT |
Returns the entity identifier without the version. More... | |
static version_type | version (const entity_type entity) ENTT_NOEXCEPT |
Returns the version stored along with an entity identifier. More... | |
Fast and reliable entity-component system.
The registry is the core class of the entity-component framework.
It stores entities and arranges pools of components on a per request basis. By means of a registry, users can manage entities and components, then create views or groups to iterate them.
Entity | A valid entity type (see entt_traits for more details). |
|
inline |
Returns the number of entities still in use.
|
inline |
Checks if an entity has at least one of the given components.
Component | Components for which to perform the check. |
entity | A valid entity identifier. |
|
inline |
Assigns entities to an empty registry.
This function is intended for use in conjunction with raw
and assign
.
Don't try to inject ranges of randomly generated entities nor the wrong head for the list of destroyed entities. There is no guarantee that a registry will continue to work properly in this case.
It | Type of input iterator. |
first | An iterator to the first element of the range of entities. |
last | An iterator past the last element of the range of entities. |
destroyed | The head of the list of destroyed entities. |
|
inline |
Returns the capacity of the pool for the given component.
Component | Type of component in which one is interested. |
|
inline |
Returns the number of entities that a registry has currently allocated space for.
|
inline |
Clears a whole registry or the pools for the given components.
Component | Types of components to remove from their entities. |
|
inline |
Creates a new entity and returns it.
There are two kinds of possible entity identifiers:
|
inline |
Creates a new entity and returns it.
If the requested entity isn't in use, the suggested identifier is created and returned. Otherwise, a new one will be generated for this purpose.
hint | A desired entity identifier. |
|
inline |
Assigns each element in a range an entity.
It | Type of forward iterator. |
first | An iterator to the first element of the range to generate. |
last | An iterator past the last element of the range to generate. |
|
inline |
Returns a reference to an object in the context of the registry.
Type | Type of object to get. |
|
inline |
Returns a reference to an object in the context of the registry.
Type | Type of object to get. |
|
inline |
Visits a registry and returns the type info for its context variables.
The signature of the function should be equivalent to the following:
Returned identifiers are those of the context variables currently set.
Func | Type of the function object to invoke. |
func | A valid function object. |
|
inline |
Binds an object to the context of the registry.
In case the context doesn't contain the given object, the parameters provided are used to construct it.
Type | Type of object to set. |
Args | Types of arguments to use to construct the object. |
args | Parameters to use to initialize the object. |
|
inline |
Returns the actual version for an entity identifier.
entity | A valid entity identifier. |
|
inline |
Direct access to the list of entities of a given pool.
The returned pointer is such that range [data<Component>(), data<Component>() + size<Component>())
is always a valid range, even if the container is empty.
Entities are in the reverse order as imposed by the sorting functionalities.
Component | Type of component in which one is interested. |
|
inline |
Direct access to the list of entities of a registry.
The returned pointer is such that range [data(), data() + size())
is always a valid range, even if the container is empty.
|
inline |
Destroys an entity.
When an entity is destroyed, its version is updated and the identifier can be recycled at any time.
entity | A valid entity identifier. |
|
inline |
Destroys an entity.
If the entity isn't already destroyed, the suggested version is used instead of the implicitly generated one.
entity | A valid entity identifier. |
version | A desired version upon destruction. |
|
inline |
Destroys all the entities in a range.
It | Type of input iterator. |
first | An iterator to the first element of the range of entities. |
last | An iterator past the last element of the range of entities. |
|
inline |
Returns the head of the list of destroyed entities.
This function is intended for use in conjunction with assign
.
The returned entity has an invalid identifier in all cases.
|
inline |
Iterates all the entities that are still in use.
The function object is invoked for each entity that is still in use.
The signature of the function should be equivalent to the following:
This function is fairly slow and should not be used frequently. However, it's useful for iterating all the entities still in use, regardless of their components.
Func | Type of the function object to invoke. |
func | A valid function object. |
|
inline |
Assigns the given component to an entity.
A new instance of the given component is created and initialized with the arguments provided (the component must have a proper constructor or be of aggregate type). Then the component is assigned to the given entity.
Component | Type of component to create. |
Args | Types of arguments to use to construct the component. |
entity | A valid entity identifier. |
args | Parameters to use to initialize the component. |
|
inline |
Assigns or replaces the given component for an entity.
Equivalent to the following snippet (pseudocode):
Prefer this function anyway because it has slightly better performance.
Component | Type of component to assign or replace. |
Args | Types of arguments to use to construct the component. |
entity | A valid entity identifier. |
args | Parameters to use to initialize the component. |
|
inline |
Checks whether the registry or the pools of the given components are empty.
A registry is considered empty when it doesn't contain entities that are still in use.
Component | Types of components in which one is interested. |
|
inlinestatic |
Returns the entity identifier without the version.
entity | An entity identifier, either valid or not. |
|
inline |
Returns references to the given components for an entity.
Component | Types of components to get. |
entity | A valid entity identifier. |
|
inline |
Returns references to the given components for an entity.
Component | Types of components to get. |
entity | A valid entity identifier. |
|
inline |
Returns a reference to the given component for an entity.
In case the entity doesn't own the component, the parameters provided are used to construct it.
Equivalent to the following snippet (pseudocode):
Prefer this function anyway because it has slightly better performance.
Component | Type of component to get. |
Args | Types of arguments to use to construct the component. |
entity | A valid entity identifier. |
args | Parameters to use to initialize the component. |
|
inline |
Returns a group for the given components.
This kind of objects are created on the fly and share with the registry its internal data structures.
Feel free to discard a group after the use. Creating and destroying a group is an incredibly cheap operation because they do not require any type of initialization, but for the first time they are requested.
As a rule of thumb, storing a group should never be an option.
Groups support exclusion lists and can own types of components. The more types are owned by a group, the faster it is to iterate entities and components.
However, groups also affect some features of the registry such as the creation and destruction of components, which will consequently be slightly slower (nothing that can be noticed in most cases).
Owned | Types of components owned by the group. |
Get | Types of components observed by the group. |
Exclude | Types of components used to filter the group. |
|
inline |
Returns a group for the given components.
Owned | Types of components owned by the group. |
Exclude | Types of components used to filter the group. |
|
inline |
Returns a group for the given components.
Owned | Types of components owned by the group. |
Get | Types of components observed by the group. |
Exclude | Types of components used to filter the group. |
|
inline |
Returns a group for the given components.
Owned | Types of components owned by the group. |
Exclude | Types of components used to filter the group. |
|
inline |
Checks if an entity has all the given components.
Component | Components for which to perform the check. |
entity | A valid entity identifier. |
|
inline |
Assigns each entity in a range the given component.
Component | Type of component to create. |
It | Type of input iterator. |
first | An iterator to the first element of the range of entities. |
last | An iterator past the last element of the range of entities. |
value | An instance of the component to assign. |
|
inline |
Assigns each entity in a range the given components.
Component | Type of component to create. |
EIt | Type of input iterator. |
CIt | Type of input iterator. |
first | An iterator to the first element of the range of entities. |
last | An iterator past the last element of the range of entities. |
from | An iterator to the first element of the range of components. |
to | An iterator past the last element of the range of components. |
|
inline |
Returns a sink object for the given component.
The sink returned by this function can be used to receive notifications whenever a new instance of the given component is created and assigned to an entity.
The function type for a listener is equivalent to:
Listeners are invoked after the component has been assigned to the entity.
Component | Type of component of which to get the sink. |
|
inline |
Returns a sink object for the given component.
The sink returned by this function can be used to receive notifications whenever an instance of the given component is removed from an entity and thus destroyed.
The function type for a listener is equivalent to:
Listeners are invoked before the component has been removed from the entity.
Component | Type of component of which to get the sink. |
|
inline |
Returns a sink object for the given component.
The sink returned by this function can be used to receive notifications whenever an instance of the given component is explicitly updated.
The function type for a listener is equivalent to:
Listeners are invoked after the component has been updated.
Component | Type of component of which to get the sink. |
|
default |
Default move assignment operator.
|
inline |
Checks if an entity has components assigned.
entity | A valid entity identifier. |
|
inline |
Iterates orphans and applies them the given function object.
The function object is invoked for each entity that is still in use and has no components assigned.
The signature of the function should be equivalent to the following:
This function can be very slow and should not be used frequently.
Func | Type of the function object to invoke. |
func | A valid function object. |
|
inline |
Patches the given component for an entity.
The signature of the functions should be equivalent to the following:
Component | Type of component to patch. |
Func | Types of the function objects to invoke. |
entity | A valid entity identifier. |
func | Valid function objects. |
|
inline |
Prepares a pool for the given type if required.
Component | Type of component for which to prepare a pool. |
|
inline |
Direct access to the list of components of a given pool.
The returned pointer is such that range [raw<Component>(), raw<Component>() + size<Component>())
is always a valid range, even if the container is empty.
Components are in the reverse order as imposed by the sorting functionalities.
Component | Type of component in which one is interested. |
|
inline |
Direct access to the list of components of a given pool.
The returned pointer is such that range [raw<Component>(), raw<Component>() + size<Component>())
is always a valid range, even if the container is empty.
Components are in the reverse order as imposed by the sorting functionalities.
Component | Type of component in which one is interested. |
|
inline |
Removes the given components from an entity.
Component | Types of components to remove. |
entity | A valid entity identifier. |
|
inline |
Removes the given components from all the entities in a range.
Component | Types of components to remove. |
It | Type of input iterator. |
first | An iterator to the first element of the range of entities. |
last | An iterator past the last element of the range of entities. |
|
inline |
Removes all the components from an entity and makes it orphaned.
entity | A valid entity identifier. |
|
inline |
Removes the given components from an entity.
Equivalent to the following snippet (pseudocode):
Prefer this function anyway because it has slightly better performance.
Component | Types of components to remove. |
entity | A valid entity identifier. |
|
inline |
Replaces the given component for an entity.
A new instance of the given component is created and initialized with the arguments provided (the component must have a proper constructor or be of aggregate type). Then the component is assigned to the given entity.
Component | Type of component to replace. |
Args | Types of arguments to use to construct the component. |
entity | A valid entity identifier. |
args | Parameters to use to initialize the component. |
|
inline |
Increases the capacity of the registry or of the pools for the given components.
If no components are specified, the capacity of the registry is increased, that is the number of entities it contains. Otherwise the capacity of the pools for the given components is increased.
In both cases, if the new capacity is greater than the current capacity, new storage is allocated, otherwise the method does nothing.
Component | Types of components for which to reserve storage. |
cap | Desired capacity. |
|
inline |
Reserves enough space to store count
pools.
count | Number of pools to reserve space for. |
|
inline |
Returns a runtime view for the given components.
This kind of objects are created on the fly and share with the registry its internal data structures.
Users should throw away the view after use. Fortunately, creating and destroying a runtime view is an incredibly cheap operation because they do not require any type of initialization.
As a rule of thumb, storing a view should never be an option.
Runtime views are to be used when users want to construct a view from some external inputs and don't know at compile-time what are the required components.
ItComp | Type of input iterator for the components to use to construct the view. |
ItExcl | Type of input iterator for the components to use to filter the view. |
first | An iterator to the first element of the range of components to use to construct the view. |
last | An iterator past the last element of the range of components to use to construct the view. |
from | An iterator to the first element of the range of components to use to filter the view. |
to | An iterator past the last element of the range of components to use to filter the view. |
|
inline |
Binds an object to the context of the registry.
If the value already exists it is overwritten, otherwise a new instance of the given type is created and initialized with the arguments provided.
Type | Type of object to set. |
Args | Types of arguments to use to construct the object. |
args | Parameters to use to initialize the value. |
|
inline |
Requests the removal of unused capacity for the given components.
Component | Types of components for which to reclaim unused capacity. |
|
inline |
Returns the number of existing components of the given type.
Component | Type of component of which to return the size. |
|
inline |
Returns the number of entities created so far.
|
inline |
Sorts the pool of entities for the given component.
The order of the elements in a pool is highly affected by assignments of components to entities and deletions. Components are arranged to maximize the performance during iterations and users should not make any assumption on the order.
This function can be used to impose an order to the elements in the pool of the given component. The order is kept valid until a component of the given type is assigned or removed from an entity.
The comparison function object must return true
if the first element is less than the second one, false
otherwise. The signature of the comparison function should be equivalent to one of the following:
Moreover, the comparison function object shall induce a strict weak ordering on the values.
The sort function oject must offer a member function template operator()
that accepts three arguments:
The comparison funtion object received by the sort function object hasn't necessarily the type of the one passed along with the other parameters to this member function.
Component | Type of components to sort. |
Compare | Type of comparison function object. |
Sort | Type of sort function object. |
Args | Types of arguments to forward to the sort function object. |
compare | A valid comparison function object. |
algo | A valid sort function object. |
args | Arguments to forward to the sort function object, if any. |
|
inline |
Sorts two pools of components in the same way.
The order of the elements in a pool is highly affected by assignments of components to entities and deletions. Components are arranged to maximize the performance during iterations and users should not make any assumption on the order.
It happens that different pools of components must be sorted the same way because of runtime and/or performance constraints. This function can be used to order a pool of components according to the order between the entities in another pool of components.
How it works
Being A
and B
the two sets where B
is the master (the one the order of which rules) and A
is the slave (the one to sort), after a call to this function an iterator for A
will return the entities according to the following rules:
A
that are also in B
are returned first according to the order they have in B
.A
that are not in B
are returned in no particular order after all the other entities.Any subsequent change to B
won't affect the order in A
.
To | Type of components to sort. |
From | Type of components to use to sort. |
|
inline |
Checks whether the given components belong to any group.
Component | Types of components in which one is interested. |
|
inline |
Checks whether a group can be sorted.
Owned | Types of components owned by the group. |
Get | Types of components observed by the group. |
Exclude | Types of components used to filter the group. |
|
inline |
Returns a poly storage for a given type.
info | The type for which to return a poly storage. |
|
inline |
Returns a poly storage for a given type.
info | The type for which to return a poly storage. |
|
inline |
Returns a pointer to an object in the context of the registry.
Type | Type of object to get. |
|
inline |
Returns a pointer to an object in the context of the registry.
Type | Type of object to get. |
|
inline |
Returns pointers to the given components for an entity.
Component | Types of components to get. |
entity | A valid entity identifier. |
|
inline |
Returns pointers to the given components for an entity.
Component | Types of components to get. |
entity | A valid entity identifier. |
|
inline |
Unsets a context variable if it exists.
Type | Type of object to set. |
|
inline |
Checks if an entity identifier refers to a valid entity.
entity | An entity identifier, either valid or not. |
|
inlinestatic |
Returns the version stored along with an entity identifier.
entity | An entity identifier, either valid or not. |
|
inline |
Returns a view for the given components.
This kind of objects are created on the fly and share with the registry its internal data structures.
Feel free to discard a view after the use. Creating and destroying a view is an incredibly cheap operation because they do not require any type of initialization.
As a rule of thumb, storing a view should never be an option.
Views do their best to iterate the smallest set of candidate entities. In particular:
Views in no way affect the functionalities of the registry nor those of the underlying pools.
Component | Type of components used to construct the view. |
Exclude | Types of components used to filter the view. |
|
inline |
Returns a view for the given components.
This kind of objects are created on the fly and share with the registry its internal data structures.
Feel free to discard a view after the use. Creating and destroying a view is an incredibly cheap operation because they do not require any type of initialization.
As a rule of thumb, storing a view should never be an option.
Views do their best to iterate the smallest set of candidate entities. In particular:
Views in no way affect the functionalities of the registry nor those of the underlying pools.
Component | Type of components used to construct the view. |
Exclude | Types of components used to filter the view. |
|
inline |
Visits an entity and returns the type info for its components.
The signature of the function should be equivalent to the following:
Returned identifiers are those of the components owned by the entity.
Func | Type of the function object to invoke. |
entity | A valid entity identifier. |
func | A valid function object. |
|
inline |
Visits a registry and returns the type info for its components.
The signature of the function should be equivalent to the following:
Returned identifiers are those of the components managed by the registry.
Func | Type of the function object to invoke. |
func | A valid function object. |