disconnects a Connection automatically upon destruction More...
#include <scoped-connection.hpp>
Public Member Functions | |
ScopedConnection () | |
ScopedConnection (const Connection &connection) | |
implicit constructor from Connection More... | |
ScopedConnection (ScopedConnection &&other) noexcept | |
move constructor More... | |
ScopedConnection & | operator= (const Connection &connection) |
assigns a connection More... | |
~ScopedConnection () noexcept | |
disconnects the connection More... | |
void | disconnect () |
disconnects the connection manually More... | |
bool | isConnected () const |
check if the connection is connected to the signal More... | |
void | release () |
releases the connection so that it won't be disconnected when this ScopedConnection is destructed More... | |
disconnects a Connection automatically upon destruction
Definition at line 33 of file scoped-connection.hpp.
ndn::util::signal::ScopedConnection::ScopedConnection | ( | ) |
Definition at line 33 of file scoped-connection.cpp.
ndn::util::signal::ScopedConnection::ScopedConnection | ( | const Connection & | connection | ) |
implicit constructor from Connection
connection | the Connection to be disconnected upon destruction |
Definition at line 37 of file scoped-connection.cpp.
|
noexcept |
move constructor
Definition at line 42 of file scoped-connection.cpp.
|
noexcept |
disconnects the connection
Definition at line 58 of file scoped-connection.cpp.
References ndn::util::signal::Connection::disconnect().
ScopedConnection & ndn::util::signal::ScopedConnection::operator= | ( | const Connection & | connection | ) |
assigns a connection
If a different connection has been assigned to this instance previously, that connection will be disconnected immediately.
Definition at line 49 of file scoped-connection.cpp.
References ndn::util::signal::Connection::disconnect().
void ndn::util::signal::ScopedConnection::disconnect | ( | ) |
disconnects the connection manually
Definition at line 64 of file scoped-connection.cpp.
References ndn::util::signal::Connection::disconnect().
Referenced by nfd::rib::AutoPrefixPropagator::disable().
bool ndn::util::signal::ScopedConnection::isConnected | ( | ) | const |
check if the connection is connected to the signal
Definition at line 70 of file scoped-connection.cpp.
References ndn::util::signal::Connection::isConnected().
void ndn::util::signal::ScopedConnection::release | ( | ) |
releases the connection so that it won't be disconnected when this ScopedConnection is destructed
Definition at line 76 of file scoped-connection.cpp.