![]() |
![]() |
Public Member Functions | |
connection () | |
Constructs an empty connection object. | |
connection (const connection& c) | |
Constructs a connection object copying an existing one. | |
template<typename T_slot> | |
connection (const slot_iterator<T_slot>& it) | |
Constructs a connection object from a slot list iterator. | |
connection (slot_base& sl) | |
Constructs a connection object from a slot object. | |
connection& | operator= (const connection& c) |
Overrides this connection object copying another one. | |
template<typename T_slot> | |
connection& | operator= (const slot_iterator<T_slot>& it) |
Overrides this connection object with another slot list iterator. | |
~connection () | |
bool | empty () const |
Returns whether the connection is still active. | |
bool | connected () const |
Returns whether the connection is still active. | |
bool | blocked () const |
Returns whether the connection is blocked. | |
bool | block (bool should_block=true) |
Sets or unsets the blocking state of this connection. | |
bool | unblock () |
Unsets the blocking state of this connection. | |
void | disconnect () |
Disconnects the referred slot. | |
operator bool () | |
Returns whether the connection is still active. | |
Static Public Member Functions | |
static void* | notify (void* data) |
Callback that is executed when the referred slot is destroyed. |
Iterators must not be used beyond the lifetime of the list they work on. A connection object can be created from a slot list iterator and may safely be used to disconnect the referred slot at any time (disconnect()). If the slot has already been destroyed, disconnect() does nothing. empty() or operator bool() can be used to test whether the connection is still active. The connection can be blocked (block(), unblock()).
This is possible because the connection object gets notified when the referred slot dies (notify()).
|
Constructs an empty connection object.
|
|
Constructs a connection object copying an existing one.
|
|
Constructs a connection object from a slot list iterator.
|
|
Constructs a connection object from a slot object. This is only useful if you create your own slot list.
|
|
|
|
Sets or unsets the blocking state of this connection. See slot_base::block() for details.
|
|
Returns whether the connection is blocked.
|
|
Returns whether the connection is still active.
|
|
Disconnects the referred slot.
|
|
Returns whether the connection is still active.
|
|
Callback that is executed when the referred slot is destroyed.
|
|
Returns whether the connection is still active.
|
|
Overrides this connection object with another slot list iterator.
|
|
Overrides this connection object copying another one.
|
|
Unsets the blocking state of this connection.
|