Boost logo

Boost-Commit :

From: stipe_at_[hidden]
Date: 2007-09-16 19:03:16


Author: srajko
Date: 2007-09-16 19:03:14 EDT (Sun, 16 Sep 2007)
New Revision: 39333
URL: http://svn.boost.org/trac/boost/changeset/39333

Log:
Add rudimentary VTK support, filter, producer_map...
Added:
   sandbox/SOC/2007/signals/boost/dataflow/VTK/
   sandbox/SOC/2007/signals/boost/dataflow/VTK/support.hpp (contents, props changed)
   sandbox/SOC/2007/signals/boost/dataflow/connection/producer_map.hpp (contents, props changed)
   sandbox/SOC/2007/signals/boost/dataflow/support/filter.hpp (contents, props changed)
   sandbox/SOC/2007/signals/boost/dataflow/support/proxy_consumer.hpp (contents, props changed)
   sandbox/SOC/2007/signals/boost/dataflow/support/proxy_producer.hpp (contents, props changed)
   sandbox/SOC/2007/signals/libs/dataflow/example/VTK/
   sandbox/SOC/2007/signals/libs/dataflow/example/VTK/Cone.cxx (contents, props changed)
   sandbox/SOC/2007/signals/libs/dataflow/example/VTK/Jamfile.v2 (contents, props changed)
Text files modified:
   sandbox/SOC/2007/signals/Jamfile.v2 | 2
   sandbox/SOC/2007/signals/boost/dataflow/connection/consumer_map.hpp | 34 ------
   sandbox/SOC/2007/signals/boost/dataflow/signal/component/filter.hpp | 21 +--
   sandbox/SOC/2007/signals/boost/dataflow/signal/component/filter_base.hpp | 36 ------
   sandbox/SOC/2007/signals/boost/dataflow/support.hpp | 31 -----
   sandbox/SOC/2007/signals/boost/dataflow/support/connectable.hpp | 23 ++-
   sandbox/SOC/2007/signals/boost/dataflow/support/consumer.hpp | 24 ++++
   sandbox/SOC/2007/signals/boost/dataflow/support/producer.hpp | 213 ++-------------------------------------
   sandbox/SOC/2007/signals/libs/dataflow/build/xcodeide/signal_network.xcodeproj/project.pbxproj | 36 ++++++
   sandbox/SOC/2007/signals/libs/dataflow/doc/Jamfile.v2 | 1
   sandbox/SOC/2007/signals/libs/dataflow/example/Jamfile.v2 | 9
   sandbox/SOC/2007/signals/libs/dataflow/test/test_disconnect.cpp | 2
   12 files changed, 107 insertions(+), 325 deletions(-)

Modified: sandbox/SOC/2007/signals/Jamfile.v2
==============================================================================
--- sandbox/SOC/2007/signals/Jamfile.v2 (original)
+++ sandbox/SOC/2007/signals/Jamfile.v2 2007-09-16 19:03:14 EDT (Sun, 16 Sep 2007)
@@ -8,6 +8,6 @@
    : $(BOOST_ROOT)
    ;
    
-project boost/signal_network
+project dataflow
    : build-dir bin.v2
    ;
\ No newline at end of file

Added: sandbox/SOC/2007/signals/boost/dataflow/VTK/support.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2007/signals/boost/dataflow/VTK/support.hpp 2007-09-16 19:03:14 EDT (Sun, 16 Sep 2007)
@@ -0,0 +1,222 @@
+// 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 BOOST_DATAFLOW_VTK_SUPPORT_HPP
+#define BOOST_DATAFLOW_VTK_SUPPORT_HPP
+
+#include "vtkActor.h"
+#include "vtkAlgorithm.h"
+#include "vtkRenderWindow.h"
+
+#include <boost/dataflow/support.hpp>
+#include <boost/dataflow/connection/producer_map.hpp>
+#include <boost/dataflow/connection/operators.hpp>
+
+#include <boost/fusion/sequence/container/map.hpp>
+#include <boost/type_traits/is_base_of.hpp>
+
+namespace boost { namespace dataflow {
+
+struct vtk_algorithm_output_producer;
+struct vtk_algorithm_consumer;
+struct vtk_algorithm_proxy_producer;
+struct vtk_algorithm_mapper_producer;
+struct vtk_prop_producer;
+struct vtk_mapper_consumer;
+struct vtk_renderer_filter;
+struct vtk_rendererwindow_consumer;
+
+struct vtk_algorithm_data;
+struct vtk_mapper_data;
+
+template<>
+struct producer_category_of<vtkAlgorithmOutput *>
+{
+ typedef vtk_algorithm_output_producer type;
+};
+
+template<typename T>
+struct proxy_producer_category_of<
+ T,
+ typename boost::enable_if<boost::is_base_of<vtkAlgorithm,T> >::type
+>
+{
+ typedef vtk_algorithm_proxy_producer type;
+};
+
+template<>
+struct producer_category_of<vtkMapper *>
+{
+ typedef vtk_algorithm_mapper_producer type;
+};
+
+template<typename T>
+struct proxied_producer_of<
+ T,
+ typename boost::enable_if<boost::is_base_of<vtkAlgorithm,T> >::type
+>
+{
+ typedef boost::dataflow::producer_map<
+ boost::fusion::map<
+ boost::fusion::pair<vtk_algorithm_data, vtkAlgorithmOutput *>,
+ boost::fusion::pair<vtk_mapper_data, vtkMapper *>
+ > > type;
+};
+
+namespace extension
+{
+ template<>
+ struct get_proxied_producer_impl<vtk_algorithm_proxy_producer>
+ {
+ template<typename ProxyProducer>
+ struct result
+ {
+ typedef boost::dataflow::producer_map<
+ boost::fusion::map<
+ boost::fusion::pair<vtk_algorithm_data, vtkAlgorithmOutput *>,
+ boost::fusion::pair<vtk_mapper_data, vtkMapper *>
+ > > type;
+ };
+
+ template<typename ProxyProducer>
+ struct apply
+ {
+ static typename result<ProxyProducer>::type
+ call(ProxyProducer &t)
+ {
+ return boost::fusion::map<
+ boost::fusion::pair<vtk_algorithm_data,vtkAlgorithmOutput *>,
+ boost::fusion::pair<vtk_mapper_data, vtkMapper *>
+ > (t.GetNumberOfOutputPorts() ? t.GetOutputPort() : (vtkAlgorithmOutput *)NULL, (vtkMapper *)&t);
+ }
+ };
+ };
+
+}
+
+template<typename T>
+struct consumer_category_of<
+ T,
+ typename boost::enable_if<boost::is_base_of<vtkAlgorithm,T> >::type
+>
+{
+ typedef vtk_algorithm_consumer type;
+};
+
+template<typename T>
+struct consumed_type_of<
+ T,
+ typename boost::enable_if<boost::is_base_of<vtkAlgorithm,T> >::type
+>
+{
+ typedef vtk_algorithm_data type;
+};
+
+
+
+namespace extension
+{
+ template<>
+ struct connect_impl<vtk_algorithm_output_producer, vtk_algorithm_consumer>
+ {
+ template<typename Producer, typename Consumer>
+ struct apply
+ {
+ static void call(const Producer &producer, Consumer &consumer)
+ {
+ consumer.AddInputConnection(producer);
+ }
+ };
+ };
+
+ template<>
+ struct connect_impl<vtk_algorithm_mapper_producer, vtk_mapper_consumer>
+ {
+ template<typename Producer, typename Consumer>
+ struct apply
+ {
+ static void call(const Producer &producer, Consumer &consumer)
+ {
+ consumer.SetMapper(producer);
+ }
+ };
+ };
+
+ template<>
+ struct connect_impl<vtk_prop_producer, vtk_renderer_filter>
+ {
+ template<typename Producer, typename Consumer>
+ struct apply
+ {
+ static void call(Producer &producer, Consumer &consumer)
+ {
+ consumer.AddActor(&producer);
+ }
+ };
+ };
+
+ template<>
+ struct connect_impl<vtk_renderer_filter, vtk_rendererwindow_consumer>
+ {
+ template<typename Producer, typename Consumer>
+ struct apply
+ {
+ static void call(Producer &producer, Consumer &consumer)
+ {
+ consumer.AddRenderer(&producer);
+ }
+ };
+ };
+}
+
+template<typename T>
+struct producer_category_of<
+ T,
+ typename boost::enable_if<boost::is_base_of<vtkActor,T> >::type
+>
+{
+ typedef vtk_prop_producer type;
+};
+
+template<typename T>
+struct consumer_category_of<
+ T,
+ typename boost::enable_if<boost::is_base_of<vtkActor,T> >::type
+>
+{
+ typedef vtk_mapper_consumer type;
+};
+
+template<typename T>
+struct consumed_type_of<
+ T,
+ typename boost::enable_if<boost::is_base_of<vtkActor,T> >::type
+>
+{
+ typedef vtk_mapper_data type;
+};
+
+template<typename T>
+struct filter_category_of<
+ T,
+ typename boost::enable_if<boost::is_base_of<vtkRenderer,T> >::type
+>
+{
+ typedef vtk_renderer_filter type;
+};
+
+template<typename T>
+struct consumer_category_of<
+ T,
+ typename boost::enable_if<boost::is_base_of<vtkRenderWindow,T> >::type
+>
+{
+ typedef vtk_rendererwindow_consumer type;
+};
+
+} }
+
+
+#endif // BOOST_DATAFLOW_VTK_SUPPORT_HPP
\ No newline at end of file

Modified: sandbox/SOC/2007/signals/boost/dataflow/connection/consumer_map.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/connection/consumer_map.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/connection/consumer_map.hpp 2007-09-16 19:03:14 EDT (Sun, 16 Sep 2007)
@@ -45,11 +45,11 @@
 
 namespace extension
 {
- // component >>= map
+ // component >>= consumer_map
     template<typename ProducerTag, typename ConsumerTag>
     struct connect_impl<ProducerTag, ConsumerTag,
         typename boost::enable_if<//boost::mpl::and_<
- //boost::mpl::not_<boost::is_base_of<fusion_map_consumer, ProducerTag> >,
+ //is_producer<ProducerTag>,
             boost::is_base_of<fusion_map_consumer, ConsumerTag>
         /*>*/ >::type >
     {
@@ -90,36 +90,6 @@
             }
         };
     };
-
- // map >>= component
- template<typename ProducerTag, typename ConsumerTag>
- struct connect_impl<ProducerTag, ConsumerTag,
- typename boost::enable_if<//boost::mpl::and_<
- boost::is_base_of<fusion_map_consumer, ProducerTag>//,
- //boost::mpl::not_<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)
- {
- connect(boost::fusion::front(producer).second, consumer);
- }
- static void call(const Producer &producer, Consumer &consumer)
- {
- connect(boost::fusion::front(producer).second, consumer);
- }
- static void call(Producer &producer, const Consumer &consumer)
- {
- connect(boost::fusion::front(producer).second, consumer);
- }
- static void call(Producer &producer, Consumer &consumer)
- {
- connect(boost::fusion::front(producer).second, consumer);
- }
- };
- };
 }
     
 } } // namespace boost::dataflow

Added: sandbox/SOC/2007/signals/boost/dataflow/connection/producer_map.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2007/signals/boost/dataflow/connection/producer_map.hpp 2007-09-16 19:03:14 EDT (Sun, 16 Sep 2007)
@@ -0,0 +1,99 @@
+// 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_CONNECTION_PRODUCER_MAP_HPP
+#define BOOST_DATAFLOW_CONNECTION_PRODUCER_MAP_HPP
+
+#include <boost/dataflow/support.hpp>
+
+#include <boost/mpl/not.hpp>
+#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/type_traits/remove_const.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+#include <boost/utility/result_of.hpp>
+#include <boost/call_traits.hpp>
+
+namespace boost { namespace dataflow {
+
+struct fusion_map_producer;
+
+template<class T>
+struct producer_map : public T
+{
+ producer_map(const T& t) : T(t) {}
+ typedef fusion_map_producer producer_category;
+ typedef
+ typename boost::remove_const<
+ typename boost::remove_reference<
+ typename boost::fusion::result_of::front<T>::type
+ >::type
+ >::type::second_type proxy_consumer_for;
+ typedef mutable_proxy_consumer proxy_consumer_category;
+
+ typename boost::call_traits<typename get_proxied_consumer_type<proxy_consumer_for>::type>::reference get_proxied_consumer() const
+ {
+ return boost::dataflow::get_proxied_consumer(boost::fusion::front(*this).second);
+ }
+};
+
+namespace extension
+{
+ // component >>= coxsumer_map
+ template<typename ProducerTag, typename ConsumerTag>
+ struct connect_impl<ProducerTag, ConsumerTag,
+ typename boost::enable_if<
+ boost::is_base_of<fusion_map_producer, ProducerTag>
+ >::type >
+ {
+ template<typename Producer, typename Consumer>
+ struct apply
+ {
+ static void call(const Producer &producer, const Consumer &consumer)
+ {
+ connect(
+ boost::fusion::at_key<
+ typename consumed_type_of<Consumer>::type
+ >(producer),
+ consumer);
+ }
+ static void call(const Producer &producer, Consumer &consumer)
+ {
+ connect(
+ boost::fusion::at_key<
+ typename consumed_type_of<Consumer>::type
+ >(producer),
+ consumer);
+ }
+ static void call(Producer &producer, const Consumer &consumer)
+ {
+ connect(
+ boost::fusion::at_key<
+ typename consumed_type_of<Consumer>::type
+ >(producer),
+ consumer);
+ }
+ static void call(Producer &producer, Consumer &consumer)
+ {
+ connect(
+ boost::fusion::at_key<
+ typename consumed_type_of<Consumer>::type
+ >(producer),
+ consumer);
+ }
+ };
+ };
+}
+
+} } // namespace boost::dataflow
+
+#endif // BOOST_DATAFLOW_CONNECTION_PRODUCER_MAP_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-09-16 19:03:14 EDT (Sun, 16 Sep 2007)
@@ -64,23 +64,19 @@
 class filter<Signature, unfused, Combiner, Group, GroupCompare> : public filter_base
 {
 public:
- //typedef Signature produced_type;
- //typedef boost::dataflow::signal_producer producer_category;
- typedef boost::signal<Signature, Combiner, Group, GroupCompare> proxy_producer_for;
+ // the type of the signal
+ typedef boost::signal<Signature, Combiner, Group, GroupCompare> signal_type;
+ typedef signal_type proxy_producer_for;
     
     // the signature of the output signal
         typedef Signature signature_type;
- // the type of the signal
- typedef boost::signal<Signature, Combiner, Group, GroupCompare> signal_type;
 
         filter(const filter &) {}
         filter(){}
     const filter &operator = (const filter &) {return *this;}
 
         /// Returns the default out signal.
- signal_type &default_signal() const
- { return out; }
- signal_type &get_proxied_producer() const
+ proxy_producer_for &get_proxied_producer() const
         { return out; }
 
         /// Disconnects all slots connected to the signals::filter.
@@ -126,16 +122,11 @@
     typedef typename boost::fusion::result_of::as_vector<parameter_types>::type parameter_vector;
     typedef typename Combiner::result_type signature_type (const parameter_vector &);
     typedef typename Combiner::result_type fused_signature_type (const parameter_vector &);
- typedef boost::signal<signature_type, Combiner, Group, GroupCompare> proxy_producer_for;
     typedef boost::signal<signature_type, Combiner, Group, GroupCompare> signal_type;
+ typedef signal_type proxy_producer_for;
 
-// typedef typename Combiner::result_type produced_type (const parameter_vector &);
-
- /// Returns the default out signal.
- signal_type &default_signal() const
- { return fused_out; }
         /// Returns the default out signal.
- signal_type &get_proxied_producer() const
+ proxy_producer_for &get_proxied_producer() const
         { return fused_out; }
         /// Disconnects all slots connected to the signals::filter.
         void disconnect_all_slots() {fused_out.disconnect_all_slots();}

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-09-16 19:03:14 EDT (Sun, 16 Sep 2007)
@@ -26,46 +26,10 @@
 #endif
 {
 public:
-// typedef boost::dataflow::signal_producer producer_category;
     typedef boost::dataflow::signal_consumer consumer_category;
     typedef boost::dataflow::mutable_proxy_producer proxy_producer_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<boost::signals::filter_base, T> >::type >
- : public boost::true_type { };
-
-/*template<class T>
-struct is_component<T, typename boost::enable_if<is_filter<T> >::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 >
-{
- typedef typename T::signal_type type;
-};
-
-}
-
-}
-
-} } // namespace boost::signals
-
 #endif // SIGNAL_NETWORK_FILTER_BASE_HPP

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-09-16 19:03:14 EDT (Sun, 16 Sep 2007)
@@ -7,36 +7,11 @@
 #define BOOST_DATAFLOW_SUPPORT_HPP
 
 #include <boost/dataflow/support/producer.hpp>
+#include <boost/dataflow/support/proxy_producer.hpp>
 #include <boost/dataflow/support/consumer.hpp>
+#include <boost/dataflow/support/proxy_consumer.hpp>
+#include <boost/dataflow/support/filter.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 detail
-{
- BOOST_MPL_HAS_XXX_TRAIT_DEF(producer_category)
-
- BOOST_MPL_HAS_XXX_TRAIT_DEF(consumer_category)
-
- BOOST_MPL_HAS_XXX_TRAIT_DEF(produced_type)
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-} } // namespace boost::dataflow
-*/
 #endif // BOOST_DATAFLOW_SUPPORT_HPP

Modified: sandbox/SOC/2007/signals/boost/dataflow/support/connectable.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/support/connectable.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/support/connectable.hpp 2007-09-16 19:03:14 EDT (Sun, 16 Sep 2007)
@@ -6,6 +6,9 @@
 #ifndef BOOST_DATAFLOW_SUPPORT_CONNECTABLE_HPP
 #define BOOST_DATAFLOW_SUPPORT_CONNECTABLE_HPP
 
+#include <boost/dataflow/support/proxy_producer.hpp>
+#include <boost/dataflow/support/proxy_consumer.hpp>
+
 #include <boost/static_assert.hpp>
 
 
@@ -37,8 +40,9 @@
         typename consumer_category_of<Consumer>::type>
             ::template apply<
                 typename get_proxied_producer_type<Producer>::type,
- Consumer
- >::call(get_proxied_producer(producer),consumer);
+ typename get_proxied_consumer_type<Consumer>::type
+ >::call(get_proxied_producer(producer),
+ get_proxied_consumer(consumer));
 }
 
 template<typename Producer, typename Consumer>
@@ -49,8 +53,9 @@
         typename consumer_category_of<Consumer>::type>
             ::template apply<
                 typename get_proxied_producer_type<Producer>::type,
- Consumer
- >::call(get_proxied_producer(producer),consumer);
+ typename get_proxied_consumer_type<Consumer>::type
+ >::call(get_proxied_producer(producer),
+ get_proxied_consumer(consumer));
 }
 
 template<typename Producer, typename Consumer>
@@ -61,8 +66,9 @@
         typename consumer_category_of<Consumer>::type>
             ::template apply<
                 typename get_proxied_producer_type<Producer>::type,
- Consumer
- >::call(get_proxied_producer(producer),consumer);
+ typename get_proxied_consumer_type<Consumer>::type
+ >::call(get_proxied_producer(producer),
+ get_proxied_consumer(consumer));
 }
 
 template<typename Producer, typename Consumer>
@@ -73,8 +79,9 @@
         typename consumer_category_of<Consumer>::type>
             ::template apply<
                 typename get_proxied_producer_type<Producer>::type,
- Consumer
- >::call(get_proxied_producer(producer),consumer);
+ typename get_proxied_consumer_type<Consumer>::type
+ >::call(get_proxied_producer(producer),
+ get_proxied_consumer(consumer));
 }
 
 } } // namespace boost::dataflow

Modified: sandbox/SOC/2007/signals/boost/dataflow/support/consumer.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/support/consumer.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/support/consumer.hpp 2007-09-16 19:03:14 EDT (Sun, 16 Sep 2007)
@@ -24,6 +24,17 @@
     typedef typename T::consumer_category type;
 };
 
+// trait giving the consumer category of a type.
+template<typename T, typename Enable=void>
+struct consumed_type_of;
+
+template<typename T>
+struct consumed_type_of<T,
+typename detail::enable_if_defined<typename T::consumed_type>::type >
+{
+ typedef typename T::consumed_type type;
+};
+
 // trait determining whether a type is a consumer.
 template<typename T, typename Enable=void>
 struct is_consumer
@@ -34,6 +45,19 @@
         typename detail::enable_if_defined<typename consumer_category_of<T>::type>::type >
     : public boost::true_type {};
 
+// trait determining whether a type is a consumer.
+template<typename T, typename Enable=void>
+struct is_single_type_consumer
+ : public boost::false_type {};
+
+template<typename T>
+struct is_single_type_consumer<T,
+ typename detail::enable_if_defined<detail::all_of<
+ typename consumer_category_of<T>::type,
+ typename consumed_type_of<T>::type>
+ >::type >
+ : public boost::true_type {};
+
 } } // namespace boost::dataflow
 
 #endif // BOOST_DATAFLOW_SUPPORT_CONSUMER_HPP

Added: sandbox/SOC/2007/signals/boost/dataflow/support/filter.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2007/signals/boost/dataflow/support/filter.hpp 2007-09-16 19:03:14 EDT (Sun, 16 Sep 2007)
@@ -0,0 +1,43 @@
+// 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_FILTER_HPP
+#define BOOST_DATAFLOW_SUPPORT_FILTER_HPP
+
+#include <boost/dataflow/support/producer.hpp>
+#include <boost/dataflow/support/consumer.hpp>
+
+namespace boost { namespace dataflow {
+
+// trait giving the producer category of a type.
+template<typename T, typename Enable=void>
+struct filter_category_of
+{
+};
+
+template<typename T>
+struct filter_category_of<T,
+ typename detail::enable_if_defined<typename T::filter_category>::type >
+{
+ typedef typename T::filter_category type;
+};
+
+template<typename T>
+struct producer_category_of<T,
+ typename detail::enable_if_defined<typename filter_category_of<T>::type>::type >
+{
+ typedef typename filter_category_of<T>::type type;
+};
+
+template<typename T>
+struct consumer_category_of<T,
+ typename detail::enable_if_defined<typename filter_category_of<T>::type>::type >
+{
+ typedef typename filter_category_of<T>::type type;
+};
+
+} } // namespace boost::dataflow
+
+#endif // BOOST_DATAFLOW_SUPPORT_FILTER_HPP

Modified: sandbox/SOC/2007/signals/boost/dataflow/support/producer.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/support/producer.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/support/producer.hpp 2007-09-16 19:03:14 EDT (Sun, 16 Sep 2007)
@@ -7,7 +7,6 @@
 #define BOOST_DATAFLOW_SUPPORT_PRODUCER_HPP
 
 #include <boost/dataflow/detail/enable_if_defined.hpp>
-//#include <boost/dataflow/support/proxy.hpp>
 
 #include <boost/utility/enable_if.hpp>
 #include <boost/type_traits/integral_constant.hpp>
@@ -16,229 +15,43 @@
 
 namespace boost { namespace dataflow {
 
+// trait giving the producer category of a type.
 template<typename T, typename Enable=void>
-struct proxied_producer_of
+struct producer_category_of
 {
 };
 
 template<typename T>
-struct proxied_producer_of<T,
-typename detail::enable_if_defined<typename T::proxy_producer_for >::type >
+struct producer_category_of<T,
+ typename detail::enable_if_defined<typename T::producer_category>::type >
 {
- typedef typename T::proxy_producer_for type;
+ typedef typename T::producer_category type;
 };
 
-struct default_proxy_producer;
-struct mutable_proxy_producer;
-
 template<typename T, typename Enable=void>
-struct proxy_producer_category_of
-{
- typedef default_proxy_producer type;
-};
-
-template<typename T>
-struct proxy_producer_category_of<T,
-typename detail::enable_if_defined<typename T::proxy_producer_category >::type >
+struct produced_type_of
 {
- typedef typename T::proxy_producer_category type;
 };
 
-// trait determining whether a type is a producer proxy.
+// trait determining whether a type is a Producer.
 template<typename T, typename Enable=void>
-struct is_proxy_producer
+struct is_producer
     : public boost::false_type {};
 
 template<typename T>
-struct is_proxy_producer<T,
+struct is_producer<T,
         typename detail::enable_if_defined<
- detail::all_of<
- typename proxied_producer_of<T>::type,
- typename proxy_producer_category_of<T>::type
- >
+ typename producer_category_of<T>::type
>::type >
     : public boost::true_type {};
 
+// trait determining whether a type is a SingleTypeProducer.
 template<typename T, typename Enable=void>
-struct get_proxied_producer_type
-{
- typedef T type;
-};
-
-template<typename T>
-struct get_proxied_producer_type<T,
- typename boost::enable_if<is_proxy_producer<T> >::type>
-{
- typedef
- typename get_proxied_producer_type<
- typename proxied_producer_of<T>::type
- >::type type;
-};
-
-namespace extension
-{
- template<typename ProxyProducerTag>
- struct get_proxied_producer_impl
- {
- template<typename ProxyProducer>
- struct apply
- {
- static void call(const ProxyProducer &)
- {
- // Error: get_proxied_producer_impl has not been implemented
- // for ProxyProducerTag.
- BOOST_STATIC_ASSERT(sizeof(ProxyProducer)==0);
- }
- };
- };
-
- template<>
- struct get_proxied_producer_impl<default_proxy_producer>
- {
- template<typename ProxyProducer>
- struct result
- {
- typedef typename
- boost::dataflow::get_proxied_producer_type<ProxyProducer>::type & type;
- };
-
- template<typename ProxyProducer>
- struct result<const ProxyProducer>
- {
- typedef const typename
- boost::dataflow::get_proxied_producer_type<ProxyProducer>::type & type;
- };
-
- template<typename ProxyProducer>
- struct apply
- {
- static typename
- boost::dataflow::get_proxied_producer_type<ProxyProducer>::type &
- call(ProxyProducer &t)
- {
- return t.get_proxied_producer();
- }
- static
- const typename boost::dataflow::get_proxied_producer_type<ProxyProducer>::type &
- call(const ProxyProducer &t)
- {
- return t.get_proxied_producer();
- }
- };
- };
-
- template<>
- struct get_proxied_producer_impl<mutable_proxy_producer>
- {
- template<typename ProxyProducer>
- struct result
- {
- typedef typename
- boost::dataflow::get_proxied_producer_type<ProxyProducer>::type & type;
- };
-
- template<typename ProxyProducer>
- struct apply
- {
- static
- typename boost::dataflow::get_proxied_producer_type<ProxyProducer>::type &
- call(const ProxyProducer &t)
- {
- return t.get_proxied_producer();
- }
- };
- };
-
-}
-
-template<typename T>
-typename boost::disable_if<
- is_proxy_producer<T>,
- const T &
->::type
-get_proxied_producer(const T &t)
-{
- return t;
-}
-
-template<typename T>
-typename boost::disable_if<
- is_proxy_producer<T>,
- T &
->::type
-get_proxied_producer(T &t)
-{
- return t;
-}
-
-template<typename T>
-typename boost::lazy_enable_if<
- is_proxy_producer<T>,
- typename extension::get_proxied_producer_impl<
- typename proxy_producer_category_of<T>::type>::template result<T>
->::type
-get_proxied_producer(T &t)
-{
- return extension::get_proxied_producer_impl<
- typename proxy_producer_category_of<T>::type>::template apply<T>::call(t);
-}
-
-template<typename T>
-typename boost::lazy_enable_if<
- is_proxy_producer<T>,
- typename extension::get_proxied_producer_impl<
- typename proxy_producer_category_of<T>::type>::template result<const T>
->::type
-get_proxied_producer(const T &t)
-{
- return extension::get_proxied_producer_impl<
- typename proxy_producer_category_of<T>::type>::template apply<T>::call(t);
-}
-
-// 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 detail::enable_if_defined<typename T::producer_category >::type >
-{
- typedef typename T::producer_category type;
-};
-
-template<typename T>
-struct producer_category_of<T,
- typename boost::enable_if<is_proxy_producer<T> >::type>
-{
- typedef
- typename producer_category_of<
- typename get_proxied_producer_type<T>::type
- >::type type;
-};
-
-template<typename T, typename Enable=void>
-struct produced_type_of
-{
-};
-
-template<typename T>
-struct produced_type_of<T, typename boost::enable_if<is_proxy_producer<T> >::type>
-{
- typedef
- typename produced_type_of<
- typename get_proxied_producer_type<T>::type
- >::type type;
-};
-
-// trait determining whether a type is a producer.
-template<typename T, typename Enable=void>
-struct is_producer
+struct is_single_type_producer
     : public boost::false_type {};
 
 template<typename T>
-struct is_producer<T,
+struct is_single_type_producer<T,
         typename detail::enable_if_defined<detail::all_of<
             typename producer_category_of<T>::type,
             typename produced_type_of<T>::type

Added: sandbox/SOC/2007/signals/boost/dataflow/support/proxy_consumer.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2007/signals/boost/dataflow/support/proxy_consumer.hpp 2007-09-16 19:03:14 EDT (Sun, 16 Sep 2007)
@@ -0,0 +1,216 @@
+// 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_PROXY_CONSUMER_HPP
+#define BOOST_DATAFLOW_SUPPORT_PROXY_CONSUMER_HPP
+
+#include <boost/dataflow/detail/enable_if_defined.hpp>
+#include <boost/dataflow/support/consumer.hpp>
+
+#include <boost/type_traits/integral_constant.hpp>
+
+namespace boost { namespace dataflow {
+
+template<typename T, typename Enable=void>
+struct proxied_consumer_of
+{
+};
+
+template<typename T>
+struct proxied_consumer_of<T,
+typename detail::enable_if_defined<typename T::proxy_consumer_for >::type >
+{
+ typedef typename T::proxy_consumer_for type;
+};
+
+struct default_proxy_consumer;
+struct mutable_proxy_consumer;
+
+template<typename T, typename Enable=void>
+struct proxy_consumer_category_of
+{
+ typedef default_proxy_consumer type;
+};
+
+template<typename T>
+struct proxy_consumer_category_of<T,
+typename detail::enable_if_defined<typename T::proxy_consumer_category >::type >
+{
+ typedef typename T::proxy_consumer_category type;
+};
+
+// trait determining whether a type is a consumer proxy.
+template<typename T, typename Enable=void>
+struct is_proxy_consumer
+ : public boost::false_type {};
+
+template<typename T>
+struct is_proxy_consumer<T,
+ typename detail::enable_if_defined<
+ detail::all_of<
+ typename proxied_consumer_of<T>::type,
+ typename proxy_consumer_category_of<T>::type
+ >
+ >::type >
+ : public boost::true_type {};
+
+template<typename T, typename Enable=void>
+struct get_proxied_consumer_type
+{
+ typedef T type;
+};
+
+template<typename T>
+struct get_proxied_consumer_type<T,
+ typename boost::enable_if<is_proxy_consumer<T> >::type>
+{
+ typedef
+ typename get_proxied_consumer_type<
+ typename proxied_consumer_of<T>::type
+ >::type type;
+};
+
+namespace extension
+{
+ template<typename ProxyProducerTag>
+ struct get_proxied_consumer_impl
+ {
+ template<typename ProxyProducer>
+ struct apply
+ {
+ static void call(const ProxyProducer &)
+ {
+ // Error: get_proxied_consumer_impl has not been implemented
+ // for ProxyProducerTag.
+ BOOST_STATIC_ASSERT(sizeof(ProxyProducer)==0);
+ }
+ };
+ };
+
+ template<>
+ struct get_proxied_consumer_impl<default_proxy_consumer>
+ {
+ template<typename ProxyProducer>
+ struct result
+ {
+ typedef typename
+ boost::dataflow::get_proxied_consumer_type<ProxyProducer>::type & type;
+ };
+
+ template<typename ProxyProducer>
+ struct result<const ProxyProducer>
+ {
+ typedef const typename
+ boost::dataflow::get_proxied_consumer_type<ProxyProducer>::type & type;
+ };
+
+ template<typename ProxyProducer>
+ struct apply
+ {
+ static typename
+ boost::dataflow::get_proxied_consumer_type<ProxyProducer>::type &
+ call(ProxyProducer &t)
+ {
+ return t.get_proxied_consumer();
+ }
+ static
+ const typename boost::dataflow::get_proxied_consumer_type<ProxyProducer>::type &
+ call(const ProxyProducer &t)
+ {
+ return t.get_proxied_consumer();
+ }
+ };
+ };
+
+ template<>
+ struct get_proxied_consumer_impl<mutable_proxy_consumer>
+ {
+ template<typename ProxyProducer>
+ struct result
+ {
+ typedef typename
+ boost::dataflow::get_proxied_consumer_type<ProxyProducer>::type & type;
+ };
+
+ template<typename ProxyProducer>
+ struct apply
+ {
+ static
+ typename boost::dataflow::get_proxied_consumer_type<ProxyProducer>::type &
+ call(const ProxyProducer &t)
+ {
+ return t.get_proxied_consumer();
+ }
+ };
+ };
+
+}
+
+template<typename T>
+typename boost::disable_if<
+ is_proxy_consumer<T>,
+ const T &
+>::type
+get_proxied_consumer(const T &t)
+{
+ return t;
+}
+
+template<typename T>
+typename boost::disable_if<
+ is_proxy_consumer<T>,
+ T &
+>::type
+get_proxied_consumer(T &t)
+{
+ return t;
+}
+
+template<typename T>
+typename boost::lazy_enable_if<
+ is_proxy_consumer<T>,
+ typename extension::get_proxied_consumer_impl<
+ typename proxy_consumer_category_of<T>::type>::template result<T>
+>::type
+get_proxied_consumer(T &t)
+{
+ return extension::get_proxied_consumer_impl<
+ typename proxy_consumer_category_of<T>::type>::template apply<T>::call(t);
+}
+
+template<typename T>
+typename boost::lazy_enable_if<
+ is_proxy_consumer<T>,
+ typename extension::get_proxied_consumer_impl<
+ typename proxy_consumer_category_of<T>::type>::template result<const T>
+>::type
+get_proxied_consumer(const T &t)
+{
+ return extension::get_proxied_consumer_impl<
+ typename proxy_consumer_category_of<T>::type>::template apply<T>::call(t);
+}
+
+template<typename T>
+struct consumer_category_of<T,
+ typename boost::enable_if<is_proxy_consumer<T> >::type>
+{
+ typedef
+ typename consumer_category_of<
+ typename get_proxied_consumer_type<T>::type
+ >::type type;
+};
+
+template<typename T>
+struct produced_type_of<T, typename boost::enable_if<is_proxy_consumer<T> >::type>
+{
+ typedef
+ typename produced_type_of<
+ typename get_proxied_consumer_type<T>::type
+ >::type type;
+};
+
+} } // namespace boost::dataflow
+
+#endif // BOOST_DATAFLOW_SUPPORT_CONSUMER_HPP

Added: sandbox/SOC/2007/signals/boost/dataflow/support/proxy_producer.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2007/signals/boost/dataflow/support/proxy_producer.hpp 2007-09-16 19:03:14 EDT (Sun, 16 Sep 2007)
@@ -0,0 +1,219 @@
+// 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_PROXY_PRODUCER_HPP
+#define BOOST_DATAFLOW_SUPPORT_PROXY_PRODUCER_HPP
+
+#include <boost/dataflow/support/producer.hpp>
+
+#include <boost/utility/enable_if.hpp>
+#include <boost/type_traits/integral_constant.hpp>
+#include <boost/static_assert.hpp>
+
+
+namespace boost { namespace dataflow {
+
+
+template<typename T, typename Enable=void>
+struct proxied_producer_of
+{
+};
+
+template<typename T>
+struct proxied_producer_of<T,
+typename detail::enable_if_defined<typename T::proxy_producer_for >::type >
+{
+ typedef typename T::proxy_producer_for type;
+};
+
+struct default_proxy_producer;
+struct mutable_proxy_producer;
+
+template<typename T, typename Enable=void>
+struct proxy_producer_category_of
+{
+ typedef default_proxy_producer type;
+};
+
+template<typename T>
+struct proxy_producer_category_of<T,
+typename detail::enable_if_defined<typename T::proxy_producer_category >::type >
+{
+ typedef typename T::proxy_producer_category type;
+};
+
+// trait determining whether a type is a producer proxy.
+template<typename T, typename Enable=void>
+struct is_proxy_producer
+ : public boost::false_type {};
+
+template<typename T>
+struct is_proxy_producer<T,
+ typename detail::enable_if_defined<
+ detail::all_of<
+ typename proxied_producer_of<T>::type,
+ typename proxy_producer_category_of<T>::type
+ >
+ >::type >
+ : public boost::true_type {};
+
+template<typename T, typename Enable=void>
+struct get_proxied_producer_type
+{
+ typedef T type;
+};
+
+template<typename T>
+struct get_proxied_producer_type<T,
+ typename boost::enable_if<is_proxy_producer<T> >::type>
+{
+ typedef
+ typename get_proxied_producer_type<
+ typename proxied_producer_of<T>::type
+ >::type type;
+};
+
+namespace extension
+{
+ template<typename ProxyProducerTag>
+ struct get_proxied_producer_impl
+ {
+ template<typename ProxyProducer>
+ struct apply
+ {
+ static void call(const ProxyProducer &)
+ {
+ // Error: get_proxied_producer_impl has not been implemented
+ // for ProxyProducerTag.
+ BOOST_STATIC_ASSERT(sizeof(ProxyProducer)==0);
+ }
+ };
+ };
+
+ template<>
+ struct get_proxied_producer_impl<default_proxy_producer>
+ {
+ template<typename ProxyProducer>
+ struct result
+ {
+ typedef typename
+ boost::dataflow::get_proxied_producer_type<ProxyProducer>::type & type;
+ };
+
+ template<typename ProxyProducer>
+ struct result<const ProxyProducer>
+ {
+ typedef const typename
+ boost::dataflow::get_proxied_producer_type<ProxyProducer>::type & type;
+ };
+
+ template<typename ProxyProducer>
+ struct apply
+ {
+ static typename
+ boost::dataflow::get_proxied_producer_type<ProxyProducer>::type &
+ call(ProxyProducer &t)
+ {
+ return t.get_proxied_producer();
+ }
+ static
+ const typename boost::dataflow::get_proxied_producer_type<ProxyProducer>::type &
+ call(const ProxyProducer &t)
+ {
+ return t.get_proxied_producer();
+ }
+ };
+ };
+
+ template<>
+ struct get_proxied_producer_impl<mutable_proxy_producer>
+ {
+ template<typename ProxyProducer>
+ struct result
+ {
+ typedef typename
+ boost::dataflow::get_proxied_producer_type<ProxyProducer>::type & type;
+ };
+
+ template<typename ProxyProducer>
+ struct apply
+ {
+ static
+ typename boost::dataflow::get_proxied_producer_type<ProxyProducer>::type &
+ call(const ProxyProducer &t)
+ {
+ return t.get_proxied_producer();
+ }
+ };
+ };
+
+}
+
+template<typename T>
+typename boost::disable_if<
+ is_proxy_producer<T>,
+ const T &
+>::type
+get_proxied_producer(const T &t)
+{
+ return t;
+}
+
+template<typename T>
+typename boost::disable_if<
+ is_proxy_producer<T>,
+ T &
+>::type
+get_proxied_producer(T &t)
+{
+ return t;
+}
+
+template<typename T>
+typename boost::lazy_enable_if<
+ is_proxy_producer<T>,
+ typename extension::get_proxied_producer_impl<
+ typename proxy_producer_category_of<T>::type>::template result<T>
+>::type
+get_proxied_producer(T &t)
+{
+ return extension::get_proxied_producer_impl<
+ typename proxy_producer_category_of<T>::type>::template apply<T>::call(t);
+}
+
+template<typename T>
+typename boost::lazy_enable_if<
+ is_proxy_producer<T>,
+ typename extension::get_proxied_producer_impl<
+ typename proxy_producer_category_of<T>::type>::template result<const T>
+>::type
+get_proxied_producer(const T &t)
+{
+ return extension::get_proxied_producer_impl<
+ typename proxy_producer_category_of<T>::type>::template apply<T>::call(t);
+}
+
+template<typename T>
+struct producer_category_of<T,
+ typename boost::enable_if<is_proxy_producer<T> >::type>
+{
+ typedef
+ typename producer_category_of<
+ typename get_proxied_producer_type<T>::type
+ >::type type;
+};
+
+template<typename T>
+struct produced_type_of<T, typename boost::enable_if<is_proxy_producer<T> >::type>
+{
+ typedef
+ typename produced_type_of<
+ typename get_proxied_producer_type<T>::type
+ >::type type;
+};
+
+} } // namespace boost::dataflow
+
+#endif // BOOST_DATAFLOW_SUPPORT_PROXY_PRODUCER_HPP

Modified: sandbox/SOC/2007/signals/libs/dataflow/build/xcodeide/signal_network.xcodeproj/project.pbxproj
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/build/xcodeide/signal_network.xcodeproj/project.pbxproj (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/build/xcodeide/signal_network.xcodeproj/project.pbxproj 2007-09-16 19:03:14 EDT (Sun, 16 Sep 2007)
@@ -76,6 +76,10 @@
 /* End PBXAggregateTarget section */
 
 /* Begin PBXFileReference section */
+ 0800AC300C8CA99700994538 /* Jamfile.v2 */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Jamfile.v2; sourceTree = "<group>"; };
+ 0800AC390C8CAAC300994538 /* boost-build.jam */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.jam; name = "boost-build.jam"; path = "../../../../boost-build.jam"; sourceTree = SOURCE_ROOT; };
+ 0800AC3A0C8CAAC300994538 /* Jamfile.v2 */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = Jamfile.v2; path = ../../../../Jamfile.v2; sourceTree = SOURCE_ROOT; };
+ 0800AC3B0C8CAAC300994538 /* project-root.jam */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.jam; name = "project-root.jam"; path = "../../../../project-root.jam"; sourceTree = SOURCE_ROOT; };
                 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>"; };
@@ -86,6 +90,8 @@
                 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>"; };
+ 089A9A090C931A1800C6C5F1 /* proxy_consumer.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = proxy_consumer.hpp; sourceTree = "<group>"; };
+ 089A9A150C931BDD00C6C5F1 /* producer_map.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = producer_map.hpp; 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>"; };
@@ -96,6 +102,7 @@
                 08C6759D0C13A03E00D85379 /* test_socket.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = test_socket.cpp; sourceTree = "<group>"; };
                 08C6759E0C13A03E00D85379 /* test_storage.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = test_storage.cpp; sourceTree = "<group>"; };
                 08C8F14F0C3B269B00B3CE45 /* test_bind_object.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = test_bind_object.cpp; sourceTree = "<group>"; };
+ 08DC14FC0C951C4800B96B2E /* Cone.cxx */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Cone.cxx; sourceTree = "<group>"; };
                 08EBB2CB0C210CC9004BE220 /* test_pull.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = test_pull.cpp; sourceTree = "<group>"; };
                 08EBB3020C21105B004BE220 /* test_disconnect.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = test_disconnect.cpp; sourceTree = "<group>"; };
                 08EBB3910C211C36004BE220 /* test_multi_type.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = test_multi_type.cpp; sourceTree = "<group>"; };
@@ -144,6 +151,7 @@
                 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>"; };
                 08F082840C1DE02F00687E1B /* test_branching.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = test_branching.cpp; sourceTree = "<group>"; };
+ 08F20FB60C95AD97005D01D4 /* filter.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = filter.hpp; sourceTree = "<group>"; };
                 08F22ECE0C4BF6130027D364 /* make_ref.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = make_ref.hpp; sourceTree = "<group>"; };
                 08F22ED60C4BF78B0027D364 /* sequence_environment.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = sequence_environment.hpp; sourceTree = "<group>"; };
                 08F22F1C0C4C1CE50027D364 /* iterator_relative.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = iterator_relative.hpp; sourceTree = "<group>"; };
@@ -154,6 +162,8 @@
                 08F348510C492B4B0096097F /* group.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = group.hpp; sourceTree = "<group>"; };
                 08F36DFB0C41375B00E2F9A1 /* dataflow_table.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = dataflow_table.xml; sourceTree = "<group>"; };
                 08F37EDF0C57A4A700AC7FB8 /* static_function_call.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = static_function_call.hpp; sourceTree = "<group>"; };
+ 08F4533A0C92259D00877528 /* proxy_producer.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = proxy_producer.hpp; sourceTree = "<group>"; };
+ 08F496DA0C9A15EC00C37AC0 /* support.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = support.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>"; };
@@ -175,9 +185,29 @@
 /* End PBXFileReference section */
 
 /* Begin PBXGroup section */
+ 0800AC2E0C8CA86400994538 /* VTK */ = {
+ isa = PBXGroup;
+ children = (
+ 08F496DA0C9A15EC00C37AC0 /* support.hpp */,
+ );
+ path = VTK;
+ sourceTree = "<group>";
+ };
+ 0800AC2F0C8CA99700994538 /* VTK */ = {
+ isa = PBXGroup;
+ children = (
+ 08DC14FC0C951C4800B96B2E /* Cone.cxx */,
+ 0800AC300C8CA99700994538 /* Jamfile.v2 */,
+ );
+ path = VTK;
+ sourceTree = "<group>";
+ };
                 080DD7560C13908400EEB53D = {
                         isa = PBXGroup;
                         children = (
+ 0800AC390C8CAAC300994538 /* boost-build.jam */,
+ 0800AC3A0C8CAAC300994538 /* Jamfile.v2 */,
+ 0800AC3B0C8CAAC300994538 /* project-root.jam */,
                                 08FC25BA0C45B60E00F59CDD /* dataflow */,
                                 08FD5DE40C1BA60700F00877 /* doc */,
                                 08668C4D0C19A16300ACB19A /* example */,
@@ -196,6 +226,7 @@
                 08668C4D0C19A16300ACB19A /* example */ = {
                         isa = PBXGroup;
                         children = (
+ 0800AC2F0C8CA99700994538 /* VTK */,
                                 08668C4E0C19A16300ACB19A /* example.cpp */,
                                 08668C4F0C19A16300ACB19A /* Jamfile.v2 */,
                                 08EFED440C1CD55100097C80 /* timing_example.cpp */,
@@ -328,6 +359,9 @@
                                 082761BC0C6037940030E557 /* consumer.hpp */,
                                 082761BD0C60379F0030E557 /* connectable.hpp */,
                                 082761BE0C6037A90030E557 /* invocable.hpp */,
+ 08F4533A0C92259D00877528 /* proxy_producer.hpp */,
+ 089A9A090C931A1800C6C5F1 /* proxy_consumer.hpp */,
+ 08F20FB60C95AD97005D01D4 /* filter.hpp */,
                         );
                         path = support;
                         sourceTree = "<group>";
@@ -348,6 +382,7 @@
                                 08F022C20C47556200C0ED27 /* group.hpp */,
                                 08F022C70C47565600C0ED27 /* operators.hpp */,
                                 08F076F80C63C78C003D448D /* consumer_map.hpp */,
+ 089A9A150C931BDD00C6C5F1 /* producer_map.hpp */,
                         );
                         path = connection;
                         sourceTree = "<group>";
@@ -390,6 +425,7 @@
                 08FC25BA0C45B60E00F59CDD /* dataflow */ = {
                         isa = PBXGroup;
                         children = (
+ 0800AC2E0C8CA86400994538 /* VTK */,
                                 08EF9B200C5D506A00D4D206 /* signal */,
                                 08F022C10C47556200C0ED27 /* connection */,
                                 08F0216A0C473AE000C0ED27 /* detail */,

Modified: sandbox/SOC/2007/signals/libs/dataflow/doc/Jamfile.v2
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/doc/Jamfile.v2 (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/doc/Jamfile.v2 2007-09-16 19:03:14 EDT (Sun, 16 Sep 2007)
@@ -16,6 +16,7 @@
 doxygen dataflow_doxygen
    :
       [ glob ../../../boost/dataflow/support.hpp ]
+ [ glob ../../../boost/dataflow/support/*.hpp ]
       [ glob ../../../boost/dataflow/signal/*.hpp ]
       [ glob ../../../boost/dataflow/signal/connection/*.hpp ]
       [ glob ../../../boost/dataflow/signal/component/*.hpp ]

Modified: sandbox/SOC/2007/signals/libs/dataflow/example/Jamfile.v2
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/example/Jamfile.v2 (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/example/Jamfile.v2 2007-09-16 19:03:14 EDT (Sun, 16 Sep 2007)
@@ -3,8 +3,9 @@
 # accompanying file LICENSE_1_0.txt or copy at
 # http://www.boost.org/LICENSE_1_0.txt)
 
+build-project VTK ;
 
-project
+project dataflow/test
     : requirements
       <include>../../..
       <library>/boost/signals//boost_signals/<link>static
@@ -13,7 +14,7 @@
 
 exe example : example.cpp ;
 # exe timing_example : timing_example.cpp ;
-exe edit_distance : edit_distance.cpp ;
-exe fibonacci : fibonacci.cpp ;
-exe simple_example : simple_example.cpp /boost/thread//boost_thread/<link>static ;
+#exe edit_distance : edit_distance.cpp ;
+#exe fibonacci : fibonacci.cpp ;
+#exe simple_example : simple_example.cpp /boost/thread//boost_thread/<link>static ;
 

Added: sandbox/SOC/2007/signals/libs/dataflow/example/VTK/Cone.cxx
==============================================================================
--- (empty file)
+++ sandbox/SOC/2007/signals/libs/dataflow/example/VTK/Cone.cxx 2007-09-16 19:03:14 EDT (Sun, 16 Sep 2007)
@@ -0,0 +1,120 @@
+/*=========================================================================
+
+ Program: Visualization Toolkit
+ Module: $RCSfile: Cone.cxx,v $
+
+ Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
+ All rights reserved.
+ See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE. See the above copyright notice for more information.
+
+=========================================================================*/
+//
+// This example creates a polygonal model of a cone, and then renders it to
+// the screen. It will rotate the cone 360 degrees and then exit. The basic
+// setup of source -> mapper -> actor -> renderer -> renderwindow is
+// typical of most VTK programs.
+//
+
+// First include the required header files for the VTK classes we are using.
+
+#include <boost/dataflow/vtk/support.hpp>
+
+#include "vtkConeSource.h"
+#include "vtkPolyDataMapper.h"
+#include "vtkRenderWindow.h"
+#include "vtkCamera.h"
+#include "vtkActor.h"
+#include "vtkRenderer.h"
+
+
+int main()
+{
+ using boost::dataflow::connect;
+ using namespace boost::dataflow::operators;
+
+ //
+ // Next we create an instance of vtkConeSource and set some of its
+ // properties. The instance of vtkConeSource "cone" is part of a
+ // visualization pipeline (it is a source process object); it produces data
+ // (output type is vtkPolyData) which other filters may process.
+ //
+ vtkConeSource *cone = vtkConeSource::New();
+ cone->SetHeight( 3.0 );
+ cone->SetRadius( 1.0 );
+ cone->SetResolution( 10 );
+
+ //
+ // In this example we terminate the pipeline with a mapper process object.
+ // (Intermediate filters such as vtkShrinkPolyData could be inserted in
+ // between the source and the mapper.) We create an instance of
+ // vtkPolyDataMapper to map the polygonal data into graphics primitives. We
+ // connect the output of the cone souece to the input of this mapper.
+ //
+ vtkPolyDataMapper *coneMapper = vtkPolyDataMapper::New();
+ //coneMapper->SetInputConnection( cone->GetOutputPort() );
+ //connect(*cone, *coneMapper);
+
+ //
+ // Create an actor to represent the cone. The actor orchestrates rendering
+ // of the mapper's graphics primitives. An actor also refers to properties
+ // via a vtkProperty instance, and includes an internal transformation
+ // matrix. We set this actor's mapper to be coneMapper which we created
+ // above.
+ //
+ vtkActor *coneActor = vtkActor::New();
+ //coneActor->SetMapper( coneMapper );
+ //connect (*coneMapper, *coneActor);
+
+ //
+ // Create the Renderer and assign actors to it. A renderer is like a
+ // viewport. It is part or all of a window on the screen and it is
+ // responsible for drawing the actors it has. We also set the background
+ // color here.
+ //
+ vtkRenderer *ren1= vtkRenderer::New();
+ //connect (*coneActor, *ren1);
+// ren1->AddActor( coneActor );
+ ren1->SetBackground( 0.1, 0.2, 0.4 );
+
+ //
+ // Finally we create the render window which will show up on the screen.
+ // We put our renderer into the render window using AddRenderer. We also
+ // set the size to be 300 pixels by 300.
+ //
+ vtkRenderWindow *renWin = vtkRenderWindow::New();
+// renWin->AddRenderer( ren1 );
+ //connect (*ren1, *renWin);
+ renWin->SetSize( 300, 300 );
+
+ *cone >>= *coneMapper >>= *coneActor >>= *ren1 >>= *renWin;
+
+ //
+ // Now we loop over 360 degreeees and render the cone each time.
+ //
+ int i;
+ for (i = 0; i < 360; ++i)
+ {
+ // render the image
+ renWin->Render();
+ // rotate the active camera by one degree
+ ren1->GetActiveCamera()->Azimuth( 1 );
+ }
+
+ //
+ // Free up any objects we created. All instances in VTK are deleted by
+ // using the Delete() method.
+ //
+ cone->Delete();
+ coneMapper->Delete();
+ coneActor->Delete();
+ ren1->Delete();
+ renWin->Delete();
+
+ return 0;
+}
+
+

Added: sandbox/SOC/2007/signals/libs/dataflow/example/VTK/Jamfile.v2
==============================================================================
--- (empty file)
+++ sandbox/SOC/2007/signals/libs/dataflow/example/VTK/Jamfile.v2 2007-09-16 19:03:14 EDT (Sun, 16 Sep 2007)
@@ -0,0 +1,34 @@
+# 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)
+
+lib vtkRendering : : <name>vtkRendering ;
+lib vtkCommon : : <name>vtkCommon ;
+lib vtkFiltering : : <name>vtkFiltering ;
+lib vtkGraphics : : <name>vtkGraphics ;
+lib vtkHybrid : : <name>vtkHybrid ;
+lib vtkIO : : <name>vtkIO ;
+lib vtkImaging : : <name>vtkImaging ;
+lib vtkGenericFiltering : : <name>vtkGenericFiltering ;
+lib vtkVolumeRendering : : <name>vtkVolumeRendering ;
+lib vtkWidgets : : <name>vtkWidgets ;
+lib vtkftgl : : <name>vtkftgl ;
+
+lib GL : : <name>GL <search>/usr/X11R6/lib ;
+lib GLU : : <name>GLU <search>/usr/X11R6/lib ;
+lib OSMesa : : <name>OSMesa <search>/usr/X11R6/lib ;
+lib X11 : : <name>X11 <search>/usr/X11R6/lib ;
+lib Xt : : <name>Xt <search>/usr/X11R6/lib ;
+
+project dataflow/test/VTK
+ : requirements
+ <include>../../../..
+ <include>/usr/local/include/vtk-5.0/
+ <define>BOOST_ALL_NO_LIB=1
+ <toolset>darwin:<linkflags>"-framework CoreServices"
+
+ ;
+
+exe Cone : Cone.cxx X11 Xt vtkCommon vtkRendering vtkFiltering vtkGraphics GL ;
+

Modified: sandbox/SOC/2007/signals/libs/dataflow/test/test_disconnect.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/test/test_disconnect.cpp (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/test/test_disconnect.cpp 2007-09-16 19:03:14 EDT (Sun, 16 Sep 2007)
@@ -37,7 +37,7 @@
         // unfortunatelly, this call hangs on MSVC!
         // banger();
 #endif
- BOOST_CHECK_EQUAL(banger.default_signal().num_slots(), 0u);
+ BOOST_CHECK_EQUAL(banger.get_proxied_producer().num_slots(), 0u);
         
         signals::counter<void (), signals::unfused> counter;
         


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