Update of /cvsroot/boost-sandbox/boost-sandbox/boost
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv22644/boost
Modified Files:
thread_safe_signal.hpp
Log Message:
Added Signature template parameter to slot class, so that an
operator() could be added. Bind can be used to bind together
slots with different signatures now. Added some syntactic
sugar to slot constructors, so a bind() call is inserted automatically
for the constructors that take more than one argument.
All tracking for automatic connection
management is now done through slot::track().
Added track_test.cpp test program, which tests some of the new
functionality.
Index: thread_safe_signal.hpp
===================================================================
RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/thread_safe_signal.hpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- thread_safe_signal.hpp 22 Feb 2007 16:57:12 -0000 1.14
+++ thread_safe_signal.hpp 27 Feb 2007 21:19:25 -0000 1.15
@@ -21,8 +21,14 @@
// For more information, see http://www.boost.org
-#ifndef _EPG_SIGNALS_H
-#define _EPG_SIGNALS_H
+#ifndef _THREAD_SAFE_SIGNAL_HPP
+#define _THREAD_SAFE_SIGNAL_HPP
+
+#ifndef BOOST_SIGNALS_MAX_ARGS
+#define BOOST_SIGNALS_MAX_ARGS 10
+#endif
+
+#define BOOST_SIGNALS_NAMESPACE signalslib
#include <algorithm>
#include <boost/function.hpp>
@@ -34,20 +40,16 @@
#include <boost/shared_ptr.hpp>
#include <boost/type_traits.hpp>
#include <boost/thread_safe_signals/detail/signals_common.hpp>
+#include <boost/thread_safe_signals/detail/signals_common_macros.hpp>
#include <boost/thread_safe_signals/detail/slot_groups.hpp>
#include <boost/thread_safe_signals/detail/slot_call_iterator.hpp>
-#include <boost/thread_safe_signals/single_threaded.hpp>
#include <boost/thread_safe_signals/connection.hpp>
+#include <boost/thread_safe_signals/single_threaded.hpp>
+#include <boost/thread_safe_signals/slot.hpp>
#include <boost/thread_safe_signals/track.hpp>
#include <functional>
-#define BOOST_SIGNALS_NAMESPACE signalslib
-
-#ifndef EPG_SIGNALS_MAX_ARGS
-#define EPG_SIGNALS_MAX_ARGS 10
-#endif
-
-#define BOOST_PP_ITERATION_LIMITS (0, EPG_SIGNALS_MAX_ARGS)
+#define BOOST_PP_ITERATION_LIMITS (0, BOOST_SIGNALS_MAX_ARGS)
#define BOOST_PP_FILENAME_1 <boost/thread_safe_signals/detail/signal_template.hpp>
#include BOOST_PP_ITERATE()
@@ -57,13 +59,13 @@
// for backward compatibility
namespace signals = signalslib;
#endif
- template<typename Signature,
+ template<typename Signature,
typename Combiner = boost::last_value<typename boost::function_traits<Signature>::result_type >,
typename Group = int,
typename GroupCompare = std::less<Group>,
typename SlotFunction = boost::function<Signature>,
typename ThreadingModel = signalslib::single_threaded >
- class signal: public signalslib::detail::signalN<boost::function_traits<Signature>::arity,
+ class signal: public signalslib::detail::signalN<function_traits<Signature>::arity,
Signature, Combiner, Group, GroupCompare, SlotFunction, ThreadingModel>::type
{
private:
@@ -76,4 +78,4 @@
};
}
-#endif // _EPG_SIGNALS_H
+#endif // _THREAD_SAFE_SIGNAL_HPP
|