[libsigc++2/variadic_bind2: 44/68] track_obj.h: Use this as a normal .h file.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsigc++2/variadic_bind2: 44/68] track_obj.h: Use this as a normal .h file.
- Date: Tue, 1 Mar 2016 21:47:25 +0000 (UTC)
commit e130782e96f9c712f0e206192905a08336bbed2d
Author: Murray Cumming <murrayc murrayc com>
Date: Thu Jan 14 21:44:15 2016 +0100
track_obj.h: Use this as a normal .h file.
Instead of genrating it from a .h.m4 file.
sigc++/.gitignore | 1 -
.../{macros/track_obj.h.m4 => track_obj.h} | 38 +++++--------------
sigc++/filelist.am | 7 ++--
3 files changed, 13 insertions(+), 33 deletions(-)
---
diff --git a/sigc++/.gitignore b/sigc++/.gitignore
index 71cf1e3..4bdfbf2 100644
--- a/sigc++/.gitignore
+++ b/sigc++/.gitignore
@@ -1,6 +1,5 @@
/limit_reference.h
/adaptors/bind.h
/adaptors/retype.h
-/adaptors/track_obj.h
/functors/mem_fun.h
/functors/slot.h
diff --git a/sigc++/adaptors/macros/track_obj.h.m4 b/sigc++/adaptors/track_obj.h
similarity index 78%
rename from sigc++/adaptors/macros/track_obj.h.m4
rename to sigc++/adaptors/track_obj.h
index 38a831f..e454f9e 100644
--- a/sigc++/adaptors/macros/track_obj.h.m4
+++ b/sigc++/adaptors/track_obj.h
@@ -1,27 +1,6 @@
-dnl Copyright 2013, The libsigc++ Development Team
-dnl
-dnl This file is part of libsigc++.
-dnl
-dnl This library is free software; you can redistribute it and/or
-dnl modify it under the terms of the GNU Lesser General Public
-dnl License as published by the Free Software Foundation; either
-dnl version 2.1 of the License, or (at your option) any later version.
-dnl
-dnl This library is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-dnl Lesser General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU Lesser General Public
-dnl License along with this library. If not, see <http://www.gnu.org/licenses/>.
-dnl
-divert(-1)
-
-include(template.macros.m4)
-
-
-divert(0)dnl
-_FIREWALL([ADAPTORS_TRACK_OBJ])
+#ifndef _SIGC_ADAPTORS_TRACK_OBJ_H_
+#define _SIGC_ADAPTORS_TRACK_OBJ_H_
+
#include <sigc++/adaptors/adaptor_trait.h>
#include <sigc++/limit_reference.h>
#include <sigc++/tuple_for_each_const.h>
@@ -36,7 +15,7 @@ namespace sigc {
*
* The functor returned by sigc::track_obj() is formally an adaptor, but it does
* not alter the signature, return type or behaviour of the supplied functor.
- * Up to CALL_SIZE objects can be tracked. operator()() can have up to CALL_SIZE arguments.
+ * Up to 7 objects can be tracked. operator()() can have up to 7 arguments.
*
* @par Example:
* @code
@@ -45,9 +24,9 @@ namespace sigc {
* void foo(bar&);
* {
* bar some_bar;
- * some_signal.connect([[&some_bar]](){ foo(some_bar); });
+ * some_signal.connect([&some_bar](){ foo(some_bar); });
* // NOT disconnected automatically when some_bar goes out of scope
- * some_signal.connect(sigc::track_obj([[&some_bar]](){ foo(some_bar); }, some_bar);
+ * some_signal.connect(sigc::track_obj([&some_bar](){ foo(some_bar); }, some_bar);
* // disconnected automatically when some_bar goes out of scope
* }
* @endcode
@@ -136,9 +115,10 @@ struct visitor<track_obj_functor<T_functor, T_obj...>>
}
private:
- template<typename T_element, typename T_action>
+ template<typename T_element>
struct TrackObjVisitForEach
{
+ template<typename T_action>
static
void
visit(const T_element& element, const T_action& action)
@@ -169,3 +149,5 @@ track_obj(const T_functor& _A_func, const T_obj&... _A_obj)
} /* namespace sigc */
+
+#endif /* _SIGC_ADAPTORS_TRACK_OBJ_H_ */
diff --git a/sigc++/filelist.am b/sigc++/filelist.am
index 267cc90..0341dc7 100644
--- a/sigc++/filelist.am
+++ b/sigc++/filelist.am
@@ -27,12 +27,10 @@ functors_built_h = slot.h mem_fun.h
# Adaptors (adaptors/)
adaptors_m4 = bind.h.m4 \
- retype.h.m4 \
- track_obj.h.m4
+ retype.h.m4
adaptors_built_cc =
adaptors_built_h = bind.h \
- retype.h \
- track_obj.h
+ retype.h
# Combine all the above parts with right directories prefixed
sigc_m4 = $(base_m4:%=macros/%) \
@@ -70,6 +68,7 @@ sigc_public_h = \
adaptors/compose.h \
adaptors/exception_catch.h \
adaptors/hide.h \
+ adaptors/track_obj.h \
adaptors/retype_return.h \
functors/functor_trait.h \
functors/functors.h \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]