EnTT 3.13.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
entt::sigh_helper< Registry, Type > Struct Template Referencefinal

Signal connection helper for registries. More...

#include <helper.hpp>

Inheritance diagram for entt::sigh_helper< Registry, Type >:
Inheritance graph
[legend]
Collaboration diagram for entt::sigh_helper< Registry, Type >:
Collaboration graph
[legend]

Public Types

using registry_type = Registry
 Registry type.
 
- Public Types inherited from entt::sigh_helper< Registry >
using registry_type = Registry
 Registry type.
 

Public Member Functions

 sigh_helper (registry_type &ref, const id_type id=type_hash< Type >::value())
 Constructs a helper for a given registry.
 
template<auto Candidate, typename... Args>
auto on_construct (Args &&...args)
 Forwards the call to on_construct on the underlying storage.
 
template<auto Candidate, typename... Args>
auto on_update (Args &&...args)
 Forwards the call to on_update on the underlying storage.
 
template<auto Candidate, typename... Args>
auto on_destroy (Args &&...args)
 Forwards the call to on_destroy on the underlying storage.
 
- Public Member Functions inherited from entt::sigh_helper< Registry >
 sigh_helper (registry_type &ref)
 Constructs a helper for a given registry.
 
template<typename Type >
auto with (const id_type id=type_hash< Type >::value()) noexcept
 Binds a properly initialized helper to a given signal type.
 
registry_typeregistry () noexcept
 Returns a reference to the underlying registry.
 

Detailed Description

template<typename Registry, typename Type>
struct entt::sigh_helper< Registry, Type >

Signal connection helper for registries.

Template Parameters
RegistryBasic registry type.
TypeType of signal to connect listeners to.

Definition at line 208 of file helper.hpp.

Member Typedef Documentation

◆ registry_type

template<typename Registry , typename Type >
using entt::sigh_helper< Registry, Type >::registry_type = Registry

Registry type.

Definition at line 210 of file helper.hpp.

Constructor & Destructor Documentation

◆ sigh_helper()

template<typename Registry , typename Type >
entt::sigh_helper< Registry, Type >::sigh_helper ( registry_type ref,
const id_type  id = type_hash<Type>::value() 
)
inline

Constructs a helper for a given registry.

Parameters
refA valid reference to a registry.
idOptional name for the underlying storage to use.

Definition at line 217 of file helper.hpp.

Member Function Documentation

◆ on_construct()

template<typename Registry , typename Type >
template<auto Candidate, typename... Args>
auto entt::sigh_helper< Registry, Type >::on_construct ( Args &&...  args)
inline

Forwards the call to on_construct on the underlying storage.

Template Parameters
CandidateFunction or member to connect.
ArgsType of class or type of payload, if any.
Parameters
argsA valid object that fits the purpose, if any.
Returns
This helper.

Definition at line 229 of file helper.hpp.

◆ on_destroy()

template<typename Registry , typename Type >
template<auto Candidate, typename... Args>
auto entt::sigh_helper< Registry, Type >::on_destroy ( Args &&...  args)
inline

Forwards the call to on_destroy on the underlying storage.

Template Parameters
CandidateFunction or member to connect.
ArgsType of class or type of payload, if any.
Parameters
argsA valid object that fits the purpose, if any.
Returns
This helper.

Definition at line 255 of file helper.hpp.

◆ on_update()

template<typename Registry , typename Type >
template<auto Candidate, typename... Args>
auto entt::sigh_helper< Registry, Type >::on_update ( Args &&...  args)
inline

Forwards the call to on_update on the underlying storage.

Template Parameters
CandidateFunction or member to connect.
ArgsType of class or type of payload, if any.
Parameters
argsA valid object that fits the purpose, if any.
Returns
This helper.

Definition at line 242 of file helper.hpp.


The documentation for this struct was generated from the following file: