Mixin type used to add signal support to storage types.
More...
#include <mixin.hpp>
|
using | allocator_type = typename underlying_type::allocator_type |
| Allocator type.
|
|
using | entity_type = typename underlying_type::entity_type |
| Underlying entity identifier.
|
|
using | registry_type = owner_type |
| Expected registry type.
|
|
template<typename Type, typename Registry>
class entt::basic_sigh_mixin< Type, Registry >
Mixin type used to add signal support to storage types.
The function type of a listener is equivalent to:
Fast and reliable entity-component system.
typename underlying_type::entity_type entity_type
Underlying entity identifier.
This applies to all signals made available.
- Template Parameters
-
Type | Underlying storage type. |
Registry | Basic registry type. |
Definition at line 29 of file mixin.hpp.
◆ allocator_type
template<typename Type , typename Registry >
Allocator type.
Definition at line 89 of file mixin.hpp.
◆ entity_type
template<typename Type , typename Registry >
Underlying entity identifier.
Definition at line 91 of file mixin.hpp.
◆ registry_type
template<typename Type , typename Registry >
Expected registry type.
Definition at line 93 of file mixin.hpp.
◆ basic_sigh_mixin() [1/4]
template<typename Type , typename Registry >
Default constructor.
Definition at line 96 of file mixin.hpp.
◆ basic_sigh_mixin() [2/4]
template<typename Type , typename Registry >
Constructs an empty storage with a given allocator.
- Parameters
-
allocator | The allocator to use. |
Definition at line 103 of file mixin.hpp.
◆ basic_sigh_mixin() [3/4]
template<typename Type , typename Registry >
Move constructor.
- Parameters
-
other | The instance to move from. |
Definition at line 114 of file mixin.hpp.
◆ basic_sigh_mixin() [4/4]
template<typename Type , typename Registry >
Allocator-extended move constructor.
- Parameters
-
other | The instance to move from. |
allocator | The allocator to use. |
Definition at line 126 of file mixin.hpp.
◆ bind()
template<typename Type , typename Registry >
Forwards variables to derived classes, if any.
- Parameters
-
value | A variable wrapped in an opaque container. |
Definition at line 287 of file mixin.hpp.
◆ emplace() [1/2]
template<typename Type , typename Registry >
Emplace elements into a storage.
The behavior of this operation depends on the underlying storage type (for example, components vs entities).
Refer to the specific documentation for more details.
- Returns
- A return value as returned by the underlying storage.
Definition at line 214 of file mixin.hpp.
◆ emplace() [2/2]
template<typename Type , typename Registry >
template<typename... Args>
Emplace elements into a storage.
The behavior of this operation depends on the underlying storage type (for example, components vs entities).
Refer to the specific documentation for more details.
- Template Parameters
-
Args | Types of arguments to forward to the underlying storage. |
- Parameters
-
hint | A valid identifier. |
args | Parameters to forward to the underlying storage. |
- Returns
- A return value as returned by the underlying storage.
Definition at line 233 of file mixin.hpp.
◆ insert()
template<typename Type , typename Registry >
template<typename It , typename... Args>
Emplace elements into a storage.
The behavior of this operation depends on the underlying storage type (for example, components vs entities).
Refer to the specific documentation for more details.
- Template Parameters
-
It | Iterator type (as required by the underlying storage type). |
Args | Types of arguments to forward to the underlying storage. |
- Parameters
-
first | An iterator to the first element of the range. |
last | An iterator past the last element of the range. |
args | Parameters to use to forward to the underlying storage. |
Definition at line 273 of file mixin.hpp.
◆ on_construct()
template<typename Type , typename Registry >
Returns a sink object.
The sink returned by this function can be used to receive notifications whenever a new instance is created and assigned to an entity.
Listeners are invoked after the object has been assigned to the entity.
- See also
- sink
- Returns
- A temporary sink object.
Definition at line 171 of file mixin.hpp.
◆ on_destroy()
template<typename Type , typename Registry >
Returns a sink object.
The sink returned by this function can be used to receive notifications whenever an instance is removed from an entity and thus destroyed.
Listeners are invoked before the object has been removed from the entity.
- See also
- sink
- Returns
- A temporary sink object.
Definition at line 201 of file mixin.hpp.
◆ on_update()
template<typename Type , typename Registry >
Returns a sink object.
The sink returned by this function can be used to receive notifications whenever an instance is explicitly updated.
Listeners are invoked after the object has been updated.
- See also
- sink
- Returns
- A temporary sink object.
Definition at line 186 of file mixin.hpp.
◆ operator=()
template<typename Type , typename Registry >
Move assignment operator.
- Parameters
-
other | The instance to move from. |
- Returns
- This storage.
Definition at line 138 of file mixin.hpp.
◆ patch()
template<typename Type , typename Registry >
template<typename... Func>
Patches the given instance for an entity.
- Template Parameters
-
Func | Types of the function objects to invoke. |
- Parameters
-
entt | A valid identifier. |
func | Valid function objects. |
- Returns
- A reference to the patched instance.
Definition at line 253 of file mixin.hpp.
◆ swap()
template<typename Type , typename Registry >
Exchanges the contents with those of a given storage.
- Parameters
-
other | Storage to exchange the content with. |
Definition at line 151 of file mixin.hpp.
The documentation for this class was generated from the following files: