Functor for calling zero or more connected callbacks.

Synopsis

Declared in <util/btcsignals.h>

template<
    typename Signature,
    typename Combiner = null_value>
class signal;

Type Aliases

Name

Description

result_type

The result type of invoking the signal, taken from the combiner.

Member Functions

Name

Description

signal [constructor]

Constructors

~signal [destructor]

Destroy the signal and drop all connection state.

operator=

Assignment operators

connect

Connect a new callback to the signal. A forwarding callable accepts anything that can be stored in a std::function.

empty

Returns true if there are no enabled callbacks.

operator()

Execute all enabled callbacks for the signal. Rather than allowing for custom combiners, the behavior of any_of is hard‐coded here.

Template Parameters

Name

Description

Signature

The callable signature accepted by connected callbacks.

Combiner

The combiner that determines the signal's result type.

Created with MrDocs