Boost logo

Boost-Commit :

From: stipe_at_[hidden]
Date: 2007-10-27 20:04:54


Author: srajko
Date: 2007-10-27 20:04:51 EDT (Sat, 27 Oct 2007)
New Revision: 40519
URL: http://svn.boost.org/trac/boost/changeset/40519

Log:
add examples, docs, clean code
Added:
   sandbox/SOC/2007/signals/boost/dataflow/signal/component/conditional_templated.hpp
      - copied, changed from r39907, /sandbox/SOC/2007/signals/boost/dataflow/signal/component/conditional.hpp
   sandbox/SOC/2007/signals/boost/dataflow/signal/component/detail/unfused_inherited_templated.hpp
      - copied, changed from r40486, /sandbox/SOC/2007/signals/boost/dataflow/signal/component/detail/unfused_inherited.hpp
   sandbox/SOC/2007/signals/boost/dataflow/signal/component/multiplexer.hpp
      - copied, changed from r40486, /sandbox/SOC/2007/signals/boost/dataflow/signal/component/selector.hpp
   sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_multiplexer.cpp (contents, props changed)
Removed:
   sandbox/SOC/2007/signals/boost/dataflow/signal/component/selector.hpp
Text files modified:
   sandbox/SOC/2007/signals/boost/dataflow/signal/component/conditional_templated.hpp | 19 +++++----
   sandbox/SOC/2007/signals/boost/dataflow/signal/component/counter.hpp | 4 +-
   sandbox/SOC/2007/signals/boost/dataflow/signal/component/detail/generic_template.hpp | 32 +++++++++++-----
   sandbox/SOC/2007/signals/boost/dataflow/signal/component/detail/unfused_inherited_templated.hpp | 24 ++++++-----
   sandbox/SOC/2007/signals/boost/dataflow/signal/component/filter_base.hpp | 2
   sandbox/SOC/2007/signals/boost/dataflow/signal/component/multiplexer.hpp | 61 +++++++++++++++++++-------------
   sandbox/SOC/2007/signals/boost/dataflow/signal/component/socket_sender.hpp | 2
   sandbox/SOC/2007/signals/boost/dataflow/signal/support.hpp | 55 ++++-------------------------
   sandbox/SOC/2007/signals/boost/dataflow/templates/binary_operation.hpp | 3 +
   sandbox/SOC/2007/signals/libs/dataflow/build/xcodeide/signal_network.xcodeproj/project.pbxproj | 10 ++++-
   sandbox/SOC/2007/signals/libs/dataflow/doc/dataflow.qbk | 4 +
   sandbox/SOC/2007/signals/libs/dataflow/doc/signals/components.qbk | 75 +++++++++++++++++++++++++++++++++++----
   sandbox/SOC/2007/signals/libs/dataflow/example/signals/intro_example.cpp | 4 +-
   sandbox/SOC/2007/signals/libs/dataflow/example/simple_distributed_example.cpp | 4 +-
   sandbox/SOC/2007/signals/libs/dataflow/example/simple_example.cpp | 4 +-
   sandbox/SOC/2007/signals/libs/dataflow/test/signals/Jamfile.v2 | 1
   sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_connect.cpp | 2
   sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_filter.cpp | 18 ---------
   sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_multi_args.cpp | 2
   sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_multi_type.cpp | 2
   sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_mutex.cpp | 12 +++---
   sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_same_type.cpp | 2
   22 files changed, 189 insertions(+), 153 deletions(-)

Copied: sandbox/SOC/2007/signals/boost/dataflow/signal/component/conditional_templated.hpp (from r39907, /sandbox/SOC/2007/signals/boost/dataflow/signal/component/conditional.hpp)
==============================================================================
--- /sandbox/SOC/2007/signals/boost/dataflow/signal/component/conditional.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/signal/component/conditional_templated.hpp 2007-10-27 20:04:51 EDT (Sat, 27 Oct 2007)
@@ -3,18 +3,19 @@
 // 1.0. (See accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 
-#ifndef SIGNAL_NETWORK_CONDITIONAL_HPP
+#ifndef SIGNAL_NETWORK_CONDITIONA_TEMPLATED_HPP
 #ifndef SIGNAL_NETWORK_GENERIC_CLASS
 
-#define SIGNAL_NETWORK_GENERIC_CLASS conditional
-#define SIGNAL_NETWORK_GENERIC_FILE <boost/dataflow/signal/component/conditional.hpp>
+#define SIGNAL_NETWORK_GENERIC_CLASS conditional_templated
+#define SIGNAL_NETWORK_GENERIC_USE_TEMPLATED
+#define SIGNAL_NETWORK_GENERIC_FILE <boost/dataflow/signal/component/conditional_templated.hpp>
 #define SIGNAL_NETWORK_GENERIC_TYPENAME Member
 #define SIGNAL_NETWORK_GENERIC_MEMBERNAME member
 #define SIGNAL_NETWORK_GENERIC_TYPENAME2 Condition
 
 #include <boost/dataflow/signal/component/detail/generic_template.hpp>
 
-#define SIGNAL_NETWORK_CONDITIONAL_HPP
+#define SIGNAL_NETWORK_CONDITIONA_TEMPLATED_HPP
 
 #else // SIGNAL_NETWORK_GENERIC_CLASS
 
@@ -33,16 +34,16 @@
         \returns Return value of the sent signal if the condition evaluates to true,
         default constructed instance otherwise.
     */
- template <class Seq>
- typename result<conditional_impl(const Seq &)>::type
+ template <int N, class Seq>
+ typename result<conditional_templated_impl(const Seq &)>::type
     operator()(const Seq &seq)
     {
- if (Condition()(member))
+ if (Condition()(N, member))
             return fused_out(seq);
         else
             return typename base_type::signal_type::result_type();
     }
 
-#endif // SIGNAL_NETWORK_GENERIC_CLASS
+#endif // SIGNAL_NETWORK_CONDITIONA_TEMPLATED_HPP
 
-#endif // SIGNAL_NETWORK_CONDITIONAL_HPP
\ No newline at end of file
+#endif // SIGNAL_NETWORK_MULTIPLEXER_HPP
\ No newline at end of file

Modified: sandbox/SOC/2007/signals/boost/dataflow/signal/component/counter.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/signal/component/counter.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/signal/component/counter.hpp 2007-10-27 20:04:51 EDT (Sat, 27 Oct 2007)
@@ -29,7 +29,7 @@
 */
 template<typename Signature,
 typename OutSignal=SIGNAL_NETWORK_DEFAULT_OUT,
-typename T=volatile int,
+typename T=int,
 typename Combiner = boost::last_value<typename boost::function_types::result_type<Signature>::type>,
 typename Group = int,
 typename GroupCompare = std::less<Group> >
@@ -51,7 +51,7 @@
 
     /** \return The internal signal counter.
     */
- typename boost::remove_volatile<T>::type count() const
+ T count() const
     { return base_type::member; }
 };
 

Modified: sandbox/SOC/2007/signals/boost/dataflow/signal/component/detail/generic_template.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/signal/component/detail/generic_template.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/signal/component/detail/generic_template.hpp 2007-10-27 20:04:51 EDT (Sat, 27 Oct 2007)
@@ -6,7 +6,14 @@
 #ifdef SIGNAL_NETWORK_GENERIC_CLASS
 
 #include <boost/dataflow/signal/component/filter.hpp>
+
+#ifndef SIGNAL_NETWORK_GENERIC_USE_TEMPLATED
 #include <boost/dataflow/signal/component/detail/unfused_inherited.hpp>
+#define SIGNAL_NETWORK_GENERIC_UNFUSED_BASE unfused_inherited
+#else
+#include <boost/dataflow/signal/component/detail/unfused_inherited_templated.hpp>
+#define SIGNAL_NETWORK_GENERIC_UNFUSED_BASE unfused_inherited_templated
+#endif
 
 #include <boost/mpl/vector.hpp>
 #include <boost/fusion/sequence/adapted/mpl.hpp>
@@ -70,21 +77,24 @@
 typename Combiner = boost::last_value<typename boost::function_types::result_type<Signature>::type>,
 typename Group = int,
 typename GroupCompare = std::less<Group> >
-class SIGNAL_NETWORK_GENERIC_CLASS : public boost::fusion::unfused_inherited<detail::SIGNAL_NETWORK_GENERIC_CLASS_IMPL<
-SIGNAL_NETWORK_GENERIC_TYPENAME,
+class SIGNAL_NETWORK_GENERIC_CLASS
+ : public boost::fusion::SIGNAL_NETWORK_GENERIC_UNFUSED_BASE
+ <detail::SIGNAL_NETWORK_GENERIC_CLASS_IMPL<
+ SIGNAL_NETWORK_GENERIC_TYPENAME,
 #ifdef SIGNAL_NETWORK_GENERIC_TYPENAME2
-SIGNAL_NETWORK_GENERIC_TYPENAME2,
+ SIGNAL_NETWORK_GENERIC_TYPENAME2,
 #endif
-Signature, OutSignal, Combiner, Group, GroupCompare>,
-typename boost::function_types::parameter_types<Signature>::type >
+ Signature, OutSignal, Combiner, Group, GroupCompare>,
+ typename boost::function_types::parameter_types<Signature>::type >
 {
- typedef boost::fusion::unfused_inherited<detail::SIGNAL_NETWORK_GENERIC_CLASS_IMPL<
- SIGNAL_NETWORK_GENERIC_TYPENAME,
+ typedef boost::fusion::SIGNAL_NETWORK_GENERIC_UNFUSED_BASE
+ <detail::SIGNAL_NETWORK_GENERIC_CLASS_IMPL<
+ SIGNAL_NETWORK_GENERIC_TYPENAME,
 #ifdef SIGNAL_NETWORK_GENERIC_TYPENAME2
- SIGNAL_NETWORK_GENERIC_TYPENAME2,
+ SIGNAL_NETWORK_GENERIC_TYPENAME2,
 #endif
- Signature, OutSignal, Combiner, Group, GroupCompare>,
- typename boost::function_types::parameter_types<Signature>::type > base_type;
+ Signature, OutSignal, Combiner, Group, GroupCompare>,
+ typename boost::function_types::parameter_types<Signature>::type > base_type;
 public:
     SIGNAL_NETWORK_GENERIC_CLASS() {}
     template<typename T1>
@@ -96,11 +106,13 @@
 } } // namespace boost::signals
 
 #undef SIGNAL_NETWORK_GENERIC_CLASS
+#undef SIGNAL_NETWORK_GENERIC_USE_TEMPLATED
 #undef SIGNAL_NETWORK_GENERIC_FILE
 #undef SIGNAL_NETWORK_GENERIC_TYPENAME
 #undef SIGNAL_NETWORK_GENERIC_TYPENAME2
 #undef SIGNAL_NETWORK_GENERIC_MEMBERNAME
 #undef SIGNAL_NETWORK_GENERIC_STANDARD_RESULT
+#undef SIGNAL_NETWORK_GENERIC_UNFUSED_BASE
 
 
 #endif
\ No newline at end of file

Copied: sandbox/SOC/2007/signals/boost/dataflow/signal/component/detail/unfused_inherited_templated.hpp (from r40486, /sandbox/SOC/2007/signals/boost/dataflow/signal/component/detail/unfused_inherited.hpp)
==============================================================================
--- /sandbox/SOC/2007/signals/boost/dataflow/signal/component/detail/unfused_inherited.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/signal/component/detail/unfused_inherited_templated.hpp 2007-10-27 20:04:51 EDT (Sat, 27 Oct 2007)
@@ -7,7 +7,7 @@
     http://www.boost.org/LICENSE_1_0.txt).
 ==============================================================================*/
 
-#if !defined(BOOST_FUSION_FUNCTIONAL_ADAPTER_UNFUSED_INHERITED_HPP_INCLUDED)
+#if !defined(BOOST_FUSION_FUNCTIONAL_ADAPTER_UNFUSED_INHERITED_TEMPLATED_HPP_INCLUDED)
 #if !defined(BOOST_PP_IS_ITERATING)
 
 #include <boost/preprocessor/cat.hpp>
@@ -38,15 +38,15 @@
 namespace boost { namespace fusion
 {
 
- template <class Function, class Sequence, typename Enable=void> class unfused_inherited;
+ template <class Function, class Sequence, typename Enable=void> class unfused_inherited_templated;
 
     //----- ---- --- -- - - - -
 
- #define BOOST_PP_ITERATION_PARAMS_1 (3, (0,BOOST_FUSION_UNFUSED_TYPED_MAX_ARITY, <boost/dataflow/signal/component/detail/unfused_inherited.hpp>))
+ #define BOOST_PP_ITERATION_PARAMS_1 (3, (0,BOOST_FUSION_UNFUSED_TYPED_MAX_ARITY, <boost/dataflow/signal/component/detail/unfused_inherited_templated.hpp>))
     #include BOOST_PP_ITERATE()
 }}
 
-#define BOOST_FUSION_FUNCTIONAL_ADAPTER_UNFUSED_INHERITED_HPP_INCLUDED
+#define BOOST_FUSION_FUNCTIONAL_ADAPTER_UNFUSED_INHERITED_TEMPLATED_HPP_INCLUDED
 #else // defined(BOOST_PP_IS_ITERATING)
 ///////////////////////////////////////////////////////////////////////////////
 //
@@ -57,7 +57,7 @@
 #define OPERATOR_ARGS BOOST_PP_ITERATION()
 
     template <class Function, class Sequence>
- class unfused_inherited<Function, Sequence,
+ class unfused_inherited_templated<Function, Sequence,
         typename boost::enable_if<
             boost::mpl::equal_to<
                 boost::fusion::result_of::size<Sequence>,
@@ -77,21 +77,21 @@
 #define MT(z,i,s) \
         typename result_of::value_at_c<s,i>::type
 
- unfused_inherited()
+ unfused_inherited_templated()
         { }
 
         template<typename T1>
- unfused_inherited(const T1 &t1)
+ unfused_inherited_templated(const T1 &t1)
             : Function(t1)
         { }
         
         template<typename T1>
- unfused_inherited(T1 &t1)
+ unfused_inherited_templated(T1 &t1)
             : Function(t1)
         { }
 
         template<typename T1, typename T2>
- unfused_inherited(const T1 &t1, const T2 &t2)
+ unfused_inherited_templated(const T1 &t1, const T2 &t2)
             : Function(t1, t2)
         { }
         
@@ -105,6 +105,7 @@
             typedef typename boost::result_of<Function(const arg_vector_t &)>::type type;
         };
 
+ template<int N>
         inline typename boost::result_of<Function(const arg_vector_t &)>::type
         operator()(BOOST_PP_ENUM(OPERATOR_ARGS,M,arg_vector_t)) const
         {
@@ -113,10 +114,11 @@
             (BOOST_PP_ENUM_PARAMS(OPERATOR_ARGS,a))
 #endif
                 ;
- return Function::operator()(arg);
+ return Function::template operator()<N>(arg);
         }
 
 #if !BOOST_WORKAROUND(BOOST_MSVC, < 1400)
+ template<int N>
         inline typename boost::result_of<Function(const arg_vector_t &)>::type
         operator()(BOOST_PP_ENUM(OPERATOR_ARGS,M,arg_vector_t))
         {
@@ -125,7 +127,7 @@
             (BOOST_PP_ENUM_PARAMS(OPERATOR_ARGS,a))
 #endif
                 ;
- return Function::operator()(arg);
+ return Function::template operator()<N>(arg);
         }
 #endif
 

Modified: sandbox/SOC/2007/signals/boost/dataflow/signal/component/filter_base.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/signal/component/filter_base.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/signal/component/filter_base.hpp 2007-10-27 20:04:51 EDT (Sat, 27 Oct 2007)
@@ -35,7 +35,7 @@
             return t.get_proxied_producer();
         }
     };
- typedef boost::dataflow::signals::keyed_consumer port_traits;
+ typedef boost::dataflow::signals::call_consumer port_traits;
     typedef boost::dataflow::mutable_proxy_port<
         boost::dataflow::signals::mechanism,
         boost::dataflow::ports::producer,

Copied: sandbox/SOC/2007/signals/boost/dataflow/signal/component/multiplexer.hpp (from r40486, /sandbox/SOC/2007/signals/boost/dataflow/signal/component/selector.hpp)
==============================================================================
--- /sandbox/SOC/2007/signals/boost/dataflow/signal/component/selector.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/signal/component/multiplexer.hpp 2007-10-27 20:04:51 EDT (Sat, 27 Oct 2007)
@@ -6,21 +6,16 @@
 #ifndef SIGNAL_NETWORK_MULTIPLEXER_HPP
 #define SIGNAL_NETWORK_MULTIPLEXER_HPP
 
-#include <boost/dataflow/signal/component/conditional.hpp>
+#include <boost/dataflow/connection/port_map.hpp>
+#include <boost/dataflow/signal/component/conditional_templated.hpp>
+#include <boost/dataflow/signal/connection/slot_selector.hpp>
 
-namespace boost { namespace signals {
+#include <boost/fusion/sequence/container/map.hpp>
+
+#include <functional>
 
-namespace detail
-{
- template<typename T>
- struct multiplex
- {
- T operator ()(T t) const
- {
- return t;
- }
- };
-}
+
+namespace boost { namespace signals {
 
 /** \brief Forwards a single signal to multiple slots, and can
 also be disabled to stop the flow of signals.
@@ -32,26 +27,42 @@
     typename Group = int,
     typename GroupCompare = std::less<Group>
>
-class multiplexer : public conditional<int, detail::<bool>, Signature, OutSignal, Combiner, Group, GroupCompare>
+class multiplexer : public conditional_templated<int, std::equal_to<int>, Signature, OutSignal, Combiner, Group, GroupCompare>
 {
 protected:
- typedef conditional<volatile bool, detail::identity<bool>, Signature, OutSignal, Combiner, Group, GroupCompare> base_type;
+ typedef conditional_templated<int, std::equal_to<int>, Signature, OutSignal, Combiner, Group, GroupCompare> base_type;
 public:
     
- /** Initializes the junction to be enabled.
+ /** Initializes the multiplexer to forward the specified input.
     */
- junction(bool enabled=true)
- {
- enable();
- }
+ multiplexer(int selector=0)
+ { select(selector); }
     /** Enables the junction (signals will be forwarded).
     */
- void enable() {base_type::member = true;}
- /** Disables the junction (signals will not be forwarded).
- */
- void disable() {base_type::member = false;}
+ void select(int selector)
+ { base_type::member = selector; }
+
+ typedef boost::fusion::map<
+ boost::fusion::pair<boost::dataflow::signals::producer<Signature>, slot_selector<Signature, multiplexer> >,
+ boost::fusion::pair<
+ boost::dataflow::signals::producer<typename base_type::fused_signature_type>,
+ slot_selector<typename base_type::fused_signature_type, multiplexer>
+ >
+ > slot_map;
+
+ template<int N>
+ boost::dataflow::port_map<boost::dataflow::signals::mechanism, boost::dataflow::ports::consumer, slot_map>
+ //slot_selector<Signature, multiplexer>
+ slot()
+ {
+ //return make_slot_selector<Signature> (&multiplexer::template operator()<N>, *this);
+ return slot_map
+ (make_slot_selector<Signature> (&multiplexer::template operator()<N>, *this),
+ make_slot_selector<typename base_type::fused_signature_type> (&multiplexer::template operator()<N>, *this));
+
+ }
 };
 
 } } // namespace boost::signals
 
-#endif
\ No newline at end of file
+#endif // SIGNAL_NETWORK_MULTIPLEXER_HPP
\ No newline at end of file

Deleted: sandbox/SOC/2007/signals/boost/dataflow/signal/component/selector.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/signal/component/selector.hpp 2007-10-27 20:04:51 EDT (Sat, 27 Oct 2007)
+++ (empty file)
@@ -1,57 +0,0 @@
-// Copyright Stjepan Rajko 2007. Use, modification and
-// distribution is subject to the Boost Software License, Version
-// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-#ifndef SIGNAL_NETWORK_MULTIPLEXER_HPP
-#define SIGNAL_NETWORK_MULTIPLEXER_HPP
-
-#include <boost/dataflow/signal/component/conditional.hpp>
-
-namespace boost { namespace signals {
-
-namespace detail
-{
- template<typename T>
- struct multiplex
- {
- T operator ()(T t) const
- {
- return t;
- }
- };
-}
-
-/** \brief Forwards a single signal to multiple slots, and can
-also be disabled to stop the flow of signals.
- junction is a conditional with Condition identity and Member volatile bool
-*/
-template<typename Signature,
- typename OutSignal=SIGNAL_NETWORK_DEFAULT_OUT,
- typename Combiner = boost::last_value<typename boost::function_types::result_type<Signature>::type>,
- typename Group = int,
- typename GroupCompare = std::less<Group>
->
-class multiplexer : public conditional<int, detail::<bool>, Signature, OutSignal, Combiner, Group, GroupCompare>
-{
-protected:
- typedef conditional<volatile bool, detail::identity<bool>, Signature, OutSignal, Combiner, Group, GroupCompare> base_type;
-public:
-
- /** Initializes the junction to be enabled.
- */
- junction(bool enabled=true)
- {
- enable();
- }
- /** Enables the junction (signals will be forwarded).
- */
- void enable() {base_type::member = true;}
- /** Disables the junction (signals will not be forwarded).
- */
- void disable() {base_type::member = false;}
-};
-
-} } // namespace boost::signals
-
-#endif
\ No newline at end of file

Modified: sandbox/SOC/2007/signals/boost/dataflow/signal/component/socket_sender.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/signal/component/socket_sender.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/signal/component/socket_sender.hpp 2007-10-27 20:04:51 EDT (Sat, 27 Oct 2007)
@@ -58,7 +58,7 @@
 template<typename Signature>
 class socket_sender : public boost::fusion::unfused_inherited<
     detail::socket_sender_impl<Signature>, typename boost::function_types::parameter_types<Signature>::type >,
- public boost::dataflow::port<boost::dataflow::signals::keyed_consumer>
+ public boost::dataflow::port<boost::dataflow::signals::call_consumer>
 {
     typedef boost::fusion::unfused_inherited<
         detail::socket_sender_impl<Signature>,

Modified: sandbox/SOC/2007/signals/boost/dataflow/signal/support.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/signal/support.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/signal/support.hpp 2007-10-27 20:04:51 EDT (Sat, 27 Oct 2007)
@@ -8,29 +8,8 @@
 
 #include <boost/dataflow/support.hpp>
 #include <boost/dataflow/signal/connection/detail/bind_object.hpp>
-#include <boost/dataflow/signal/connection/detail/result_of_defined.hpp>
-#include <boost/dataflow/signal/connection/detail/replace_return_type.hpp>
-#include <boost/dataflow/detail/enable_if_defined.hpp>
 #include <boost/signal.hpp>
 
-#include <boost/mpl/aux_/has_type.hpp>
-#include <boost/utility/result_of.hpp>
-
-namespace boost { namespace signals {
-
-namespace detail
-{
- template<typename T>
- struct get_signature;
-
- template<typename Signature, typename Combiner, typename Group, typename GroupCompare>
- struct get_signature<boost::signal<Signature, Combiner, Group, GroupCompare> >
- {
- typedef Signature type;
- };
-}
-
-} } // namespace boost::signals
 
 namespace boost { namespace dataflow {
 
@@ -45,7 +24,7 @@
     typedef T produced_signature_type;
 };
 
-struct keyed_consumer
+struct call_consumer
     : public port_traits<mechanism, ports::consumer, concepts::keyed_port>
 {};
 
@@ -73,7 +52,7 @@
 namespace extension
 {
     template<typename Signature>
- struct get_keyed_port_impl<signals::keyed_consumer, signals::producer<Signature> >
+ struct get_keyed_port_impl<signals::call_consumer, signals::producer<Signature> >
     {
         template<typename ConsumerPort, typename ProducerPort>
         struct apply
@@ -87,7 +66,7 @@
             };
         };
     };
-
+
     template<typename T>
     struct binary_operation_impl<operations::connect, signals::producer<T>, signals::consumer<T> >
     {
@@ -105,30 +84,12 @@
 } } // namespace boost::dataflow
 
 namespace boost { namespace signals {
-
-template<typename Producer, typename Consumer>
-inline void connect(Producer &producer, Consumer &consumer)
-{
- boost::dataflow::binary_operation<boost::dataflow::operations::connect, boost::dataflow::signals::mechanism>(producer, consumer);
-}
-
-template<typename Producer, typename Consumer>
-inline void connect(Producer &producer, const Consumer &consumer)
-{
- boost::dataflow::binary_operation<boost::dataflow::operations::connect, boost::dataflow::signals::mechanism>(producer, consumer);
-}
 
-template<typename Producer, typename Consumer>
-inline void connect(const Producer &producer, Consumer &consumer)
-{
- boost::dataflow::binary_operation<boost::dataflow::operations::connect, boost::dataflow::signals::mechanism>(producer, consumer);
-}
-
-template<typename Producer, typename Consumer>
-inline void connect(const Producer &producer, const Consumer &consumer)
-{
- boost::dataflow::binary_operation<boost::dataflow::operations::connect, boost::dataflow::signals::mechanism>(producer, consumer);
-}
+#define DATAFLOW_TEMPLATE_MECHANISM boost::dataflow::signals::mechanism
+#define DATAFLOW_TEMPLATE_BINARY_OPERATION connect
+#include <boost/dataflow/templates/binary_operation.hpp>
+#undef DATAFLOW_TEMPLATE_BINARY_OPERATION
+#undef DATAFLOW_TEMPLATE_MECHANISM
 
 template<typename Component>
 inline void invoke(Component &component)

Modified: sandbox/SOC/2007/signals/boost/dataflow/templates/binary_operation.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/templates/binary_operation.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/templates/binary_operation.hpp 2007-10-27 20:04:51 EDT (Sat, 27 Oct 2007)
@@ -3,10 +3,11 @@
 // 1.0. (See accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 
-// DO NOT INCLUDE THIS FILE DIRECTLY
 
 #ifndef DATAFLOW_TEMPLATE_MECHANISM
 #error DATAFLOW_TEMPLATE_MECHANISM undefined.
+#endif
+#ifndef DATAFLOW_TEMPLATE_BINARY_OPERATION
 #error DATAFLOW_TEMPLATE_BINARY_OPERATION undefined.
 #endif
 

Modified: sandbox/SOC/2007/signals/libs/dataflow/build/xcodeide/signal_network.xcodeproj/project.pbxproj
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/build/xcodeide/signal_network.xcodeproj/project.pbxproj (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/build/xcodeide/signal_network.xcodeproj/project.pbxproj 2007-10-27 20:04:51 EDT (Sat, 27 Oct 2007)
@@ -111,7 +111,7 @@
                 08EF9B300C5D506A00D4D206 /* junction.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = junction.hpp; sourceTree = "<group>"; };
                 08EF9B310C5D506A00D4D206 /* modifier.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = modifier.hpp; sourceTree = "<group>"; };
                 08EF9B320C5D506A00D4D206 /* mutex.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = mutex.hpp; sourceTree = "<group>"; };
- 08EF9B330C5D506A00D4D206 /* selector.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = selector.hpp; sourceTree = "<group>"; };
+ 08EF9B330C5D506A00D4D206 /* multiplexer.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = multiplexer.hpp; sourceTree = "<group>"; };
                 08EF9B340C5D506A00D4D206 /* socket_receiver.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = socket_receiver.hpp; sourceTree = "<group>"; };
                 08EF9B350C5D506A00D4D206 /* socket_sender.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = socket_sender.hpp; sourceTree = "<group>"; };
                 08EF9B360C5D506A00D4D206 /* storage.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = storage.hpp; sourceTree = "<group>"; };
@@ -200,6 +200,9 @@
                 08FA6A050C41E11800434913 /* rationale.qbk */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = rationale.qbk; sourceTree = "<group>"; };
                 08FB7BEF0C6157D000BD4EC2 /* introduction.qbk */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = introduction.qbk; sourceTree = "<group>"; };
                 08FB7BFE0C61597000BD4EC2 /* signals.qbk */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = signals.qbk; sourceTree = "<group>"; };
+ 08FBDA240CD26F8700CC3891 /* unfused_inherited_templated.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = unfused_inherited_templated.hpp; sourceTree = "<group>"; };
+ 08FBDA3A0CD272ED00CC3891 /* test_multiplexer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = test_multiplexer.cpp; sourceTree = "<group>"; };
+ 08FBDA3B0CD2748100CC3891 /* conditional_templated.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; name = conditional_templated.hpp; path = component/conditional_templated.hpp; sourceTree = "<group>"; };
                 08FC25DB0C45D0F700F59CDD /* producer.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = producer.hpp; sourceTree = "<group>"; };
                 08FC25DF0C45D18700F59CDD /* consumer.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = consumer.hpp; sourceTree = "<group>"; };
                 08FC25FC0C45E77B00F59CDD /* producer_accumulator.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = producer_accumulator.hpp; sourceTree = "<group>"; };
@@ -284,6 +287,7 @@
                 08EF9B200C5D506A00D4D206 /* signal */ = {
                         isa = PBXGroup;
                         children = (
+ 08FBDA3B0CD2748100CC3891 /* conditional_templated.hpp */,
                                 08EF9B520C5D537F00D4D206 /* support.hpp */,
                                 08EF9B210C5D506A00D4D206 /* component */,
                                 08EF9B390C5D506A00D4D206 /* connection */,
@@ -310,7 +314,7 @@
                                 08EF9B300C5D506A00D4D206 /* junction.hpp */,
                                 08EF9B310C5D506A00D4D206 /* modifier.hpp */,
                                 08EF9B320C5D506A00D4D206 /* mutex.hpp */,
- 08EF9B330C5D506A00D4D206 /* selector.hpp */,
+ 08EF9B330C5D506A00D4D206 /* multiplexer.hpp */,
                                 08EF9B340C5D506A00D4D206 /* socket_receiver.hpp */,
                                 08EF9B350C5D506A00D4D206 /* socket_sender.hpp */,
                                 08EF9B360C5D506A00D4D206 /* storage.hpp */,
@@ -323,6 +327,7 @@
                 08EF9B270C5D506A00D4D206 /* detail */ = {
                         isa = PBXGroup;
                         children = (
+ 08FBDA240CD26F8700CC3891 /* unfused_inherited_templated.hpp */,
                                 08EF9B280C5D506A00D4D206 /* generic_template.hpp */,
                                 08EF9B290C5D506A00D4D206 /* serialize_fusion_vector.hpp */,
                                 08EF9B2A0C5D506A00D4D206 /* storable.hpp */,
@@ -487,6 +492,7 @@
                                 08F71D4E0CA3547C0010099E /* test_same_type.cpp */,
                                 08F71D4F0CA3547C0010099E /* test_socket.cpp */,
                                 08F71D500CA3547C0010099E /* test_storage.cpp */,
+ 08FBDA3A0CD272ED00CC3891 /* test_multiplexer.cpp */,
                         );
                         path = signals;
                         sourceTree = "<group>";

Modified: sandbox/SOC/2007/signals/libs/dataflow/doc/dataflow.qbk
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/doc/dataflow.qbk (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/doc/dataflow.qbk 2007-10-27 20:04:51 EDT (Sat, 27 Oct 2007)
@@ -67,7 +67,9 @@
 [template storage[] [link dataflow.signals.components.properties.storage storage]]
 [template counter[] [link dataflow.signals.components.properties.counter counter]]
 [template junction[] [link dataflow.signals.components.flow.junction junction]]
-[template mutex[] [link dataflow.signals.components.flow.mutex mutex]]
+[template multiplexer[] [link dataflow.signals.components.flow.multiplexer multiplexer]]
+[template mutex[] [link dataflow.signals.components.threading.mutex mutex]]
+[template condition[] [link dataflow.signals.components.threading.condition condition]]
 [template function[] [link dataflow.signals.components.adapters.function function]]
 [template socket_sender[] [link dataflow.signals.components.network.socket_sender socket_sender]]
 [template socket_receiver[] [link dataflow.signals.components.network.socket_receiver socket_receiver]]

Modified: sandbox/SOC/2007/signals/libs/dataflow/doc/signals/components.qbk
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/doc/signals/components.qbk (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/doc/signals/components.qbk 2007-10-27 20:04:51 EDT (Sat, 27 Oct 2007)
@@ -1,5 +1,23 @@
 [section:components Components]
 
+The [DataflowSignals] layer provides a number of components which are useful
+in a variety of circumstances. The following table summarizes the components
+and their use.
+
+[table
+ [[Component][Use]]
+ [[[filter]][Base class for your own components]]
+ [[[junction]][This will be renamed to gate, it controls whether signals pass through it]]
+ [[[multiplexer]][Allows selection of which of the input ports is forwarded]]
+ [[[counter]][Counts the number of signals passing through]]
+ [[[mutex]][Provides mutexing on incoming signals for multithreaded environments]]
+ [[[condition]][Signals a threading condition whenever a signal is received]]
+ [[[function]][Allows any Boost.Function object to be applied to a passing signal]]
+ [[[chain]][Chains a number of components together into a new component]]
+ [[[socket_sender] and [socket_receiver]][Allow a signal dataflow network to
+ straddle a network socket]]
+]
+
 [section:generic Generic]
 
 [section:filter filter]
@@ -19,13 +37,13 @@
 
 [test_filter_classes]
 
-The type of the output signal (in the above example, `unfused_out_signal`)
+The type of the output signal (in the above example, `signals::unfused`)
 is specified as the second template parameter.
 There are three options:
 
-* `unfused_out_signal` provides an unfused output signal named `out`.
-* `fused_out_signal` provides a fused output signal named `fused_out`.
-* `combined_out_signal` provides an unfused output signal named `out`,
+* `signals::unfused` provides an unfused output signal named `out`.
+* `signals::fused` provides a fused output signal named `fused_out`.
+* `signals::combined` provides an unfused output signal named `out`,
   and a fused adapter for the signal named `fused_out`.
   This is useful for components which wish to use fusion internally but output
   an unfused signal.
@@ -33,10 +51,7 @@
 A component developed on top of the [filter] class can then be used in the
 appropriate network. Here is an example which uses the class defined above:
 
-[table filter-based class use example
- [[fused][unfused]]
- [[[test_filter_fused]][[test_filter_unfused]]]
-]
+[test_filter_fused]
 
 [endsect][/filter]
 
@@ -175,6 +190,28 @@
 ]
 [endsect][/junction]
 
+[section multiplexer]
+[*See also]: [classref boost::signals::multiplexer multiplexer class reference.]
+
+[heading Model of]
+* [SignalConsumerConcept]
+* [SignalProducerConcept]
+* [ConnectableConcept] to any [SignalProducerConcept] type `P` where
+ `Signature` matches `P`'s produced type.
+
+[heading Description]
+
+The [multiplexer] class can be used to bring in multiple signals, and forward
+them all to the same set of output signals.
+
+[test_multiplexer_unfused]
+
+[endsect][/multiplexer]
+
+[endsect][/flow]
+
+[section:threading Threading]
+
 [section:mutex mutex]
 [*See also]: [classref boost::signals::mutex mutex class reference.]
 
@@ -195,7 +232,26 @@
 ]
 [endsect][/mutex]
 
-[endsect][/flow]
+[section:condition condition]
+[*See also]: [classref boost::signals::mutex mutex class reference.]
+
+[heading Model of]
+* [SignalConsumerConcept]
+* [SignalProducerConcept]
+* [ConnectableConcept] to any [SignalProducerConcept] type `P` where
+ `Signature` matches `P`'s produced type.
+
+[heading Description]
+
+The [condition] class signals a threading condition when receiving a signal.
+
+[table mutex class use example
+ [[fused][unfused]]
+ [[[test_mutex_fused]][[test_mutex_unfused]]]
+]
+[endsect][/condition]
+
+[endsect][/threading]
 
 [section:adapters Adapters]
 [section:function function]
@@ -292,3 +348,4 @@
 [endsect][/network]
 
 [endsect][/components]
+

Modified: sandbox/SOC/2007/signals/libs/dataflow/example/signals/intro_example.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/example/signals/intro_example.cpp (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/example/signals/intro_example.cpp 2007-10-27 20:04:51 EDT (Sat, 27 Oct 2007)
@@ -13,7 +13,7 @@
 {
     int cnt;
 public:
- typedef dataflow::signals::keyed_consumer port_traits;
+ typedef dataflow::signals::call_consumer port_traits;
     
     SignalVoidCounter() : cnt(0) {}
     void operator()()
@@ -32,7 +32,7 @@
 {
     int cnt;
 public:
- typedef dataflow::signals::keyed_consumer port_traits;
+ typedef dataflow::signals::call_consumer port_traits;
     
     FusedSignalVoidCounter() : cnt(0) {}
     void operator()(const fusion::vector<> &)

Modified: sandbox/SOC/2007/signals/libs/dataflow/example/simple_distributed_example.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/example/simple_distributed_example.cpp (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/example/simple_distributed_example.cpp 2007-10-27 20:04:51 EDT (Sat, 27 Oct 2007)
@@ -45,11 +45,11 @@
 };
 
 // This will be our data output. We just need to make a function object,
-// and specify that it is a signals::keyed_consumer.
+// and specify that it is a signals::call_consumer.
 class output
 {
 public:
- typedef dataflow::signals::keyed_consumer port_traits;
+ typedef dataflow::signals::call_consumer port_traits;
     
     void operator()(double x)
     {

Modified: sandbox/SOC/2007/signals/libs/dataflow/example/simple_example.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/example/simple_example.cpp (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/example/simple_example.cpp 2007-10-27 20:04:51 EDT (Sat, 27 Oct 2007)
@@ -38,11 +38,11 @@
 };
 
 // This will be our data output. We just need to make a function object,
-// and specify that it is a signals::keyed_consumer.
+// and specify that it is a signals::call_consumer.
 class output
 {
 public:
- typedef dataflow::signals::keyed_consumer port_traits;
+ typedef dataflow::signals::call_consumer port_traits;
     
     void operator()(double x)
     {

Modified: sandbox/SOC/2007/signals/libs/dataflow/test/signals/Jamfile.v2
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/test/signals/Jamfile.v2 (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/test/signals/Jamfile.v2 2007-10-27 20:04:51 EDT (Sat, 27 Oct 2007)
@@ -21,6 +21,7 @@
 run test_storage.cpp ;
 run test_counter.cpp ;
 run test_junction.cpp ;
+run test_multiplexer.cpp ;
 run test_function.cpp ;
 run test_chain.cpp ;
 run test_mutex.cpp

Modified: sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_connect.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_connect.cpp (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_connect.cpp 2007-10-27 20:04:51 EDT (Sat, 27 Oct 2007)
@@ -10,7 +10,7 @@
 //[ test_connect
 
 struct receiver
- : public boost::dataflow::port<boost::dataflow::signals::keyed_consumer>
+ : public boost::dataflow::port<boost::dataflow::signals::call_consumer>
 {
     typedef void result_type;
     

Modified: sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_filter.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_filter.cpp (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_filter.cpp 2007-10-27 20:04:51 EDT (Sat, 27 Oct 2007)
@@ -18,30 +18,12 @@
 class DoublerClass : public signals::filter<void (float), signals::unfused>
 {
 public:
- template<typename FArgs>
- struct result;
-
- template<typename F>
- struct result<F(float)>
- {
- typedef void type;
- };
-
     void operator()(float x) {out(2*x);}
 };
 
 class FusedDoublerClass : public signals::filter<void (float), signals::fused>
 {
 public:
- template<typename FArgs>
- struct result;
-
- template<typename F>
- struct result<F(const fusion::vector<float> &)>
- {
- typedef void type;
- };
-
     void operator()(const fusion::vector<float> &x)
     {
         // this could be more general but I'm having problems with the general approach...

Modified: sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_multi_args.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_multi_args.cpp (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_multi_args.cpp 2007-10-27 20:04:51 EDT (Sat, 27 Oct 2007)
@@ -26,7 +26,7 @@
 //[ test_multi_args_class2
 
 class SignalMultiCollector
- : public boost::dataflow::port<boost::dataflow::signals::keyed_consumer>
+ : public boost::dataflow::port<boost::dataflow::signals::call_consumer>
 {
         optional<float> last, last1, last2;
         int cnt;

Modified: sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_multi_type.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_multi_type.cpp (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_multi_type.cpp 2007-10-27 20:04:51 EDT (Sat, 27 Oct 2007)
@@ -15,7 +15,7 @@
 //[ test_multi_type_classes
 
 class SignalIntFloatCollector : public boost::dataflow::port<
- boost::dataflow::signals::keyed_consumer>
+ boost::dataflow::signals::call_consumer>
 {
     optional<int> last_int;
     optional<float> last_float;

Added: sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_multiplexer.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_multiplexer.cpp 2007-10-27 20:04:51 EDT (Sat, 27 Oct 2007)
@@ -0,0 +1,73 @@
+// Copyright Stjepan Rajko 2007. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/dataflow/signal/component/multiplexer.hpp>
+#include <boost/dataflow/signal/component/storage.hpp>
+#include <boost/dataflow/signal/connection.hpp>
+
+#include <boost/test/included/test_exec_monitor.hpp>
+
+using namespace boost;
+
+int test_main(int, char* [])
+{
+ {
+ //[ test_multiplexer_unfused
+ signals::storage<void (float), signals::unfused> one(1.0f), two(2.0f), collector(-1.0f);
+ signals::multiplexer<void (float), signals::unfused> multiplexer;
+
+ one >>= multiplexer.slot<1>();
+ two >>= multiplexer.slot<2>();
+
+ multiplexer >>= collector;
+
+ invoke(one);
+ invoke(two);
+
+ BOOST_CHECK_EQUAL(collector.at<0>(), -1.0f);
+
+ multiplexer.select(1);
+ invoke(one);
+ invoke(two);
+
+ BOOST_CHECK_EQUAL(collector.at<0>(), 1.0f);
+
+ multiplexer.select(2);
+ invoke(two);
+ invoke(one);
+
+ BOOST_CHECK_EQUAL(collector.at<0>(), 2.0f);
+ //]
+ }
+ {
+ //[ test_multiplexer_fused
+ signals::storage<void (float), signals::fused> one(1.0f), two(2.0f), collector(-1.0f);
+ signals::multiplexer<void (float), signals::fused> multiplexer;
+
+ one >>= multiplexer.slot<1>();
+ two >>= multiplexer.slot<2>();
+
+ multiplexer >>= collector;
+
+ invoke(one);
+ invoke(two);
+
+ BOOST_CHECK_EQUAL(collector.at<0>(), -1.0f);
+
+ multiplexer.select(1);
+ invoke(one);
+ invoke(two);
+
+ BOOST_CHECK_EQUAL(collector.at<0>(), 1.0f);
+
+ multiplexer.select(2);
+ invoke(two);
+ invoke(one);
+
+ BOOST_CHECK_EQUAL(collector.at<0>(), 2.0f);
+ //]
+ }
+ return 0;
+} // int test_main(int, char* [])
\ No newline at end of file

Modified: sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_mutex.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_mutex.cpp (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_mutex.cpp 2007-10-27 20:04:51 EDT (Sat, 27 Oct 2007)
@@ -19,7 +19,7 @@
         signals::timed_generator<void (), signals::unfused> banger1;
         signals::timed_generator<void (), signals::unfused> banger2;
         signals::mutex<void (), signals::unfused> lock;
- signals::counter<void (), signals::unfused> counter;
+ signals::counter<void (), signals::unfused, volatile int> counter;
         
         banger1 >>= lock >>= counter;
         banger2 >>= lock;
@@ -27,8 +27,8 @@
         banger2.enable(0.5, 5);
         
         while (counter.count() < 10) {}
-
- BOOST_CHECK_EQUAL(counter.count(), 10);
+ int x = counter.count();
+ BOOST_CHECK_EQUAL(x, 10);
         banger1.join();
         banger2.join();
         //]
@@ -38,7 +38,7 @@
         signals::timed_generator<void (), signals::fused> banger1;
         signals::timed_generator<void (), signals::fused> banger2;
         signals::mutex<void (), signals::fused> lock;
- signals::counter<void (), signals::fused> counter;
+ signals::counter<void (), signals::fused, volatile int> counter;
 
         banger1 >>= lock >>= counter;
         banger2 >>= lock;
@@ -46,8 +46,8 @@
         banger2.enable(0.5, 5);
 
         while (counter.count() < 10) {}
-
- BOOST_CHECK_EQUAL(counter.count(), 10);
+ int x = counter.count();
+ BOOST_CHECK_EQUAL(x, 10);
         banger1.join();
         banger2.join();
         //]

Modified: sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_same_type.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_same_type.cpp (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_same_type.cpp 2007-10-27 20:04:51 EDT (Sat, 27 Oct 2007)
@@ -20,7 +20,7 @@
 }; // end class Signal2VoidCounter
 
 class Signal2VoidInputs
- : public boost::dataflow::port<boost::dataflow::signals::keyed_consumer>
+ : public boost::dataflow::port<boost::dataflow::signals::call_consumer>
 {
         int result;
 public:


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk