Class connection
boost::signalslib::connection — Query/disconnect a signal-slot connection.
Synopsis
class connection { public: // construct/copy/destruct connection(); connection(const connection&); connection& operator=(const connection&); // connection management void disconnect() const; bool connected() const; // blocking bool blocked() const; // modifiers void swap(const connection&); // comparisons bool operator==(const connection&) const; bool operator<(const connection&) const; }; // specialized algorithms void swap(connection&, connection&);
Description
The connection class represents a connection between a Signal and a Slot. It is a lightweight object that has the ability to query whether the signal and slot are currently connected, and to disconnect the signal and slot. It is always safe to query or disconnect a connection.
connection
public
construct/copy/destruct
-
connection();
Effects: Sets the currently represented connection to the NULL connection.
Postconditions: !this->connected().Throws: Will not throw.
-
connection(const connection& other);
Effects: thisreferences the connection referenced byother.Throws: Will not throw.
-
connection& operator=(const connection& other);
Effects: thisreferences the connection referenced byother.Throws: Will not throw.
connection blocking
-
bool blocked() const;
Queries if the connection is blocked. A connection may be blocked by creating a
boost::signalslib::shared_connection_blockobject.Returns: trueif the associated slot is either disconnected or blocked,falseotherwise.Throws: Will not throw.
connection modifiers
-
void swap(const connection& other);
Effects: Swaps the connections referenced in
thisandother.Throws: Will not throw.
connection comparisons
-
bool operator==(const connection& other) const;
Returns: trueifthisandotherreference the same connection or both reference the NULL connection, andfalseotherwise.Throws: Will not throw.
-
bool operator<(const connection& other) const;
Returns: trueif the connection referenced bythisprecedes the connection referenced byotherbased on some unspecified ordering, andfalseotherwise.Throws: Will not throw.
connection specialized algorithms
-
void swap(connection& x, connection& y);
Effects: x.swap(y)Throws: Will not throw.