![]() |
Bitcoin Core 32.99.0
P2P Digital Currency
|
#include <btcsignals.h>
Classes | |
| class | liveness |
| Track liveness. More... | |
Public Member Functions | |
| constexpr | connection () noexcept=default |
| The default constructor creates a connection with no associated signal. | |
| void | disconnect () |
| If a callback is associated with this connection, prevent it from being called in the future. | |
| bool | connected () const |
| Returns true if this connection was created by a signal and has not been disabled. | |
Private Member Functions | |
| connection (std::shared_ptr< liveness > &&state) | |
| Only a signal can create an enabled connection. | |
Private Attributes | |
| std::shared_ptr< liveness > | m_state {} |
| connections have shared_ptr-like copy and move semantics. | |
Friends | |
| template<typename Signature , typename Combiner > | |
| class | signal |
Definition at line 57 of file btcsignals.h.
|
inlineexplicitprivate |
Only a signal can create an enabled connection.
Definition at line 82 of file btcsignals.h.
|
constexprdefaultnoexcept |
The default constructor creates a connection with no associated signal.
|
inline |
Returns true if this connection was created by a signal and has not been disabled.
Definition at line 111 of file btcsignals.h.
|
inline |
If a callback is associated with this connection, prevent it from being called in the future.
If a connection is disabled as part of a signal's callback function, it will not be executed in the current signal invocation.
Note that disconnected callbacks are not removed from their owning signals here. They are garbage collected in signal::connect().
Definition at line 100 of file btcsignals.h.
Definition at line 60 of file btcsignals.h.
|
private |
connections have shared_ptr-like copy and move semantics.
Definition at line 77 of file btcsignals.h.