![]() |
Home | Libraries | People | FAQ | More |
boost::signals2::scoped_connection — Limits a signal-slot connection lifetime to a particular scope.
// In header: <boost/signals2/connection.hpp> class scoped_connection : public connection { public: // construct/copy/destruct (); (connection&); (scoped_connection&&); (connection&&); scoped_connection& (connection&); scoped_connection& (scoped_connection&&); scoped_connection& (connection&&); ~(); // public methods connection (); private: // construct/copy/destruct (scoped_connection&); scoped_connection& (scoped_connection&); };
A connection which automatically disconnects on destruction.
The methods of the scoped_connection
class (including those
inherited from its base connection
class) are thread-safe with the exception
of signals2::connection::swap, release, and
the assignment operator. A scoped_connection
object
should not be accessed concurrently when any of these operations is in progress.
However, it is always safe to access a different connection
object
in another thread, even if it references the same underlying signal-slot connection.
scoped_connection
public construct/copy/destruct();
Default constructs an empty scoped_connection.
Postconditions: |
|
Throws: |
Will not throw. |
(connection& other);
Effects: |
|
Postconditions: |
|
Throws: |
Will not throw. |
(scoped_connection&& other);
Move constructor.
Effects: |
|
Throws: |
Will not throw. |
(connection&& other);
Move constructor.
Effects: |
|
Throws: |
Will not throw. |
scoped_connection& (connection& rhs);
Copy assignment from unscoped connection.
Effects: |
|
Postconditions: |
|
Throws: |
Will not throw. |
scoped_connection& (scoped_connection&& rhs);
Move assignment.
Effects: |
|
Throws: |
Will not throw. |
scoped_connection& (connection&& rhs);
Move assignment.
Effects: |
|
Throws: |
Will not throw. |
~();
Effects: |
If
|
scoped_connection
public methodsconnection ();
Effects: |
Releases the connection so it will not be disconnected by the |
Postconditions: |
|
Returns: |
A connection object referencing the connection which was
released by the |
scoped_connection
private construct/copy/destruct(scoped_connection& other);
The scoped_connection class is not copyable. It may only be copy constructed from an unscoped
connection
object.
scoped_connection& (scoped_connection& rhs);
The scoped_connection class is not copyable. It may only be copy assigned from an unscoped
connection
object.