Disconnects a Connection automatically upon destruction.
More...
#include <ndn-cxx/util/signal/scoped-connection.hpp>
Disconnects a Connection automatically upon destruction.
Definition at line 32 of file scoped-connection.hpp.
◆ ScopedConnection() [1/4]
constexpr ndn::signal::ScopedConnection::ScopedConnection |
( |
| ) |
|
|
constexprdefaultnoexcept |
◆ ScopedConnection() [2/4]
◆ ScopedConnection() [3/4]
◆ ScopedConnection() [4/4]
ndn::signal::ScopedConnection::ScopedConnection |
( |
Connection |
connection | ) |
|
|
noexcept |
◆ ~ScopedConnection()
ndn::signal::ScopedConnection::~ScopedConnection |
( |
| ) |
|
◆ disconnect()
void ndn::signal::ScopedConnection::disconnect |
( |
| ) |
|
◆ isConnected()
bool ndn::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 53 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 32 of file scoped-connection.cpp.
◆ operator=() [2/3]
◆ operator=() [3/3]
Move assignment operator.
◆ release()
void ndn::signal::ScopedConnection::release |
( |
| ) |
|
|
noexcept |