Update of /cvsroot/boost-sandbox/boost-sandbox/boost/thread_safe_signals/detail
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv12171/boost/thread_safe_signals/detail
Modified Files:
slot_template.hpp
Log Message:
Added typedefs to slot class for argN_type, and added "arity" constant.
Index: slot_template.hpp
===================================================================
RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/thread_safe_signals/detail/slot_template.hpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- slot_template.hpp 28 Feb 2007 16:19:41 -0000 1.3
+++ slot_template.hpp 28 Feb 2007 17:06:53 -0000 1.4
@@ -30,6 +30,18 @@
friend class BOOST_SLOT_CLASS_NAME(BOOST_SIGNALS_NUM_ARGS);
typedef R result_type;
+// typedef Tn argn_type;
+#define BOOST_SIGNAL_MISC_STATEMENT(z, n, data) \
+ typedef BOOST_PP_CAT(T, BOOST_PP_INC(n)) BOOST_PP_CAT(BOOST_PP_CAT(arg, BOOST_PP_INC(n)), _type);
+ BOOST_PP_REPEAT(BOOST_SIGNALS_NUM_ARGS, BOOST_SIGNAL_MISC_STATEMENT, ~)
+#undef BOOST_SIGNAL_MISC_STATEMENT
+#if BOOST_SIGNALS_NUM_ARGS == 1
+ typedef arg1_type argument_type;
+#elif BOOST_SIGNALS_NUM_ARGS == 2
+ typedef arg1_type first_argument_type;
+ typedef arg2_type second_argument_type;
+#endif
+ static const int arity = BOOST_SIGNALS_NUM_ARGS;
template<typename F>
BOOST_SLOT_CLASS_NAME(BOOST_SIGNALS_NUM_ARGS)(const F& f): _slot_function(signalslib::detail::get_invocable_slot(f, signalslib::detail::tag_type(f)))
@@ -48,7 +60,7 @@
{
}
// bind syntactic sugar
-// const ArgTypeN argN
+// ArgTypeN argN
#define BOOST_SLOT_BINDING_ARG_DECL(z, n, data) \
BOOST_PP_CAT(ArgType, n) BOOST_PP_CAT(arg, n)
// template<typename Func, typename ArgType0, typename ArgType1, ..., typename ArgTypen-1> slotN(...
|