22 #ifndef NDN_CXX_UTIL_SIGNAL_CONNECTION_HPP
23 #define NDN_CXX_UTIL_SIGNAL_CONNECTION_HPP
56 return !m_disconnect.expired();
65 template<
typename Owner,
typename ...TArgs>
80 return (!lhs.isConnected() && !rhs.isConnected()) ||
81 (!lhs.m_disconnect.owner_before(rhs.m_disconnect) &&
82 !rhs.m_disconnect.owner_before(lhs.m_disconnect));
99 weak_ptr<DisconnectFunction> m_disconnect;
represents a connection to a signal
constexpr Connection() noexcept=default
friend bool operator==(const Connection &lhs, const Connection &rhs) noexcept
compare for equality
bool isConnected() const noexcept
check if connected to the signal
void disconnect()
disconnects from the signal
friend bool operator!=(const Connection &lhs, const Connection &rhs) noexcept
provides a lightweight signal / event system
Common includes and macros used throughout the library.
std::function< void()> DisconnectFunction