|
Boost-Commit : |
From: stipe_at_[hidden]
Date: 2007-08-03 19:07:18
Author: srajko
Date: 2007-08-03 19:07:12 EDT (Fri, 03 Aug 2007)
New Revision: 38429
URL: http://svn.boost.org/trac/boost/changeset/38429
Log:
refactor signal_network to use generic dataflow layer (incomplete)
Added:
sandbox/SOC/2007/signals/boost/dataflow/signal/support.hpp
- copied, changed from r7582, /sandbox/SOC/2007/signals/boost/dataflow/signal/connection/signal.hpp
sandbox/SOC/2007/signals/libs/dataflow/
- copied from r7581, /sandbox/SOC/2007/signals/libs/signal_network/
sandbox/SOC/2007/signals/libs/dataflow/build/
- copied from r38428, /sandbox/SOC/2007/signals/libs/signal_network/build/
sandbox/SOC/2007/signals/libs/dataflow/doc/
- copied from r38428, /sandbox/SOC/2007/signals/libs/signal_network/doc/
sandbox/SOC/2007/signals/libs/dataflow/example/
- copied from r38428, /sandbox/SOC/2007/signals/libs/signal_network/example/
sandbox/SOC/2007/signals/libs/dataflow/src/
- copied from r38428, /sandbox/SOC/2007/signals/libs/signal_network/src/
sandbox/SOC/2007/signals/libs/dataflow/test/
- copied from r38428, /sandbox/SOC/2007/signals/libs/signal_network/test/
Removed:
sandbox/SOC/2007/signals/boost/dataflow/signal/component/traits.hpp
sandbox/SOC/2007/signals/boost/dataflow/signal/connection/connect.hpp
sandbox/SOC/2007/signals/boost/dataflow/signal/connection/operators.hpp
sandbox/SOC/2007/signals/boost/dataflow/signal/connection/signal.hpp
sandbox/SOC/2007/signals/boost/dataflow/support/fusion_groups.hpp
sandbox/SOC/2007/signals/libs/dataflow/doc/html/
sandbox/SOC/2007/signals/libs/dataflow/doc/signal_network.qbk
sandbox/SOC/2007/signals/libs/signal_network/
Text files modified:
sandbox/SOC/2007/signals/boost/dataflow/connection/group.hpp | 34 ++
sandbox/SOC/2007/signals/boost/dataflow/phoenix/component/producer_accumulator.hpp | 2
sandbox/SOC/2007/signals/boost/dataflow/phoenix/components.hpp | 1
sandbox/SOC/2007/signals/boost/dataflow/phoenix/connection/iterator_relative.hpp | 19
sandbox/SOC/2007/signals/boost/dataflow/phoenix/static_function.hpp | 4
sandbox/SOC/2007/signals/boost/dataflow/phoenix/static_value.hpp | 5
sandbox/SOC/2007/signals/boost/dataflow/phoenix/support.hpp | 47 ++
sandbox/SOC/2007/signals/boost/dataflow/signal/component/detail/unfused_inherited.hpp | 4
sandbox/SOC/2007/signals/boost/dataflow/signal/component/filter.hpp | 5
sandbox/SOC/2007/signals/boost/dataflow/signal/component/filter_base.hpp | 34 +
sandbox/SOC/2007/signals/boost/dataflow/signal/component/function.hpp | 2
sandbox/SOC/2007/signals/boost/dataflow/signal/component/socket_sender.hpp | 1
sandbox/SOC/2007/signals/boost/dataflow/signal/component/storage.hpp | 71 +++-
sandbox/SOC/2007/signals/boost/dataflow/signal/component/timed_generator.hpp | 10
sandbox/SOC/2007/signals/boost/dataflow/signal/connection.hpp | 12
sandbox/SOC/2007/signals/boost/dataflow/signal/connection/detail/bind_object.hpp | 6
sandbox/SOC/2007/signals/boost/dataflow/signal/connection/detail/result_of_defined.hpp | 8
sandbox/SOC/2007/signals/boost/dataflow/signal/connection/slot_selector.hpp | 27 +
sandbox/SOC/2007/signals/boost/dataflow/signal/connection/slot_selector_map.hpp | 28 +
sandbox/SOC/2007/signals/boost/dataflow/signal/support.hpp | 187 ++++++++----
sandbox/SOC/2007/signals/boost/dataflow/support.hpp | 108 ------
sandbox/SOC/2007/signals/boost/signal_network/component/detail/unfused_inherited.hpp | 4
sandbox/SOC/2007/signals/boost/signal_network/component/function.hpp | 2
sandbox/SOC/2007/signals/boost/signal_network/connection/detail/replace_return_type.hpp | 2
sandbox/SOC/2007/signals/boost/signal_network/connection/detail/slot_type.hpp | 2
sandbox/SOC/2007/signals/libs/dataflow/build/xcodeide/signal_network.xcodeproj/project.pbxproj | 206 ++++++++++++--
sandbox/SOC/2007/signals/libs/dataflow/doc/Jamfile.v2 | 30 +
sandbox/SOC/2007/signals/libs/dataflow/doc/components.qbk | 155 ++++++++--
sandbox/SOC/2007/signals/libs/dataflow/doc/connections.qbk | 24
sandbox/SOC/2007/signals/libs/dataflow/doc/dataflow_table.xml | 8
sandbox/SOC/2007/signals/libs/dataflow/doc/introduction.qbk | 576 +++++++++++++++++----------------------
sandbox/SOC/2007/signals/libs/dataflow/doc/support.qbk | 25 -
sandbox/SOC/2007/signals/libs/dataflow/example/Jamfile.v2 | 4
sandbox/SOC/2007/signals/libs/dataflow/example/example.cpp | 73 ----
sandbox/SOC/2007/signals/libs/dataflow/example/fibonacci.cpp | 50 ++
sandbox/SOC/2007/signals/libs/dataflow/test/test_bind_object.cpp | 2
sandbox/SOC/2007/signals/libs/dataflow/test/test_branching.cpp | 6
sandbox/SOC/2007/signals/libs/dataflow/test/test_chain.cpp | 6
sandbox/SOC/2007/signals/libs/dataflow/test/test_connect.cpp | 13
sandbox/SOC/2007/signals/libs/dataflow/test/test_connections.cpp | 20
sandbox/SOC/2007/signals/libs/dataflow/test/test_counter.cpp | 2
sandbox/SOC/2007/signals/libs/dataflow/test/test_disconnect.cpp | 8
sandbox/SOC/2007/signals/libs/dataflow/test/test_filter.cpp | 6
sandbox/SOC/2007/signals/libs/dataflow/test/test_function.cpp | 6
sandbox/SOC/2007/signals/libs/dataflow/test/test_junction.cpp | 8
sandbox/SOC/2007/signals/libs/dataflow/test/test_multi_args.cpp | 5
sandbox/SOC/2007/signals/libs/dataflow/test/test_multi_out.cpp | 4
sandbox/SOC/2007/signals/libs/dataflow/test/test_multi_type.cpp | 5
sandbox/SOC/2007/signals/libs/dataflow/test/test_mutex.cpp | 8
sandbox/SOC/2007/signals/libs/dataflow/test/test_pull.cpp | 4
sandbox/SOC/2007/signals/libs/dataflow/test/test_result_of_defined.cpp | 6
sandbox/SOC/2007/signals/libs/dataflow/test/test_same_type.cpp | 7
sandbox/SOC/2007/signals/libs/dataflow/test/test_socket.cpp | 8
sandbox/SOC/2007/signals/libs/dataflow/test/test_storage.cpp | 6
54 files changed, 1088 insertions(+), 818 deletions(-)
Modified: sandbox/SOC/2007/signals/boost/dataflow/connection/group.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/connection/group.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/connection/group.hpp 2007-08-03 19:07:12 EDT (Fri, 03 Aug 2007)
@@ -10,10 +10,13 @@
#include <boost/fusion/algorithm/iteration/for_each.hpp>
#include <boost/fusion/sequence/container/vector.hpp>
+#include <boost/fusion/sequence/intrinsic/at_key.hpp>
+#include <boost/fusion/sequence/intrinsic/front.hpp>
#include <boost/fusion/sequence/generation/vector_tie.hpp>
#include <boost/fusion/sequence/view/zip_view.hpp>
#include <boost/fusion/support/is_sequence.hpp>
#include <boost/utility/result_of.hpp>
+#include <boost/mpl/not.hpp>
namespace boost { namespace dataflow {
@@ -22,6 +25,7 @@
template<class T>
struct producer_group : public T
{
+ producer_group() {}
producer_group(const T& t) : T(t) {}
typedef fusion_group_producer producer_category;
};
@@ -46,13 +50,21 @@
struct fusion_group_consumer;
-template <typename Sequence>
+template<class T>
+struct consumer_group : public T
+{
+ consumer_group() {}
+ consumer_group(const T& t) : T(t) {}
+ typedef fusion_group_consumer consumer_category;
+};
+
+/*template <typename Sequence>
struct consumer_category_of<Sequence,
typename boost::enable_if<
boost::fusion::traits::is_sequence<Sequence> >::type >
{
typedef fusion_group_consumer type;
-};
+};*/
namespace extension
@@ -76,6 +88,7 @@
};
}
+ // group >>= group
template<typename ProducerTag, typename ConsumerTag>
struct connect_impl<ProducerTag, ConsumerTag,
typename boost::enable_if<boost::mpl::and_<
@@ -102,9 +115,24 @@
zip(zip_type(producer, consumer));
boost::fusion::for_each(zip, detail::zip_connect());
}
+ static void call(Producer &producer, const Consumer &consumer)
+ {
+ typedef boost::fusion::vector<Producer&, const Consumer&>
+ zip_type;
+ boost::fusion::zip_view<zip_type>
+ zip(zip_type(producer, consumer));
+ boost::fusion::for_each(zip, detail::zip_connect());
+ }
+ static void call(Producer &producer, Consumer &consumer)
+ {
+ typedef boost::fusion::vector<Producer&, Consumer&>
+ zip_type;
+ boost::fusion::zip_view<zip_type>
+ zip(zip_type(producer, consumer));
+ boost::fusion::for_each(zip, detail::zip_connect());
+ }
};
};
-
}
} } // namespace boost::dataflow
Modified: sandbox/SOC/2007/signals/boost/dataflow/phoenix/component/producer_accumulator.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/phoenix/component/producer_accumulator.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/phoenix/component/producer_accumulator.hpp 2007-08-03 19:07:12 EDT (Fri, 03 Aug 2007)
@@ -47,6 +47,8 @@
class producer_accumulator : public Operations // should be a fusion sequence
{
public:
+// typedef boost::dataflow::fusion_group_consumer consumer_category;
+
producer_accumulator(const Operations &op) : Operations(op) {}
producer_accumulator() {}
Modified: sandbox/SOC/2007/signals/boost/dataflow/phoenix/components.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/phoenix/components.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/phoenix/components.hpp 2007-08-03 19:07:12 EDT (Fri, 03 Aug 2007)
@@ -9,5 +9,6 @@
#include <boost/dataflow/phoenix/component/producer.hpp>
#include <boost/dataflow/phoenix/component/consumer.hpp>
#include <boost/dataflow/phoenix/component/producer_accumulator.hpp>
+#include <boost/dataflow/phoenix/component/producer_wrapper.hpp>
#endif // BOOST_DATAFLOW_PHOENIX_COMPONENTS_HPP
Modified: sandbox/SOC/2007/signals/boost/dataflow/phoenix/connection/iterator_relative.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/phoenix/connection/iterator_relative.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/phoenix/connection/iterator_relative.hpp 2007-08-03 19:07:12 EDT (Fri, 03 Aug 2007)
@@ -25,13 +25,15 @@
template<class T>
struct result
{
- typedef const typename T::value_type & type;
+ typedef const typename boost::dataflow::produced_type_of<T>::type & type;
};
template<class T>
typename result<T>::type operator()(const T &t) const
- {
- return t.value;
+ {
+ return boost::dataflow::extension::phoenix::template get_value<
+ typename boost::dataflow::producer_category_of<T>::type>
+ ::template apply<T>::call(t);
}
};
@@ -39,8 +41,15 @@
static_function<impl::get_value> const get_value = static_function<impl::get_value>();
- BOOST_TYPEOF(get_value(*(boost::phoenix::arg_names::arg1-actor<int_<2> >()))) const prev2;
- BOOST_TYPEOF(get_value(*(boost::phoenix::arg_names::arg1-actor<int_<1> >()))) const prev1;
+ BOOST_TYPEOF(get_value(*(boost::phoenix::arg_names::arg1-int_<2>()))) const prev2;
+ BOOST_TYPEOF(get_value(*(boost::phoenix::arg_names::arg1-int_<1>()))) const prev1;
+
+ template<int N, typename Arg>
+ BOOST_TYPEOF(get_value(*(Arg()-int_<N>()))) prev(Arg arg)
+ {
+ BOOST_TYPEOF(get_value(*(Arg()-int_<N>()))) t;
+ return t;
+ }
}
} } // namespace boost::phoenix
Modified: sandbox/SOC/2007/signals/boost/dataflow/phoenix/static_function.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/phoenix/static_function.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/phoenix/static_function.hpp 2007-08-03 19:07:12 EDT (Fri, 03 Aug 2007)
@@ -37,8 +37,8 @@
return compose<detail::function_eval<2> >(actor<static_value<F> >(), _0, _1);
}
-// // Bring in the rest of the function call operators - not implemented
-// #include <boost/spirit/phoenix/function/detail/static_function_call.hpp>
+ // Bring in the rest of the function call operators
+ #include <boost/dataflow/phoenix/detail/static_function_call.hpp>
};
}}
Modified: sandbox/SOC/2007/signals/boost/dataflow/phoenix/static_value.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/phoenix/static_value.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/phoenix/static_value.hpp 2007-08-03 19:07:12 EDT (Fri, 03 Aug 2007)
@@ -31,7 +31,10 @@
};
template<int N>
-struct int_ : static_value<boost::mpl::int_<N> > {};
+actor<static_value<boost::mpl::int_<N> > > int_()
+{
+ return actor<static_value<boost::mpl::int_<N> > >();
+}
} } // namespace boost::phoenix
Modified: sandbox/SOC/2007/signals/boost/dataflow/phoenix/support.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/phoenix/support.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/phoenix/support.hpp 2007-08-03 19:07:12 EDT (Fri, 03 Aug 2007)
@@ -10,18 +10,15 @@
#include <boost/mpl/and.hpp>
#include <boost/type_traits/is_base_of.hpp>
+#include <boost/type_traits/is_pod.hpp>
namespace boost { namespace dataflow {
-
-namespace mechanism
-{
- struct phoenix;
-}
struct phoenix_producer {};
struct phoenix_consumer {};
struct ptr_consumer : public phoenix_consumer {};
+struct pod_producer : public phoenix_producer {};
template <typename T>
struct consumer_category_of<T *>
@@ -35,6 +32,18 @@
typedef ptr_consumer type;
};
+template<typename T>
+struct producer_category_of<T, typename boost::enable_if<is_pod<T> >::type>
+{
+ typedef pod_producer type;
+};
+
+template<typename T>
+struct produced_type_of<T, typename boost::enable_if<is_pod<T> >::type>
+{
+ typedef T type;
+};
+
namespace extension
{
// phoenix specific extensions
@@ -81,6 +90,34 @@
}
};
};
+
+ template<typename ProducerTag>
+ struct get_value
+ {
+ template<typename Producer>
+ struct apply
+ {
+ static const typename produced_type_of<Producer>::type &
+ call(const Producer &producer)
+ {
+ return producer.value;
+ }
+ };
+ };
+
+ template<>
+ struct get_value<boost::dataflow::pod_producer>
+ {
+ template<typename Producer>
+ struct apply
+ {
+ static const typename produced_type_of<Producer>::type &
+ call(const Producer &producer)
+ {
+ return producer;
+ }
+ };
+ };
}
template<typename ProducerTag, typename ConsumerTag>
Modified: 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.hpp 2007-08-03 19:07:12 EDT (Fri, 03 Aug 2007)
@@ -32,8 +32,8 @@
#include <boost/fusion/algorithm/transformation/pop_back.hpp>
#include <boost/fusion/functional/adapter/limits.hpp>
-#include <boost/fusion/functional/adapter/detail/has_type.hpp>
-#include <boost/fusion/functional/adapter/detail/nullary_call_base.hpp>
+//#include <boost/fusion/functional/adapter/detail/has_type.hpp>
+//#include <boost/fusion/functional/adapter/detail/nullary_call_base.hpp>
#include <boost/mpl/size.hpp>
#include <boost/utility/result_of.hpp>
Modified: sandbox/SOC/2007/signals/boost/dataflow/signal/component/filter.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/signal/component/filter.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/signal/component/filter.hpp 2007-08-03 19:07:12 EDT (Fri, 03 Aug 2007)
@@ -64,6 +64,9 @@
class filter<Signature, unfused, Combiner, Group, GroupCompare> : public filter_base
{
public:
+ //typedef Signature produced_type;
+ //typedef boost::dataflow::signal_producer producer_category;
+
// the signature of the output signal
typedef Signature signature_type;
// the type of the signal
@@ -121,6 +124,8 @@
typedef typename Combiner::result_type fused_signature_type (const parameter_vector &);
typedef boost::signal<signature_type, Combiner, Group, GroupCompare> signal_type;
+// typedef typename Combiner::result_type produced_type (const parameter_vector &);
+
/// Returns the default out signal.
signal_type &default_signal() const
{ return fused_out; }
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-08-03 19:07:12 EDT (Fri, 03 Aug 2007)
@@ -6,7 +6,7 @@
#ifndef SIGNAL_NETWORK_FILTER_BASE_HPP
#define SIGNAL_NETWORK_FILTER_BASE_HPP
-#include <boost/dataflow/signal/component/traits.hpp>
+#include <boost/dataflow/signal/support.hpp>
#include <boost/type_traits/integral_constant.hpp>
#include <boost/utility/enable_if.hpp>
@@ -24,30 +24,46 @@
#ifdef SIGNAL_NETWORK_TRACKABLE
: public boost::signals::trackable
#endif
-{};
+{
+public:
+ typedef boost::dataflow::signal_producer producer_category;
+ typedef boost::dataflow::signal_consumer consumer_category;
+};
+
+} }
+
+namespace boost { namespace dataflow {
+
+namespace extension {
+namespace signals {
+
template<class T, typename Enable=void>
struct is_filter : public boost::false_type { };
template<class T>
-struct is_filter<T, typename boost::enable_if<boost::is_base_of<filter_base, T> >::type >
+struct is_filter<T, typename boost::enable_if<boost::is_base_of<boost::signals::filter_base, T> >::type >
: public boost::true_type { };
-template<class T>
+/*template<class T>
struct is_component<T, typename boost::enable_if<is_filter<T> >::type >
- : public boost::true_type { };
-
+ : public boost::true_type { };*/
+
template<class T>
struct get_signal<T, typename boost::enable_if<is_filter<T> >::type >
{
typename T::signal_type &operator()(const T &t) {return t.default_signal();}
};
-/*template<class T>
-struct get_signal_type<T, typename boost::enable_if<is_filter<T> >::type>
+template<class T>
+struct get_signal_type<T, typename boost::enable_if<is_filter<T> >::type >
{
typedef typename T::signal_type type;
-};*/
+};
+
+}
+
+}
} } // namespace boost::signals
Modified: sandbox/SOC/2007/signals/boost/dataflow/signal/component/function.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/signal/component/function.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/signal/component/function.hpp 2007-08-03 19:07:12 EDT (Fri, 03 Aug 2007)
@@ -36,7 +36,7 @@
boost::fusion::fused<boost::function<FunctionSignature> const &> fused_func;
};
}
-/** \brief Converts a function into a Signal Network filter.
+/** \brief Converts a function into a [DataflowSignals] filter.
\param Signature Signature of the function to be converted.
The signals::function object will receive signals of signature void(<i>function arguments</i>),
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-08-03 19:07:12 EDT (Fri, 03 Aug 2007)
@@ -62,6 +62,7 @@
typename boost::function_types::parameter_types<Signature>::type>
base_type;
public:
+ typedef boost::dataflow::signal_consumer consumer_category;
socket_sender(asio::ip::tcp::socket & socket) : base_type(socket)
{ }
};
Modified: sandbox/SOC/2007/signals/boost/dataflow/signal/component/storage.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/signal/component/storage.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/signal/component/storage.hpp 2007-08-03 19:07:12 EDT (Fri, 03 Aug 2007)
@@ -3,17 +3,18 @@
// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
-#ifndef SIGNAL_NETWORK_GENERATOR_HPP
-#define SIGNAL_NETWORK_GENERATOR_HPP
+#ifndef BOOST_DATAFLOW_SIGNALS_COMPONENT_STORAGE_HPP
+#define BOOST_DATAFLOW_SIGNALS_COMPONENT_STORAGE_HPP
#include <boost/dataflow/signal/component/conditional_modifier.hpp>
#include <boost/dataflow/signal/component/detail/storable.hpp>
-#include <boost/dataflow/signal/connection/slot_selector_map.hpp>
+#include <boost/dataflow/signal/connection/slot_selector.hpp>
+#include <boost/dataflow/connection/consumer_map.hpp>
#include <boost/fusion/sequence/container/vector.hpp>
#include <boost/fusion/sequence/view/transform_view.hpp>
#include <boost/fusion/sequence/container/map.hpp>
-#include <boost/type_traits/add_reference.hpp>
+#include <boost/dataflow/detail/make_ref.hpp>
namespace boost { namespace signals {
@@ -25,24 +26,13 @@
>
class storage;
+namespace tag
+{
+ struct storage_invocable;
+}
+
namespace detail
{
- struct make_ref
- {
- template<typename Sig>
- struct result;
-
- template<typename T>
- struct result<make_ref(T&)>
- : boost::add_reference<T>
- {};
-
- template<typename T>
- typename boost::add_reference<T>::type operator()(T& t) const
- {
- return t;
- }
- };
}
// storage_modifier should be in the detail namespace, but MSVC complains when
// making boost::signals::storage a friend.
@@ -106,6 +96,8 @@
typedef typename storage_modifier<Signature>::storable_types storable_types;
typedef typename storage_modifier<Signature>::storable_vector storable_vector;
+
+ typedef tag::storage_invocable invocable_category;
/** Initializes the stored parameter values using the provided sequence.
\param[in] seq Sequence from which the stored parameter sequence is initialized from.
@@ -124,8 +116,8 @@
*/
typename base_type::signal_type::result_type send()
{
- boost::fusion::transform_view<storable_vector, detail::make_ref>
- view(base_type::modification.stored, detail::make_ref());
+ boost::fusion::transform_view<storable_vector, boost::dataflow::detail::make_ref>
+ view(base_type::modification.stored, boost::dataflow::detail::make_ref());
return base_type::fused_out(view);
}
/** Sends a signal containing the stored parameter values.
@@ -156,14 +148,14 @@
return boost::fusion::at_c<N>(base_type::modification.stored);
}
- boost::fusion::map<
+ boost::dataflow::consumer_map<boost::fusion::map<
boost::fusion::pair<void(), slot_selector<void (), storage> >,
boost::fusion::pair<void(const boost::fusion::vector<> &),
- slot_selector<void (const boost::fusion::vector<> &), storage> >
+ slot_selector<void (const boost::fusion::vector<> &), storage> > >
>
send_slot()
{
- return boost::fusion::map<
+ return boost::fusion::map<
boost::fusion::pair<void(), slot_selector<void (), storage> >,
boost::fusion::pair<void(const boost::fusion::vector<> &),
slot_selector<void (const boost::fusion::vector<> &), storage> >
@@ -203,4 +195,31 @@
} } // namespace boost::signals
-#endif // SIGNAL_NETWORK_GENERATOR_HPP
\ No newline at end of file
+
+namespace boost { namespace dataflow {
+
+namespace extension {
+
+ template<>
+ struct invoke_impl<boost::signals::tag::storage_invocable>
+ {
+ template<typename Invocable>
+ struct apply
+ {
+ static void call(Invocable &invocable)
+ {
+ invocable.send();
+ }
+ static void call(const Invocable &invocable)
+ {
+ invocable.send();
+ }
+ };
+ };
+
+}
+
+} } // namespace boost::dataflow
+
+
+#endif // BOOST_DATAFLOW_SIGNALS_COMPONENT_STORAGE_HPP
\ No newline at end of file
Modified: sandbox/SOC/2007/signals/boost/dataflow/signal/component/timed_generator.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/signal/component/timed_generator.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/signal/component/timed_generator.hpp 2007-08-03 19:07:12 EDT (Fri, 03 Aug 2007)
@@ -21,12 +21,20 @@
>
class timed_generator : public storage<Signature, OutSignal, Combiner, Group, GroupCompare>
{
+ typedef storage<Signature, OutSignal, Combiner, Group, GroupCompare> base_type;
public:
/// Default constructor. Starts the thread, but signals won't be sent until the enable() function is called.
timed_generator() : terminating(false), enabled(false)
{
thread_object = new boost::thread(boost::bind(&timed_generator::thread_function, boost::ref(*this)));
}
+ /// Forwarding constructor for underlying storage
+ template<typename T>
+ timed_generator(const T &t) : base_type(t), terminating(false), enabled(false)
+ {
+ thread_object = new boost::thread(boost::bind(&timed_generator::thread_function, boost::ref(*this)));
+ }
+
/// Sets the object to send the stored value at specified time intervals.
/** \param[in] interval Sets the time interval (in seconds) at which the signal is sent.
\param[in] signal_count The signal will be sent signal_count times, or indefinitelly if signal_count==0.
@@ -86,7 +94,7 @@
boost::thread::sleep(xt);
if (terminating) break;
- (*this)();
+ base_type::send();
if (count)
if (--count==0)
disable();
Deleted: sandbox/SOC/2007/signals/boost/dataflow/signal/component/traits.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/signal/component/traits.hpp 2007-08-03 19:07:12 EDT (Fri, 03 Aug 2007)
+++ (empty file)
@@ -1,33 +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_COMPONENT_TRAITS_HPP
-#define SIGNAL_NETWORK_COMPONENT_TRAITS_HPP
-
-#include <boost/dataflow/signal/detail/enable_if_defined.hpp>
-
-namespace boost { namespace signals {
-
-template<class T, typename Enable=void>
-struct is_component : public boost::false_type {};
-
-template<class T, typename Enable=void>
-struct get_signal;
-
-template<typename T, typename Enable=void>
-struct get_signal_type;
-
-template<typename T>
-struct get_signal_type<T, typename detail::enable_if_defined<typename T::signal_type>::type >
-{
- typedef typename T::signal_type type;
-};
-
-template<typename Signature, typename T, typename Enable=void>
-struct get_slot;
-
-} } // namespace boost::signals
-
-#endif // SIGNAL_NETWORK_COMPONENT_TRAITS_HPP
Modified: sandbox/SOC/2007/signals/boost/dataflow/signal/connection.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/signal/connection.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/signal/connection.hpp 2007-08-03 19:07:12 EDT (Fri, 03 Aug 2007)
@@ -6,10 +6,16 @@
#ifndef SIGNAL_NETWORK_CONNECTION_HPP
#define SIGNAL_NETWORK_CONNECTION_HPP
-#include <boost/dataflow/signal/connection/connect.hpp>
-#include <boost/dataflow/signal/connection/operators.hpp>
-#include <boost/dataflow/signal/connection/signal.hpp>
+#include <boost/dataflow/signal/support.hpp>
+#include <boost/dataflow/connection/operators.hpp>
#include <boost/dataflow/signal/connection/slot_selector.hpp>
#include <boost/dataflow/signal/connection/slot_selector_map.hpp>
+namespace boost { namespace signals {
+
+ using boost::dataflow::operators::operator>>=;
+ using boost::dataflow::operators::operator|;
+
+} }
+
#endif
\ No newline at end of file
Deleted: sandbox/SOC/2007/signals/boost/dataflow/signal/connection/connect.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/signal/connection/connect.hpp 2007-08-03 19:07:12 EDT (Fri, 03 Aug 2007)
+++ (empty file)
@@ -1,67 +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_CONNECT_HPP
-#define SIGNAL_NETWORK_CONNECT_HPP
-
-namespace boost { namespace signals {
-
-/** \brief A functor which connects two components. It must be specialized to support each component to be used with the library.
-*/
-template<typename Input, typename Output, typename Enable=void>
-struct connect_impl
-#ifdef DOXYGEN_DOCS_ONLY
-{
- /** Connects input to output.
- */
- void operator()(Input &input, Output &output);
- /** Connects input to output.
- */
- void operator()(Input &input, const Output &output);
- /** Connects input to output.
- */
- void operator()(const Input &input, Output &output);
- /** Connects input to output.
- */
- void operator()(const Input &input, const Output &output);
-}
-#endif
- ;
-
-/** Connects two components using boost::signals::connect_impl.
-*/
-template<typename Input, typename Output>
-void connect(Input &input, Output &output)
-{
- connect_impl<Input, Output>()(input, output);
-};
-
-/** Connects two components using boost::signals::connect_impl.
-*/
-template<typename Input, typename Output>
-void connect(Input &input, const Output &output)
-{
- connect_impl<Input, Output>()(input, output);
-};
-
-/** Connects two components using boost::signals::connect_impl.
-*/
-template<typename Input, typename Output>
-void connect(const Input &input, Output &output)
-{
- connect_impl<Input, Output>()(input, output);
-};
-
-/** Connects two components using boost::signals::connect_impl.
-*/
-template<typename Input, typename Output>
-void connect(const Input &input, const Output &output)
-{
- connect_impl<Input, Output>()(input, output);
-};
-
-} } // namespace boost::signals
-
-#endif // SIGNAL_NETWORK_CONNECT_HPP
\ No newline at end of file
Modified: sandbox/SOC/2007/signals/boost/dataflow/signal/connection/detail/bind_object.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/signal/connection/detail/bind_object.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/signal/connection/detail/bind_object.hpp 2007-08-03 19:07:12 EDT (Fri, 03 Aug 2007)
@@ -17,7 +17,7 @@
#include <boost/function.hpp>
namespace boost { namespace signals {
-
+
namespace detail {
template<typename Signature, typename T, int Arity>
@@ -40,13 +40,13 @@
template<typename Signature, typename T>
struct bind_object_impl<Signature, T, BOOST_PP_ITERATION()>
{
- boost::function<Signature> operator()(typename boost::signals::detail::slot_type<Signature, T>::type mem_fn, T &object)
+ boost::function<Signature> operator()(typename slot_type<Signature, T>::type mem_fn, T &object)
{
return boost::bind(mem_fn, boost::ref(object)
BOOST_PP_COMMA_IF(BOOST_PP_ITERATION())
BOOST_PP_ENUM_SHIFTED_PARAMS(BOOST_PP_INC(BOOST_PP_ITERATION()),_));
}
- boost::function<Signature> operator()(typename boost::signals::detail::slot_type<Signature, T>::type mem_fn, const T &object)
+ boost::function<Signature> operator()(typename slot_type<Signature, T>::type mem_fn, const T &object)
{
return boost::bind(mem_fn, boost::ref(object)
BOOST_PP_COMMA_IF(BOOST_PP_ITERATION())
Modified: sandbox/SOC/2007/signals/boost/dataflow/signal/connection/detail/result_of_defined.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/signal/connection/detail/result_of_defined.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/signal/connection/detail/result_of_defined.hpp 2007-08-03 19:07:12 EDT (Fri, 03 Aug 2007)
@@ -6,7 +6,7 @@
#ifndef SIGNAL_NETWORK_RESULT_OF_DEFINED_HPP
#define SIGNAL_NETWORK_RESULT_OF_DEFINED_HPP
-#include <boost/dataflow/signal/detail/enable_if_defined.hpp>
+#include <boost/dataflow/detail/enable_if_defined.hpp>
#include <boost/function_types/function_type.hpp>
#include <boost/function_types/parameter_types.hpp>
@@ -19,7 +19,7 @@
#include <boost/type_traits/integral_constant.hpp>
namespace boost { namespace signals {
-
+
namespace detail {
// BOOST_MPL_HAS_XXX_TRAIT_DEF(result_type)
@@ -27,14 +27,14 @@
struct has_result_type : public boost::false_type {};
template<typename T>
- struct has_result_type<T, typename detail::enable_if_defined<typename T::result_type>::type>
+ struct has_result_type<T, typename boost::dataflow::detail::enable_if_defined<typename T::result_type>::type>
: public boost::true_type {};
template<typename F, typename FArgs, typename Enable=void>
struct result_defined : public boost::false_type {};
template<typename F, typename FArgs>
- struct result_defined<F, FArgs, typename detail::enable_if_defined<typename F::template result<FArgs>::type >::type>
+ struct result_defined<F, FArgs, typename boost::dataflow::detail::enable_if_defined<typename F::template result<FArgs>::type >::type>
: public boost::true_type {};
template<typename T, typename Enable=void>
Deleted: sandbox/SOC/2007/signals/boost/dataflow/signal/connection/operators.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/signal/connection/operators.hpp 2007-08-03 19:07:12 EDT (Fri, 03 Aug 2007)
+++ (empty file)
@@ -1,60 +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_CONNECTION_OPERATORS_HPP
-#define SIGNAL_NETWORK_CONNECTION_OPERATORS_HPP
-
-#include <boost/dataflow/signal/connection/connect.hpp>
-
-namespace boost { namespace signals {
-
-/// Connects two components (typically as a part of a chain of components).
-/** This operator is identical to signals::operator| (it connects the
-left component to the right component, and returns a reference to the left component),
-except it is evaluated right to left. This makes it semantics more suitable for
-connecting a chain of components.
-*/
-template<typename Input, typename Output>
-typename boost::enable_if<is_component<Input>, Input & >::type
-operator >>= (Input &input, Output &output) { connect(input, output); return input;}
-
-template<typename Input, typename Output>
-typename boost::enable_if<is_component<Input>, Input & >::type
-operator >>= (Input &input, const Output &output) { connect(input, output); return input;}
-
-template<typename Input, typename Output>
-typename boost::enable_if<is_component<Input>, const Input & >::type
-operator >>= (const Input &input, Output &output) { connect(input, output); return input;}
-
-template<typename Input, typename Output>
-typename boost::enable_if<is_component<Input>, const Input & >::type
-operator >>= (const Input &input, const Output &output) { connect(input, output); return input;}
-
-/// Connects two components (typically as a part of branching from a single component).
-/** This operator is identical to signals::operator>>=, (it connects the
-left component to the right component, and returns a reference to the left component)
-except it is evaluated left to right. This makes its semantics more suitable for
-branching connections.
-*/
-template<typename Input, typename Output>
-typename boost::enable_if<is_component<Input>, Input & >::type
-operator | (Input &input, Output &output) { connect(input, output); return input;}
-
-template<typename Input, typename Output>
-typename boost::enable_if<is_component<Input>, Input & >::type
-operator | (Input &input, const Output &output) { connect(input, output); return input;}
-
-template<typename Input, typename Output>
-typename boost::enable_if<is_component<Input>, const Input & >::type
-operator | (const Input &input, Output &output) { connect(input, output); return input;}
-
-template<typename Input, typename Output>
-typename boost::enable_if<is_component<Input>, const Input & >::type
-operator | (const Input &input, const Output &output) { connect(input, output); return input;}
-
-} } // namespace boost::signals
-
-#endif SIGNAL_NETWORK_CONNECTION_OPERATORS_HPP
-
Deleted: sandbox/SOC/2007/signals/boost/dataflow/signal/connection/signal.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/signal/connection/signal.hpp 2007-08-03 19:07:12 EDT (Fri, 03 Aug 2007)
+++ (empty file)
@@ -1,99 +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_CONNECTION_SIGNAL_HPP
-#define SIGNAL_NETWORK_CONNECTION_SIGNAL_HPP
-
-#include <boost/dataflow/signal/connection/connect.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/signal/detail/enable_if_defined.hpp>
-#include <boost/dataflow/signal/component/traits.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;
- };
-}
-
-/** \brief Support for components using the signal data transport mechanism.
-*/
-template<typename Input, typename Output>
-struct connect_impl<Input, Output>
-{
- void operator()(Input &input, Output &output)
- {
- get_signal<Input>()(input).connect(get_slot<typename detail::get_signature<typename get_signal_type<Input>::type>::type, Output>()(output));
- }
- void operator()(Input &input, const Output &output)
- {
- get_signal<Input>()(input).connect(get_slot<typename detail::get_signature<typename get_signal_type<Input>::type>::type, Output>()(output));
- }
- void operator()(const Input &input, Output &output)
- {
- get_signal<Input>()(input).connect(get_slot<typename detail::get_signature<typename get_signal_type<Input>::type>::type, Output>()(output));
- }
- void operator()(const Input &input, const Output &output)
- {
- get_signal<Input>()(input).connect(get_slot<typename detail::get_signature<typename get_signal_type<Input>::type>::type, Output>()(output));
- }
-};
-
-/** \brief Support for boost::signal.
-*/
-template<typename Signature, typename Combiner, typename Group, typename GroupCompare>
-struct is_component<boost::signal<Signature, Combiner, Group, GroupCompare> >
- : public boost::true_type {};
-
-/** \brief Support for boost::signal.
-*/
-template<typename Signature, typename Combiner, typename Group, typename GroupCompare>
-struct get_signal<boost::signal<Signature, Combiner, Group, GroupCompare> >
-{
- boost::signal<Signature, Combiner, Group, GroupCompare> & operator()
- (boost::signal<Signature, Combiner, Group, GroupCompare> &s) {return s;}
-};
-
-/** \brief Support for boost::signal.
-*/
-template<typename Signature, typename Combiner, typename Group, typename GroupCompare>
-struct get_signal_type<boost::signal<Signature, Combiner, Group, GroupCompare> >
-{
- typedef boost::signal<Signature, Combiner, Group, GroupCompare> type;
-};
-
-/** \brief Support for function objects that for which boost::result_of is defined.
-*/
-template<typename Signature, typename T>
-struct get_slot<Signature, T, typename boost::enable_if<detail::result_of_defined<
- typename detail::replace_return_type<Signature, T>::type > >::type>
-{
- boost::function<Signature> operator()(T &object)
- {
- return detail::bind_object<Signature, T>()
- (static_cast<typename detail::slot_type<Signature, T>::type>(&T::operator()), object);
- }
- boost::function<Signature> operator()(const T &object)
- {
- return detail::bind_object<Signature, T>()
- (static_cast<typename detail::slot_type<Signature, T>::type>(&T::operator()), object);
- }
-};
-
-} } // namespace boost::signals
-#endif // SIGNAL_NETWORK_CONNECTION_SIGNAL_HPP
\ No newline at end of file
Modified: sandbox/SOC/2007/signals/boost/dataflow/signal/connection/slot_selector.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/signal/connection/slot_selector.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/signal/connection/slot_selector.hpp 2007-08-03 19:07:12 EDT (Fri, 03 Aug 2007)
@@ -11,7 +11,7 @@
#define SIGNAL_NETWORK_SLOT_SELECTOR_HPP
#include <boost/dataflow/signal/connection/detail/bind_object.hpp>
-#include <boost/dataflow/signal/component/traits.hpp>
+#include <boost/dataflow/signal/support.hpp>
namespace boost { namespace signals {
@@ -22,6 +22,8 @@
{
typedef Signature signature_type;
typedef T class_type;
+ typedef typename boost::dataflow::signal_consumer consumer_category;
+ typedef typename boost::dataflow::signal_producer producer_category;
T &object;
typename detail::slot_type<Signature, T>::type func;
@@ -38,16 +40,23 @@
return slot_selector<Signature, T>(func, object);
}
+} }
+
+namespace boost { namespace dataflow {
+
+ namespace extension { namespace signals {
+/*
/// Support for slot_selector as an input component (producer).
template<typename Signature, typename T>
struct is_component<slot_selector<Signature, T> >
: public boost::true_type {};
+*/
/// Support for slot_selector as an input component (producer).
template<typename Signature, typename T>
-struct get_signal<slot_selector<Signature, T> >
+struct get_signal<boost::signals::slot_selector<Signature, T> >
{
- typename get_signal_type<T>::type &operator()(const slot_selector<Signature, T> &selector)
+ typename get_signal_type<T>::type &operator()(const boost::signals::slot_selector<Signature, T> &selector)
{
return selector.object.default_signal();
}
@@ -55,22 +64,24 @@
/// Support for slot_selector as an input component (producer).
template<typename Signature, typename T>
-struct get_signal_type<slot_selector<Signature, T> >
+struct get_signal_type<boost::signals::slot_selector<Signature, T> >
{
typedef typename get_signal_type<T>::type type;
};
/// Support for slot_selector as an output component (consumer).
template<typename Signature, typename T>
-struct get_slot<Signature, slot_selector<Signature, T> >
+struct get_slot<Signature, boost::signals::slot_selector<Signature, T> >
{
- boost::function<Signature> operator()(const slot_selector<Signature, T> &selector)
+ boost::function<Signature> operator()(const boost::signals::slot_selector<Signature, T> &selector)
{
- return detail::bind_object<Signature, T>()
- (static_cast<typename detail::slot_type<Signature, T>::type>(selector.func), selector.object);
+ return boost::signals::detail::bind_object<Signature, T>()
+ (static_cast<typename boost::signals::detail::slot_type<Signature, T>::type>(selector.func), selector.object);
}
};
+} }
+
} } // namespace boost::signals
#endif // SIGNAL_NETWORK_SLOT_SELECTOR_HPP
\ No newline at end of file
Modified: sandbox/SOC/2007/signals/boost/dataflow/signal/connection/slot_selector_map.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/signal/connection/slot_selector_map.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/signal/connection/slot_selector_map.hpp 2007-08-03 19:07:12 EDT (Fri, 03 Aug 2007)
@@ -5,7 +5,7 @@
#ifndef SIGNAL_NETWORK_SLOT_SELECTOR_MAP_HPP
#define SIGNAL_NETWORK_SLOT_SELECTOR_MAP_HPP
-
+/*
#include <boost/dataflow/signal/connection/slot_selector.hpp>
#include <boost/fusion/support/is_sequence.hpp>
@@ -14,10 +14,17 @@
#include <boost/fusion/sequence/intrinsic/front.hpp>
#include <boost/type_traits/remove_reference.hpp>
-namespace boost { namespace signals {
+namespace boost { namespace dataflow {
-/** Support for fusion maps of consumer components.
-*/
+template<typename T>
+struct producer_category_of<T, typename boost::enable_if<boost::fusion::traits::is_sequence<T> >::type>
+{
+ typedef signal_producer type;
+};
+
+namespace extension { namespace signals {
+
+// Support for fusion maps of consumer components.
template<typename Signature, typename T>
struct get_slot<Signature, T, typename boost::enable_if<boost::fusion::traits::is_sequence<T> >::type> // this should be is_map
{
@@ -28,12 +35,7 @@
}
};
-/// Support for fusion maps as a producer component (it will try to use the first component).
-template<typename T>
-struct is_component<T, typename boost::enable_if<boost::fusion::traits::is_sequence<T> >::type>
- : public boost::true_type {};
-
-/// Support for slot_selector as an input component (producer).
+// Support for slot_selector as an input component (producer).
template<typename T>
struct get_signal_type<T, typename boost::enable_if<boost::fusion::traits::is_sequence<T> >::type>
{
@@ -45,7 +47,7 @@
>::type type;
};
-/// Support for slot_selector as an input component (producer).
+// Support for slot_selector as an input component (producer).
template<typename T>
struct get_signal<T, typename boost::enable_if<boost::fusion::traits::is_sequence<T> >::type>
{
@@ -58,8 +60,8 @@
}
};
-
+ } }
} } // namespace boost::signals
-
+*/
#endif // SIGNAL_NETWORK_SLOT_SELECTOR_MAP_HPP
\ No newline at end of file
Copied: sandbox/SOC/2007/signals/boost/dataflow/signal/support.hpp (from r7582, /sandbox/SOC/2007/signals/boost/dataflow/signal/connection/signal.hpp)
==============================================================================
--- /sandbox/SOC/2007/signals/boost/dataflow/signal/connection/signal.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/signal/support.hpp 2007-08-03 19:07:12 EDT (Fri, 03 Aug 2007)
@@ -3,15 +3,14 @@
// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
-#ifndef SIGNAL_NETWORK_CONNECTION_SIGNAL_HPP
-#define SIGNAL_NETWORK_CONNECTION_SIGNAL_HPP
+#ifndef SIGNAL_NETWORK_SIGNAL_SUPPORT_HPP
+#define SIGNAL_NETWORK_SIGNAL_SUPPORT_HPP
-#include <boost/dataflow/signal/connection/connect.hpp>
+#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/signal/detail/enable_if_defined.hpp>
-#include <boost/dataflow/signal/component/traits.hpp>
+#include <boost/dataflow/detail/enable_if_defined.hpp>
#include <boost/signal.hpp>
#include <boost/mpl/aux_/has_type.hpp>
@@ -30,70 +29,138 @@
typedef Signature type;
};
}
-
-/** \brief Support for components using the signal data transport mechanism.
-*/
-template<typename Input, typename Output>
-struct connect_impl<Input, Output>
-{
- void operator()(Input &input, Output &output)
- {
- get_signal<Input>()(input).connect(get_slot<typename detail::get_signature<typename get_signal_type<Input>::type>::type, Output>()(output));
- }
- void operator()(Input &input, const Output &output)
- {
- get_signal<Input>()(input).connect(get_slot<typename detail::get_signature<typename get_signal_type<Input>::type>::type, Output>()(output));
- }
- void operator()(const Input &input, Output &output)
- {
- get_signal<Input>()(input).connect(get_slot<typename detail::get_signature<typename get_signal_type<Input>::type>::type, Output>()(output));
- }
- void operator()(const Input &input, const Output &output)
- {
- get_signal<Input>()(input).connect(get_slot<typename detail::get_signature<typename get_signal_type<Input>::type>::type, Output>()(output));
- }
-};
-/** \brief Support for boost::signal.
-*/
-template<typename Signature, typename Combiner, typename Group, typename GroupCompare>
-struct is_component<boost::signal<Signature, Combiner, Group, GroupCompare> >
- : public boost::true_type {};
+} }
-/** \brief Support for boost::signal.
-*/
-template<typename Signature, typename Combiner, typename Group, typename GroupCompare>
-struct get_signal<boost::signal<Signature, Combiner, Group, GroupCompare> >
-{
- boost::signal<Signature, Combiner, Group, GroupCompare> & operator()
- (boost::signal<Signature, Combiner, Group, GroupCompare> &s) {return s;}
-};
+namespace boost { namespace dataflow {
+
+struct signal_producer {};
+struct signal_consumer {};
-/** \brief Support for boost::signal.
-*/
template<typename Signature, typename Combiner, typename Group, typename GroupCompare>
-struct get_signal_type<boost::signal<Signature, Combiner, Group, GroupCompare> >
+struct producer_category_of<boost::signal<Signature, Combiner, Group, GroupCompare> >
{
- typedef boost::signal<Signature, Combiner, Group, GroupCompare> type;
+ typedef signal_producer type;
};
-/** \brief Support for function objects that for which boost::result_of is defined.
-*/
-template<typename Signature, typename T>
-struct get_slot<Signature, T, typename boost::enable_if<detail::result_of_defined<
- typename detail::replace_return_type<Signature, T>::type > >::type>
+/*template<typename T>
+struct consumer_type_of<T, */
+
+namespace extension
{
- boost::function<Signature> operator()(T &object)
- {
- return detail::bind_object<Signature, T>()
- (static_cast<typename detail::slot_type<Signature, T>::type>(&T::operator()), object);
- }
- boost::function<Signature> operator()(const T &object)
+ namespace signals
{
- return detail::bind_object<Signature, T>()
- (static_cast<typename detail::slot_type<Signature, T>::type>(&T::operator()), object);
+ template<class T, typename Enable=void>
+ struct get_signal;
+
+ template<typename T, typename Enable=void>
+ struct get_signal_type;
+
+ template<typename Signature, typename T, typename Enable=void>
+ struct get_slot;
+
+ /** \brief Support for boost::signal.
+ */
+ template<typename Signature, typename Combiner, typename Group, typename GroupCompare>
+ struct get_signal<boost::signal<Signature, Combiner, Group, GroupCompare> >
+ {
+ boost::signal<Signature, Combiner, Group, GroupCompare> & operator()
+ (boost::signal<Signature, Combiner, Group, GroupCompare> &s) {return s;}
+ };
+
+ /** \brief Support for boost::signal.
+ */
+ template<typename Signature, typename Combiner, typename Group, typename GroupCompare>
+ struct get_signal_type<boost::signal<Signature, Combiner, Group, GroupCompare> >
+ {
+ typedef boost::signal<Signature, Combiner, Group, GroupCompare> type;
+ };
+
+ /** \brief Support for function objects that for which boost::result_of is defined.
+ */
+ template<typename Signature, typename T>
+ struct get_slot<Signature, T, typename boost::enable_if<boost::signals::detail::result_of_defined<
+ typename boost::signals::detail::replace_return_type<Signature, T>::type > >::type>
+ {
+ boost::function<Signature> operator()(T &object)
+ {
+ return boost::signals::detail::bind_object<Signature, T>()
+ (static_cast<typename boost::signals::detail::slot_type<Signature, T>::type>(&T::operator()), object);
+ }
+ boost::function<Signature> operator()(const T &object)
+ {
+ return boost::signals::detail::bind_object<Signature, T>()
+ (static_cast<typename boost::signals::detail::slot_type<Signature, T>::type>(&T::operator()), object);
+ }
+ };
+
+ /** \brief Support for function objects that for which boost::result_of is defined.
+ */
+/* template<typename T>
+ struct consumer_category_of<T, boost::enable_if<boost::signals::detail::result_of_defined<
+ typename boost::signals::detail::replace_return_type<Signature, T>::type > >::type>
+ {
+ typedef boost::dataflow::signal_consumer type;
+ };*/
}
+
+ template<typename ProducerTag, typename ConsumerTag>
+ struct connect_impl<ProducerTag, ConsumerTag,
+ typename boost::enable_if<boost::mpl::and_<
+ boost::is_base_of<signal_producer, ProducerTag>,
+ boost::is_base_of<signal_consumer, ConsumerTag>
+ > >::type >
+ {
+ template<typename Producer, typename Consumer>
+ struct apply
+ {
+ static void call(const Producer &producer, const Consumer &consumer)
+ {
+ signals::get_signal<Producer>()(producer).connect(
+ signals::get_slot<typename dataflow::produced_type_of<
+ Producer>::type, Consumer>()(consumer));
+ }
+ static void call(const Producer &producer, Consumer &consumer)
+ {
+ signals::get_signal<Producer>()(producer).connect(
+ signals::get_slot<typename dataflow::produced_type_of<
+ Producer>::type, Consumer>()(consumer));
+ }
+ static void call(Producer &producer, const Consumer &consumer)
+ {
+ signals::get_signal<Producer>()(producer).connect(
+ signals::get_slot<typename dataflow::produced_type_of<
+ Producer>::type, Consumer>()(consumer));
+ }
+ static void call(Producer &producer, Consumer &consumer)
+ {
+ signals::get_signal<Producer>()(producer).connect(
+ signals::get_slot<typename dataflow::produced_type_of<
+ Producer>::type, Consumer>()(consumer));
+ }
+ };
+ };
+}
+
+template<typename T>
+struct produced_type_of<
+T,
+typename boost::enable_if<
+boost::is_base_of<
+signal_producer,
+typename producer_category_of<T>::type
+>
+>::type >
+{
+ typedef typename boost::signals::detail::get_signature<typename extension::signals::get_signal_type<T>::type>::type type;
};
-} } // namespace boost::signals
-#endif // SIGNAL_NETWORK_CONNECTION_SIGNAL_HPP
\ No newline at end of file
+} } // namespace boost::dataflow
+
+namespace boost { namespace signals {
+
+ using boost::dataflow::connect;
+
+} } // namespace boost::phoenix
+
+#endif // SIGNAL_NETWORK_SIGNAL_SUPPORT_HPP
\ No newline at end of file
Modified: sandbox/SOC/2007/signals/boost/dataflow/support.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/support.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/support.hpp 2007-08-03 19:07:12 EDT (Fri, 03 Aug 2007)
@@ -6,12 +6,13 @@
#ifndef BOOST_DATAFLOW_SUPPORT_HPP
#define BOOST_DATAFLOW_SUPPORT_HPP
-#include <boost/type_traits/integral_constant.hpp>
-#include <boost/mpl/has_xxx.hpp>
-#include <boost/utility/enable_if.hpp>
-#include <boost/dataflow/detail/enable_if_defined.hpp>
+#include <boost/dataflow/support/producer.hpp>
+#include <boost/dataflow/support/consumer.hpp>
+#include <boost/dataflow/support/invocable.hpp>
+#include <boost/dataflow/support/connectable.hpp>
+//#include <boost/dataflow/support/fusion_groups.hpp>
-namespace boost { namespace dataflow {
+/*namespace boost { namespace dataflow {
namespace detail
{
@@ -22,101 +23,20 @@
BOOST_MPL_HAS_XXX_TRAIT_DEF(produced_type)
}
-// contains mechanism tags
-namespace mechanism
-{
-
-}
-// returns the underlying mechanism associated with a type.
-template<typename T>
-struct mechanism_of;
-
-// trait giving the producer category of a type.
-template<typename T, typename Enable=void>
-struct producer_category_of;
-
-template<typename T>
-struct producer_category_of<T,
-typename boost::enable_if<detail::has_producer_category<T> >::type >
-{
- typedef typename T::producer_category type;
-};
-// trait giving the consumer category of a type.
-template<typename T, typename Enable=void>
-struct consumer_category_of;
-
-template<typename T>
-struct consumer_category_of<T,
-typename boost::enable_if<detail::has_consumer_category<T> >::type >
-{
- typedef typename T::consumer_category type;
-};
-// trait determining whether a type is a producer.
-template<typename T, typename Enable=void>
-struct is_producer
- : public boost::false_type {};
-
-template<typename T>
-struct is_producer<T,
- typename detail::enable_if_defined<producer_category_of<T> >::type >
- : public boost::true_type {};
-
-// trait determining whether a type is a consumer.
-template<typename T, typename Enable=void>
-struct is_consumer
- : public boost::false_type {};
-
-template<typename T>
-struct is_consumer<T,
- typename detail::enable_if_defined<consumer_category_of<T> >::type >
- : public boost::true_type {};
-
-template<typename T, typename Enable=void>
-struct produced_type_of;
-
-template<typename T>
-struct produced_type_of<T,
-typename boost::enable_if<detail::has_produced_type<T> >::type >
-{
- typedef typename T::produced_type type;
-};
-namespace extension
-{
- template<typename ProducerTag, typename ConsumerTag, typename Enable=void>
- struct connect_impl
- {
- template<typename Producer, typename Consumer>
- struct apply
- {
-
- };
- };
-}
-template<typename Producer, typename Consumer>
-inline void connect(Producer &producer, Consumer &consumer)
-{
- extension::connect_impl<
- typename producer_category_of<Producer>::type,
- typename consumer_category_of<Consumer>::type>
- ::template apply<Producer,Consumer>
- ::call(producer,consumer);
-}
-template<typename Producer, typename Consumer>
-inline void connect(const Producer &producer, Consumer &consumer)
-{
- extension::connect_impl<
- typename producer_category_of<Producer>::type,
- typename consumer_category_of<Consumer>::type>
- ::template apply<Producer,Consumer>
- ::call(producer,consumer);
-}
-} } // namespace boost::dataflow
+
+
+
+
+
+
+} } // namespace boost::dataflow
+*/
#endif // BOOST_DATAFLOW_SUPPORT_HPP
Deleted: sandbox/SOC/2007/signals/boost/dataflow/support/fusion_groups.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/support/fusion_groups.hpp 2007-08-03 19:07:12 EDT (Fri, 03 Aug 2007)
+++ (empty file)
@@ -1,88 +0,0 @@
-// Copyright 2007 Stjepan Rajko.
-// Distributed under 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 BOOST_DATAFLOW_SUPPORT_FUSION_GROUPS_HPP
-#define BOOST_DATAFLOW_SUPPORT_FUSION_GROUPS_HPP
-
-#include <boost/fusion/algorithm/iteration/for_each.hpp>
-#include <boost/fusion/sequence/container/vector.hpp>
-#include <boost/fusion/sequence/generation/vector_tie.hpp>
-#include <boost/fusion/sequence/view/joint_view.hpp>
-#include <boost/fusion/sequence/view/zip_view.hpp>
-#include <boost/fusion/support/is_sequence.hpp>
-
-namespace boost { namespace dataflow {
-
-struct fusion_group_producer;
-
-template<class T>
-struct producer_group : public T
-{
- fusion_producer_group(const T& t) : T(t) {}
- typedef fusion_group_producer producer_category;
-};
-
-template<typename T1, typename T2> inline
-producer_group<typename boost::fusion::result_of::vector_tie<T1,T2>::type>
-group(T1 &t1, T2 &t2)
-{
- return fusion_group<
- typename boost::fusion::result_of::vector_tie<T1,T2>::type>
- (boost::fusion::vector_tie(t1, t2));
-} // need to specialize make_group for T1 or T2 being groups already.
-
-struct fusion_group_consumer;
-
-template <typename Sequence>
-struct consumer_category_of<Sequence,
- typename boost::enable_if<
- boost::fusion::traits::is_sequence<Sequence> >::type >
-{
- typedef fusion_group_consumer type;
-};
-
-
-namespace extension
-{
- namespace detail
- {
- struct zip_connect
- {
- template<typename T>
- void operator()(const T& t) const
- {
- dataflow::connect(boost::fusion::at_c<0>(t),
- boost::fusion::at_c<1>(t));
- }
- };
- }
-
- template<typename ProducerTag, typename ConsumerTag>
- struct connect_impl<ProducerTag, ConsumerTag,
- typename boost::enable_if<boost::mpl::and_<
- boost::is_base_of<fusion_group_producer, ProducerTag>,
- boost::is_base_of<fusion_group_consumer, ConsumerTag>
- > >::type >
- {
- template<typename Producer, typename Consumer>
- struct apply
- {
- static void call(const Producer &producer, const Consumer &consumer)
- {
- typedef boost::fusion::vector<const Producer&, const Consumer&> zip_type;
- boost::fusion::zip_view<zip_type>
- zip(zip_type(producer, consumer));
- boost::fusion::for_each(zip, detail::zip_connect());
- }
- };
- };
-
-}
-
-} } // namespace boost::dataflow
-
-#endif // BOOST_DATAFLOW_SUPPORT_FUSION_GROUPS_HPP
-
-
Modified: sandbox/SOC/2007/signals/boost/signal_network/component/detail/unfused_inherited.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/signal_network/component/detail/unfused_inherited.hpp (original)
+++ sandbox/SOC/2007/signals/boost/signal_network/component/detail/unfused_inherited.hpp 2007-08-03 19:07:12 EDT (Fri, 03 Aug 2007)
@@ -32,8 +32,8 @@
#include <boost/fusion/algorithm/transformation/pop_back.hpp>
#include <boost/fusion/functional/adapter/limits.hpp>
-#include <boost/fusion/functional/adapter/detail/has_type.hpp>
-#include <boost/fusion/functional/adapter/detail/nullary_call_base.hpp>
+//#include <boost/fusion/functional/adapter/detail/has_type.hpp>
+//#include <boost/fusion/functional/adapter/detail/nullary_call_base.hpp>
#include <boost/mpl/size.hpp>
#include <boost/utility/result_of.hpp>
Modified: sandbox/SOC/2007/signals/boost/signal_network/component/function.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/signal_network/component/function.hpp (original)
+++ sandbox/SOC/2007/signals/boost/signal_network/component/function.hpp 2007-08-03 19:07:12 EDT (Fri, 03 Aug 2007)
@@ -36,7 +36,7 @@
boost::fusion::fused<boost::function<FunctionSignature> const &> fused_func;
};
}
-/** \brief Converts a function into a Signal Network filter.
+/** \brief Converts a function into a [DataflowSignals] filter.
\param Signature Signature of the function to be converted.
The signals::function object will receive signals of signature void(<i>function arguments</i>),
Modified: sandbox/SOC/2007/signals/boost/signal_network/connection/detail/replace_return_type.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/signal_network/connection/detail/replace_return_type.hpp (original)
+++ sandbox/SOC/2007/signals/boost/signal_network/connection/detail/replace_return_type.hpp 2007-08-03 19:07:12 EDT (Fri, 03 Aug 2007)
@@ -7,7 +7,7 @@
#define SIGNAL_NETWORK_REPLACE_RETURN_TYPE_HPP
namespace boost { namespace signals {
-
+
namespace detail {
template<typename Signature, typename T>
Modified: sandbox/SOC/2007/signals/boost/signal_network/connection/detail/slot_type.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/signal_network/connection/detail/slot_type.hpp (original)
+++ sandbox/SOC/2007/signals/boost/signal_network/connection/detail/slot_type.hpp 2007-08-03 19:07:12 EDT (Fri, 03 Aug 2007)
@@ -14,7 +14,7 @@
#include <boost/function_types/result_type.hpp>
#include <boost/mpl/push_front.hpp>
-namespace boost { namespace signals {
+namespace boost { namespace signals {
namespace detail {
Modified: sandbox/SOC/2007/signals/libs/dataflow/build/xcodeide/signal_network.xcodeproj/project.pbxproj
==============================================================================
--- /sandbox/SOC/2007/signals/libs/signal_network/build/xcodeide/signal_network.xcodeproj/project.pbxproj (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/build/xcodeide/signal_network.xcodeproj/project.pbxproj 2007-08-03 19:07:12 EDT (Fri, 03 Aug 2007)
@@ -90,9 +90,17 @@
080DD7810C13912C00EEB53D /* socket_sender.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = socket_sender.hpp; sourceTree = "<group>"; };
080DD7820C13912C00EEB53D /* storage.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = storage.hpp; sourceTree = "<group>"; };
080DD7830C13912C00EEB53D /* timed_generator.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = timed_generator.hpp; sourceTree = "<group>"; };
+ 082761BB0C6037740030E557 /* producer.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = producer.hpp; sourceTree = "<group>"; };
+ 082761BC0C6037940030E557 /* consumer.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = consumer.hpp; sourceTree = "<group>"; };
+ 082761BD0C60379F0030E557 /* connectable.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = connectable.hpp; sourceTree = "<group>"; };
+ 082761BE0C6037A90030E557 /* invocable.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = invocable.hpp; sourceTree = "<group>"; };
+ 083FD3B90C62A4CB00EF3F6B /* concepts.qbk */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = concepts.qbk; sourceTree = "<group>"; };
+ 083FD3C10C62A75B00EF3F6B /* concepts.qbk */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = concepts.qbk; sourceTree = "<group>"; };
+ 083FD3C60C62A7F600EF3F6B /* phoenix.qbk */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = phoenix.qbk; sourceTree = "<group>"; };
08668C4E0C19A16300ACB19A /* example.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = example.cpp; sourceTree = "<group>"; };
08668C4F0C19A16300ACB19A /* Jamfile.v2 */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Jamfile.v2; sourceTree = "<group>"; };
08668C560C19AD0100ACB19A /* test_connections.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = test_connections.cpp; sourceTree = "<group>"; };
+ 08C3EEA20C625AE30074AB9E /* simple_example.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = simple_example.cpp; sourceTree = "<group>"; };
08C675970C13A03E00D85379 /* Jamfile.v2 */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Jamfile.v2; sourceTree = "<group>"; };
08C675980C13A03E00D85379 /* test_chain.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = test_chain.cpp; sourceTree = "<group>"; };
08C675990C13A03E00D85379 /* test_counter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = test_counter.cpp; sourceTree = "<group>"; };
@@ -112,6 +120,37 @@
08EC0E640C3C215900CC8AE0 /* result_of_defined.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = result_of_defined.hpp; sourceTree = "<group>"; };
08EC84040C18DA8100820E53 /* connect.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = connect.hpp; sourceTree = "<group>"; };
08EF63F20C33320D0099D00A /* generic_template.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = generic_template.hpp; sourceTree = "<group>"; };
+ 08EF9B220C5D506A00D4D206 /* applicator.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = applicator.hpp; sourceTree = "<group>"; };
+ 08EF9B230C5D506A00D4D206 /* chain.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = chain.hpp; sourceTree = "<group>"; };
+ 08EF9B240C5D506A00D4D206 /* conditional.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = conditional.hpp; sourceTree = "<group>"; };
+ 08EF9B250C5D506A00D4D206 /* conditional_modifier.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = conditional_modifier.hpp; sourceTree = "<group>"; };
+ 08EF9B260C5D506A00D4D206 /* counter.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = counter.hpp; sourceTree = "<group>"; };
+ 08EF9B280C5D506A00D4D206 /* generic_template.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = generic_template.hpp; sourceTree = "<group>"; };
+ 08EF9B290C5D506A00D4D206 /* serialize_fusion_vector.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = serialize_fusion_vector.hpp; sourceTree = "<group>"; };
+ 08EF9B2A0C5D506A00D4D206 /* storable.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = storable.hpp; sourceTree = "<group>"; };
+ 08EF9B2B0C5D506A00D4D206 /* unfused_inherited.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = unfused_inherited.hpp; sourceTree = "<group>"; };
+ 08EF9B2C0C5D506A00D4D206 /* filter.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = filter.hpp; sourceTree = "<group>"; };
+ 08EF9B2D0C5D506A00D4D206 /* filter_base.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = filter_base.hpp; sourceTree = "<group>"; };
+ 08EF9B2E0C5D506A00D4D206 /* function.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = function.hpp; sourceTree = "<group>"; };
+ 08EF9B2F0C5D506A00D4D206 /* instantiator.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = instantiator.hpp; sourceTree = "<group>"; };
+ 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>"; };
+ 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>"; };
+ 08EF9B370C5D506A00D4D206 /* timed_generator.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = timed_generator.hpp; sourceTree = "<group>"; };
+ 08EF9B3C0C5D506A00D4D206 /* bind_object.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = bind_object.hpp; sourceTree = "<group>"; };
+ 08EF9B3D0C5D506A00D4D206 /* replace_return_type.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = replace_return_type.hpp; sourceTree = "<group>"; };
+ 08EF9B3E0C5D506A00D4D206 /* result_of_defined.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = result_of_defined.hpp; sourceTree = "<group>"; };
+ 08EF9B3F0C5D506A00D4D206 /* slot_type.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = slot_type.hpp; sourceTree = "<group>"; };
+ 08EF9B420C5D506A00D4D206 /* slot_selector.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = slot_selector.hpp; sourceTree = "<group>"; };
+ 08EF9B430C5D506A00D4D206 /* slot_selector_map.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = slot_selector_map.hpp; sourceTree = "<group>"; };
+ 08EF9B440C5D506A00D4D206 /* connection.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = connection.hpp; sourceTree = "<group>"; };
+ 08EF9B460C5D506A00D4D206 /* enable_if_defined.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = enable_if_defined.hpp; sourceTree = "<group>"; };
+ 08EF9B470C5D506A00D4D206 /* unfused_typed_class.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = unfused_typed_class.hpp; sourceTree = "<group>"; };
+ 08EF9B520C5D537F00D4D206 /* support.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = support.hpp; sourceTree = "<group>"; };
08EFC1EC0C30987700C730EC /* modifier.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = modifier.hpp; sourceTree = "<group>"; };
08EFEADE0C1C892A00097C80 /* instantiator.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = instantiator.hpp; sourceTree = "<group>"; };
08EFEB970C1C983500097C80 /* applicator.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = applicator.hpp; sourceTree = "<group>"; };
@@ -124,6 +163,7 @@
08F0216B0C473AF000C0ED27 /* enable_if_defined.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = enable_if_defined.hpp; sourceTree = "<group>"; };
08F022C20C47556200C0ED27 /* group.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = group.hpp; sourceTree = "<group>"; };
08F022C70C47565600C0ED27 /* operators.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = operators.hpp; sourceTree = "<group>"; };
+ 08F076F80C63C78C003D448D /* consumer_map.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = consumer_map.hpp; sourceTree = "<group>"; };
08F082020C1D591000687E1B /* introduction.qbk */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = introduction.qbk; sourceTree = "<group>"; };
08F082570C1DD53400687E1B /* components.qbk */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = components.qbk; sourceTree = "<group>"; };
08F0825A0C1DD58500687E1B /* connections.qbk */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = connections.qbk; sourceTree = "<group>"; };
@@ -139,6 +179,10 @@
08F36DFB0C41375B00E2F9A1 /* dataflow_table.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = dataflow_table.xml; sourceTree = "<group>"; };
08F36EED0C416DEB00E2F9A1 /* support.qbk */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = support.qbk; sourceTree = "<group>"; };
08F3701D0C41968800E2F9A1 /* enable_if_defined.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = enable_if_defined.hpp; sourceTree = "<group>"; };
+ 08F37EDF0C57A4A700AC7FB8 /* static_function_call.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = static_function_call.hpp; sourceTree = "<group>"; };
+ 08F4FBB80C56AFDF00EB271A /* producer_wrapper.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = producer_wrapper.hpp; sourceTree = "<group>"; };
+ 08F4FC170C56C96300EB271A /* producer_container.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = producer_container.hpp; sourceTree = "<group>"; };
+ 08F585BE0C5A7ED70086F4F4 /* concepts.qbk */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = concepts.qbk; sourceTree = "<group>"; };
08F74F790C3A9E8200FD50BE /* slot_type.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = slot_type.hpp; sourceTree = "<group>"; };
08F74F7D0C3A9F6900FD50BE /* slot_selector.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = slot_selector.hpp; sourceTree = "<group>"; };
08F74F820C3AA0FA00FD50BE /* operators.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = operators.hpp; sourceTree = "<group>"; };
@@ -154,6 +198,8 @@
08F9462E0C46C2F000E224E4 /* fibonacci.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = fibonacci.cpp; sourceTree = "<group>"; };
08FA69EE0C41DDFD00434913 /* replace_return_type.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = replace_return_type.hpp; sourceTree = "<group>"; };
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>"; };
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>"; };
@@ -161,11 +207,8 @@
08FD5DE80C1BA60700F00877 /* html_footer.html */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.html; path = html_footer.html; sourceTree = "<group>"; };
08FD5DE90C1BA60700F00877 /* html_header.html */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.html; path = html_header.html; sourceTree = "<group>"; };
08FD5DEA0C1BA60700F00877 /* signal_network.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = signal_network.hpp; sourceTree = "<group>"; };
- 08FD5DEC0C1BA60700F00877 /* boostbook.css */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = boostbook.css; sourceTree = "<group>"; };
- 08FD5DED0C1BA60700F00877 /* boostbook_doxygen.css */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = boostbook_doxygen.css; sourceTree = "<group>"; };
- 08FD5E450C1BA60800F00877 /* reference.css */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = reference.css; sourceTree = "<group>"; };
08FD5E4D0C1BA60800F00877 /* Jamfile.v2 */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Jamfile.v2; sourceTree = "<group>"; };
- 08FD5E4E0C1BA60800F00877 /* signal_network.qbk */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = signal_network.qbk; sourceTree = "<group>"; };
+ 08FD5E4E0C1BA60800F00877 /* dataflow.qbk */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = dataflow.qbk; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXGroup section */
@@ -201,6 +244,14 @@
path = detail;
sourceTree = "<group>";
};
+ 083FD3C00C62A75100EF3F6B /* phoenix */ = {
+ isa = PBXGroup;
+ children = (
+ 083FD3C10C62A75B00EF3F6B /* concepts.qbk */,
+ );
+ path = phoenix;
+ sourceTree = "<group>";
+ };
08668C4D0C19A16300ACB19A /* example */ = {
isa = PBXGroup;
children = (
@@ -209,6 +260,7 @@
08EFED440C1CD55100097C80 /* timing_example.cpp */,
08FC26060C46049400F59CDD /* edit_distance.cpp */,
08F9462E0C46C2F000E224E4 /* fibonacci.cpp */,
+ 08C3EEA20C625AE30074AB9E /* simple_example.cpp */,
);
name = example;
path = ../../example;
@@ -242,9 +294,99 @@
path = ../../test;
sourceTree = SOURCE_ROOT;
};
+ 08EF9B200C5D506A00D4D206 /* signal */ = {
+ isa = PBXGroup;
+ children = (
+ 08EF9B520C5D537F00D4D206 /* support.hpp */,
+ 08EF9B210C5D506A00D4D206 /* component */,
+ 08EF9B390C5D506A00D4D206 /* connection */,
+ 08EF9B440C5D506A00D4D206 /* connection.hpp */,
+ 08EF9B450C5D506A00D4D206 /* detail */,
+ 08EF9B480C5D506A00D4D206 /* trait */,
+ );
+ path = signal;
+ sourceTree = "<group>";
+ };
+ 08EF9B210C5D506A00D4D206 /* component */ = {
+ isa = PBXGroup;
+ children = (
+ 08EF9B220C5D506A00D4D206 /* applicator.hpp */,
+ 08EF9B230C5D506A00D4D206 /* chain.hpp */,
+ 08EF9B240C5D506A00D4D206 /* conditional.hpp */,
+ 08EF9B250C5D506A00D4D206 /* conditional_modifier.hpp */,
+ 08EF9B260C5D506A00D4D206 /* counter.hpp */,
+ 08EF9B270C5D506A00D4D206 /* detail */,
+ 08EF9B2C0C5D506A00D4D206 /* filter.hpp */,
+ 08EF9B2D0C5D506A00D4D206 /* filter_base.hpp */,
+ 08EF9B2E0C5D506A00D4D206 /* function.hpp */,
+ 08EF9B2F0C5D506A00D4D206 /* instantiator.hpp */,
+ 08EF9B300C5D506A00D4D206 /* junction.hpp */,
+ 08EF9B310C5D506A00D4D206 /* modifier.hpp */,
+ 08EF9B320C5D506A00D4D206 /* mutex.hpp */,
+ 08EF9B330C5D506A00D4D206 /* selector.hpp */,
+ 08EF9B340C5D506A00D4D206 /* socket_receiver.hpp */,
+ 08EF9B350C5D506A00D4D206 /* socket_sender.hpp */,
+ 08EF9B360C5D506A00D4D206 /* storage.hpp */,
+ 08EF9B370C5D506A00D4D206 /* timed_generator.hpp */,
+ );
+ path = component;
+ sourceTree = "<group>";
+ };
+ 08EF9B270C5D506A00D4D206 /* detail */ = {
+ isa = PBXGroup;
+ children = (
+ 08EF9B280C5D506A00D4D206 /* generic_template.hpp */,
+ 08EF9B290C5D506A00D4D206 /* serialize_fusion_vector.hpp */,
+ 08EF9B2A0C5D506A00D4D206 /* storable.hpp */,
+ 08EF9B2B0C5D506A00D4D206 /* unfused_inherited.hpp */,
+ );
+ path = detail;
+ sourceTree = "<group>";
+ };
+ 08EF9B390C5D506A00D4D206 /* connection */ = {
+ isa = PBXGroup;
+ children = (
+ 08EF9B3B0C5D506A00D4D206 /* detail */,
+ 08EF9B420C5D506A00D4D206 /* slot_selector.hpp */,
+ 08EF9B430C5D506A00D4D206 /* slot_selector_map.hpp */,
+ );
+ path = connection;
+ sourceTree = "<group>";
+ };
+ 08EF9B3B0C5D506A00D4D206 /* detail */ = {
+ isa = PBXGroup;
+ children = (
+ 08EF9B3C0C5D506A00D4D206 /* bind_object.hpp */,
+ 08EF9B3D0C5D506A00D4D206 /* replace_return_type.hpp */,
+ 08EF9B3E0C5D506A00D4D206 /* result_of_defined.hpp */,
+ 08EF9B3F0C5D506A00D4D206 /* slot_type.hpp */,
+ );
+ path = detail;
+ sourceTree = "<group>";
+ };
+ 08EF9B450C5D506A00D4D206 /* detail */ = {
+ isa = PBXGroup;
+ children = (
+ 08EF9B460C5D506A00D4D206 /* enable_if_defined.hpp */,
+ 08EF9B470C5D506A00D4D206 /* unfused_typed_class.hpp */,
+ );
+ path = detail;
+ sourceTree = "<group>";
+ };
+ 08EF9B480C5D506A00D4D206 /* trait */ = {
+ isa = PBXGroup;
+ children = (
+ );
+ path = trait;
+ sourceTree = "<group>";
+ };
08F01F950C470E1500C0ED27 /* support */ = {
isa = PBXGroup;
children = (
+ 082761BB0C6037740030E557 /* producer.hpp */,
+ 082761BC0C6037940030E557 /* consumer.hpp */,
+ 082761BD0C60379F0030E557 /* connectable.hpp */,
+ 082761BE0C6037A90030E557 /* invocable.hpp */,
);
path = support;
sourceTree = "<group>";
@@ -264,6 +406,7 @@
08F348500C492B320096097F /* operator */,
08F022C20C47556200C0ED27 /* group.hpp */,
08F022C70C47565600C0ED27 /* operators.hpp */,
+ 08F076F80C63C78C003D448D /* consumer_map.hpp */,
);
path = connection;
sourceTree = "<group>";
@@ -284,6 +427,14 @@
path = operator;
sourceTree = "<group>";
};
+ 08F37EDE0C57A49500AC7FB8 /* detail */ = {
+ isa = PBXGroup;
+ children = (
+ 08F37EDF0C57A4A700AC7FB8 /* static_function_call.hpp */,
+ );
+ path = detail;
+ sourceTree = "<group>";
+ };
08F74F650C3A9C9700FD50BE /* component */ = {
isa = PBXGroup;
children = (
@@ -345,9 +496,19 @@
path = detail;
sourceTree = "<group>";
};
+ 08FB7BEE0C6157AE00BD4EC2 /* signals */ = {
+ isa = PBXGroup;
+ children = (
+ 08FB7BEF0C6157D000BD4EC2 /* introduction.qbk */,
+ 083FD3B90C62A4CB00EF3F6B /* concepts.qbk */,
+ );
+ path = signals;
+ sourceTree = "<group>";
+ };
08FC25BA0C45B60E00F59CDD /* dataflow */ = {
isa = PBXGroup;
children = (
+ 08EF9B200C5D506A00D4D206 /* signal */,
08F022C10C47556200C0ED27 /* connection */,
08F0216A0C473AE000C0ED27 /* detail */,
08F01F950C470E1500C0ED27 /* support */,
@@ -361,6 +522,7 @@
08FC25CA0C45CF5B00F59CDD /* phoenix */ = {
isa = PBXGroup;
children = (
+ 08F37EDE0C57A49500AC7FB8 /* detail */,
08F22F1B0C4C1CC70027D364 /* connection */,
08FC25DA0C45D0F700F59CDD /* component */,
08F9459A0C46A86E00E224E4 /* components.hpp */,
@@ -369,6 +531,7 @@
08F22FD70C4C87C50027D364 /* static_value.hpp */,
08F230020C4C894E0027D364 /* advance.hpp */,
08F230430C4C8D810027D364 /* static_function.hpp */,
+ 08F4FC170C56C96300EB271A /* producer_container.hpp */,
);
path = phoenix;
sourceTree = "<group>";
@@ -380,6 +543,7 @@
08FC25DF0C45D18700F59CDD /* consumer.hpp */,
08FC25FC0C45E77B00F59CDD /* producer_accumulator.hpp */,
08F22FB40C4C83900027D364 /* constant.hpp */,
+ 08F4FBB80C56AFDF00EB271A /* producer_wrapper.hpp */,
);
path = component;
sourceTree = "<group>";
@@ -387,16 +551,20 @@
08FD5DE40C1BA60700F00877 /* doc */ = {
isa = PBXGroup;
children = (
+ 083FD3C00C62A75100EF3F6B /* phoenix */,
+ 08FB7BEE0C6157AE00BD4EC2 /* signals */,
08FD5DE50C1BA60700F00877 /* dox */,
- 08FD5DEB0C1BA60700F00877 /* html */,
08FD5E4D0C1BA60800F00877 /* Jamfile.v2 */,
- 08FD5E4E0C1BA60800F00877 /* signal_network.qbk */,
+ 08FD5E4E0C1BA60800F00877 /* dataflow.qbk */,
08F082020C1D591000687E1B /* introduction.qbk */,
08F082570C1DD53400687E1B /* components.qbk */,
08F0825A0C1DD58500687E1B /* connections.qbk */,
08F36DFB0C41375B00E2F9A1 /* dataflow_table.xml */,
08F36EED0C416DEB00E2F9A1 /* support.qbk */,
08FA6A050C41E11800434913 /* rationale.qbk */,
+ 08F585BE0C5A7ED70086F4F4 /* concepts.qbk */,
+ 08FB7BFE0C61597000BD4EC2 /* signals.qbk */,
+ 083FD3C60C62A7F600EF3F6B /* phoenix.qbk */,
);
name = doc;
path = ../../doc;
@@ -405,7 +573,6 @@
08FD5DE50C1BA60700F00877 /* dox */ = {
isa = PBXGroup;
children = (
- 08FD5DE60C1BA60700F00877 /* boost */,
08FD5DE80C1BA60700F00877 /* html_footer.html */,
08FD5DE90C1BA60700F00877 /* html_header.html */,
08FD5DEA0C1BA60700F00877 /* signal_network.hpp */,
@@ -413,31 +580,6 @@
path = dox;
sourceTree = "<group>";
};
- 08FD5DE60C1BA60700F00877 /* boost */ = {
- isa = PBXGroup;
- children = (
- 08FD5DE70C1BA60700F00877 /* signal_network */,
- );
- path = boost;
- sourceTree = "<group>";
- };
- 08FD5DE70C1BA60700F00877 /* signal_network */ = {
- isa = PBXGroup;
- children = (
- );
- path = signal_network;
- sourceTree = "<group>";
- };
- 08FD5DEB0C1BA60700F00877 /* html */ = {
- isa = PBXGroup;
- children = (
- 08FD5DEC0C1BA60700F00877 /* boostbook.css */,
- 08FD5DED0C1BA60700F00877 /* boostbook_doxygen.css */,
- 08FD5E450C1BA60800F00877 /* reference.css */,
- );
- path = html;
- sourceTree = "<group>";
- };
/* End PBXGroup section */
/* Begin PBXProject section */
Modified: sandbox/SOC/2007/signals/libs/dataflow/doc/Jamfile.v2
==============================================================================
--- /sandbox/SOC/2007/signals/libs/signal_network/doc/Jamfile.v2 (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/doc/Jamfile.v2 2007-08-03 19:07:12 EDT (Fri, 03 Aug 2007)
@@ -4,7 +4,7 @@
# http://www.boost.org/LICENSE_1_0.txt)
-project boost/signal_network/doc ;
+project boost/dataflow/doc ;
import boostbook : boostbook ;
using quickbook ;
@@ -12,12 +12,13 @@
local loc = [ path.native [ path.pwd ] ] ;
local root = [ path.native [ path.join [ path.pwd ] ../../.. ] ] ;
-xml signal_network_xml : signal_network.qbk ;
-doxygen signal_network_doxygen
+xml dataflow_xml : dataflow.qbk ;
+doxygen dataflow_doxygen
:
- [ glob ../../../boost/signal_network/*.hpp ]
- [ glob ../../../boost/signal_network/connection/*.hpp ]
- [ glob ../../../boost/signal_network/component/*.hpp ]
+ [ glob ../../../boost/dataflow/support.hpp ]
+ [ glob ../../../boost/dataflow/signal/*.hpp ]
+ [ glob ../../../boost/dataflow/signal/connection/*.hpp ]
+ [ glob ../../../boost/dataflow/signal/component/*.hpp ]
:
<doxygen:param>TAB_SIZE=4
<doxygen:param>EXAMPLE_PATH=../test
@@ -42,12 +43,19 @@
boostbook standalone
:
- signal_network_xml
- signal_network_doxygen
+ dataflow_xml
+ dataflow_doxygen
:
+ # pull in the online .css and images
+ <xsl:param>project.root=http://beta.boost.org/development
+ # without the next line, build complains
+ <xsl:param>annotation.support=1
+ # pulled this from the doc_test Jamfile
+ <xsl:param>quickbook.source.style.show="'true'"
+ # formatting options
<xsl:param>chunk.first.sections=1
- <xsl:param>chunk.section.depth=3
- <xsl:param>toc.section.depth=3
+ <xsl:param>chunk.section.depth=10
+ <xsl:param>toc.section.depth=4
<xsl:param>toc.max.depth=3
- <xsl:param>generate.section.toc.level=3
+ <xsl:param>generate.section.toc.level=4
;
\ No newline at end of file
Modified: sandbox/SOC/2007/signals/libs/dataflow/doc/components.qbk
==============================================================================
--- /sandbox/SOC/2007/signals/libs/signal_network/doc/components.qbk (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/doc/components.qbk 2007-08-03 19:07:12 EDT (Fri, 03 Aug 2007)
@@ -5,21 +5,33 @@
[section:filter filter]
[*See also]: [classref boost::signals::filter filter class reference.]
-The __filter__ class is provided as a base class for in / out components. It provides support for Signal Network connection operators,
-and provides a default output signal. Here is an example of a simple class which inherits __filter__:
+[heading Model of]
+
+* [SignalConsumerConcept]
+* [SignalProducerConcept]
+
+[heading Description]
+
+The [filter] class is provided as a base class for in / out components.
+It provides support for Dataflow connection operators and functions,
+and provides a default output signal. Here is an example of a simple class
+which inherits [filter]:
[test_filter_classes]
-The type of the output signal (in the above example, `unfused_out_signal`) is specified as the second template parameter.
+The type of the output signal (in the above example, `unfused_out_signal`)
+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`, 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.
+* `combined_out_signal` 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.
-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:
+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]]
@@ -31,48 +43,76 @@
[section:applicator applicator]
[*See also]: [classref boost::signals::applicator applicator class reference.]
-The __applicator__ class applies a specified function object to a member variable of a specified type whenever it receives a signal.
+[heading Model of]
+* [SignalConsumerConcept]
+* [SignalProducerConcept]
+* [ConnectableConcept] to any [SignalProducerConcept] type `P` where
+ `Signature` matches `P`'s produced type.
+
+[heading Description]
+
+The [applicator] class applies a specified function object to a member variable
+of a specified type whenever it receives a signal.
The signal is always forwarded.
Examples of applicators:
-* __counter__
+* [counter]
[endsect][/applicator]
[section:conditional conditional]
[*See also]: [classref boost::signals::conditional conditional class reference.]
-The __conditional__ class applies a specified function object to a member variable of a specified type whenever it receives a signal.
+The [conditional] class applies a specified function object to a member variable
+of a specified type whenever it receives a signal.
The signal is forwarded if the function object returns true.
Examples of conditionals:
-* __junction__
+* [junction]
[endsect][/conditional]
[section:instantiator instantiator]
[*See also]: [classref boost::signals::instantiator instantiator class reference.]
-The __instantiator__ class instantiates a specified type from a member variable of a specified type whenever it receives a signal.
+[heading Model of]
+* [SignalConsumerConcept]
+* [SignalProducerConcept]
+* [ConnectableConcept] to any [SignalProducerConcept] type `P` where
+ `Signature` matches `P`'s produced type.
+
+[heading Description]
+
+The [instantiator] class instantiates a specified type from a member variable
+of a specified type whenever it receives a signal.
The signal is always forwarded.
Examples of applicators:
-* __mutex__
+* [mutex]
[endsect][/instantiator]
[section:modifier modifier]
[*See also]: [classref boost::signals::modifier modifier class reference.]
-The __modifier__ class instantiates a member function object of specified type Member. It applies the member function object
+[heading Model of]
+* [SignalConsumerConcept]
+* [SignalProducerConcept]
+* [ConnectableConcept] to any [SignalProducerConcept] type `P` where
+ `Signature` matches `P`'s produced type.
+
+[heading Description]
+
+The [modifier] class instantiates a member function object of specified
+type Member. It applies the member function object
to each incoming signal, and sends the returned value.
Examples of modifiers:
-* __function__
+* [function]
[endsect][/modifier]
@@ -82,8 +122,16 @@
[section:storage storage]
[*See also]: [classref boost::signals::storage storage class reference.]
-The __storage__ class can store the parameters it receives from a signal, as well as transmit the stored
-parameter values through its own signal.
+[heading Model of]
+* [SignalConsumerConcept]
+* [SignalProducerConcept]
+* [ConnectableConcept] to any [SignalProducerConcept] type `P` where
+ `Signature` matches `P`'s produced type.
+
+[heading Description]
+
+The [storage] class can store the parameters it receives from a signal,
+as well as transmit the stored parameter values through its own signal.
[table storage class use example
[[fused][unfused]]
@@ -94,7 +142,8 @@
[section:counter counter]
[*See also]: [classref boost::signals::counter counter class reference.]
-The __counter__ class counts the number of passing signals. Each time it receives a signal, it will increment an internal
+The [counter] class counts the number of passing signals. Each time it
+receives a signal, it will increment an internal
counter and forward the signal.
[import ../test/test_counter.cpp]
@@ -110,8 +159,16 @@
[section:junction junction]
[*See also]: [classref boost::signals::junction junction class reference.]
-The __junction__ class can be used to bring in multiple signals, and forward them all to the same set of
-output signals.
+[heading Model of]
+* [SignalConsumerConcept]
+* [SignalProducerConcept]
+* [ConnectableConcept] to any [SignalProducerConcept] type `P` where
+ `Signature` matches `P`'s produced type.
+
+[heading Description]
+
+The [junction] class can be used to bring in multiple signals, and forward
+them all to the same set of output signals.
[import ../test/test_junction.cpp]
[table storage class use example
@@ -123,8 +180,16 @@
[section:mutex mutex]
[*See also]: [classref boost::signals::mutex mutex class reference.]
-The __mutex__ class locks an internal mutex when it receives a signal, and then forwards the signal.
-__mutex__ is an __instantiator__ with the Instantiation boost::mutex::scoped_lock and Member boost::mutex.
+[heading Model of]
+* [SignalConsumerConcept]
+* [SignalProducerConcept]
+* [ConnectableConcept] to any [SignalProducerConcept] type `P` where
+ `Signature` matches `P`'s produced type.
+
+[heading Description]
+
+The [mutex] class locks an internal mutex when it receives a signal, and then forwards the signal.
+[mutex] is an __instantiator__ with the Instantiation boost::mutex::scoped_lock and Member boost::mutex.
[import ../test/test_mutex.cpp]
[table mutex class use example
@@ -139,8 +204,16 @@
[section:function function]
[*See also]: [classref boost::signals::function function class reference.]
-The __function__ class can be used to apply a function to an incoming signal and output the result.
-__function__ is a __modifier__ with the Modifier set to an adapter for the provided function.
+[heading Model of]
+* [SignalConsumerConcept]
+* [SignalProducerConcept]
+* [ConnectableConcept] to any [SignalProducerConcept] type `P` where
+ `Signature` matches `P`'s produced type.
+
+[heading Description]
+
+The [function] class can be used to apply a function to an incoming signal and output the result.
+[function] is a __modifier__ with the Modifier set to an adapter for the provided function.
[table function class use example
[[fused][unfused]]
@@ -155,7 +228,15 @@
[section:chain chain]
-The __chain__ class chains together multiple copies of the same component.
+[heading Model of]
+* [SignalConsumerConcept]
+* [SignalProducerConcept]
+* [ConnectableConcept] to any [SignalProducerConcept] type `P` where
+ `Signature` matches `P`'s produced type.
+
+[heading Description]
+
+The [chain] class chains together multiple copies of the same component.
[table function class use example
[[fused][unfused]]
@@ -175,9 +256,16 @@
[section:socket_sender socket_sender]
[*See also]: [classref boost::signals::socket_sender socket_sender class reference.]
-The __socket_sender__ class can be used to bridge a signal network accross multiple computers via a
-network connection. Any signal going to the __socket_sender__ will be serialized and sent over a provided
-socket. A __socket_receiver__ can be used on the other end to unserialize the signal and forward it.
+[heading Model of]
+* [SignalConsumerConcept]
+* [ConnectableConcept] to any [SignalProducerConcept] type `P` where
+ `Signature` matches `P`'s produced type.
+
+[heading Description]
+
+The [socket_sender] class can be used to bridge a signal network accross multiple computers via a
+network connection. Any signal going to the [socket_sender] will be serialized and sent over a provided
+socket. A [socket_receiver] can be used on the other end to unserialize the signal and forward it.
Example:
@@ -189,9 +277,14 @@
[*See also]: [classref boost::signals::socket_receiver socket_receiver class reference.]
-The __socket_receiver__ class can be used to bridge a signal network accross multiple computers via a
-network connection. Any signal going to the __socket_sender__ will be serialized and sent over a provided
-socket. A __socket_receiver__ can be used on the other end to unserialize the signal and forward it.
+[heading Model of]
+* [SignalProducerConcept]
+
+[heading Description]
+
+The [socket_receiver] class can be used to bridge a signal network accross multiple computers via a
+network connection. Any signal going to the [socket_sender] will be serialized and sent over a provided
+socket. A [socket_receiver] can be used on the other end to unserialize the signal and forward it.
Example:
Modified: sandbox/SOC/2007/signals/libs/dataflow/doc/connections.qbk
==============================================================================
--- /sandbox/SOC/2007/signals/libs/signal_network/doc/connections.qbk (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/doc/connections.qbk 2007-08-03 19:07:12 EDT (Fri, 03 Aug 2007)
@@ -4,16 +4,16 @@
[*See also]: [funcref boost::signals::connect connect function reference.]
-The __connect__ function is the fundamental connection-creating mechanism of
+The [connect] function is the fundamental connection-creating mechanism of
the library. Given a /producer/ `p` and /consumer/ `c` supported by the library,
- connect(p, c);
+ connect(p,c);
will create a connection between the two. The examples in this documentation typically
-use __operators__ to create connections. The __operators__ use the __connect__ function
-directly, and can be replaced by invocations of __connect__ if preferred.
+use [operators] to create connections. The __operators__ use the __connect__ function
+directly, and can be replaced by invocations of [connect] if preferred.
-The support for various types of components that are supported by __connect__ is currently
+The support for various types of components that are supported by [connect] is currently
divided in the following files:
#include <boost/signal_network/connection/signal.hpp>
@@ -23,14 +23,14 @@
#include <boost/signal_network/connection/slot_selector.hpp>
-will add support for __slot_selector__ objects as signal consumers. In addition, they can be used
+will add support for [slot_selector] objects as signal consumers. In addition, they can be used
as signal producers if the underlying object is a signal producer.
#include <boost/signal_network/connection/slot_selector_map.hpp>
-will add support for fusion maps from signatures to __slot_selector__ objects (and perhaps to any signal consumer,
+will add support for fusion maps from signatures to [slot_selector] objects (and perhaps to any signal consumer,
not tested yet) as signal consumers. This can be used to pack multiple slots of an object together, and then make
-connections based on the appropriate signature (see the send_slot function of __storage__ as an example).
+connections based on the appropriate signature (see the send_slot function of [storage] as an example).
In addition, fusion maps can be used as signal producers if the underlying object of the front element is a signal
producer.
@@ -47,11 +47,11 @@
[*See also]: [classref boost::signals::slot_selector slot_selector class reference.]
-The __slot_selector__ class is used to refer to a particular member function of a particular object, and can be used
+The [slot_selector] class is used to refer to a particular member function of a particular object, and can be used
can be used as a receiver.
-__slot_selector__ objects can be constructed using the [funcref boost::signals::make_slot_selector] function.
-See the [link signal_network.connections.examples.multiple_same Multiple inputs of the same signature] example.
+[slot_selector] objects can be constructed using the [funcref boost::signals::make_slot_selector] function.
+See the [link dataflow.connections.examples.multiple_same Multiple inputs of the same signature] example.
[endsect]
@@ -89,7 +89,7 @@
[section:pull Pull-based networks]
-The Signal Network library was built with push-based networks in
+The [DataflowSignals] module was built with push-based networks in
mind (the data producer sends data through a signal), but it can also
be used for pull-based networks (the data consumer requests data through
a signal).
Modified: sandbox/SOC/2007/signals/libs/dataflow/doc/dataflow_table.xml
==============================================================================
--- /sandbox/SOC/2007/signals/libs/signal_network/doc/dataflow_table.xml (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/doc/dataflow_table.xml 2007-08-03 19:07:12 EDT (Fri, 03 Aug 2007)
@@ -5,19 +5,19 @@
<colspec colname='c1'/>
<colspec colname='c2'/>
<colspec colname='c3'/>
-<tbody>
+<thead>
<row>
<entry>operators</entry>
<entry>blueprint</entry>
<entry>component</entry>
</row>
<row>
- <entry namest="c1" nameend="c2" align="center">connect</entry>
- <entry>mechanism-specific</entry>
+ <entry namest="c1" nameend="c2" align="center">connect, invoke</entry>
+ <entry>mechanism-specific support</entry>
</row>
<row>
<entry namest="c1" nameend="c3">support</entry>
</row>
-</tbody>
+</thead>
</tgroup>
</table>
Modified: sandbox/SOC/2007/signals/libs/dataflow/doc/introduction.qbk
==============================================================================
--- /sandbox/SOC/2007/signals/libs/signal_network/doc/introduction.qbk (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/doc/introduction.qbk 2007-08-03 19:07:12 EDT (Fri, 03 Aug 2007)
@@ -1,41 +1,44 @@
[section:introduction Introduction]
-[section:dataflow Dataflow programming in C++]
+[section:dataflow Dataflow programming in C++ - motivation and advantages]
-[@http://en.wikipedia.org/wiki/Dataflow_language Dataflow languages] provide a programming paradigm
-based on interconnected /components/ which process passing /data/. In general,
-this conceptually models data as something that originates from a source, flows through
-a number of processing components that manipulate it (e.g., by changing it, duplicating, etc.),
-and arrives at some final destination. As such, the dataflow paradigm is most suitable when developing
-applications that are themselves focused on the "flow" of data.
+The [WikiDataflow] programming paradigm is based on interconnected
+/components/ which process passing /data/. Basically, data is treated
+as something that originates from a source, flows through a number of
+processing components that manipulate it (e.g., by changing it,
+duplicating, etc.), and arrives at some final destination. As such,
+the dataflow paradigm is most suitable when developing applications that
+are themselves focused on the "flow" of data.
Perhaps the most readily available examples of a
-dataflow-oriented applications come from the realm of [@http://en.wikipedia.org/wiki/Signal_processing
-signal processing], e.g. a video signal processor which perhaps starts with a video input,
-modifies it through a number of processing components (video filters), and finally
-outputs it to a video display.
+dataflow-oriented applications come from the realm of real-time
+[@http://en.wikipedia.org/wiki/Signal_processing signal processing],
+e.g. a video signal processor which perhaps starts with a video input,
+modifies it through a number of processing components (video filters),
+and finally outputs it to a video display.
[heading A motivating example]
-Let's take a simple real-time camera-input-displayed-on-the-screen application. Suppose there are three
-parts to the application - getting each image frame from the camera, processing the image in some way,
-and displaying it on the screen. To see how we might arrive at a dataflow-oriented implementation
-of this application, let's first begin with an imperative approach. Such an implementation might
+Let's take a simple real-time camera-input-displayed-on-the-screen application.
+Suppose there are three parts to the application - getting each image frame
+from the camera, processing the image in some way,
+and displaying it on the screen. To see how we might arrive at
+a dataflow-oriented implementation of this application,
+let's first begin with an imperative approach. Such an implementation might
be structured as follows:
[$dataflow1.png]
-Basically, the main program loop is a series of instructions which does this particular job.
-If you wanted to be a little bit more object oriented, you could encapsulate all this functionality
-into an Image class and just call the methods that do the right thing from the main program loop,
-which would give you an object-oriented imperative solution.
-
-However, let's take this a step further in the dataflow direction. Video input libraries often provide callback
-functionality which will deliver a video stream as a sequence of image frames given at the appropriate frame rate.
+Basically, the main program loop is a series of instructions which does
+this particular job. To take this a step further in the dataflow direction,
+we note that video input libraries often provide callback
+functionality which will deliver a video stream as a sequence of
+image frames given at the appropriate frame rate.
With this in mind, we do the following:
# implement a function which takes an image as input.
- # the function first invokes the image processing library function that modifies the image as appropriate
+ # the function first invokes the image processing library function that
+ modifies the image as appropriate
# the function then invokes the GUI library function that displays the image
# register the function as a callback with the camera library
# the main program loop can relax and have some coffee.
@@ -44,16 +47,20 @@
[$dataflow2.png]
-So now, the image library is acting as a data/signal generator - it
-generates images at a certain frame rate. And the function we implemented seems to be
-a signal consumer which can take an image, process it, and display it on the screen.
-
-This now employs the basic elements of the dataflow paradigm, but we could take it even further.
-Instead of just having two components, one image signal generator and one signal consumer, how about this:
-
-# implement a component which accepts an input image signal, modifies the image as appropriate, and then outputs
-a signal with the modified image
-# implement a component which receives an imput image signal and displays it on the screen
+So now, the image library is acting as a data/signal producer - it
+generates images at a certain frame rate. And the function we
+implemented seems to be a signal consumer which can take an image,
+process it, and display it on the screen.
+
+This now employs the basic elements of the dataflow paradigm, but we could
+take it even further. Instead of just having two components, one image
+signal generator and one signal consumer, how about this:
+
+# implement a component which accepts an input image signal,
+ modifies the image as appropriate, and then outputs
+ a signal with the modified image
+# implement a component which receives an imput image signal and displays
+ it on the screen
# connect the camera library input stream to the first component
# connect the first component to the second component
# the main program loop can relax and have some tea, or even take a nap.
@@ -62,17 +69,43 @@
[$dataflow3.png]
+To give you a sense of how you would do something like this using the Dataflow
+library, we will present a slightly simplified example using [DataflowSignals].
+Instead of processing images, we will just process numbers - but the dataflow
+parts of the code are pretty much the same:
+
+[simple_example]
+
+A sample run produces:
+
+[pre
+
+0.213436
+-0.49558
+1.57538
+-1.0592
+1.83927
+1.88577
+0.604675
+...
+
+]
+
+...not quite image processing, but you get the (dataflow) point :-)
+
[heading Advantages]
There are already many programming paradigms supported by C++ (either directly or through
additional libraries), so let's examine what the advantages of the the dataflow paradigm might be.
-First of all, [*dataflow programming is not exclusive of other techniques], so adopting the dataflow paradigm
-does not hinder the use of other approaches. In fact, in C++ it can't - since the components
+First of all, [*dataflow programming is not exclusive of other paradigms], so adopting the dataflow paradigm
+does not hinder the use of other techniques. In fact, in C++ it can't - since the components
themselves need to be implemented somehow, and we can't recursively define them
forever as finer and finer dataflow diagrams, the dataflow paradigm relies on other
-programming techniques to do the underlying work. Also, dataflow can only be a part of a complete
-application implementation. You can always "extend your fingers" from other parts of the program in order
+programming techniques to do the underlying work. Also, dataflow does not need
+be used for the entire application implementation. You can always use it
+for only those parts of the application it is appropriate for, and
+"extend your fingers" from other parts of the program in order
to insert data into the dataflow, catch it on the other end, probe and adjust the components, etc.
You can think of it as working with electronic components and changing the connections, turning knobs,
flipping switches, or hanging over a circuit board and tinkering with it using, say, a multimeter and a
@@ -96,349 +129,250 @@
because the data dependencies are much more visible. In the image processing example, say you have
the display on a different computer. You can just pass the connection to it through a network socket.
With the data flow clearly specified, it is much easier to distribute the work either manually or
-even automatically (although the Signal Network library at the moment offers no such automatic functionality).
+even automatically (although the Dataflow library at the moment offers no such automatic functionality).
Finally, [*we are not to far from the advantages of a [@http://en.wikipedia.org/wiki/Visual_programming_language
visual programming language]], since the components and the connections have a natural graphical representation.
With a visaul development environment, programming becomes as easy as connecting components with connections
-(again, the Signal Network library provides no visual programming functionality).
+(again, the Dataflow library provides no visual programming functionality).
[heading Go with the flow?]
-If you are interested in exploring the dataflow concept further, see
+If you are interested in exploring the dataflow concept further using
+the Dataflow library, see
-* generic approach to dataflow in C++.
-* using Boost.Signals as a data transport mechanism.
+* Dataflow library [organization] for a high level overview of the library.
+* The [signals_quickstart] section of the [DataflowSignals] module, for
+ further usage examples.
[endsect][/dataflow]
-[section:generic_dataflow A generic approach to dataflow]
+[section:organization Organization and namespace use]
-[note A lot of the ideas in this section have come from discussions with Tobias Schwinger and Douglas Gregor,
-whom I thank sincerely for their continuing help and suggestions.]
+The Dataflow library (originally called Signal Network) started as a way to
+facilitate dataflow programming by providing components and connections which
+allow large-scale use of Boost.Signals as a mechanism to
+model the transfer of data between processing components.
+However, during the planning, design and development
+of the library, it became apparent that:
+
+* There are a lot of good ways to move data around, [BoostSignals] being one of
+ them.
+* There are generic properties of dataflow programs which do not depend on the
+ data transport mechanism,
+ and can be exploited to develop mechanism-independent dataflow code.
+
+Hence, the Signal Network library has been redesigned into a generic Dataflow
+library, and offers individual mechanism-specific modules - [DataflowSignals]
+and [DataflowPhoenix].
-The Signal Network library started as a way to facilitate dataflow programming by
-providing components and connections which allow large-scale use of Boost.Signals as a mechanism to
-model the transfer of data between processing components. However, during the planning, design and development
-of the library, it became apparent that
+[heading Dataflow library organization]
-* there are a lot of good ways to move data around, Boost.Signals being one of them
-* there are generic properties of dataflow programs which do not depend on the data transport mechanism,
- and can be used to develop mechanism-independent dataflow code.
-
-Hence, the Signal Network library is planned to be redesigned into a generic dataflow library (probably called
-Dataflow), and offer individual mechanism-specific modules (the Signal Network library being one of them).
-
-The design of the Dataflow library might look something like this:
+The design of the Dataflow library looks like this:
[xinclude dataflow_table.xml]
-The layers are a bottom-up hierarchy, with dependencies only on layers underneath.
-The /support/ layer provides the necessary generic traits and functions required for generic code to work with mechanism-specific
-components. Each type of mechanism or component must specialize the elements of the support layer to work with the mechanism\/component.
-The /connect/ layer provides the generic connect free function, which is then used by the /operators/ and
-the envisioned /blueprint/ layer. Each mechanism might have its own /mechanism-specific/ layer, on top of which a mechanism-specific
-/component/ can be implemented. As long as the support layer is implemented for the mechanism/component, the component should
+The layers are a bottom-up hierarchy, with dependencies
+only on layers underneath.
+The /support/ layer provides the necessary generic traits and functions
+required for generic code to work with mechanism-specific
+components. Each type of mechanism or component must specialize the elements
+of the support layer to work with the mechanism\/component.
+
+The /connect/ layer provides the generic connect function, which is then used by
+the /operators/ and the envisioned /blueprint/ layer. Each mechanism might
+have its own /mechanism-specific/ layer, on top of which a mechanism-specific
+/component/ can be implemented. As long as the support layer is implemented
+for the mechanism/component, the component should
work seamlesly with the rest of the dataflow library.
-Essentially, the support layer is a very minimal layer implementing a generic and extensible intrusive directed graph
-framework. The blueprint layer could be implemented as a BGL graph over a hierarchy of classes with a common interface
-(implemented using a base class with virtual methods) which provides serialization, instantiation, and (if applicable)
+Essentially, the support layer is a very minimal layer implementing a generic
+and extensible intrusive directed graph framework. The blueprint layer could
+be implemented as a BGL graph over a hierarchy of classes with a common
+interface (implemented using a base class with virtual methods) which provides
+serialization, instantiation, and (if applicable)
execution capability for an entire network.
-[heading The different data transport mechanisms]
+[heading Namespace use]
-To explore the concept of generic dataflow in C++ further, let us take a step back and examine where the flow of data
-happens in C++. Rather informally, we can divide things as follows:
+Since the Dataflow library provides both a generic layer, as well as
+mechanism-specific implementations, its elements are scattered over multiple
+namespaces.
+
+The fundamental user-oriented generic elements, such as `is_producer`,
+`producer_category_of` etc., are located in the `boost::dataflow` namespace.
+Function objects which must be specialized for different data trasport
+mechanisms, such as `connect_impl`, are in the `boost::dataflow::extension`
+namespace.
+
+On the other hand, individual data transport mechanism implementations
+are located in the namespace of the data transport mechanism. For example,
+all of the [DataflowSignals] components are in the `boost::signals` namespace,
+and all of the [DataflowPhoenix] components are in the `boost::phoenix`
+namespace. Furthermore, free functions such as `connect` and `invoke` are
+imported into the mechanism's namespace, so that they can be used via ADL.
-* on one hand, there is /data/ (variables, objects, etc...)
-* on the other, there are /computational components/ (functions, methods, etc...)
+All of the examples shown in this documentation are assuming the use of
-Data can then be processed by the computational
-components by applying the components to the data in some appropriate way.
-There are several ways of providing data to the computational components:
+ using namespace boost;
-* by placing it in a location where the component will read it
-* by passing it as a parameter in a call
-* (a combination of the above) by passing the location of the data as a parameter in a call
+[endsect][/organization]
-Similarly, there are several ways of getting data out of a computation component
+[section:mechanisms Implemented data transport mechanisms]
-* the component makes a function call that carries the data as a parameter
-* the component places a value somewhere where it can be read
-* the component returns it as a return value
+There are two modules of the Dataflow library which implement different
+data transport mechanisms. [DataflowSignals] uses [BoostSignals],
+and [DataflowPhoenix] uses object pointers, with support for
+[BoostPhoenix] actors specifying how the data is processed.
-Another important thing to note is that there is a separation between providing the data to a component, and invoking the
-component. In some cases, the two happen simoultaneously (when the data is passed and returned
-via a function call), while in others invoking the computational component
-can happen separately from providing the data (at least from a modeling perspective).
-An example of the latter is a computational component which uses data stored in a particular location.
-We can place the data in that location much before invoking the computational component.
+[section:signals Dataflow.Signals - based on Boost.Signals]
-The Signal Network library relies on moving the data via function parameters and return values.
+[/The Signal Network library relies on moving the data via function parameters and return values.
Here, the Boost.Signals library is used to model these individual data channels which couple
the data transfer and the computational component invocation. This is one possible dataflow-oriented
approach.
-There is another approach, proposed by Tobias Schwinger, in which the computational components are
-connected by "pins". Here, the data is communicated by
-placing it in locations where the components will read it, and reading it
-from locations where the components write them. Also, rather than the components
-activating each other, the network itself activates the components manually in an optimized
-order/way.
-
Each of these approaches has different properties. In the signal-based approach, the knowledge of the
network is local - each component knows about where its signals are going, but it knows nothing
of where the signals arriving at its own slots are coming from. Unless we record how the network was
constructed, there is no "big picture" of what the complete network looks like. Similarly,
the network is executed autonomously - the components invoke one another when appropriate, and
-no external control mechanism is required.
+no external control mechanism is required.]
-In the pin-based approach, the situation is reversed. There is a "big picture" of what the complete
-network looks like, and the network control mechanism uses this information to decide when a component
-should be invoked and to manage the data shared between the components via pins. Global
-knowledge of the network can be used for better optimization, serialization, etc. However, it may
-come at the price of some intrusiveness to the computation components.
-
-[heading What's happening here for Google Summer of Code?]
-Even though these the signal-based approach and pin-based approach are sufficiently different, they aim for the same goal:
-a dataflow-oriented approach using the C++ language. It is possible that an application
-designed in a dataflow-oriented way could be implemented using either of the approaches,
-that one approaches could be convertible to the other, or that using both approaches
-simoultaneously is in fact the best solution. Even though investigating the relationships
-between these two frameworks, or implementing both, would be outside the scope of this
-Google Summer of Code project, I believe it is worthwhile to keep the connections in
-mind while designing and implementing the Signal Network library.
-
-To this end, I have started implementing a very simple framework that is based on
-phoenix2 actors, and uses straight pointers to indicate the flow of
-data. This is somewhat related to the pin-based approach (but much simpler and without the support for things
-like buffer/pin management which Tobias has envisioned), so it is helping me see what tends to be similar accross
-data transport mechanisms, and what tends to be different. This additional framework, as well as the generic
-Dataflow layers, will be committed to the repository shortly (mid-July), after I get a chance to integrate everything
-in a joint design.
+[BoostSignals] is an excellent building block for dataflow networks,
+as it provides support for all of the essential elements -
+data transport through parameters and return values, combining
+return values from multiple signal calls, component invocation,
+and reconfigurability through connection and disconnection.
+
+The [DataflowSignals] module uses [BoostSignals] as
+the data transport mechanism in dataflow networks.
+In addition, it provides two major elements that facilitate the
+building of large signals-based dataflow networks:
+
+* The [connect] function and its associated operators which can be
+ used to easily connect different kinds of components.
+* A number of generic and specific components which can be extended
+ and customized for use in particular dataflow networks.
[endsect]
-[section:signals Boost.Signals as a data transport mechanism]
+[section:phoenix Dataflow.Phoenix - based on pointers and Boost.Phoenix2]
-Boost.Signals is an excellent building block for dataflow networks, as it provides support for
-all of the essential elements - data transport through parameters and return values, combining
-return values from multiple signal calls, component invocation, and reconfigurability through connection
-and disconnection.
-
-The Signal Network library uses Boost.Signals as the data transport mechanism in dataflow networks.
-In addition, it provides two major elements that facilitate the building of large signals-based dataflow
-networks:
+The [DataflowPhoenix] module uses ordinary object pointers to establish
+a flow of data. It has been named after the Phoenix library because
+it is convenient to describe the operations on the data using Phoenix
+actors.
+
+This module is in early experimental stages, and has little documentation.
+If you are interested, take a look at the fibonacci.cpp example, which
+implements various extravagant versions of a Fibonacci sequence generator:
-* The __connect__ function and its associated operators which can be used to easily connect different kinds of components.
-* A number of generic and specific components which can be extended and customized for use in particular dataflow networks.
+[example_fibonacci]
[endsect]
-[section:use When to use]
+[endsect][/mechanisms]
-While the [link signal_network.introduction.dataflow dataflow] section hopefully convinced you
-that there are circumstances in which a dataflow approach is useful, please keep in mind that
-there are many circumstances in which this is not the case.
+[section:pin Comparison with a pin-based approach, proposed by Tobias Schwinger]
-First, a dataflow approach really only makes sense when the underlying task is
-really about the flow of data through the components that process it. If you can't sketch a concise
-data flow diagram which truly represents the application, the dataflow approach might not be the best option.
-For example, if you are implementing a complicated algorithm which is really about the sequence of
-instructions that need to be executed on the data (rather than the data going through well-defined and
-self-contained processing components), you probably should't use the Signal Network library.
-If you are working on an audio or video processing application, maybe you should.
-
-Second, using signals as the underlying data transport mechanism makes the Signal Network library
-inherently a run-time contraption. Every signal sent results in a function call, and if the processing
-components are so minute that the cost of the function calls overtakes the cost of the processing,
-using the Signal Network library will cause a significant performance hit.
+In the early stages of the design of the then called Signal Network
+library, Tobias Schwinger discussed with me his ideas of an alternative
+implementation of a dataflow library. In his approach, there would be
+a separation between the processing components, and components whose purpose
+was to transport data. The processing components would have one or more /pins/,
+and connecting the pins of two processing components together would mean
+pointing them to the same data transport component.
+
+There was a lot of envisioned configurability of the connections made this way
+- the pins at each processing component could be in, out, or in/out, and links
+created by connecting two pins could be categorized as push, pull, push/pull,
+and would also have support for update tracking and trigger modes. The
+framework would provide support for the data transport components and link/pin
+management, and would also be in charge of invoking the components (which
+could be done in an optimized way, depending on what parts of the network
+need to be updated).
+
+While the pin-based approach is substantially different than the signal-based
+approach I was concentrating on at the time, it was clear that both of these
+approaches had their own advantages, and that each could be a useful dataflow
+framework in its own regard. Hence, during the development of the Signal
+Network library, I tried to isolate the common properties of dataflow
+frameworks, in hopes that the signal-based approach could live under the
+same roof as something like the pin-based approach.
+Eventually, I started implementing the [DataflowPhoenix] module,
+partly because I wanted something that contrasted the signal-based approach so
+that I could isolate the truly mechanism-independent dataflow concepts, and
+partly because the underlying pointer based connections in [DataflowPhoenix]
+were a step closer to Tobias' ideas of the pin-based frameworks.
+
+With the Dataflow library in place, which came after merging the Signal Network
+library with the new generic-oriented [DataflowPhoenix], it is now
+a little clearer how the pin-based approach that Tobias proposed could
+be adapted into the generic Dataflow framework.
+Instead of a direct
+connection from a data-producing component to a data-consuming component,
+as is now typically done in both of the Dataflow modules,
+there would be a connection from a data-producing component's pin
+to a data transport component, and again a connection from the data transport
+component to to the pin of the data-consuming component.
+The processing components would be [InvocableConcept], while each data transport
+component would be both a [ProducerConcept] and a [ConsumerConcept].
+
+There are, of course, a lot of other issues to solve, and a lot of ways in
+which the Dataflow generic support layer might need to grow to accomodate
+the pin-based implementation, but perhaps in the end it will show that the
+signal-based approach and the pin-based approach are not too different, and
+perhaps even compatible or convertible between each other.
-To sum up, consider using the Signal Network library when:
-
-* The application can be modeled well through the flow of data; and
-* The cost of the processing shadows the cost of the function calls that transport the data.
+[/In the pin-based approach, the situation is reversed. There is a "big picture" of what the complete
+network looks like, and the network control mechanism uses this information to decide when a component
+should be invoked and to manage the data shared between the components via pins. Global
+knowledge of the network can be used for better optimization, serialization, etc. However, it may
+come at the price of some intrusiveness to the computation components.]
[endsect]
-[section:fusion Signal Network and Boost.Fusion]
-
-The components in the Signal Network library are implemented using __fusion__. To use the
-Signal Network library, you might benefit from the following if you're not familiar with fusion.
-
-[heading Fused vs. unfused]
-A simple C++ function object might look something like this:
-
- struct f
- {
- int operator()(int arg1, int &arg2, const std::string &arg3)
- {
- ...
- }
- }
-
-The thing to note here is that there are three arguments (of types `int`, `int &`, and `const std::string &`
-respectively), and that when the function object is invoked, they are passed separately:
-
- int x;
- std::string s;
- f()(1, x, s);
-
-In the terminology of __fusion__, this function object is /unfused/. This is in contrast to a /fused/
-fuction object, which might look like this:
-
- struct fused_f
- {
- int operator()(fusion::vector<int, int &, const std::string &> &args)
- {
- ...
- }
- }
-
-Basically, the difference is that the three arguments from the unfused version are now sent in a single
-fusion container. The benefit is that no matter how many "unfused" arguments there are, there is
-always a single "fused" argument. Hence, writing templates that deal with a variable number of arguments
-becomes a lot simpler.
-
-[heading Signal Network provides both fused and unfused components]
-
-While writing the generic components provided in the Signal Network library benefits from using
-__fusion__, your particular use case might not. For this reason, every component provided
-by the Signal Network library:
-
-* can receive both fused and unfused signals
-* has both a version that sends fused signals and a version that sends unfused signals.
-
-The type of sent signal is provided as a template argument to the class, and the default value can be set
-by defining `SIGNAL_NETWORK_DEFAULT_OUT` to either `unfused` or `fused` before including a sinal
-network component.
-
-For example,
-
- signals::storage<int (int, int &, const std::string &>), signals::unfused> unfused_storage;
- signals::storage<int (int, int &, const std::string &>), signals::fused> fused_storage;
-
-In the above case, `unfused_storage` is similar to `f` above, and can be used as a slot
-for signals which carry regular, unfused arguments.
-On the other hand, `fused_storage` acts as a function object similar to `fused_f` above.
-Hence, it can be used as a slot for signals which carry a fusion container as an argument.
+[section:use When to use]
-[endsect][/fusion]
+While the [link dataflow.introduction.dataflow dataflow] section hopefully
+convinced you that there are circumstances in which a dataflow approach is
+useful, please keep in mind that there are many circumstances in which this
+is not the case.
-[section:namespace Namespace use]
+First, a dataflow approach really only makes sense when the underlying task is
+really about the flow of data through the components that process it.
+If you can't sketch a concise data flow diagram which truly represents
+the application, the dataflow approach might not be the best option.
+For example, if you are implementing a complicated algorithm which is really
+about the sequence of instructions that need to be executed on the data
+(rather than the data going through well-defined and self-contained
+processing components), you probably should't use the Dataflow library.
+If you are working on an audio or video processing application,
+maybe you should.
+
+Second, the data transport mechanism you choose should reflect the needs of
+the applications closely. Most of the functionality that the library supports
+at this moment is regarding run-time configurable connections. If you don't
+need that functionality, you might be wasting resources ([DataflowPhoenix]
+offers some functionality related to compile-time connectability in its
+iterator_relative connections, but that is yet to trickle out into the library
+as a whole).
+
+When using signals as the data transport mechanism, remember that every signal
+sent results in a function call, and if the processing
+components are so minute that the cost of the function
+calls overtakes the cost of the processing,
+using [DataflowSignals] will cause a significant performance hit. A similar
+situation occurs with [DataflowPhoenix], where each consumer must be invoked.
-Currently, everything in the Signal Network library is located in the `boost::signals` namespace.
-All of the examples shown are assuming the use of
+To sum up, consider using the Dataflow library when:
- using namespace boost;
+* The application can be modeled well through the flow of data; and
+* The cost of the processing shadows the cost of the function calls, and any
+ unnecessary overhead caused by any connections that need to be stored.
[endsect]
-[section:start Quick Start]
-
-[note You may want to read the [link signal_network.introduction.namespace Namespace Use] and
-[link signal_network.introduction.fusion Signal Network and Boost.Fusion] sections first.]
-
-The Sigal Network library provides many common building block components for a
-signal network. The most basic is __storage__, which
-can be used to store a value received through a signal, send it on, and/or retreive it.
-
-By default, components in the library use `operator()` to receive a signal.
-For example, __storage__ objects can receive
-signals through [memberref boost::signals::storage::operator()(void) operator()()].
-Upon receiving this signal, they will output their stored value through another signal.
-
-The value stored inside a __storage__ object
-can be retrieved via the [memberref boost::signals::storage::at() at()] method.
-
-Using a few __storage__ objects, it is easy to
-create a network using [funcref boost::signal_network::operator>>=() operator>>=]:
-
-[table storage class use example
- [[fused][unfused]]
- [[[test_storage_fused]][[test_storage_unfused]]]
-]
-
-[heading Creating your own signal receiver (slot)]
-
-The easiest way to create your own signal receiver which can be used with the Signal Network
-library is to create a class with `operator()` of the signal signature you wish to receive.
-
-For example, consider the signature `void()`. This is the signature
-of a function that returns void and takes no arguments.
-A class that can receive signals of such a signature would be
-defined as follows:
-
- class SignalVoidCounter
- #ifdef SIGNAL_NETWORK_TRACKABLE
- // Two base signals implementations are supported currently
- // (Boost.Signals by Doug Gregor and the
- // thread_safe_signals version under implementation by Frank Mori Hess).
- // SIGNAL_NETWORK_TRACKABLE is defined if you are using Boost.Signals
- // - in this case, we want to make our component trackable so that
- // it gets disconnected automatically when this object is destroyed.
- : public boost::signals::trackable
- #endif
- {
- volatile int cnt;
- public:
- SignalVoidCounter() : cnt(0) {}
- void operator()()
- {
- cnt++; // whenever a void() signal is received, increase the counter
- }
- int GetCount()
- {
- return cnt;
- }
- }; // end class SignalVoidCounter
-
-The above class does something really simple - it receives signals of signature `void()`, and counts
-how many it has received. While this functionality is actually covered by the library component __counter__,
-it's a good introductory example.
-
-If you read the section about [link signal_network.introduction.fusion Boost.Fusion], you will find out that the Signal Network
-library works with both /fused/ and /unfused/ signals. If you wanted the above to work with fused signals,
-all you would need to do is add or substitute the following `operator()`:
-
- void operator()(const fusion::vector<> &)
- {
- cnt++; // whenever a void() signal is received, increase the counter
- }
-
-You can now introduce this component into a signal network:
-
-[table storage class use example
- [[fused][unfused]]
- [[``
- SignalVoidCounter counter;
- signals::storage<void()> storage;
-
- storage >>= counter;
- for (int i=0; i<33; i++)
- storage();
-
- assert(counter.GetCount());
- ``][``
- SignalVoidCounter counter;
- signals::storage<void(), signals::unfused> storage;
-
- storage >>= counter;
- for (int i=0; i<33; i++)
- storage();
-
- assert(counter.GetCount());
- ``]]
-]
-
-To proceed, you may want to look at
-
-* Provided Signal Network library [link signal_network.components components].
-* Creating your own in/out components using the __filter__ class.
-* Using the [link signal_network.connections connection operators] to make connections.
-
-[endsect][/start]
-
[endsect][/introduction]
Deleted: /sandbox/SOC/2007/signals/libs/signal_network/doc/signal_network.qbk
==============================================================================
--- /sandbox/SOC/2007/signals/libs/signal_network/doc/signal_network.qbk 2007-08-03 19:07:12 EDT (Fri, 03 Aug 2007)
+++ (empty file)
@@ -1,174 +0,0 @@
-[library Signal Network
- [quickbook 1.4]
- [version 0.1]
- [authors [Rajko, Stjepan]]
- [copyright 2007 Stjepan Rajko]
- [purpose Operators and Components for signal-based networks.]
- [license
- Distributed under 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])
- ]
-]
-
-[def __connect__ [link signal_network.connections.connect connect]]
-[def __components__ [link signal_network.components components]]
-[def __operators__ [link signal_network.connections.operators operators]]
-
-[def __slot_selector__ [link signal_network.connections.classes.slot_selector slot_selector]]
-
-[def __filter__ [link signal_network.components.generic.filter filter]]
-[def __applicator__ [link signal_network.components.generic.applicator applicator]]
-[def __conditional__ [link signal_network.components.generic.conditional conditional]]
-[def __instantiator__ [link signal_network.components.generic.instantiator instantiator]]
-[def __modifier__ [link signal_network.components.generic.modifier modifier]]
-[def __storage__ [link signal_network.components.properties.storage storage]]
-[def __counter__ [link signal_network.components.properties.counter counter]]
-[def __junction__ [link signal_network.components.flow.junction junction]]
-[def __mutex__ [link signal_network.components.flow.mutex mutex]]
-[def __function__ [link signal_network.components.adapters.function function]]
-[def __socket_sender__ [link signal_network.components.network.socket_sender socket_sender]]
-[def __socket_receiver__ [link signal_network.components.network.socket_receiver socket_receiver]]
-[def __chain__ [link signal_network.components.topologies.chain chain]]
-
-[def __fusion__ [@http://spirit.sourceforge.net/dl_more/fusion_v2/libs/fusion/doc/html/index.html Boost.Fusion]]
-
-[import ../test/test_connect.cpp]
-[import ../test/test_branching.cpp]
-[import ../test/test_pull.cpp]
-[import ../test/test_disconnect.cpp]
-[import ../test/test_multi_type.cpp]
-[import ../test/test_multi_args.cpp]
-[import ../test/test_same_type.cpp]
-[import ../test/test_multi_out.cpp]
-
-[import ../test/test_filter.cpp]
-[import ../test/test_storage.cpp]
-[import ../test/test_function.cpp]
-[import ../test/test_chain.cpp]
-[import ../test/test_socket.cpp]
-
-The Signal Network library aims to facilitate the
-implementation and interconnection of objects into signal networks using Boost.Signals.
-To see the rationale behind the Signal Network library, please visit the associated
-[@http://svn.boost.org/trac/boost/wiki/soc/2007/SignalNetwork GSoC page].
-
-[warning Signal Network is not a part of the Boost libraries. It is being developed
-as a part of Google Summer of Code program.]
-
-* If you would like some more information about why one would want to connect objects into a signal-based
- network, read my exploration of [link signal_network.introduction.dataflow Dataflow-oriented programming approaches in C++].
-* If you'd like to try out the library
- * keep in mind that the interface is highly unstable at this point
- * see the [link signal_network.introduction.start Quick Start] section.
-* If you are interested in the progress of the implementation, see
- * News section of the [@http://svn.boost.org/trac/boost/wiki/soc/2007/SignalNetwork Signal Network GSoC page]
- * [link signal_network.discussion Discussion on Boost Community Feedback]
- * [link signal_network.download Download and Changelog]
-
-[include introduction.qbk]
-
-[section:discussion Discussion on Boost Community Feedback]
-
-The following summarizes some of the suggestions / comments given by the Boost community, and
-what has been done to incorporate this feedback.
-
-[* Tobias Schwinger indicated that the library could be used for pulling rather than pushing data.]
-
-* [link signal_network.connections.pull An example] which illustrates this has been addded.
-
-[* James Jones suggested that a ||-like operator could be used for branching, and >> for chaining.]
-
-* `operator >=` which was orignally used for branching has been replaced with `operator |`.
-* Since the most straightforward way for me to implement chaining/branching is using a left-to-right
-operator for one and a right-to-left operator for the other, I decided to stay with >>= as the chaining
-operator.
-
-[* Paolo Coletta suggested a "video_generator >>= ( effect1 && effect2 ) >>= image_sum" - like syntax that
- would allow parallel processing of signals (identified as the "join" pattern by Yigong Liu)]
-
-* I have started to implement thread-related components in __timed_generator__ and __mutex__.
-More sophisticated threading components, control and syntax to follow.
-
-[* Yigong Liu suggested enhanced support for common network topologies, such as mesh. ]
-
-* I have implemented a prototype
-__chain__ topology
-to get a start on this concept.
-
-[* Braddock Gaskill pointed out the relationship with the "pipes and filters" pattern, and suggested
- the possibility of using functions as filters. He also suggested the library would me more useful
- if different functions executed in parallel threads, or were queued to specific worker threads,
- if the library would provide functionality to control and schedule the execution of the invoked functions,
- or traverse the call graph.]
-
-* In light of the possible connection with the "pipes and filters" pattern, the base
- object for signal network components which receive a signal and send a signal has
- been changed to __filter__.
- I was not successful in finding a formal definition
- of what "pipes and filters" semantics should be, so I am not sure whether this is appropriate.
-* __function__
- now offers the proposed functionality of converting functions into filters.
-* Threading and scheduling of the invoked functions is something I plan to address.
-* Providing a call graph would be a great feature, but I am not sure what the best
- way to address that is, since each component might be of a different type. Perhaps a graph
- in which only the edges are labeled (with connection objects) would be doable and useful.
-
-[endsect]
-
-[section:download Download and Changelog]
-
-Please keep in mind that this code is a prototype and far from the finished product. I am learning
-as I go, and any feedback on improving the implementation is very welcome.
-
-GSoC Development version (*latest*) \[located in the Boost sandbox /SOC/2007/signals\]
-
-* converting documentation to boostbook, using Boost.Build
-
-Proposal for Boost / Google SoC version \[[@signal_network.zip download]\]
-
-* finished the signals::socket_sender and signals::socket_receiver components
-
-Draft proposal for Boost / Google SoC version
-
-* changed the file and namespace structure
-* implemented a file-iteration based mechanism for arity-dependent classes
-* changed the operators used
-* signal_link is now signals::filter and does not need to know it's descendant's type
-* implemented signals::junction, signals::selector, signals::storage, signals::timed_generator,
- signals::mutex, signals::chain, signals::function classes
-
-Original request for interest version available as attachment to
-[@http://lists.boost.org/Archives/boost/2007/02/116869.php]
-
-[endsect]
-
-[include support.qbk]
-
-[include connections.qbk]
-
-[include components.qbk]
-
-[include rationale.qbk]
-
-[xinclude signal_network_doxygen.xml]
-
-[section:acknowledgements Acknowledgements]
-
-* Thanks to Douglas Gregor for making himself available as a mentor for this project, and for his support, suggestions and feedback.
-* Thanks to all the members of the Boost community who have expressed an interest in this library
- and contributed [link signal_network.discussion valuable feedback].
-* Thanks to Tobias Schwinger for a most valuable discussion on various [link signal_network.introduction.generic_dataflow
- dataflow-oriented approaches and ideas].
-
-[endsect]
-
-[section:license License]
-
-Copyright 2007 Stjepan Rajko.
-Distributed under 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])
-
-
-[endsect]
\ No newline at end of file
Modified: sandbox/SOC/2007/signals/libs/dataflow/doc/support.qbk
==============================================================================
--- /sandbox/SOC/2007/signals/libs/signal_network/doc/support.qbk (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/doc/support.qbk 2007-08-03 19:07:12 EDT (Fri, 03 Aug 2007)
@@ -1,25 +0,0 @@
-[section The Support Layer]
-
-[section Support traits and function objects]
-
-There are a few things that must be defined in order for a class to function seamlessly as a component within the
-library.
-
-[variablelist Components that produce data must specialize:
-
- [[boost::signals::is_component] [Boost.TypeTraits style trait - true for data-producing components.]]
- [[boost::signals::get_signal_type] [Metafunction returning the underlying boost::signal type of the produced data
- (currently, underlying signal signature). If the component is a class with a type `signal_type`, it is
- already supported.]]
- [[boost::signals::get_signal] [Function object returning a reference to the underlying signal.]]
-]
-
-[variablelist Components that consume data must specialize:
-
- [[boost::signals::get_slot] [Function object returning a boost::function of the underlying slot.]]
-
-]
-
-[endsect]
-
-[endsect]
\ No newline at end of file
Modified: sandbox/SOC/2007/signals/libs/dataflow/example/Jamfile.v2
==============================================================================
--- /sandbox/SOC/2007/signals/libs/signal_network/example/Jamfile.v2 (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/example/Jamfile.v2 2007-08-03 19:07:12 EDT (Fri, 03 Aug 2007)
@@ -13,5 +13,7 @@
exe example : example.cpp ;
# exe timing_example : timing_example.cpp ;
-# exe edit_distance : edit_distance.cpp ;
+exe edit_distance : edit_distance.cpp ;
exe fibonacci : fibonacci.cpp ;
+exe simple_example : simple_example.cpp /boost/thread//boost_thread/<link>static ;
+
Modified: sandbox/SOC/2007/signals/libs/dataflow/example/example.cpp
==============================================================================
--- /sandbox/SOC/2007/signals/libs/signal_network/example/example.cpp (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/example/example.cpp 2007-08-03 19:07:12 EDT (Fri, 03 Aug 2007)
@@ -3,79 +3,22 @@
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
-#include <boost/dataflow/phoenix/support.hpp>
-#include <boost/spirit/phoenix/operator/self.hpp>
-#include <boost/spirit/phoenix/core/composite.hpp>
-#include <boost/spirit/phoenix/core/compose.hpp>
-#include <boost/spirit/phoenix/detail/type_deduction.hpp>
-#include <boost/spirit/phoenix/operator/detail/unary_eval.hpp>
-#include <boost/spirit/phoenix/operator/detail/unary_compose.hpp>
-#include <boost/spirit/phoenix/operator/detail/binary_eval.hpp>
-#include <boost/spirit/phoenix/operator/detail/binary_compose.hpp>
+#include <boost/dataflow/support.hpp>
-#include <boost/utility/addressof.hpp>
-
-#include <boost/fusion/sequence/container/vector.hpp>
-#include <boost/spirit/phoenix/core.hpp>
-#include <boost/typeof/typeof.hpp>
-
-#include <iostream>
-#include <vector>
-
-template<typename T>
-class wrapper : public T
-{
- public:
- void operator()()
- {
- }
-
-};
+using namespace boost;
-template<typename T>
-wrapper<T> *operator & (wrapper<T> &t)
-{
- return boost::addressof(t);
-}
+struct dummy_producer_tag;
+struct dummy_consumer_tag;
struct test
{
+ typedef dummy_producer_tag producer_category;
+ typedef dummy_consumer_tag consumer_category;
};
-struct test2 : public test {int x;};
-
-struct test3
-{
- int x;
- test t;
-};
-
-using namespace boost;
-
int main()
{
- test t;
- test2 t2;
- test3 t3;
-
- std::cout << sizeof(test) << std::endl;
- std::cout << sizeof(test2) << std::endl;
- std::cout << sizeof(test3) << std::endl;
-
- std::cout << sizeof(t) << std::endl;
- std::cout << sizeof(t2) << std::endl;
- std::cout << sizeof(t3) << std::endl;
-
- fusion::vector<int, int> vec;
- fusion::vector2<int, int> vec2;
-
- std::cout << sizeof(vec) << std::endl;
- std::cout << sizeof(vec2) << std::endl;
-
- wrapper<BOOST_TYPEOF(phoenix::arg_names::arg1)> wrap;
- std::cout << sizeof(wrap) << std::endl;
+ test t1, t2;
- //std::vector<BOOST_TYPEOF(phoenix::arg_names::arg1)> unwrap_vec(100);
- std::vector<wrapper<BOOST_TYPEOF(phoenix::arg_names::arg1)> > wrap_vec(100);
- (*wrap_vec.begin())();
+ //boost::dataflow::connect(t1, t2);
}
Modified: sandbox/SOC/2007/signals/libs/dataflow/example/fibonacci.cpp
==============================================================================
--- /sandbox/SOC/2007/signals/libs/signal_network/example/fibonacci.cpp (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/example/fibonacci.cpp 2007-08-03 19:07:12 EDT (Fri, 03 Aug 2007)
@@ -3,8 +3,11 @@
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
+//[ example_fibonacci
+
#include <boost/dataflow/connection/operators.hpp>
#include <boost/dataflow/phoenix/components.hpp>
+#include <boost/dataflow/phoenix/producer_container.hpp>
#include <boost/dataflow/phoenix/connection/iterator_relative.hpp>
#include <boost/dataflow/phoenix/sequence_environment.hpp>
@@ -34,8 +37,9 @@
// and the function that combines them into this cell's value (plus).
// Most of the methods here are complete overkill because they provide
// runtime reconnection of cells - which is not necessary here.
-// the relative_link_fibonacci example is the closest to capturing
-// the needs of the problem (apart from sane_fibonacci)
+// the relative_link_fibonacci and the producer_container examples
+// are the closest to capturing the needs of the problem.
+// (apart from sane_fibonacci)
// this one uses a persistent environment (lives in the args)
@@ -45,7 +49,8 @@
{
// link to two cells - pointers and the function that joins their pointees
typedef phoenix::sequence_environment<
- boost::fusion::vector2<const fib_type *, const fib_type *>,
+ dataflow::consumer_group<
+ fusion::vector2<const fib_type *, const fib_type *> >,
BOOST_TYPEOF(*arg1 + *arg2)
> link_type;
@@ -61,7 +66,8 @@
{
boost::progress_timer t;
- cells[0].value = cells[1].value = 1;
+ cells[0].value = 0;
+ cells[1].value = 1;
for (int i=2; i<n; i++)
cells[i]();
}
@@ -73,9 +79,10 @@
{
// the producer_accumulator automaticall accumulates the links
typedef phoenix::producer_accumulator<std::plus<fib_type>,
- boost::fusion::vector2<
- phoenix::actor<phoenix::consumer<fib_type> >,
- phoenix::actor<phoenix::consumer<fib_type> >
+ dataflow::consumer_group<
+ fusion::vector2<
+ phoenix::actor<phoenix::consumer<fib_type> >,
+ phoenix::actor<phoenix::consumer<fib_type> > >
> > link_type;
std::cout << sizeof(phoenix::producer<fib_type, link_type>) << std::endl;
@@ -136,10 +143,10 @@
}
}
-// This one uses relative links
+// This one uses relative links embedded in the vector type
// * prev2 refers to the value two back from the supplied iterator,
// and prev1 refers to the value one back from the supplied iterator.
-// Relative links need to be stored.
+// Relative links do not need to be stored.
void relative_link_fibonacci(int n)
{
// each element of the vector contains relative links to the
@@ -162,6 +169,29 @@
}
}
+// This one uses relative links embedded in a producer_container wrapper.
+// * prev2 refers to the value two back from the supplied iterator,
+// and prev1 refers to the value one back from the supplied iterator.
+// Relative links do not need to be stored.
+void producer_container_fibonacci(int n)
+{
+ typedef boost::phoenix::producer_container<
+ std::vector<fib_type>, // container
+ BOOST_TYPEOF(prev2 + prev1), // general rule
+ mpl::vector< // init cases
+ BOOST_TYPEOF(phoenix::int_<0>()),
+ BOOST_TYPEOF(phoenix::int_<1>())
+ > > cells_type;
+
+ cells_type cells(n);
+
+ {
+ boost::progress_timer t;
+
+ cells.eval();
+ }
+}
+
// This would be what a sane person would write.
void sane_fibonacci(int n)
{
@@ -188,6 +218,8 @@
phoenix_fibonacci(len);
mimic_fibonacci(len);
relative_link_fibonacci(len);
+ producer_container_fibonacci(len);
sane_fibonacci(len);
return 0;
}
+//]
\ No newline at end of file
Modified: sandbox/SOC/2007/signals/libs/dataflow/test/test_bind_object.cpp
==============================================================================
--- /sandbox/SOC/2007/signals/libs/signal_network/test/test_bind_object.cpp (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/test/test_bind_object.cpp 2007-08-03 19:07:12 EDT (Fri, 03 Aug 2007)
@@ -3,7 +3,7 @@
// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
-#include <boost/signal_network/connection/detail/bind_object.hpp>
+#include <boost/dataflow/signal/connection/detail/bind_object.hpp>
#include <boost/test/included/test_exec_monitor.hpp>
Modified: sandbox/SOC/2007/signals/libs/dataflow/test/test_branching.cpp
==============================================================================
--- /sandbox/SOC/2007/signals/libs/signal_network/test/test_branching.cpp (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/test/test_branching.cpp 2007-08-03 19:07:12 EDT (Fri, 03 Aug 2007)
@@ -3,9 +3,9 @@
// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
-#include <boost/signal_network/component/storage.hpp>
-#include <boost/signal_network/component/counter.hpp>
-#include <boost/signal_network/connection.hpp>
+#include <boost/dataflow/signal/component/storage.hpp>
+#include <boost/dataflow/signal/component/counter.hpp>
+#include <boost/dataflow/signal/connection.hpp>
#include <boost/test/included/test_exec_monitor.hpp>
Modified: sandbox/SOC/2007/signals/libs/dataflow/test/test_chain.cpp
==============================================================================
--- /sandbox/SOC/2007/signals/libs/signal_network/test/test_chain.cpp (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/test/test_chain.cpp 2007-08-03 19:07:12 EDT (Fri, 03 Aug 2007)
@@ -3,9 +3,9 @@
// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
-#include <boost/signal_network/component/chain.hpp>
-#include <boost/signal_network/component/storage.hpp>
-#include <boost/signal_network/connection.hpp>
+#include <boost/dataflow/signal/component/chain.hpp>
+#include <boost/dataflow/signal/component/storage.hpp>
+#include <boost/dataflow/signal/connection.hpp>
#include <boost/fusion/algorithm/iteration/for_each.hpp>
#include <boost/fusion/algorithm/transformation/transform.hpp>
Modified: sandbox/SOC/2007/signals/libs/dataflow/test/test_connect.cpp
==============================================================================
--- /sandbox/SOC/2007/signals/libs/signal_network/test/test_connect.cpp (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/test/test_connect.cpp 2007-08-03 19:07:12 EDT (Fri, 03 Aug 2007)
@@ -3,13 +3,16 @@
// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
-#include <boost/signal_network/connection/signal.hpp>
+#include <boost/dataflow/signal/support.hpp>
#include <boost/test/included/test_exec_monitor.hpp>
+//[ test_connect
+
struct receiver
{
typedef void result_type;
+ typedef boost::dataflow::signal_consumer consumer_category;
receiver() : stored(0) {}
@@ -23,17 +26,17 @@
int test_main(int, char* [])
{
- //[ test_connect
boost::signal<void(int)> p;
receiver r;
- connect(p, r);
+ boost::dataflow::connect(p, r);
p(3);
BOOST_CHECK_EQUAL(r.stored, 3);
- //]
return 0;
-}
\ No newline at end of file
+}
+
+//]
Modified: sandbox/SOC/2007/signals/libs/dataflow/test/test_connections.cpp
==============================================================================
--- /sandbox/SOC/2007/signals/libs/signal_network/test/test_connections.cpp (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/test/test_connections.cpp 2007-08-03 19:07:12 EDT (Fri, 03 Aug 2007)
@@ -12,22 +12,22 @@
#define BOOST_SIGNALS_STATIC_LINK
#include <boost/optional.hpp>
-#include <boost/signal_network/filter.hpp>
-#include <boost/signal_network/storage.hpp>
-#include <boost/signal_network/junction.hpp>
-#include <boost/signal_network/selector.hpp>
-#include <boost/signal_network/mutex.hpp>
-#include <boost/signal_network/timed_generator.hpp>
-#include <boost/signal_network/function.hpp>
-#include <boost/signal_network/chain.hpp>
+#include <boost/dataflow/signal/filter.hpp>
+#include <boost/dataflow/signal/storage.hpp>
+#include <boost/dataflow/signal/junction.hpp>
+#include <boost/dataflow/signal/selector.hpp>
+#include <boost/dataflow/signal/mutex.hpp>
+#include <boost/dataflow/signal/timed_generator.hpp>
+#include <boost/dataflow/signal/function.hpp>
+#include <boost/dataflow/signal/chain.hpp>
#ifdef WIN32
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#define _WIN32_WINDOWS
#endif
-#include <boost/signal_network/socket_receiver.hpp>
-#include <boost/signal_network/socket_sender.hpp>
+#include <boost/dataflow/signal/socket_receiver.hpp>
+#include <boost/dataflow/signal/socket_sender.hpp>
#undef _WIN32_WINDOWS
// for access to connection operators >>= and |
Modified: sandbox/SOC/2007/signals/libs/dataflow/test/test_counter.cpp
==============================================================================
--- /sandbox/SOC/2007/signals/libs/signal_network/test/test_counter.cpp (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/test/test_counter.cpp 2007-08-03 19:07:12 EDT (Fri, 03 Aug 2007)
@@ -3,7 +3,7 @@
// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
-#include <boost/signal_network/component/counter.hpp>
+#include <boost/dataflow/signal/component/counter.hpp>
#include <boost/test/included/test_exec_monitor.hpp>
Modified: sandbox/SOC/2007/signals/libs/dataflow/test/test_disconnect.cpp
==============================================================================
--- /sandbox/SOC/2007/signals/libs/signal_network/test/test_disconnect.cpp (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/test/test_disconnect.cpp 2007-08-03 19:07:12 EDT (Fri, 03 Aug 2007)
@@ -3,9 +3,9 @@
// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
-#include <boost/signal_network/component/storage.hpp>
-#include <boost/signal_network/component/counter.hpp>
-#include <boost/signal_network/connection.hpp>
+#include <boost/dataflow/signal/component/storage.hpp>
+#include <boost/dataflow/signal/component/counter.hpp>
+#include <boost/dataflow/signal/connection.hpp>
#include <boost/test/included/test_exec_monitor.hpp>
@@ -31,7 +31,7 @@
BOOST_CHECK_EQUAL(collector.at<0>(), 2.5f);
} // counter, floater, and collector are now destroyed and disconnected with Boost.Signals
#ifdef SIGNAL_NETWORK_THREAD_SAFE
- // if Signal Network has detected thread safe signals, we need to
+ // if [DataflowSignals] has detected thread safe signals, we need to
// touch the signal to disconnect things that are destroyed:
// unfortunatelly, this call hangs on MSVC!
// banger();
Modified: sandbox/SOC/2007/signals/libs/dataflow/test/test_filter.cpp
==============================================================================
--- /sandbox/SOC/2007/signals/libs/signal_network/test/test_filter.cpp (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/test/test_filter.cpp 2007-08-03 19:07:12 EDT (Fri, 03 Aug 2007)
@@ -3,9 +3,9 @@
// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
-#include <boost/signal_network/component/filter.hpp>
-#include <boost/signal_network/component/storage.hpp>
-#include <boost/signal_network/connection.hpp>
+#include <boost/dataflow/signal/component/filter.hpp>
+#include <boost/dataflow/signal/component/storage.hpp>
+#include <boost/dataflow/signal/connection.hpp>
#include <boost/fusion/sequence/intrinsic/at.hpp>
Modified: sandbox/SOC/2007/signals/libs/dataflow/test/test_function.cpp
==============================================================================
--- /sandbox/SOC/2007/signals/libs/signal_network/test/test_function.cpp (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/test/test_function.cpp 2007-08-03 19:07:12 EDT (Fri, 03 Aug 2007)
@@ -3,9 +3,9 @@
// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
-#include <boost/signal_network/component/function.hpp>
-#include <boost/signal_network/component/storage.hpp>
-#include <boost/signal_network/connection.hpp>
+#include <boost/dataflow/signal/component/function.hpp>
+#include <boost/dataflow/signal/component/storage.hpp>
+#include <boost/dataflow/signal/connection.hpp>
#include <boost/test/included/test_exec_monitor.hpp>
Modified: sandbox/SOC/2007/signals/libs/dataflow/test/test_junction.cpp
==============================================================================
--- /sandbox/SOC/2007/signals/libs/signal_network/test/test_junction.cpp (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/test/test_junction.cpp 2007-08-03 19:07:12 EDT (Fri, 03 Aug 2007)
@@ -3,10 +3,10 @@
// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
-#include <boost/signal_network/component/junction.hpp>
-#include <boost/signal_network/component/counter.hpp>
-#include <boost/signal_network/component/storage.hpp>
-#include <boost/signal_network/connection.hpp>
+#include <boost/dataflow/signal/component/junction.hpp>
+#include <boost/dataflow/signal/component/counter.hpp>
+#include <boost/dataflow/signal/component/storage.hpp>
+#include <boost/dataflow/signal/connection.hpp>
#include <boost/test/included/test_exec_monitor.hpp>
Modified: sandbox/SOC/2007/signals/libs/dataflow/test/test_multi_args.cpp
==============================================================================
--- /sandbox/SOC/2007/signals/libs/signal_network/test/test_multi_args.cpp (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/test/test_multi_args.cpp 2007-08-03 19:07:12 EDT (Fri, 03 Aug 2007)
@@ -3,8 +3,8 @@
// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
-#include <boost/signal_network/component/storage.hpp>
-#include <boost/signal_network/connection.hpp>
+#include <boost/dataflow/signal/component/storage.hpp>
+#include <boost/dataflow/signal/connection.hpp>
#include <boost/optional.hpp>
@@ -31,6 +31,7 @@
int cnt;
public:
typedef void result_type;
+ typedef boost::dataflow::signal_consumer consumer_category;
SignalMultiCollector() : cnt(0) {}
void operator()()
Modified: sandbox/SOC/2007/signals/libs/dataflow/test/test_multi_out.cpp
==============================================================================
--- /sandbox/SOC/2007/signals/libs/signal_network/test/test_multi_out.cpp (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/test/test_multi_out.cpp 2007-08-03 19:07:12 EDT (Fri, 03 Aug 2007)
@@ -3,8 +3,8 @@
// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
-#include <boost/signal_network/component/storage.hpp>
-#include <boost/signal_network/connection.hpp>
+#include <boost/dataflow/signal/component/storage.hpp>
+#include <boost/dataflow/signal/connection.hpp>
#include <boost/test/included/test_exec_monitor.hpp>
Modified: sandbox/SOC/2007/signals/libs/dataflow/test/test_multi_type.cpp
==============================================================================
--- /sandbox/SOC/2007/signals/libs/signal_network/test/test_multi_type.cpp (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/test/test_multi_type.cpp 2007-08-03 19:07:12 EDT (Fri, 03 Aug 2007)
@@ -3,8 +3,8 @@
// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
-#include <boost/signal_network/component/storage.hpp>
-#include <boost/signal_network/connection.hpp>
+#include <boost/dataflow/signal/component/storage.hpp>
+#include <boost/dataflow/signal/connection.hpp>
#include <boost/optional.hpp>
@@ -20,6 +20,7 @@
optional<float> last_float;
public:
typedef void result_type;
+ typedef boost::dataflow::signal_consumer consumer_category;
void operator()(int x)
{
Modified: sandbox/SOC/2007/signals/libs/dataflow/test/test_mutex.cpp
==============================================================================
--- /sandbox/SOC/2007/signals/libs/signal_network/test/test_mutex.cpp (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/test/test_mutex.cpp 2007-08-03 19:07:12 EDT (Fri, 03 Aug 2007)
@@ -3,10 +3,10 @@
// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
-#include <boost/signal_network/component/mutex.hpp>
-#include <boost/signal_network/component/timed_generator.hpp>
-#include <boost/signal_network/component/counter.hpp>
-#include <boost/signal_network/connection.hpp>
+#include <boost/dataflow/signal/component/mutex.hpp>
+#include <boost/dataflow/signal/component/timed_generator.hpp>
+#include <boost/dataflow/signal/component/counter.hpp>
+#include <boost/dataflow/signal/connection.hpp>
#include <boost/test/included/test_exec_monitor.hpp>
Modified: sandbox/SOC/2007/signals/libs/dataflow/test/test_pull.cpp
==============================================================================
--- /sandbox/SOC/2007/signals/libs/signal_network/test/test_pull.cpp (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/test/test_pull.cpp 2007-08-03 19:07:12 EDT (Fri, 03 Aug 2007)
@@ -3,8 +3,8 @@
// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
-#include <boost/signal_network/component/storage.hpp>
-#include <boost/signal_network/connection.hpp>
+#include <boost/dataflow/signal/component/storage.hpp>
+#include <boost/dataflow/signal/connection.hpp>
#include <boost/test/included/test_exec_monitor.hpp>
Modified: sandbox/SOC/2007/signals/libs/dataflow/test/test_result_of_defined.cpp
==============================================================================
--- /sandbox/SOC/2007/signals/libs/signal_network/test/test_result_of_defined.cpp (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/test/test_result_of_defined.cpp 2007-08-03 19:07:12 EDT (Fri, 03 Aug 2007)
@@ -3,10 +3,10 @@
// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
-#include <boost/signal_network/connection/detail/result_of_defined.hpp>
+#include <boost/dataflow/signal/connection/detail/result_of_defined.hpp>
#include <boost/fusion/sequence/container/map.hpp>
-#include <boost/signal_network/component/junction.hpp>
-#include <boost/signal_network/component/storage.hpp>
+#include <boost/dataflow/signal/component/junction.hpp>
+#include <boost/dataflow/signal/component/storage.hpp>
#include <boost/test/included/test_exec_monitor.hpp>
Modified: sandbox/SOC/2007/signals/libs/dataflow/test/test_same_type.cpp
==============================================================================
--- /sandbox/SOC/2007/signals/libs/signal_network/test/test_same_type.cpp (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/test/test_same_type.cpp 2007-08-03 19:07:12 EDT (Fri, 03 Aug 2007)
@@ -3,9 +3,9 @@
// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
-#include <boost/signal_network/component/storage.hpp>
-#include <boost/signal_network/component/counter.hpp>
-#include <boost/signal_network/connection.hpp>
+#include <boost/dataflow/signal/component/storage.hpp>
+#include <boost/dataflow/signal/component/counter.hpp>
+#include <boost/dataflow/signal/connection.hpp>
#include <boost/test/included/test_exec_monitor.hpp>
@@ -24,6 +24,7 @@
int result;
public:
typedef void result_type;
+ typedef dataflow::signal_consumer consumer_category;
Signal2VoidInputs() : result(0) {};
void operator()()
Modified: sandbox/SOC/2007/signals/libs/dataflow/test/test_socket.cpp
==============================================================================
--- /sandbox/SOC/2007/signals/libs/signal_network/test/test_socket.cpp (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/test/test_socket.cpp 2007-08-03 19:07:12 EDT (Fri, 03 Aug 2007)
@@ -5,10 +5,10 @@
#include <boost/asio.hpp>
-#include <boost/signal_network/component/socket_receiver.hpp>
-#include <boost/signal_network/component/socket_sender.hpp>
-#include <boost/signal_network/component/function.hpp>
-#include <boost/signal_network/connection.hpp>
+#include <boost/dataflow/signal/component/socket_receiver.hpp>
+#include <boost/dataflow/signal/component/socket_sender.hpp>
+#include <boost/dataflow/signal/component/function.hpp>
+#include <boost/dataflow/signal/connection.hpp>
#include <boost/thread/thread.hpp>
#include <boost/thread/mutex.hpp>
Modified: sandbox/SOC/2007/signals/libs/dataflow/test/test_storage.cpp
==============================================================================
--- /sandbox/SOC/2007/signals/libs/signal_network/test/test_storage.cpp (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/test/test_storage.cpp 2007-08-03 19:07:12 EDT (Fri, 03 Aug 2007)
@@ -3,8 +3,8 @@
// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
-#include <boost/signal_network/component/storage.hpp>
-#include <boost/signal_network/connection.hpp>
+#include <boost/dataflow/signal/component/storage.hpp>
+#include <boost/dataflow/signal/connection.hpp>
#include <boost/test/included/test_exec_monitor.hpp>
@@ -28,7 +28,7 @@
BOOST_CHECK_EQUAL(collector.at<0>(), 2.5f);
floater(1.5f); // change the value in floater
- floater.send(); // we can also signal floater directly
+ boost::dataflow::invoke(floater); // we can also signal floater directly
BOOST_CHECK_EQUAL(collector.at<0>(), 1.5f);
//]
}
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