[libsigc++2] Documentation cleanup: sigc::hide() always only hides one signal argument
- From: Michael Hasselmann <mikhas src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [libsigc++2] Documentation cleanup: sigc::hide() always only hides one signal argument
- Date: Fri, 18 Sep 2009 13:33:20 +0000 (UTC)
commit 4fe3aad92b89a04b657fe34236393044a571a85f
Author: Michael Hasselmann <michaelh openismus com>
Date: Thu Sep 17 11:22:37 2009 +0200
Documentation cleanup: sigc::hide() always only hides one signal argument
* sigc++/adaptors/macros/hide.h.m4: The documentation stated that sigc::hide()
could discard multiple signal arguments when in fact the whole API only allows
control over one (dummy) signal argument at a time. The "multiple argument
hiding" example lives in it own section now to make it clearer you have to nest
sigc::hide() for that.
ChangeLog | 10 ++++++++++
sigc++/adaptors/macros/hide.h.m4 | 11 ++++++++---
2 files changed, 18 insertions(+), 3 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 4920d9d..218f3ec 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2009-09-17 Michael Hasselmann <michaelh openismus com>
+
+ Documentation cleanup: sigc::hide() always only hides one signal argument
+
+ * sigc++/adaptors/macros/hide.h.m4: The documentation stated that sigc::hide()
+ could discard multiple signal arguments when in fact the whole API only allows
+ control over one (dummy) signal argument at a time. The "multiple argument
+ hiding" example lives in it own section now to make it clearer you have to nest
+ sigc::hide() for that.
+
2009-09-13 Daniel Elstner <daniel kitta gmail com>
Enable verbose output of autoreconf
diff --git a/sigc++/adaptors/macros/hide.h.m4 b/sigc++/adaptors/macros/hide.h.m4
index d0ba300..9e68fbc 100644
--- a/sigc++/adaptors/macros/hide.h.m4
+++ b/sigc++/adaptors/macros/hide.h.m4
@@ -127,7 +127,7 @@ namespace sigc {
/** @defgroup hide hide(), hide_return()
* sigc::hide() alters an arbitrary functor in that it adds a parameter
* whose value is ignored on invocation of the returned functor.
- * Thus you can discard one or more of the arguments of a signal.
+ * Thus you can discard one argument of a signal.
*
* You may optionally specify the zero-based position of the parameter
* to ignore as a template argument. The default is to ignore the last
@@ -145,8 +145,6 @@ namespace sigc {
* sigc::hide<0>(&foo)(1,2,3); // adds a dummy parameter at the beginning and calls foo(2,3)
* sigc::hide<1>(&foo)(1,2,3); // adds a dummy parameter in the middle and calls foo(1,3)
* sigc::hide<2>(&foo)(1,2,3); // adds a dummy parameter at the back and calls foo(1,2)
- * // multiple argument hiding ...
- * sigc::hide(sigc::hide(&foo))(1,2,3,4); // adds two dummy parameters at the back and calls foo(1,2)
* @endcode
*
* The functor sigc::hide() returns can be passed into
@@ -159,6 +157,13 @@ namespace sigc {
* some_signal.connect(sigc::hide(&foo));
* @endcode
*
+ * sigc::hide() can be nested in order to discard multiple arguments.
+ * @par Example:
+ * @code
+ * // multiple argument hiding ...
+ * sigc::hide(sigc::hide(&foo))(1,2,3,4); // adds two dummy parameters at the back and calls foo(1,2)
+ * @endcode
+
* sigc::hide_return() alters an arbitrary functor by
* dropping its return value, thus converting it to a void functor.
*
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]