Disconnects a Connection automatically upon destruction.
More...
#include <ndn-cxx/util/signal/scoped-connection.hpp>
Disconnects a Connection automatically upon destruction.
Definition at line 33 of file scoped-connection.hpp.
◆ ScopedConnection() [1/4]
constexpr ndn::util::signal::ScopedConnection::ScopedConnection |
( |
| ) |
|
|
constexprdefaultnoexcept |
◆ ScopedConnection() [2/4]
ndn::util::signal::ScopedConnection::ScopedConnection |
( |
const ScopedConnection & |
| ) |
|
|
delete |
◆ ScopedConnection() [3/4]
◆ ScopedConnection() [4/4]
ndn::util::signal::ScopedConnection::ScopedConnection |
( |
Connection |
connection | ) |
|
|
noexcept |
◆ ~ScopedConnection()
ndn::util::signal::ScopedConnection::~ScopedConnection |
( |
| ) |
|
◆ disconnect()
void ndn::util::signal::ScopedConnection::disconnect |
( |
| ) |
|
◆ isConnected()
bool ndn::util::signal::ScopedConnection::isConnected |
( |
| ) |
const |
|
noexcept |
Check if the connection is connected to the signal.
- Returns
- false when a default-constructed connection is used, the connection is released, or the connection is disconnected
Definition at line 55 of file scoped-connection.cpp.
◆ operator=() [1/3]
Assign a connection.
If a different connection has been assigned to this instance previously, that connection will be disconnected immediately.
Definition at line 34 of file scoped-connection.cpp.
◆ operator=() [2/3]
◆ operator=() [3/3]
Move assignment operator.
◆ release()
void ndn::util::signal::ScopedConnection::release |
( |
| ) |
|
|
noexcept |