EnTT: entt::sigh_helper< Registry, Type > Struct Template Reference

EnTT 3.16.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 >:
[legend]
Collaboration diagram for entt::sigh_helper< Registry, Type >:
[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_type & | registry () 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

  Registry | Basic registry type.
  Type | Type of signal to connect listeners to.

Definition at line 191 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 193 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

  ref | A valid reference to a registry.
  id | Optional name for the underlying storage to use.

Definition at line 200 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

  Candidate | Function or member to connect.
  Args | Type of class or type of payload, if any.

Parameters

  args | A valid object that fits the purpose, if any.

Returns
  This helper.

Definition at line 212 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

  Candidate | Function or member to connect.
  Args | Type of class or type of payload, if any.

Parameters

  args | A valid object that fits the purpose, if any.

Returns
  This helper.

Definition at line 238 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

  Candidate | Function or member to connect.
  Args | Type of class or type of payload, if any.

Parameters

  args | A valid object that fits the purpose, if any.

Returns
  This helper.

Definition at line 225 of file helper.hpp.

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

- src/entt/entity/helper.hpp