Skip to content

Commit 9a48bad

Browse files
committed
connection: Improve the class documentation
Fixes #88
1 parent 14d2ed3 commit 9a48bad

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

sigc++/connection.h

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,20 @@
2323

2424
namespace sigc {
2525

26-
/** Convinience class for safe disconnection.
27-
* Iterators must not be used beyond the lifetime of the list
28-
* they work on. A connection object can be created from a
29-
* slot list iterator and may safely be used to disconnect
30-
* the referred slot at any time (disconnect()). If the slot
31-
* has already been destroyed, disconnect() does nothing. empty() or
32-
* operator bool() can be used to test whether the connection is
33-
* still active. The connection can be blocked (block(), unblock()).
26+
/** Convenience class for safe disconnection.
3427
*
35-
* This is possible because the connection object gets notified
36-
* when the referred slot dies (notify()).
28+
* sigc::signal::connect() returns a slot list iterator.
29+
* Iterators must not be used beyond the lifetime of the list they work on.
30+
* A connection object can be created from a slot list iterator.
31+
* @code
32+
* sigc::connection conn = sig.connect(sigc::mem_fun(a, &A::foo));
33+
* @endcode
34+
* The connection may safely be used to disconnect the referred slot
35+
* at any time (disconnect()). If the slot has already been destroyed,
36+
* disconnect() does nothing. This is possible because the connection
37+
* object gets notified when the referred slot dies (notify()). empty() or
38+
* operator bool() can be used to test whether the connection is still active.
39+
* The connection can be blocked (block(), unblock()).
3740
*
3841
* @ingroup signal
3942
*/

0 commit comments

Comments
 (0)