Boost logo

Boost-Commit :

From: stipe_at_[hidden]
Date: 2007-10-23 20:14:15


Author: srajko
Date: 2007-10-23 20:14:11 EDT (Tue, 23 Oct 2007)
New Revision: 40384
URL: http://svn.boost.org/trac/boost/changeset/40384

Log:
make VTK and Signals with Port-based concepts
Added:
   sandbox/SOC/2007/signals/boost/dataflow/support/component.hpp (contents, props changed)
   sandbox/SOC/2007/signals/boost/dataflow/support/component_operation.hpp (contents, props changed)
   sandbox/SOC/2007/signals/boost/dataflow/templates/binary_operation.hpp
      - copied, changed from r39908, /sandbox/SOC/2007/signals/boost/dataflow/templates/connect.hpp
   sandbox/SOC/2007/signals/boost/dataflow/utility/underlying_type.hpp (contents, props changed)
   sandbox/SOC/2007/signals/libs/dataflow/doc/port_concepts.qbk
      - copied, changed from r39908, /sandbox/SOC/2007/signals/libs/dataflow/doc/producer_concepts.qbk
   sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_result_of_defined.cpp
      - copied unchanged from r39907, /sandbox/SOC/2007/signals/libs/dataflow/test/test_result_of_defined.cpp
   sandbox/SOC/2007/signals/libs/dataflow/test/test_component.cpp (contents, props changed)
Removed:
   sandbox/SOC/2007/signals/boost/dataflow/templates/connect.hpp
   sandbox/SOC/2007/signals/libs/dataflow/doc/consumer_concepts.qbk
   sandbox/SOC/2007/signals/libs/dataflow/doc/producer_concepts.qbk
   sandbox/SOC/2007/signals/libs/dataflow/test/test_result_of_defined.cpp
Text files modified:
   sandbox/SOC/2007/signals/boost/dataflow/connection/port_map.hpp | 53 +++---
   sandbox/SOC/2007/signals/boost/dataflow/signal/component/chain.hpp | 2
   sandbox/SOC/2007/signals/boost/dataflow/signal/component/detail/unfused_inherited.hpp | 2
   sandbox/SOC/2007/signals/boost/dataflow/signal/component/filter_base.hpp | 28 +--
   sandbox/SOC/2007/signals/boost/dataflow/signal/component/socket_sender.hpp | 2
   sandbox/SOC/2007/signals/boost/dataflow/signal/component/storage.hpp | 27 +--
   sandbox/SOC/2007/signals/boost/dataflow/signal/connection/operators.hpp | 102 +++++++++-----
   sandbox/SOC/2007/signals/boost/dataflow/signal/connection/slot_selector.hpp | 78 +++--------
   sandbox/SOC/2007/signals/boost/dataflow/signal/support.hpp | 174 ++++++------------------
   sandbox/SOC/2007/signals/boost/dataflow/support.hpp | 14 -
   sandbox/SOC/2007/signals/boost/dataflow/support/keyed_port.hpp | 6
   sandbox/SOC/2007/signals/boost/dataflow/support/port.hpp | 18 +-
   sandbox/SOC/2007/signals/boost/dataflow/support/proxy_port.hpp | 37 ++---
   sandbox/SOC/2007/signals/boost/dataflow/templates/binary_operation.hpp | 25 ++
   sandbox/SOC/2007/signals/libs/dataflow/build/xcodeide/signal_network.xcodeproj/project.pbxproj | 20 +-
   sandbox/SOC/2007/signals/libs/dataflow/doc/Jamfile.v2 | 49 +++---
   sandbox/SOC/2007/signals/libs/dataflow/doc/components.qbk | 10
   sandbox/SOC/2007/signals/libs/dataflow/doc/concepts.qbk | 222 +++++++++++++------------------
   sandbox/SOC/2007/signals/libs/dataflow/doc/dataflow.qbk | 43 ++++--
   sandbox/SOC/2007/signals/libs/dataflow/doc/future.qbk | 2
   sandbox/SOC/2007/signals/libs/dataflow/doc/introduction.qbk | 48 +++---
   sandbox/SOC/2007/signals/libs/dataflow/doc/phoenix/concepts.qbk | 6
   sandbox/SOC/2007/signals/libs/dataflow/doc/port_concepts.qbk | 226 ++++++++++++++++----------------
   sandbox/SOC/2007/signals/libs/dataflow/doc/signals/concepts.qbk | 8
   sandbox/SOC/2007/signals/libs/dataflow/example/VTK/Cone.cxx | 3
   sandbox/SOC/2007/signals/libs/dataflow/example/VTK/Jamfile.v2 | 2
   sandbox/SOC/2007/signals/libs/dataflow/example/VTK/support.hpp | 278 +++++++++++++++++++++------------------
   sandbox/SOC/2007/signals/libs/dataflow/test/Jamfile.v2 | 6
   sandbox/SOC/2007/signals/libs/dataflow/test/my_producer_consumer.hpp | 4
   sandbox/SOC/2007/signals/libs/dataflow/test/signals/Jamfile.v2 | 1
   sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_connect.cpp | 7
   sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_disconnect.cpp | 8
   sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_multi_args.cpp | 4
   sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_multi_type.cpp | 4
   sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_same_type.cpp | 4
   sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_storage.cpp | 9
   sandbox/SOC/2007/signals/libs/dataflow/test/test_keyed_port.cpp | 32 ++++
   sandbox/SOC/2007/signals/libs/dataflow/test/test_proxy_port.cpp | 52 +++++++
   38 files changed, 803 insertions(+), 813 deletions(-)

Modified: sandbox/SOC/2007/signals/boost/dataflow/connection/port_map.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/connection/port_map.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/connection/port_map.hpp 2007-10-23 20:14:11 EDT (Tue, 23 Oct 2007)
@@ -24,46 +24,47 @@
 
 template<typename Mechanism, typename PortCategory, typename T>
 class port_map
- : public port<fusion_map_port<Mechanism, PortCategory> >
 {
-public:
- typedef Mechanism mechanism_type;
- typedef PortCategory port_category_type;
- typedef T map_type;
-
- port_map(const T& t) : t(t) {}
- const map_type &map() const {return t;}
-
-private:
- map_type t;
-
-public:
-
-/* template<typename PT>
- struct dataflow<Mechanism, PT, typename enable_if<is_same<PT, typename PortCategory::complement> >::type >
+ struct get_proxied_object
     {
+ typename port_map::proxy_port_for & operator()(const port_map &map)
+ {
+ return boost::fusion::front(map.t).second;
+ }
+ };
 // typedef typename boost::fusion::result_of::value_at_c<T, 0>::type::second_type
 // proxy_consumer_for;
- typedef
+ typedef
+ typename boost::remove_reference<
             typename boost::remove_const<
                 typename boost::remove_reference<
                     typename boost::fusion::result_of::front<T>::type
>::type
- >::type::second_type proxy_consumer_for;
+ >::type::second_type
+ >::type proxy_port_for;
+public:
+ typedef Mechanism mechanism_type;
+ typedef PortCategory port_category_type;
+ typedef T map_type;
+
+ port_map(const T& t) : t(t) {}
+ map_type &map() const {return t;}
+
+ typedef fusion_map_port<Mechanism, PortCategory> port_traits;
+ typedef mutable_proxy_port<
+ Mechanism,
+ typename PortCategory::complement,
+ proxy_port_for,
+ get_proxied_object> proxy_port_traits;
 
- typedef mutable_proxy_port<Mechanism, typename PortCategory::complement, proxy_consumer_for> proxy_port_traits;
- static typename get_port_result_type<Mechanism, typename PortCategory::complement, proxy_consumer_for>::type
- get_proxied_port(const port_map &map)
- {
- return get_port<typename PortCategory::complement>(boost::fusion::front(map.t).second);
- }
- };*/
+private:
+ mutable map_type t;
 };
 
 namespace extension
 {
     template<typename Mechanism, typename PortCategory, typename KeyTag>
- struct get_keyed_port_impl<Mechanism, fusion_map_port<Mechanism, PortCategory>, KeyTag>
+ struct get_keyed_port_impl<fusion_map_port<Mechanism, PortCategory>, KeyTag>
     {
         template<typename KeyedPort, typename Key>
         struct apply

Modified: sandbox/SOC/2007/signals/boost/dataflow/signal/component/chain.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/signal/component/chain.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/signal/component/chain.hpp 2007-10-23 20:14:11 EDT (Tue, 23 Oct 2007)
@@ -55,7 +55,7 @@
         }
         typename T::signal_type &get_proxied_producer() const
         {
- return boost::dataflow::get_proxied_producer<boost::dataflow::signals_mechanism>(components[size-1]);
+ return boost::dataflow::get_port<dataflow::signals::mechanism, dataflow::ports::producer>(components[size-1]);
         }
     private:
         void initialize(size_t copies, T *component=NULL)

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-10-23 20:14:11 EDT (Tue, 23 Oct 2007)
@@ -138,7 +138,7 @@
 
 #if !BOOST_WORKAROUND(BOOST_MSVC, < 1400)
         inline typename boost::result_of<Function(const arg_vector_t &)>::type
- operator()()
+ operator()()
         {
             arg_vector_t arg;
             return Function::operator()(arg);

Modified: sandbox/SOC/2007/signals/boost/dataflow/signal/component/filter_base.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/signal/component/filter_base.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/signal/component/filter_base.hpp 2007-10-23 20:14:11 EDT (Tue, 23 Oct 2007)
@@ -27,25 +27,21 @@
 #endif
 {
 public:
- template<typename Mechanism, typename Enable=void>
- struct dataflow;
-
- template<typename Mechanism>
- struct dataflow<
- Mechanism,
- typename enable_if<
- is_same<Mechanism, boost::dataflow::signals_mechanism>
- >::type>
+ struct get_proxied_object
     {
- typedef boost::dataflow::signal_consumer consumer_category;
- typedef boost::dataflow::mutable_proxy_producer<Signal> proxy_producer_category;
-
         template<typename T>
- static typename boost::dataflow::get_proxied_producer_result_type<boost::dataflow::signals_mechanism, Signal>
- ::type get_proxied_producer(T &t)
- { return t.get_proxied_producer(); }
-
+ Signal &operator()(T &t)
+ {
+ return t.get_proxied_producer();
+ }
     };
+ typedef boost::dataflow::signals::keyed_consumer port_traits;
+ typedef boost::dataflow::mutable_proxy_port<
+ boost::dataflow::signals::mechanism,
+ boost::dataflow::ports::producer,
+ Signal,
+ get_proxied_object
+ > proxy_port_traits;
 };
 
 } }

Modified: sandbox/SOC/2007/signals/boost/dataflow/signal/component/socket_sender.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/signal/component/socket_sender.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/signal/component/socket_sender.hpp 2007-10-23 20:14:11 EDT (Tue, 23 Oct 2007)
@@ -56,7 +56,7 @@
 template<typename Signature>
 class socket_sender : public boost::fusion::unfused_inherited<
     detail::socket_sender_impl<Signature>, typename boost::function_types::parameter_types<Signature>::type >,
- public boost::dataflow::consumer<boost::dataflow::signals_mechanism, boost::dataflow::signal_consumer>
+ public boost::dataflow::port<boost::dataflow::signals::keyed_consumer>
 {
     typedef boost::fusion::unfused_inherited<
         detail::socket_sender_impl<Signature>,

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-10-23 20:14:11 EDT (Tue, 23 Oct 2007)
@@ -9,7 +9,7 @@
 #include <boost/dataflow/signal/component/conditional_modifier.hpp>
 #include <boost/dataflow/signal/component/detail/storable.hpp>
 #include <boost/dataflow/signal/connection/slot_selector.hpp>
-#include <boost/dataflow/connection/consumer_map.hpp>
+#include <boost/dataflow/connection/port_map.hpp>
 
 #include <boost/fusion/sequence/container/vector.hpp>
 #include <boost/fusion/sequence/view/transform_view.hpp>
@@ -26,10 +26,9 @@
>
 class storage;
 
-namespace tag
-{
- struct storage_invocable;
-}
+struct storage_component_traits
+ : public dataflow::component_traits<dataflow::signals::mechanism>
+{};
 
 namespace detail
 {
@@ -97,13 +96,13 @@
     typedef typename storage_modifier<Signature>::storable_types storable_types;
     typedef typename storage_modifier<Signature>::storable_vector storable_vector;
     
- typedef tag::storage_invocable invocable_category;
-
+ typedef storage_component_traits component_traits;
+
     /** Initializes the stored parameter values using the provided sequence.
         \param[in] seq Sequence from which the stored parameter sequence is initialized from.
         */
     template<typename Seq>
- storage(const Seq &seq) : base_type(seq) {}
+ storage(const Seq &seq) : base_type(seq) {}
     /** Initializes the stored parameter values using its default constructor.
         */
     storage() {}
@@ -149,14 +148,14 @@
     }
 
     typedef boost::fusion::map<
- boost::fusion::pair<boost::dataflow::signal_producer<void()>, slot_selector<void (), storage> >,
+ boost::fusion::pair<boost::dataflow::signals::producer<void()>, slot_selector<void (), storage> >,
         boost::fusion::pair<
- boost::dataflow::signal_producer<void(const boost::fusion::vector<> &)>,
+ boost::dataflow::signals::producer<void(const boost::fusion::vector<> &)>,
             slot_selector<void (const boost::fusion::vector<> &), storage>
>
> send_map;
 
- boost::dataflow::consumer_map<send_map>
+ boost::dataflow::port_map<boost::dataflow::signals::mechanism, boost::dataflow::ports::consumer, send_map>
     send_slot()
     {
         return send_map
@@ -201,7 +200,7 @@
 namespace extension {
     
     template<>
- struct invoke_impl<boost::signals::tag::storage_invocable>
+ struct component_operation_impl<operations::invoke, boost::signals::storage_component_traits>
     {
         template<typename Invocable>
         struct apply
@@ -210,10 +209,6 @@
             {
                 invocable.send();
             }
- static void call(const Invocable &invocable)
- {
- invocable.send();
- }
         };
     };
     

Modified: sandbox/SOC/2007/signals/boost/dataflow/signal/connection/operators.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/signal/connection/operators.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/signal/connection/operators.hpp 2007-10-23 20:14:11 EDT (Tue, 23 Oct 2007)
@@ -16,25 +16,49 @@
     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<dataflow::is_producer<boost::dataflow::signals_mechanism, Input>, Input & >::type
- operator >>= (Input &input, Output &output)
- { connect(input, output); return input;}
-
- template<typename Input, typename Output>
- typename boost::enable_if<dataflow::is_producer<boost::dataflow::signals_mechanism, Input>, Input & >::type
- operator >>= (Input &input, const Output &output)
- { connect(input, output); return input;}
-
- template<typename Input, typename Output>
- typename boost::enable_if<dataflow::is_producer<boost::dataflow::signals_mechanism, Input>, const Input & >::type
- operator >>= (const Input &input, Output &output)
- { connect(input, output); return input;}
-
- template<typename Input, typename Output>
- typename boost::enable_if<dataflow::is_producer<boost::dataflow::signals_mechanism, Input>, const Input & >::type
- operator >>= (const Input &input, const Output &output)
- { connect(input, output); return input;}
+template<typename Input, typename Output>
+typename boost::enable_if<
+ boost::mpl::and_<
+ boost::dataflow::is_port<boost::dataflow::signals::mechanism, boost::dataflow::ports::producer, Input>,
+ boost::dataflow::is_port<boost::dataflow::signals::mechanism, boost::dataflow::ports::consumer, Output>
+ >,
+ Input &
+>::type
+operator >>= (Input &input, Output &output)
+{ connect(input, output); return input;}
+
+template<typename Input, typename Output>
+typename boost::enable_if<
+ boost::mpl::and_<
+ boost::dataflow::is_port<boost::dataflow::signals::mechanism, boost::dataflow::ports::producer, Input>,
+ boost::dataflow::is_port<boost::dataflow::signals::mechanism, boost::dataflow::ports::consumer, Output>
+ >,
+ Input &
+>::type
+operator >>= (Input &input, const Output &output)
+{ connect(input, output); return input;}
+
+template<typename Input, typename Output>
+typename boost::enable_if<
+ boost::mpl::and_<
+ boost::dataflow::is_port<boost::dataflow::signals::mechanism, boost::dataflow::ports::producer, Input>,
+ boost::dataflow::is_port<boost::dataflow::signals::mechanism, boost::dataflow::ports::consumer, Output>
+ >,
+ const Input &
+>::type
+operator >>= (const Input &input, Output &output)
+{ connect(input, output); return input;}
+
+template<typename Input, typename Output>
+typename boost::enable_if<
+ boost::mpl::and_<
+ boost::dataflow::is_port<boost::dataflow::signals::mechanism, boost::dataflow::ports::producer, Input>,
+ boost::dataflow::is_port<boost::dataflow::signals::mechanism, boost::dataflow::ports::consumer, Output>
+ >,
+ 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
@@ -42,25 +66,27 @@
     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<dataflow::is_producer<boost::dataflow::signals_mechanism, Input>, Input & >::type
- operator | (Input &input, Output &output)
- { connect(input, output); return input;}
-
- template<typename Input, typename Output>
- typename boost::enable_if<dataflow::is_producer<boost::dataflow::signals_mechanism, Input>, Input & >::type
- operator | (Input &input, const Output &output)
- { connect(input, output); return input;}
-
- template<typename Input, typename Output>
- typename boost::enable_if<dataflow::is_producer<boost::dataflow::signals_mechanism, Input>, const Input & >::type
- operator | (const Input &input, Output &output)
- { connect(input, output); return input;}
-
- template<typename Input, typename Output>
- typename boost::enable_if<dataflow::is_producer<boost::dataflow::signals_mechanism, Input>, const Input & >::type
- operator | (const Input &input, const Output &output)
- { connect(input, output); return input;}
+template<typename Input, typename Output>
+typename boost::enable_if<
+ boost::mpl::and_<
+ boost::dataflow::is_port<boost::dataflow::signals::mechanism, boost::dataflow::ports::producer, Input>,
+ boost::dataflow::is_port<boost::dataflow::signals::mechanism, boost::dataflow::ports::consumer, Output>
+ >,
+ Input &
+>::type
+operator | (Input &input, Output &output)
+{ connect(input, output); return input;}
+
+template<typename Input, typename Output>
+typename boost::enable_if<
+ boost::mpl::and_<
+ boost::dataflow::is_port<boost::dataflow::signals::mechanism, boost::dataflow::ports::producer, Input>,
+ boost::dataflow::is_port<boost::dataflow::signals::mechanism, boost::dataflow::ports::consumer, Output>
+ >,
+ Input &
+>::type
+operator | (Input &input, const Output &output)
+{ connect(input, output); return input;}
     
 } } // namespace boost::dataflow
 

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-10-23 20:14:11 EDT (Tue, 23 Oct 2007)
@@ -14,36 +14,35 @@
 #include <boost/dataflow/signal/support.hpp>
 #include <boost/dataflow/signal/component/filter_base.hpp>
 
-namespace boost { namespace signals {
+namespace boost { namespace dataflow { namespace signals {
 
 struct slot_selector_consumer
- : public boost::dataflow::consumer_category<boost::dataflow::concepts::keyed_consumer> {};
-
+ : public boost::dataflow::port_traits<mechanism, ports::consumer, concepts::keyed_port> {};
+
+} } // namespace dataflow::signals
+
+namespace signals {
 
 /** \brief Reference to a class instance and pointer to a class member function.
 */
 template<typename Signature, typename T>
 struct slot_selector
 {
- template<typename Mechanism, typename Enable=void>
- struct dataflow;
-
- template<typename Mechanism>
- struct dataflow<
- Mechanism,
- typename enable_if<
- is_same<Mechanism, boost::dataflow::signals_mechanism>
- >::type>
+ struct get_proxied_object
     {
- typedef slot_selector_consumer consumer_category;
- typedef boost::dataflow::mutable_proxy_producer<T> proxy_producer_category;
-
- static typename boost::dataflow::get_proxied_producer_result_type<boost::dataflow::signals_mechanism, T>::type
- get_proxied_producer(const slot_selector<Signature, T> &t)
+ T &operator()(const slot_selector<Signature, T> &t)
         {
- return boost::dataflow::get_proxied_producer<boost::dataflow::signals_mechanism>(t.object);
+ return t.object;
         };
     };
+
+ typedef boost::dataflow::signals::slot_selector_consumer port_traits;
+ typedef boost::dataflow::mutable_proxy_port<
+ boost::dataflow::signals::mechanism,
+ boost::dataflow::ports::producer,
+ T,
+ get_proxied_object
+ > proxy_port_traits;
 
     typedef Signature signature_type;
     typedef T class_type;
@@ -70,15 +69,15 @@
 namespace extension {
     
     template<typename Signature>
- struct get_keyed_consumer_impl<signals_mechanism, signal_producer<Signature>,
- boost::signals::slot_selector_consumer>
+ struct get_keyed_port_impl<
+ signals::slot_selector_consumer, signals::producer<Signature> >
     {
- template<typename Producer, typename Consumer>
+ template<typename Consumer, typename Producer>
         struct apply
         {
             typedef const boost::function<Signature> type;
             
- static type call(Producer &, Consumer &consumer)
+ static type call(Consumer &consumer, Producer &)
             {
                 return boost::signals::detail::bind_object<Signature, typename Consumer::class_type>()
                 (static_cast<typename boost::signals::detail::slot_type<Signature, typename Consumer::class_type>::type>(consumer.func), consumer.object);
@@ -86,41 +85,6 @@
         };
     };
     
- /*
-/// 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<boost::signals::slot_selector<Signature, T> >
-{
- typename get_signal_type<T>::type &operator()(const boost::signals::slot_selector<Signature, T> &selector)
- {
- return selector.object.default_signal();
- }
-};*/
-
-/// Support for slot_selector as an input component (producer).
-/*template<typename Signature, typename 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, boost::signals::slot_selector<Signature, T> >
-{
- boost::function<Signature> operator()(const boost::signals::slot_selector<Signature, T> &selector)
- {
- 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

Modified: sandbox/SOC/2007/signals/boost/dataflow/signal/support.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/signal/support.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/signal/support.hpp 2007-10-23 20:14:11 EDT (Tue, 23 Oct 2007)
@@ -34,142 +34,62 @@
 
 namespace boost { namespace dataflow {
 
+namespace signals {
+
+struct mechanism;
+
 template<typename T>
-struct signal_producer
- : public producer_category<concepts::producer, connections::many>
+struct producer
+ : public port_traits<mechanism, ports::producer, concepts::port>
 {
     typedef T produced_signature_type;
 };
 
-struct signal_consumer
- : public consumer_category<concepts::keyed_consumer> {};
+struct keyed_consumer
+ : public port_traits<mechanism, ports::consumer, concepts::keyed_port>
+{};
 
 template<typename T>
-struct function_consumer
- : public consumer_category<concepts::consumer>
+struct consumer
+ : public port_traits<mechanism, ports::consumer, concepts::port>
 {
     typedef T consumed_signature_type;
 };
 
-//struct signal_keyed_consumer
-// : public consumer_category<concepts::keyed_consumer> {};
-
-struct signals_mechanism;
+} // namespace signals
 
 template<typename Signature, typename Combiner, typename Group, typename GroupCompare>
-struct producer_category_of<signals_mechanism, boost::signal<Signature, Combiner, Group, GroupCompare> >
+struct port_traits_of<signals::mechanism, ports::producer, boost::signal<Signature, Combiner, Group, GroupCompare> >
 {
- typedef signal_producer<Signature> type;
+ typedef signals::producer<Signature> type;
 };
 
 template<typename Signature>
-struct consumer_category_of<signals_mechanism, boost::function<Signature> >
+struct port_traits_of<signals::mechanism, ports::consumer, boost::function<Signature> >
 {
- typedef function_consumer<Signature> type;
+ typedef signals::consumer<Signature> type;
 };
 
-//template<typename T>
-//struct consumer_category_of<signals_mechanism, T>
-//{
-// typedef signal_consumer type;
-//};
-
 namespace extension
 {
     template<typename Signature>
- struct get_keyed_consumer_impl<signals_mechanism, signal_producer<Signature>,
- signal_consumer>
+ struct get_keyed_port_impl<signals::keyed_consumer, signals::producer<Signature> >
     {
- template<typename Producer, typename Consumer>
+ template<typename ConsumerPort, typename ProducerPort>
         struct apply
         {
             typedef const boost::function<Signature> type;
             
- static type call(Producer &, Consumer &consumer)
+ static type call(ConsumerPort &consumer, ProducerPort &)
             {
- return boost::signals::detail::bind_object<Signature, Consumer>()
- (static_cast<typename boost::signals::detail::slot_type<Signature, Consumer>::type>(&Consumer::operator()), consumer);
+ return boost::signals::detail::bind_object<Signature, ConsumerPort>()
+ (static_cast<typename boost::signals::detail::slot_type<Signature, ConsumerPort>::type>(&ConsumerPort::operator()), consumer);
             };
         };
     };
 
- namespace signals
- {
-/* 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<signals_mechanism, 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<signals_mechanism, 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(Producer &producer, Consumer &consumer)
- {
- signals::get_signal<Producer>()(producer).connect(
- signals::get_slot<typename dataflow::produced_type_of<
- signals_mechanism, Producer>::type, Consumer>()(consumer));
- }
- };
- };*/
-
     template<typename T>
- struct connect_impl<signals_mechanism, signal_producer<T>, function_consumer<T> >
+ struct binary_operation_impl<operations::connect, signals::producer<T>, signals::consumer<T> >
     {
         template<typename Producer, typename Consumer>
         struct apply
@@ -182,28 +102,6 @@
     };
 }
 
-/*
-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;
-};*/
-
-/*template<typename Signature, typename Combiner, typename Group, typename GroupCompare>
-struct produced_type_of<
- signals_mechanism,
- boost::signal<Signature, Combiner, Group, GroupCompare> >
-{
- typedef Signature type;
-};*/
-
 } } // namespace boost::dataflow
 
 namespace boost { namespace signals {
@@ -211,9 +109,33 @@
 template<typename Producer, typename Consumer>
 inline void connect(Producer &producer, Consumer &consumer)
 {
- boost::dataflow::connect<boost::dataflow::signals_mechanism>(producer, consumer);
+ boost::dataflow::binary_operation<boost::dataflow::operations::connect, boost::dataflow::signals::mechanism>(producer, consumer);
 }
-
+
+template<typename Producer, typename Consumer>
+inline void connect(Producer &producer, const Consumer &consumer)
+{
+ boost::dataflow::binary_operation<boost::dataflow::operations::connect, boost::dataflow::signals::mechanism>(producer, consumer);
+}
+
+template<typename Producer, typename Consumer>
+inline void connect(const Producer &producer, Consumer &consumer)
+{
+ boost::dataflow::binary_operation<boost::dataflow::operations::connect, boost::dataflow::signals::mechanism>(producer, consumer);
+}
+
+template<typename Producer, typename Consumer>
+inline void connect(const Producer &producer, const Consumer &consumer)
+{
+ boost::dataflow::binary_operation<boost::dataflow::operations::connect, boost::dataflow::signals::mechanism>(producer, consumer);
+}
+
+template<typename Component>
+inline void invoke(Component &component)
+{
+ boost::dataflow::component_operation<boost::dataflow::operations::invoke, boost::dataflow::signals::mechanism>(component);
+}
+
 } } // 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-10-23 20:14:11 EDT (Tue, 23 Oct 2007)
@@ -9,16 +9,12 @@
 #include <boost/dataflow/support/port.hpp>
 #include <boost/dataflow/support/proxy_port.hpp>
 #include <boost/dataflow/support/binary_operation.hpp>
+#include <boost/dataflow/support/keyed_port.hpp>
+#include <boost/dataflow/support/unary_operation.hpp>
+#include <boost/dataflow/support/component.hpp>
+#include <boost/dataflow/support/component_operation.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/only_connectable.hpp>
-//#include <boost/dataflow/support/disconnect_all_ins.hpp>
-//#include <boost/dataflow/support/disconnect_all_outs.hpp>
 
 #endif // BOOST_DATAFLOW_SUPPORT_HPP

Added: sandbox/SOC/2007/signals/boost/dataflow/support/component.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2007/signals/boost/dataflow/support/component.hpp 2007-10-23 20:14:11 EDT (Tue, 23 Oct 2007)
@@ -0,0 +1,62 @@
+// 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_COMPONENT_HPP
+#define BOOST_DATAFLOW_SUPPORT_COMPONENT_HPP
+
+#include <boost/dataflow/detail/enable_if_defined.hpp>
+
+#include <boost/mpl/and.hpp>
+#include <boost/mpl/at.hpp>
+#include <boost/mpl/assert.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/is_sequence.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/type_traits/remove_cv.hpp>
+
+//temp
+#include <boost/mpl/vector.hpp>
+
+namespace boost { namespace dataflow {
+
+template<typename Mechanism>
+struct component_traits
+{
+ typedef Mechanism mechanism;
+};
+
+/// Boolean metafunction determining whether a type is a ComponentTraits.
+template<typename ComponentTraits, typename Enable=void>
+struct is_component_traits : public mpl::false_
+{};
+
+template<typename ComponentTraits>
+struct is_component_traits<ComponentTraits,
+ typename detail::enable_if_defined<
+ typename ComponentTraits::mechanism
+ >::type>
+ : public mpl::true_
+{};
+
+/// Metafunction returning the ComponentTraits of a type.
+template<typename Mechanism, typename T, typename Enable=void>
+struct component_traits_of
+{};
+
+/// Specialization allowing intrusive specification of the ComponentTraits.
+template<typename Mechanism, typename T>
+struct component_traits_of<Mechanism, T,
+ typename enable_if<
+ is_same<Mechanism, typename T::component_traits::mechanism>
+ >::type
+>
+{
+ typedef typename T::component_traits type;
+ BOOST_MPL_ASSERT(( is_component_traits<type> ));
+};
+
+} } // namespace boost::dataflow
+
+#endif // BOOST_DATAFLOW_SUPPORT_COMPONENT_HPP

Added: sandbox/SOC/2007/signals/boost/dataflow/support/component_operation.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2007/signals/boost/dataflow/support/component_operation.hpp 2007-10-23 20:14:11 EDT (Tue, 23 Oct 2007)
@@ -0,0 +1,77 @@
+// 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_COMPONENT_OPERATION_HPP
+#define BOOST_DATAFLOW_SUPPORT_COMPONENT_OPERATION_HPP
+
+#include <boost/dataflow/support/component.hpp>
+
+#include <boost/static_assert.hpp>
+
+
+namespace boost { namespace dataflow {
+
+namespace detail {
+ struct not_implemented;
+}
+
+namespace operations
+{
+ struct invoke;
+}
+
+namespace extension
+{
+ template<typename Operation, typename ComponentTraits, typename Enable=void>
+ struct component_operation_impl
+ {
+ template<typename Component>
+ struct apply
+ {
+ struct detail
+ {
+ typedef void not_specialized;
+ };
+
+ static void call(Component &)
+ {
+ // Error: component_operation_impl Operation has not been
+ // implemented for ComponentTraits.
+ BOOST_STATIC_ASSERT(sizeof(Component)==0);
+ }
+ };
+ };
+}
+
+template<typename Operation, typename Mechanism, typename T, typename Enable=void>
+struct implements_component_operation
+ : public mpl::true_ {};
+
+template<typename Operation, typename Mechanism, typename Component, typename T>
+struct implements_component_operation<
+ Operation,
+ Mechanism,
+ T,
+ typename detail::enable_if_defined<
+ typename extension::component_operation_impl<
+ Operation,
+ typename component_traits_of<Mechanism, Component>::type
+ >::template apply<Component>::detail::not_specialized
+ >::type
+>
+ : public mpl::false_ {};
+
+template<typename Operation, typename Mechanism, typename Component>
+void component_operation(Component &producer)
+{
+ extension::component_operation_impl<
+ Operation,
+ typename component_traits_of<Mechanism, Component>::type
+ >::template apply<Component>::call(producer);
+}
+
+} } // namespace boost::dataflow
+
+#endif // BOOST_DATAFLOW_SUPPORT_COMPONENT_OPERATION_HPP

Modified: sandbox/SOC/2007/signals/boost/dataflow/support/keyed_port.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/support/keyed_port.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/support/keyed_port.hpp 2007-10-23 20:14:11 EDT (Tue, 23 Oct 2007)
@@ -22,7 +22,7 @@
 
 namespace extension
 {
- template<typename Mechanism, typename KeyedPortTag, typename KeyPortTag>
+ template<typename KeyedPortTag, typename KeyPortTag>
     struct get_keyed_port_impl
     {
         template<typename KeyedPort, typename Key>
@@ -41,7 +41,6 @@
     
 template<typename Mechanism, typename PortCategory, typename T1, typename T2>
 typename extension::get_keyed_port_impl<
- Mechanism,
     typename port_traits_of<
         Mechanism, PortCategory, typename boost::remove_cv<T1>::type
>::type,
@@ -52,14 +51,13 @@
 get_keyed_port(T1 &t1, T2 &t2)
 {
     return extension::get_keyed_port_impl<
- Mechanism,
         typename port_traits_of<
             Mechanism, PortCategory, typename boost::remove_cv<T1>::type
>::type,
         typename port_traits_of<
             Mechanism, typename PortCategory::complement, typename boost::remove_cv<T2>::type
>::type
- >::template apply<const T1, const T2>::call(t1, t2);
+ >::template apply<T1, T2>::call(t1, t2);
 }
 
 namespace extension

Modified: sandbox/SOC/2007/signals/boost/dataflow/support/port.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/support/port.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/support/port.hpp 2007-10-23 20:14:11 EDT (Tue, 23 Oct 2007)
@@ -7,6 +7,7 @@
 #define BOOST_DATAFLOW_SUPPORT_PORT_HPP
 
 #include <boost/dataflow/detail/enable_if_defined.hpp>
+#include <boost/dataflow/utility/underlying_type.hpp>
 
 #include <boost/mpl/and.hpp>
 #include <boost/mpl/at.hpp>
@@ -52,8 +53,7 @@
 namespace concepts
 {
     /// Tag
- struct producer;
- struct consumer;
+ struct port;
 }
 
 /// Convenience class for PortTraits types.
@@ -178,9 +178,9 @@
                 typename port_traits_of<
                     Mechanism,
                     PortCategory,
- typename remove_cv<T>::type
+ typename utility::underlying_type<T>::type
>::type
- >::template apply<T>::type type;
+ >::template apply<typename remove_reference<T>::type>::type type;
 };
 
 template<typename Mechanism, typename PortCategory, typename T>
@@ -191,7 +191,7 @@
 get_port(T &p)
 {
     return extension::get_port_impl<
- typename port_traits_of<Mechanism, PortCategory, T>::type
+ typename port_traits_of<Mechanism, PortCategory, typename boost::remove_cv<T>::type >::type
>::template apply<T>::call(p);
 }
 
@@ -199,6 +199,7 @@
 
 /// Macro simplifying non-intrusive specification of a type's PortTraits.
 #define DATAFLOW_PORT_CATEGORY(Type,PortTraits) \
+namespace boost { namespace dataflow { \
 template<> \
 struct port_traits_of< \
     PortTraits::mechanism, \
@@ -207,11 +208,13 @@
 { \
     typedef PortTraits type; \
     BOOST_MPL_ASSERT(( is_port_traits<type> )); \
-};
+}; \
+}}
 
 /// Macro simplifying non-intrusive specification of multiple types'
 /// PortTraits, using a boost::enable_if condition.
 #define DATAFLOW_PORT_CATEGORY_ENABLE_IF(Type,Cond,PortTraits) \
+namespace boost { namespace dataflow { \
 template<typename Type> \
 struct port_traits_of< \
     typename PortTraits::mechanism, \
@@ -221,6 +224,7 @@
 { \
     typedef PortTraits type; \
     BOOST_MPL_ASSERT(( is_port_traits<type> )); \
-};
+}; \
+}}
 
 #endif // BOOST_DATAFLOW_SUPPORT_PORT_HPP

Modified: sandbox/SOC/2007/signals/boost/dataflow/support/proxy_port.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/support/proxy_port.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/support/proxy_port.hpp 2007-10-23 20:14:11 EDT (Tue, 23 Oct 2007)
@@ -41,22 +41,13 @@
 struct default_proxy_port : public proxy_port_traits<Mechanism, PortCategory>
 {};
 
-template<typename Mechanism, typename PortCategory, typename T>
+template<typename Mechanism, typename PortCategory, typename T, typename GetProxiedObject>
 struct mutable_proxy_port : public proxy_port_traits<Mechanism, PortCategory>
 {};
 
 template<typename Mechanism, typename PortCategory, typename T, typename Enable=void>
 struct proxy_port_traits_of;
 
-template<typename Mechanism, typename PortCategory, typename T>
-struct proxy_port_traits_of<Mechanism, PortCategory, T,
- typename detail::enable_if_defined<
- typename T::template dataflow<Mechanism, PortCategory>::proxy_port_traits
- >::type >
-{
- typedef typename T::template dataflow<Mechanism, PortCategory>::proxy_port_traits type;
-};
-
 /// Specialization allowing intrusive specification of the PortTraits.
 template<typename Mechanism, typename PortCategory, typename T>
 struct proxy_port_traits_of<Mechanism, PortCategory, T,
@@ -121,13 +112,13 @@
             
             static type call(ProxyPort &t)
             {
- return get_port<Mechanism, PortCategory>(GetProxiedObject()(t));
+ return get_port<Mechanism, PortCategory>(GetProxiedObject()(t));
             }
         };
     };
     
- template<typename Mechanism, typename PortCategory, typename ProxiedPort>
- struct get_port_impl<mutable_proxy_port<Mechanism, PortCategory, ProxiedPort> >
+ template<typename Mechanism, typename PortCategory, typename ProxiedPort, typename GetProxiedObject>
+ struct get_port_impl<mutable_proxy_port<Mechanism, PortCategory, ProxiedPort, GetProxiedObject> >
     {
         template<typename ProxyPort>
         struct apply
@@ -141,9 +132,7 @@
             
             static type call(const ProxyPort &t)
             {
- return get_port<Mechanism, PortCategory>(
- ProxyPort::template dataflow<Mechanism, PortCategory>
- ::get_proxied_port(t));
+ return get_port<Mechanism, PortCategory>(GetProxiedObject()(t));
             }
         };
     };
@@ -168,7 +157,7 @@
 };
 
 template<typename Mechanism, typename PortCategory, typename T>
-struct port_traits_of<Mechanism, T,
+struct port_traits_of<Mechanism, PortCategory, T,
     typename boost::enable_if<is_proxy_port<Mechanism, PortCategory, T> >::type>
 {
     typedef
@@ -186,16 +175,20 @@
 } } // namespace boost::dataflow
 
 #define DATAFLOW_PROXY_PORT_CATEGORY(ProxyPort,ProxyPortCategory) \
+namespace boost { namespace dataflow { \
 template<> \
 struct proxy_port_traits_of< \
- typename ProxyPortCategory::mechanism, \
- typename ProxyPortCategory::category, \
+ ProxyPortCategory::mechanism, \
+ ProxyPortCategory::category, \
     ProxyPort> \
 { \
     typedef ProxyPortCategory type; \
-};
+ BOOST_MPL_ASSERT(( is_proxy_port_traits<type> )); \
+}; \
+}}
 
 #define DATAFLOW_PROXY_PORT_CATEGORY_ENABLE_IF(P,Cond,ProxyPortCategory) \
+namespace boost { namespace dataflow { \
 template<typename P> \
 struct proxy_port_traits_of< \
     typename ProxyPortCategory::mechanism, \
@@ -204,6 +197,8 @@
     typename boost::enable_if< Cond >::type> \
 { \
     typedef ProxyPortCategory type; \
-};
+ BOOST_MPL_ASSERT(( is_proxy_port_traits<type> )); \
+}; \
+}}
 
 #endif // BOOST_DATAFLOW_SUPPORT_PROXY_PORT_HPP

Copied: sandbox/SOC/2007/signals/boost/dataflow/templates/binary_operation.hpp (from r39908, /sandbox/SOC/2007/signals/boost/dataflow/templates/connect.hpp)
==============================================================================
--- /sandbox/SOC/2007/signals/boost/dataflow/templates/connect.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/templates/binary_operation.hpp 2007-10-23 20:14:11 EDT (Tue, 23 Oct 2007)
@@ -6,17 +6,30 @@
 // DO NOT INCLUDE THIS FILE DIRECTLY
 
 #ifndef DATAFLOW_TEMPLATE_MECHANISM
-#error DATAFLOW_TEMPLATE_MECHANISM undefined. Do not include this file directly.
+#error DATAFLOW_TEMPLATE_MECHANISM undefined.
+#error DATAFLOW_TEMPLATE_BINARY_OPERATION undefined.
 #endif
 
 template<typename Producer, typename Consumer>
-inline void connect(Producer &producer, Consumer &consumer)
+inline void DATAFLOW_TEMPLATE_BINARY_OPERATION(Producer &producer, Consumer &consumer)
 {
- boost::dataflow::connect< DATAFLOW_TEMPLATE_MECHANISM >(producer, consumer);
+ boost::dataflow::binary_operation< boost::dataflow::operations::DATAFLOW_TEMPLATE_BINARY_OPERATION, DATAFLOW_TEMPLATE_MECHANISM >(producer, consumer);
 }
 
 template<typename Producer, typename Consumer>
-inline void connect_only(Producer &producer, Consumer &consumer)
+inline void DATAFLOW_TEMPLATE_BINARY_OPERATION(Producer &producer, const Consumer &consumer)
 {
- boost::dataflow::connect_only< DATAFLOW_TEMPLATE_MECHANISM >(producer, consumer);
-}
\ No newline at end of file
+ boost::dataflow::binary_operation< boost::dataflow::operations::DATAFLOW_TEMPLATE_BINARY_OPERATION, DATAFLOW_TEMPLATE_MECHANISM >(producer, consumer);
+}
+
+template<typename Producer, typename Consumer>
+inline void DATAFLOW_TEMPLATE_BINARY_OPERATION(const Producer &producer, Consumer &consumer)
+{
+ boost::dataflow::binary_operation< boost::dataflow::operations::DATAFLOW_TEMPLATE_BINARY_OPERATION, DATAFLOW_TEMPLATE_MECHANISM >(producer, consumer);
+}
+
+template<typename Producer, typename Consumer>
+inline void DATAFLOW_TEMPLATE_BINARY_OPERATION(const Producer &producer, const Consumer &consumer)
+{
+ boost::dataflow::binary_operation< boost::dataflow::operations::DATAFLOW_TEMPLATE_BINARY_OPERATION, DATAFLOW_TEMPLATE_MECHANISM >(producer, consumer);
+}

Deleted: sandbox/SOC/2007/signals/boost/dataflow/templates/connect.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/templates/connect.hpp 2007-10-23 20:14:11 EDT (Tue, 23 Oct 2007)
+++ (empty file)
@@ -1,22 +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)
-
-// DO NOT INCLUDE THIS FILE DIRECTLY
-
-#ifndef DATAFLOW_TEMPLATE_MECHANISM
-#error DATAFLOW_TEMPLATE_MECHANISM undefined. Do not include this file directly.
-#endif
-
-template<typename Producer, typename Consumer>
-inline void connect(Producer &producer, Consumer &consumer)
-{
- boost::dataflow::connect< DATAFLOW_TEMPLATE_MECHANISM >(producer, consumer);
-}
-
-template<typename Producer, typename Consumer>
-inline void connect_only(Producer &producer, Consumer &consumer)
-{
- boost::dataflow::connect_only< DATAFLOW_TEMPLATE_MECHANISM >(producer, consumer);
-}
\ No newline at end of file

Added: sandbox/SOC/2007/signals/boost/dataflow/utility/underlying_type.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2007/signals/boost/dataflow/utility/underlying_type.hpp 2007-10-23 20:14:11 EDT (Tue, 23 Oct 2007)
@@ -0,0 +1,25 @@
+// 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_UNDERLYING_TYPE_HPP
+#define BOOST_DATAFLOW_UNDERLYING_TYPE_HPP
+
+#include <boost/type_traits/remove_cv.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+
+namespace boost { namespace dataflow { namespace utility {
+
+template<typename T>
+struct underlying_type
+{
+ typedef
+ typename remove_cv<
+ typename remove_reference<T>::type
+ >::type type;
+};
+
+} } }
+
+#endif // BOOST_DATAFLOW_UNDERLYING_TYPE_HPP
\ No newline at end of file

Modified: sandbox/SOC/2007/signals/libs/dataflow/build/xcodeide/signal_network.xcodeproj/project.pbxproj
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/build/xcodeide/signal_network.xcodeproj/project.pbxproj (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/build/xcodeide/signal_network.xcodeproj/project.pbxproj 2007-10-23 20:14:11 EDT (Tue, 23 Oct 2007)
@@ -131,16 +131,19 @@
                 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>"; };
+ 08F034B60CCBFA95009A4C8E /* port_concepts.qbk */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = port_concepts.qbk; sourceTree = "<group>"; };
                 08F077830C63F736003D448D /* components.qbk */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = components.qbk; sourceTree = "<group>"; };
- 08F079950CA88EBF001E6E24 /* connect.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = connect.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>"; };
                 08F1CD280CC55A5100EB5B4A /* port_traits_sequence.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = port_traits_sequence.hpp; sourceTree = "<group>"; };
                 08F20FB60C95AD97005D01D4 /* filter.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = filter.hpp; sourceTree = "<group>"; };
+ 08F216430CC95C3800DD25D3 /* test_result_of_defined.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = test_result_of_defined.cpp; sourceTree = "<group>"; };
                 08F217BB0CC570CD00F9A91B /* proxy_port_traits_sequence.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = proxy_port_traits_sequence.hpp; sourceTree = "<group>"; };
                 08F21F770CC6A2EB00DE649A /* test_unary_op.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = test_unary_op.cpp; sourceTree = "<group>"; };
                 08F21FAD0CC6ABCF00DE649A /* component.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = component.hpp; sourceTree = "<group>"; };
+ 08F21FB90CC6B29600DE649A /* component_operation.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = component_operation.hpp; sourceTree = "<group>"; };
+ 08F21FC20CC6B3E600DE649A /* test_component.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = test_component.cpp; 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>"; };
@@ -158,18 +161,18 @@
                 08F26D630CBF2D4100EDC3F6 /* test_proxy_port.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = test_proxy_port.cpp; sourceTree = "<group>"; };
                 08F2C31A0CAD961F00F9100C /* operators.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = operators.hpp; sourceTree = "<group>"; };
                 08F2C31B0CAD961F00F9100C /* support.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = support.hpp; sourceTree = "<group>"; };
+ 08F2D3A90CCADDE00042A3FF /* underlying_type.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = underlying_type.hpp; sourceTree = "<group>"; };
                 08F348510C492B4B0096097F /* group.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = group.hpp; sourceTree = "<group>"; };
                 08F348970CC021E0006D0A67 /* copy_cv.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = copy_cv.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>"; };
+ 08F3944C0CCEC35E00ED7978 /* binary_operation.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = binary_operation.hpp; sourceTree = "<group>"; };
                 08F3FE0C0CA0975100F0E144 /* common.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = common.hpp; sourceTree = "<group>"; };
                 08F418080CBD69FE007E7F7A /* port.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = port.hpp; sourceTree = "<group>"; };
                 08F418AB0CBD7668007E7F7A /* proxy_port.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = proxy_port.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>"; };
- 08F71D320CA3538E0010099E /* producer_concepts.qbk */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = producer_concepts.qbk; sourceTree = "<group>"; };
- 08F71D390CA353F40010099E /* consumer_concepts.qbk */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = consumer_concepts.qbk; sourceTree = "<group>"; };
                 08F71D3E0CA3547C0010099E /* Jamfile.v2 */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Jamfile.v2; sourceTree = "<group>"; };
                 08F71D3F0CA3547C0010099E /* test_bind_object.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = test_bind_object.cpp; sourceTree = "<group>"; };
                 08F71D400CA3547C0010099E /* test_branching.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = test_branching.cpp; sourceTree = "<group>"; };
@@ -189,7 +192,6 @@
                 08F71D4E0CA3547C0010099E /* test_same_type.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = test_same_type.cpp; sourceTree = "<group>"; };
                 08F71D4F0CA3547C0010099E /* test_socket.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = test_socket.cpp; sourceTree = "<group>"; };
                 08F71D500CA3547C0010099E /* test_storage.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = test_storage.cpp; sourceTree = "<group>"; };
- 08F8A00B0C3C879C007637A9 /* test_result_of_defined.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = test_result_of_defined.cpp; sourceTree = "<group>"; };
                 08F9459A0C46A86E00E224E4 /* components.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = components.hpp; sourceTree = "<group>"; };
                 08F9462E0C46C2F000E224E4 /* fibonacci.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = fibonacci.cpp; sourceTree = "<group>"; };
                 08FA6A050C41E11800434913 /* rationale.qbk */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = rationale.qbk; sourceTree = "<group>"; };
@@ -264,12 +266,12 @@
                                 08B9D4190CC3D0790050F10B /* test_binary_op.cpp */,
                                 08F71D3D0CA3547C0010099E /* signals */,
                                 08C675970C13A03E00D85379 /* Jamfile.v2 */,
- 08F8A00B0C3C879C007637A9 /* test_result_of_defined.cpp */,
                                 08F26C8B0CBF1CBA00EDC3F6 /* test_port.cpp */,
                                 08F26D630CBF2D4100EDC3F6 /* test_proxy_port.cpp */,
                                 08B9D41E0CC3D0A80050F10B /* my_producer_consumer.hpp */,
                                 08F24D6E0CC4419F00FC4A0C /* test_keyed_port.cpp */,
                                 08F21F770CC6A2EB00DE649A /* test_unary_op.cpp */,
+ 08F21FC20CC6B3E600DE649A /* test_component.cpp */,
                         );
                         name = test;
                         path = ../../test;
@@ -374,6 +376,7 @@
                                 08061C2D0CBEE985002DC710 /* binary_operation.hpp */,
                                 08061C980CBEF0C6002DC710 /* keyed_port.hpp */,
                                 08F21FAD0CC6ABCF00DE649A /* component.hpp */,
+ 08F21FB90CC6B29600DE649A /* component_operation.hpp */,
                         );
                         path = support;
                         sourceTree = "<group>";
@@ -401,7 +404,7 @@
                 08F079940CA88EAB001E6E24 /* templates */ = {
                         isa = PBXGroup;
                         children = (
- 08F079950CA88EBF001E6E24 /* connect.hpp */,
+ 08F3944C0CCEC35E00ED7978 /* binary_operation.hpp */,
                         );
                         path = templates;
                         sourceTree = "<group>";
@@ -443,6 +446,7 @@
                         isa = PBXGroup;
                         children = (
                                 08F348970CC021E0006D0A67 /* copy_cv.hpp */,
+ 08F2D3A90CCADDE00042A3FF /* underlying_type.hpp */,
                         );
                         path = utility;
                         sourceTree = "<group>";
@@ -458,6 +462,7 @@
                 08F71D3D0CA3547C0010099E /* signals */ = {
                         isa = PBXGroup;
                         children = (
+ 08F216430CC95C3800DD25D3 /* test_result_of_defined.cpp */,
                                 08F71D3E0CA3547C0010099E /* Jamfile.v2 */,
                                 08F71D3F0CA3547C0010099E /* test_bind_object.cpp */,
                                 08F71D400CA3547C0010099E /* test_branching.cpp */,
@@ -540,6 +545,7 @@
                 08FD5DE40C1BA60700F00877 /* doc */ = {
                         isa = PBXGroup;
                         children = (
+ 08F034B60CCBFA95009A4C8E /* port_concepts.qbk */,
                                 083FD3C00C62A75100EF3F6B /* phoenix */,
                                 08FB7BEE0C6157AE00BD4EC2 /* signals */,
                                 08FD5E4D0C1BA60800F00877 /* Jamfile.v2 */,
@@ -551,8 +557,6 @@
                                 08FB7BFE0C61597000BD4EC2 /* signals.qbk */,
                                 083FD3C60C62A7F600EF3F6B /* phoenix.qbk */,
                                 08F077830C63F736003D448D /* components.qbk */,
- 08F71D320CA3538E0010099E /* producer_concepts.qbk */,
- 08F71D390CA353F40010099E /* consumer_concepts.qbk */,
                                 08FCEFCE0CB9CEB000BBB599 /* future.qbk */,
                         );
                         name = doc;

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-10-23 20:14:11 EDT (Tue, 23 Oct 2007)
@@ -13,34 +13,35 @@
 local root = [ path.native [ path.join [ path.pwd ] ../../.. ] ] ;
 
 xml dataflow_xml : dataflow.qbk ;
-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 ]
- :
- <doxygen:param>TAB_SIZE=4
- <doxygen:param>EXAMPLE_PATH=../test
- <doxygen:param>EXAMPLE_PATH=../example
- <doxygen:param>STRIP_FROM_PATH=$(root)
- <doxygen:param>STRIP_FROM_INC_PATH=$(root)
- <doxygen:param>EXTRACT_ALL=NO
- <doxygen:param>HIDE_UNDOC_MEMBERS=YES
- <doxygen:param>INHERIT_DOCS=YES
- <doxygen:param>EXTRACT_PRIVATE=NO
- <doxygen:param>ENABLE_PREPROCESSING=YES
- <doxygen:param>MACRO_EXPANSION=YES
- <doxygen:param>SEARCH_INCLUDES=YES
- <doxygen:param>INCLUDE_PATH=../../..
- <doxygen:param>PREDEFINED=DOXYGEN_DOCS_ONLY
- ;
+
+#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 ]
+# :
+# <doxygen:param>TAB_SIZE=4
+# <doxygen:param>EXAMPLE_PATH=../test
+# <doxygen:param>EXAMPLE_PATH=../example
+# <doxygen:param>STRIP_FROM_PATH=$(root)
+# <doxygen:param>STRIP_FROM_INC_PATH=$(root)
+# <doxygen:param>EXTRACT_ALL=NO
+# <doxygen:param>HIDE_UNDOC_MEMBERS=YES
+# <doxygen:param>INHERIT_DOCS=YES
+# <doxygen:param>EXTRACT_PRIVATE=NO
+# <doxygen:param>ENABLE_PREPROCESSING=YES
+# <doxygen:param>MACRO_EXPANSION=YES
+# <doxygen:param>SEARCH_INCLUDES=YES
+# <doxygen:param>INCLUDE_PATH=../../..
+# <doxygen:param>PREDEFINED=DOXYGEN_DOCS_ONLY
+# ;
 
 boostbook standalone
    :
       dataflow_xml
- dataflow_doxygen
+# dataflow_doxygen
     :
         # pull in the online .css and images
         <xsl:param>project.root=http://beta.boost.org/development

Modified: sandbox/SOC/2007/signals/libs/dataflow/doc/components.qbk
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/doc/components.qbk (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/doc/components.qbk 2007-10-23 20:14:11 EDT (Tue, 23 Oct 2007)
@@ -3,7 +3,7 @@
 [section producer_group]
 
 [heading Model of]
-* [ProducerConcept]
+* [ProducerPortConcept]
 
 [heading Description]
 
@@ -24,7 +24,7 @@
 [section consumer_group]
 
 [heading Model of]
-* [ProducerConcept]
+* [ProducerPortConcept]
 
 [heading Description]
 
@@ -45,8 +45,8 @@
 [section consumer_map]
 
 A [consumer_map] groups together multiple consumers, keyed by type they consume.
-When a [ProducerConcept] is connected to a [consumer_map], the consumer
-whose key matches the [ProducerConcept]'s produced type will be chosen for
+When a [ProducerPortConcept] is connected to a [consumer_map], the consumer
+whose key matches the [ProducerPortConcept]'s produced type will be chosen for
 the connection.
 [consumer_map] is a wrapper for [BoostFusion] maps which allows them to be
 used in this fashion.
@@ -55,7 +55,7 @@
 A [consumer_map] is used as the return type of [^[storage].send_slot()],
 which and includes the [slot_selector] for both the fused and unfused
 versions of the `send()` function. The appropriate slot is selected when
-a connection is made, based on the [ProducerConcept]'s outgoing signal
+a connection is made, based on the [ProducerPortConcept]'s outgoing signal
 signature.
 
 [endsect][/consumer_map]

Modified: sandbox/SOC/2007/signals/libs/dataflow/doc/concepts.qbk
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/doc/concepts.qbk (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/doc/concepts.qbk 2007-10-23 20:14:11 EDT (Tue, 23 Oct 2007)
@@ -34,41 +34,44 @@
 
 [BoostSignals] and [VTK] are examples of different /mechanisms/ - particular
 environments each offering their own, independent way of doing dataflow.
-In the Dataflow library, everything is keyed through a mechanism typename
+In the Dataflow library, everything is keyed through a mechanism type
 tag, allowing different mechanisms to be specified independently, and
 allowing a single component to support muliple mechanisms.
 
-[heading Components]
-
-We will call the fundamental processing elements of a dataflow program
-/components/. A component can have a number of connectable interfaces
-(inputs\/outputs), which have two categories:
+[heading Ports]
 
-* /producers/, which produce data; and
-* /consumers/, which consume data.
+The fundamental point of data production or consumption is called a /port/.
+Two complementary ports that produce / consume the same type of data (using
+the same type of mechanism) can typically be connected/disconnected, or data
+can be extracted from one port to another.
 
 Depending on the data-transport mechanism used, a producer could be anything
 that produces / provides data: a POD variable, an object of a class type, or
 a function that returns a value. Similarly, a consumer could be anything
 that consumes data - a function that takes an argument, a functor, etc.
 
-Producers and consumers are captured more formally by the [ProducerConcept]
-and [ConsumerConcept] concepts. There is no concept directly corresponding to
-a component, because a component is a more abstract notion - i.e., a component
-is whatever makes sense for the application design. Typically, though, a
-component is embedded in a class, and the different [ProducerConcept]s
-and [ConsumerConcept]s are accessible either through the class
-directly, or through its member functions and variables.
+Ports are captured more formally by the [PortConcept] concept.
+
+[heading Components]
+
+A /component/ is the fundamental data processing element of a dataflow
+network. It can have multiple ports, for example a video filter component
+might have one consumer port (consuming video to be processed) and one
+producer port (producing filtered video).
+
+Typically, a component is embedded in a class, and the different [PortConcept]s
+are accessible either through the class directly, or through its member
+functions and variables.
 
 [heading Proxies]
 
-It is often the case that a component delegates its [ProducerConcept] or
-[ConsumerConcept] functionality to some other element. For example, a
+It is often the case that a component delegates its [PortConcept]
+functionality to some other element. For example, a
 class that is a [DataflowSignals] component might delegate its
-[ProducerConcept] functionality to a member boost::signal. It can
-do so by declaring itself a [ProxyProducerConcept] for the boost::signal.
+[ProducerPortConcept] functionality to a member boost::signal. It can
+do so by declaring itself a [ProxyProducerPortConcept] for the boost::signal.
 
-[heading Connections]
+[heading Port Operations]
 
 To establish a flow of data in a dataflow program, we typically /connect/
 producers and consumers using some type of /connection/. In C++, this is usually
@@ -77,8 +80,10 @@
 connected to the signal. Or, a consumer class might have a pointer to a variable
 which it collects data from.
 
-Connectability is captured more formally by the [ConnectableConcept] concept.
-
+Operations between two ports such as /connect/, /connect_only/, /disconnect/,
+and /extract/ are captured by the [BinaryOperable] concept. Operations
+on a single port such as /disconnect_all/ are covered by the [UnaryOperable]
+concept.
 
 [/
 [heading Push and pull]
@@ -130,176 +135,139 @@
 
 [endsect][/mechanism]
 
-[section PortCategory]
+[include port_concepts.qbk]
+
+[section:binaryoperable BinaryOperable (Connectable, OnlyConnectable, Disconnectable, Extractable) ]
 
-A [PortCategoryConcept] designates a type of port in the Dataflow library.
-The library currently defines two [PortCategoryConcept]s:
+A [ProducerPortConcept] `P` and [ConsumerPortConcept] `C` are /BinaryOperable/
+for a binary operation `O`, and mechanism `M`, if the implementation of
+the binary operation `O` has been specialized for `M`, `P`, and `C`.
 
- * `boost::dataflow::ports::producer`, and
- * `boost::dataflow::ports::consumer`
+In this case,
+
+* If `O` is operations::connect, `P` and `C` are [ConnectableConcept]
+* If `O` is operations::connect_only, `P` and `C` are [OnlyConnectableConcept]
+* If `O` is operations::disconnect, `P` and `C` are [DisconnectableConcept]
+* If `O` is operations::extract, `P` and `C` are [ExtractableConcept]
 
 [heading Notation]
 The following expressions are used in this document:
 
 [variablelist
- [[PT] [A [PortCategoryConcept] type.]]
+ [[P] [A [ProducerPortConcept] type.]]
+ [[C] [A [ConsumerPortConcept] type.
+ [footnote `P` and `C` are [ConnectableConcept]]
+ [[p] [An object of type P.]]
+ [[c] [An object of type C.]]
 ]
 
 [heading Requirements]
 [table
     [[Name] [Expression] [Result Type] [Description]]
     [
- [Opposite PortCategory]
- [`PT::complement`]
- [[PortCategoryConcept] type]
+ [Connect]
+ [`binary_operation<operations::connect, M>(p,c)`]
+ [Any type]
         [
- The complementing [PortCategory] of `PT`, meaning that connections
- can be made between [PortConcept]s of [PortCategoryConcept] `PT` and
- [PortConcept]s of [PortCategoryConcept] `PT::complement`.
+ Creates a lasting connection between the `p` and `c`.
         ]
     ]
-]
-
-
-[endsect][/porttype]
-
-[include producer_concepts.qbk]
-
-[include consumer_concepts.qbk]
-
-[section Invocable]
-
-A type `T` is /invocable/ if it can be invoked to consume its inputs and/or
-produce its outputs.
-
-[heading Notation]
-The following expressions are used in this document:
-
-[variablelist
- [[C] [An [InvocableConcept] type.]]
- [[c] [An object of type `P`.]]
-]
-
-[heading Requirements]
-[table
- [[Name] [Expression] [Result Type] [Description]]
     [
- [Invocation]
- [`invoke(c)`
- [footnote `namespace boost::dataflow`,
- `namespace boost::signals`, `namespace boost::phoenix`]]
+ [OnlyConnect]
+ [`binary_operation<operations::connect_only, M>(p,c)`]
         [Any type]
         [
- *Semantics:* The component consumes data from connected producers,
- and makes produced data available to connected consumers.
- [footnote: This does not imply that it invokes any connected
- producers or consumers.].
+ Discards any lasting connections stored by `p` or `c`,
+ and creates a lasting connection between `p` and `c`.
+ Note that `p` or `c` could still be connected to other ports,
+ as long as these connections are not stored in `p` or `c`.
         ]
     ]
     [
- [Invocable]
- [`is_invocable<P>::type`
- [footnote `namespace boost::dataflow`]]
- [mpl::true_ or boost::true_type]
+ [Disconnect]
+ [`binary_operation<operations::disconnect, M>(p,c)`]
+ [Any type]
         [
- *Semantics:* A trait encapsulating adherence to the
- [InvocableConcept] concept.
+ Discards any existing connection between `p` and `c`.
+ ]
+ ]
+ [
+ [Extract]
+ [`binary_operation<operations::extract, M>(p,c)`]
+ [Any type]
+ [
+ Perfoms a one time transfer of data from `p` to `c`.
         ]
     ]
 ]
 
-[endsect][/invocable]
+[endsect][/binaryoperable]
 
-[section Connectable]
+[section:unaryoperable UnnaryOperable (AllDisconnectable) ]
 
-A [ProducerConcept] `P` and [ConsumerConcept] `C` are /connectable/ if they
-can be connected via the `connect` function. Typically, this means that
-they use the same underlying data transport mechanism, and produce / consume
-the same data type.
+A [PortConcept] `P` is /UnnaryOperable/
+for a unary operation `O`, and mechanism `M`, if the implementation of
+the unnary operation `O` has been specialized for `M` and `P`
+
+In this case,
+
+* If `O` is operations::disconnect_all, `P` is [AllDisconnectable]
 
 [heading Notation]
 The following expressions are used in this document:
 
 [variablelist
- [[P] [A [ProducerConcept] type.]]
- [[C] [A [ConsumerConcept] type.
- [footnote `P` and `C` are [ConnectableConcept]]
+ [[P] [A [PortConcept] type.]]
     [[p] [An object of type P.]]
- [[c] [An object of type C.]]
 ]
 
 [heading Requirements]
 [table
     [[Name] [Expression] [Result Type] [Description]]
     [
- [Connect]
- [`connect(p,c)`]
+ [Disconnect All]
+ [`unnary_operation<operations::disconnect_all, M>(p)`]
         [Any type]
         [
- *Semantics:* Creates a permanent connection between the producer
- and consumer.
- [footnote: This does not (yet) specify what happens to other
- existing connections out of `p` of into `c`. They may or may
- not get modified of erased.].
+ Destroys any connections stored by `p`.
         ]
     ]
-[/ [
- [Compatible]
- [`mpl::has_key<consumed_types_of<C>::type, produced_type_of<P>::type>`]
- [`mpl::true_`]
- [
- *Semantics:* In order for two components to be connectable,
- the produced type must be an element of the consumed types.
- ]
- ] ]
 ]
 
-[endsect][/connectable]
+[endsect][/unaryoperable]
+
+[section:componentoperable ComponentOperable (Invocable) ]
+
+A [ComponentConcept] `P` is /ComponentOperable/
+for a component operation `O`, and mechanism `M`, if the implementation of
+the component operation `O` has been specialized for `M` and `P`
 
-[section OnlyConnectable]
+In this case,
 
-A [ProducerConcept] `P` and [ConsumerConcept] `C` are /connectable/ if they
-can be connected via the `connect` function. Typically, this means that
-they use the same underlying data transport mechanism, and produce / consume
-the same data type.
+* If `O` is operations::invoke, `P` is [Invocable]
 
 [heading Notation]
 The following expressions are used in this document:
 
 [variablelist
- [[P] [A [ProducerConcept] type.]]
- [[C] [A [ConsumerConcept] type.
- [footnote `P` and `C` are [ConnectableConcept]]
- [[p] [An object of type P.]]
- [[c] [An object of type C.]]
+ [[C] [A [ComponentConcept] type.]]
+ [[c] [An object of type P.]]
 ]
 
 [heading Requirements]
 [table
     [[Name] [Expression] [Result Type] [Description]]
     [
- [Connect]
- [`connect(p,c)`]
+ [Invoke]
+ [`component_operation<operations::invoke, M>(p)`]
         [Any type]
         [
- *Semantics:* Creates a permanent connection between the producer
- and consumer.
- [footnote: This does not (yet) specify what happens to other
- existing connections out of `p` of into `c`. They may or may
- not get modified of erased.].
+ Invokes `c` - this typically causes a component to consume its
+ input data and produce its output data as appropriate.
         ]
     ]
-[/ [
- [Compatible]
- [`mpl::has_key<consumed_types_of<C>::type, produced_type_of<P>::type>`]
- [`mpl::true_`]
- [
- *Semantics:* In order for two components to be connectable,
- the produced type must be an element of the consumed types.
- ]
- ] ]
 ]
 
-[endsect][/onlyconnectable]
+[endsect][/unaryoperable]
 
 [endsect][/concepts]
\ No newline at end of file

Deleted: sandbox/SOC/2007/signals/libs/dataflow/doc/consumer_concepts.qbk
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/doc/consumer_concepts.qbk 2007-10-23 20:14:11 EDT (Tue, 23 Oct 2007)
+++ (empty file)
@@ -1,93 +0,0 @@
-
-
-[section ConsumerCategory]
-
-A ['[ConsumerCategoryConcept]] specifies the traits of a [ConsumerConcept].
-
-[heading Notation]
-[variablelist
- [[CC] [A ConsumerCategory type.]]
- [[C] [A [ConsumerConcept] type of producer category `CC`.]]
-]
-
-[heading Requirements]
-[table
- [[Name] [Expression] [Result Type] [Semantics]]
- [
- [Connections Stored]
- [`CC::connections_stored`]
- [connections_none, connections_one, connections_many]
- [
- The number of incoming connections that `C` can store.
- ]
- ]
-]
-
-[heading Notes]
-
-[heading Examples]
-
-[endsect][/consumercategory]
-
-
-[section Consumer]
-
-A type `T` is a /consumer/ if it defines a consumer category.
-To be useful, a [ConsumerConcept] should likely be
-[ConnectableConcept] to at least one [ProducerConcept]. Also, at least
-one component of a connected network should be [InvocableConcept].
-
-[heading Refinements]
-* [PhoenixConsumerConcept]
-
-[heading Notation]
-The following expressions are used in this document:
-
-[variablelist
- [[C] [A Consumer type.]]
-]
-
-[heading Requirements]
-[table
- [[Name] [Expression] [Result Type] [Description]]
- [
- [Consumer Category]
- [`consumer_category_of<C>::type`
- [footnote `namespace boost::dataflow`]]
- [Any type]
- [
- *Semantics:* The category of the producer, used for tag forwarding.
- ]
- ]
- [
- [Consumer Trait]
- [`is_consumer<C>::type`
- [footnote `namespace boost::dataflow`]]
- [mpl::true_ or boost::true_type]
- [
- *Semantics:* A trait encapsulating adherence to the Producer
- concept.
- ]
- ]
-[/ [
- [Consumed Types]
- [`consumed_types_of<P>::type`]
- [`mpl::set<any-type-list>`]
- [
- *Semantics:* The types of data consumed by the consumer.
- [footnote The types inside the `mpl::set` might
- mean different things for different consumer categories - for
- example, a SignalProducer uses function types, whereas
- a PhoenixProducer uses object types.].
- ]
- ] ]
-]
-
-[heading Notes]
-
-To define a new [ConsumerConcept] class type, it is sufficient to define
-member typedefs `consumer_category` and `consumed_types`.
-
-[heading Examples]
-
-[endsect][/consumer]
\ No newline at end of file

Modified: sandbox/SOC/2007/signals/libs/dataflow/doc/dataflow.qbk
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/doc/dataflow.qbk (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/doc/dataflow.qbk 2007-10-23 20:14:11 EDT (Tue, 23 Oct 2007)
@@ -14,17 +14,30 @@
 
 [template concepts[] [link dataflow.concepts concepts]]
 [template MechanismConcept[] [link dataflow.concepts.mechanism [^Mechanism]]]
-[template PortCategoryConcept[] [link dataflow.concepts.porttype [^PortCategory]]]
-[template FilterConcept[] [link dataflow.concepts.filter [^Filter]]]
-[template ProducerCategoryConcept[] [link dataflow.concepts.producercategory [^ProducerCategory]]]
-[template ProducerConcept[] [link dataflow.concepts.producer [^Producer]]]
-[template ProducerMapConcept[] [link dataflow.concepts.producermapconcept [^ProducerMap]]]
-[template ProxyProducerConcept[] [link dataflow.concepts.proxyproducer [^ProxyProducer]]]
-[template ConsumerConcept[] [link dataflow.concepts.consumer [^Consumer]]]
-[template ConsumerMapConcept[] [link dataflow.concepts.consumermapconcept [^ConsumerMap]]]
-[template InvocableConcept[] [link dataflow.concepts.invocable [^Invocable]]]
-[template ConnectableConcept[] [link dataflow.concepts.connectable [^Connectable]]]
-[template OnlyConnectableConcept[] [link dataflow.concepts.onlyconnectable [^OnlyConnectable]]]
+[template PortCategoryConcept[] [link dataflow.concepts.portcategory [^PortCategory]]]
+[template PortTraitsConcept[] [link dataflow.concepts.porttraits [^PortTraits]]]
+[template PortConcept[] [link dataflow.concepts.port [^Port]]]
+[template ProducerPortConcept[] [link dataflow.concepts.port [^ProducerPort]]]
+[template ConsumerPortConcept[] [link dataflow.concepts.port [^ConsumerPort]]]
+[template KeyedPortConcept[] [link dataflow.concepts.keyedport [^KeyedPort]]]
+[template ProxyPortTraitsConcept[] [link dataflow.concepts.proxyporttraits [^ProxyPortTraits]]]
+[template ProxyPortConcept[] [link dataflow.concepts.proxyport [^ProxyPort]]]
+
+[template ComponentTraitsConcept[] [link dataflow.concepts.componenttraits [^ComponentTraits]]]
+[template ComponentConcept[] [link dataflow.concepts.component [^Component]]]
+
+[template BinaryOperableConcept[] [link dataflow.concepts.binaryoperable [^BinaryOperable]]]
+[template ConnectableConcept[] [link dataflow.concepts.binaryoperable [^Connectable]]]
+[template OnlyConnectableConcept[] [link dataflow.concepts.binaryoperable [^OnlyConnectable]]]
+[template DisconnectableConcept[] [link dataflow.concepts.binaryoperable [^Disconnectable]]]
+[template ExtractableConcept[] [link dataflow.concepts.binaryoperable [^Extractable]]]
+
+[template UnaryOperableConcept[] [link dataflow.concepts.unaryoperable [^UnaryOperable]]]
+[template AllDisconnectableConcept[] [link dataflow.concepts.unaryoperable [^AllDisconnectable]]]
+
+[template ComponentOperableConcept[] [link dataflow.concepts.componentoperable [^ComponentOperable]]]
+[template InvocableConcept[] [link dataflow.concepts.componentoperable [^Invocable]]]
+
 [template SignalProducerConcept[] [link dataflow.signals.concepts.signalproducer [^SignalProducer]]]
 [template SignalConsumerConcept[] [link dataflow.signals.concepts.signalconsumer [^SignalConsumer]]]
 [template PhoenixProducerConcept[] [link dataflow.concepts.phoenix.phoenixproducer [^PhoenixProducer]]]
@@ -120,11 +133,11 @@
 [@http://svn.boost.org/trac/boost/wiki/soc/2007/SignalNetwork GSoC page].]
 
 * If you would like some more information about why one would want to connect
- objects into a signal-based network, read about
+ objects into a dataflow network, read about
   [link dataflow.introduction.dataflow Dataflow programming 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 [signals_quickstart] section of [DataflowSignals].
+ * keep in mind that the interface is subject to change
+ * Read [how_to_use how to use this library and the documentation].
 
 [include introduction.qbk]
 
@@ -239,4 +252,4 @@
 
 [endsect]
 
-[xinclude dataflow_doxygen.xml]
+[/[xinclude dataflow_doxygen.xml]]

Modified: sandbox/SOC/2007/signals/libs/dataflow/doc/future.qbk
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/doc/future.qbk (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/doc/future.qbk 2007-10-23 20:14:11 EDT (Tue, 23 Oct 2007)
@@ -53,7 +53,7 @@
 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].
+component would be both a [ProducerPortConcept] and a [ConsumerPortConcept].
 
 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

Modified: sandbox/SOC/2007/signals/libs/dataflow/doc/introduction.qbk
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/doc/introduction.qbk (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/doc/introduction.qbk 2007-10-23 20:14:11 EDT (Tue, 23 Oct 2007)
@@ -194,9 +194,8 @@
 
 For examples of how the [DataflowSignals] layer can be used, see:
 
-
-* The example on developing distributed
- [link dataflow.introduction.examples.new_layer example] application
+* The example on developing a
+ [link dataflow.introduction.examples.distributed distributed dataflow application].
 * The [DataflowSignals] documentation.
 
 [/[heading When to use]
@@ -366,7 +365,7 @@
     Setting up a Producer and Consumer]
 [endsect][/mechanism]
 
-[section:producerconsumer Setting up a Producer and Consumer]
+[section:producerconsumer Setting up a ProducerPort and ConsumerPort]
 
 Now that we have the mechanism, let's cover the basic data pipeline,
 which is implemented using the
@@ -374,14 +373,14 @@
 are accessible via `GetOuptutPort` member functions, which return a proxy
 object ([vtkAlgorithmOutput] `*`) for an actual output port.
 
-In Dataflow concepts, [vtkAlgorithmOutput] can be made a [ProducerConcept]
+In Dataflow concepts, [vtkAlgorithmOutput] can be made a [ProducerPortConcept]
 - it corresponds to a single data output point. We support it as such by
-creating a [ProducerCategoryConcept], and associating [vtkAlgorithmOutput]
+creating a [PortTraitsConcept], and associating [vtkAlgorithmOutput]
 with the producer category:
 
 [vtk_algorithm_output_producer]
 
-Now that we have a [ProducerConcept], we need a [ConsumerConcept].
+Now that we have a [ProducerPortConcept], we need a [ConsumerPortConcept].
 [vtkAlgorithm] can accept incoming connections using the `AddInputConnection`
 and `SetInputConnection` member functions. The code below provides support
 for [vtkAlgorithm] accepting connections on its default input port:
@@ -397,26 +396,29 @@
 
 [section:connectable Making things Connectable]
 
-With the pair of [ProducerConcept] and [ConsumerConcept] registered, we
+With the pair of [ProducerPortConcept] and [ConsumerPortConcept] registered, we
 can make them [ConnectableConcept] and/or [OnlyConnectableConcept].
 All we need to do is specialize the implementation for the appropriate
 categories:
 
 [vtk_connect_impl_algorithm]
 
-To make connections, the Dataflow library has a `connect`
-function in its namespace, but it
-has to be called with a mechanism template parameter. To make connecting
-easier, we'll add a forwarding
-connect function in the global namespace (where vtk classes live) specific
-to the vtk mechanism:
+Connections are done through the `boost::dataflow::binary_operation` function
+with either `operation::connect` or `operation::connect_only` operation tag,
+and the specified mechanism. To make connecting
+easier, we'll add forwarding connect and connect_only
+functions in the global namespace (where vtk classes live) specific
+to the vtk mechanism using the template include files for this purpose:
 
 [vtk_specialize_connect]
 
 [heading What we can do with what we have so far]
 
 ```
+ // connect *cone to *coneMapper
     connect(*cone->GetOutputPort(), *coneMapper);
+ // make *cone the only thing connected to *coneMapper
+ connect_only(*cone->GetOutputPort(), *coneMapper);
 ```
 
 [heading Next]
@@ -429,23 +431,23 @@
 
 In the VTK example above, both `vtkConeSource` and `vtkPolyDataMapper`
 inherit [vtkAlgorithm].
-With the [vtkAlgorithmOutput] [ProducerConcept] and
-[vtkAlgorithm] [ConsumerConcept] we've set up,
+With the [vtkAlgorithmOutput] [ProducerPortConcept] and
+[vtkAlgorithm] [ConsumerPortConcept] we've set up,
 we can do things like `connect(cone->GetOutputPort(), *coneMapper);`.
 However, we would like to do `connect(*cone, *coneMapper)`.
 
 To do that,
-we need to make [vtkAlgorithm] a [ProducerConcept]. Since [vtkAlgorithm]
+we need to make [vtkAlgorithm] a [ProducerPortConcept]. Since [vtkAlgorithm]
 forms its output connections using [vtkAlgorithmOutput] objects
 returned through the `GetOutputPort` member functions, and we've already
-configured [vtkAlgorithmOutput] as a [ProducerConcept], we can make use
+configured [vtkAlgorithmOutput] as a [ProducerPortConcept], we can make use
 of the [ProxyProducerConcept] concept provided by the dataflow library.
-In effect, we will make [vtkAlgorithm] delegate it's [ProducerConcept]
+In effect, we will make [vtkAlgorithm] delegate it's [ProducerPortConcept]
 functionality to [vtkAlgorithmOutput]:
 
 [vtk_algorithm_proxy_producer]
 
-Now, [vtkAlgorithm] is a [ProducerConcept].
+Now, [vtkAlgorithm] is a [ProducerPortConcept].
 
 [heading What we can do with what we have so far]
 
@@ -463,7 +465,7 @@
 
 In a VTK pipeline, a [vtkActor] consumes data from a [vtkMapper], and produces
 data for a [vtkRenderer]. In this case, we can provide Dataflow support
-for a [vtkActor] as both a [ProducerConcept] and a [ConsumerConcept] in one
+for a [vtkActor] as both a [ProducerPortConcept] and a [ConsumerPortConcept] in one
 fell swoop:
 
 [vtk_actor_filter]
@@ -484,8 +486,8 @@
 
 To accomodate such situations, the Dataflow library provides
 [ProducerMapConcept]s, which are similar to [ProxyProducer]s but
-the [ProducerConcept] they delegate to is keyed on the category of
-[ConsumerConcept] they are being connected to.
+the [ProducerPortConcept] they delegate to is keyed on the category of
+[ConsumerPortConcept] they are being connected to.
 
 [vtk_mapper_producer]
 

Modified: sandbox/SOC/2007/signals/libs/dataflow/doc/phoenix/concepts.qbk
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/doc/phoenix/concepts.qbk (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/doc/phoenix/concepts.qbk 2007-10-23 20:14:11 EDT (Tue, 23 Oct 2007)
@@ -2,12 +2,12 @@
 
 [section PhoenixProducer]
 
-A [ProducerConcept] type `P` is a ['[PhoenixProducerConcept]] if it uses
+A [ProducerPortConcept] type `P` is a ['[PhoenixProducerConcept]] if it uses
 the underlying pointer based data transport mechanism. It is
 [ConnectableConcept] with a compatible [PhoenixConsumerConcept].
 
 [heading Refinement of]
-* [ProducerConcept]
+* [ProducerPortConcept]
 * [InvocableConcept]
 
 [heading Notation]
@@ -65,7 +65,7 @@
 [PhoenixProducerConcept] of compatible produced type.
 
 [heading Refinement of]
-* [ConsumerConcept]
+* [ConsumerPortConcept]
 * [ConnectableConcept] with [PhoenixProducerConcept] of compatible produced type.
 
 [heading Notation]

Copied: sandbox/SOC/2007/signals/libs/dataflow/doc/port_concepts.qbk (from r39908, /sandbox/SOC/2007/signals/libs/dataflow/doc/producer_concepts.qbk)
==============================================================================
--- /sandbox/SOC/2007/signals/libs/dataflow/doc/producer_concepts.qbk (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/doc/port_concepts.qbk 2007-10-23 20:14:11 EDT (Tue, 23 Oct 2007)
@@ -1,185 +1,176 @@
-[section ProducerCategory]
+[section PortCategory]
 
-A ['[ProducerCategoryConcept]] specifies the traits of a [ProducerConcept].
+A [PortCategoryConcept] designates a category of port in the Dataflow library.
+The library currently defines two [PortCategoryConcept]s:
+
+ * `boost::dataflow::ports::producer`, and
+ * `boost::dataflow::ports::consumer`
 
 [heading Notation]
+The following expressions are used in this document:
+
 [variablelist
- [[PC] [A ProducerCategory type.]]
- [[P] [A [ProducerConcept] type of producer category `PC`.]]
+ [[PT] [A [PortCategoryConcept] type.]]
 ]
 
 [heading Requirements]
+
 [table
- [[Name] [Expression] [Result Type] [Semantics]]
- [
- [Connections Stored]
- [`PC::connections_stored`]
- [connections::none, connections::one, connections::many]
- [The number of outgoing connections that `P` can store.]
- ]
+ [[Name] [Expression] [Result Type] [Description]]
     [
- [Producer Concept]
- [`PC::producer_concept`]
- [concepts::producer, concepts::single_type_producer,
- concepts::keyed_producer]
- [The most refined producer concept that `P` satisfies.]
+ [Opposite PortCategory]
+ [`PT::complement`]
+ [[PortCategoryConcept] type]
+ [
+ The complementing [PortCategoryConcept] of `PT`, meaning that connections
+ can be made between [PortCategoryConcept]s of [PortCategoryConcept] `PT` and
+ [PortConcept]s of [PortCategoryConcept] `PT::complement`.
+ ]
     ]
 ]
 
-[heading Notes]
-All these traits are in regards to the mechanism for which the `P` has
-producer category `PC`.
-
-[heading Examples]
-
+[heading Header]
 
-[endsect][/producercategory]
+```
+ #include <boost/dataflow/support/port.hpp> // or
+ #include <boost/dataflow/support.hpp>
+```
 
+[endsect][/portcategory]
 
-[section Producer]
+[section PortTraits]
 
-A type `P` is a ['[ProducerConcept]] for a mechanism `M` if it specifies
-a producer category for that mechanism.
-To be useful, a [ProducerConcept] should likely be
-[ConnectableConcept] to at least one [ConsumerConcept]. Also, at least
-one component of a connected network should be [InvocableConcept].
-
-[heading Refinements]
-* [SingleTypeProducer]
-* [PhoenixProducerConcept]
+A ['[PortTraitsConcept]] specifies the traits of a [PortConcept].
 
 [heading Notation]
-The following expressions are used in this document:
-
 [variablelist
- [[P] [A Producer type.]]
- [[M] [A Mechanism type.]]
+ [[PC] [A PortTraits type.]]
+ [[P] [A [PortConcept] type of producer category `PC`.]]
 ]
 
 [heading Requirements]
 [table
     [[Name] [Expression] [Result Type] [Semantics]]
     [
- [Producer Category]
- [`producer_category_of<M, P>::type`
- [footnote `namespace boost::dataflow`]]
- [Any type]
- [
- The category of the producer, used for tag forwarding.
- ]
+ [Mechanism]
+ [`PC::mechanism`]
+ [any type]
+ [[MechanismConcept] type tag.]
     ]
     [
- [Producer Trait]
- [`is_producer<M, P>::type`
- [footnote `namespace boost::dataflow`]]
- [mpl::true_ or boost::true_type]
- [
- A trait encapsulating adherence to the Producer
- concept.
- ]
+ [Port Category]
+ [`PC::port_category`]
+ [[PortCategoryConcept] type]
+ [The category of the port]
+ ]
+ [
+ [Port Concept]
+ [`PC::port_concept`]
+ [`concepts::port`, `concepts::keyed_port`]
+ [The most refined producer concept that `P` satisfies.]
     ]
 ]
 
-[heading Notes]
+[heading Header]
 
-To specify that a type `P` is a [ProducerConcept] for a mechanism `M`,
-it suffices to provide a specification for `producer_category_of`.
-If the type is a class type which you can modify, you can achieve this by
-providing a `T::dataflow<M>::producer_category` typedef specifying the
-category. The Dataflow library provides a convenience class
-`producer` which you can inherit for this purpose.
+```
+ #include <boost/dataflow/support/port.hpp> // or
+ #include <boost/dataflow/support.hpp>
+```
+
+[heading Notes]
 
 [heading Examples]
 
-[endsect][/producer]
+[endsect][/producertraits]
+
+
+[section:port Port (ProducerPort, ConsumerPort)]
 
-[section SingleTypeProducer]
+A type `P` is a ['[PortConcept]] for a mechanism `M` and port category `PC`
+if it specifies a [PortTraitsConcept] for that mechanism and port category.
 
-A type `P` is a ['[ProducerConcept]] if it defines a producer category,
-a produced type, and specifies whether it is invocable.
-To be useful, a [ProducerConcept] should likely be
-[ConnectableConcept] to at least one [ConsumerConcept]. Also, at least
-one component of a connected network should be [InvocableConcept].
+In that case,
+
+* If `PC` is `ports::producer`, then `P` is a `ProducerPort`
+* If `PC` If `ports::consumer`, then `P` is a `ConsumerPort`
 
 [heading Refinements]
-* [SingleTypeProducer]
-* [PhoenixProducerConcept]
+* [SingleTypePort]
+* [PhoenixPortConcept]
 
 [heading Notation]
 The following expressions are used in this document:
 
 [variablelist
- [[P] [A Producer type.]]
+ [[P] [A Port type.]]
+ [[M] [A [MechanismConcept] type.]]
+ [[PC] [A [PortCategoryConcept] type.]]
 ]
 
 [heading Requirements]
 [table
     [[Name] [Expression] [Result Type] [Semantics]]
     [
- [Producer Category]
- [`producer_category_of<P>::type`
- [footnote `namespace boost::dataflow`]]
- [Any type]
- [
- The category of the producer, used for tag forwarding.
- ]
- ]
- [
- [Produced Type]
- [`produced_type_of<P>::type`
+ [Port Traits]
+ [`port_traits_of<M, PC, P>::type`
          [footnote `namespace boost::dataflow`]]
- [Any type]
+ [Any [PortTraitsConcept] type]
         [
- The type of data produced by the producer.
- [footnote This might
- mean different things for different producer categories - for
- example, a SignalProducer uses function types, whereas
- a PhoenixProducer uses object types.].
+ The [PortTraitsConcept] of the port.
         ]
     ]
     [
- [Producer Trait]
- [`is_producer<P>::type`
+ [IsPort Trait]
+ [`is_port<M, PC, P>::type`
          [footnote `namespace boost::dataflow`]]
- [mpl::true_ or boost::true_type]
+ [Boolean metafunction that evaluates to true]
         [
- *Semantics:* A trait encapsulating adherence to the Producer
+ A trait encapsulating adherence to the Port
             concept.
         ]
     ]
- [
- [Invocable]
- [`is_invocable<P>::type`
- [footnote `namespace boost::dataflow`]]
- [Boolean metafunction]
- [
- *Semantics:* A producer must specify if it is [InvocableConcept].
- ]
- ]
 ]
 
+[heading Header]
+
+```
+ #include <boost/dataflow/support/port.hpp> // or
+ #include <boost/dataflow/support.hpp>
+```
+
 [heading Notes]
 
-To define a new [ProducerConcept] class type, it is sufficient to define
-member typedefs `producer_category` and `produced_type`.
+To specify that a type `P` is a [PortConcept],
+it suffices to provide a specialization of `port_traits_of`.
+This can either be done explicitly, or intrusively by providing
+a `P::port_traits` member type specifying the
+[PortTraitsConcept]. `P::port_traits` can either be a [PortTraitsConcept]
+type, or an MPL sequence of [PortTraitsConcept] types.
+
+The Dataflow library provides a convenience class
+`port` which you can inherit instead of declaring the member type.
 
 [heading Examples]
 
-[endsect][/singletypeproducer]
+[endsect][/port]
 
-[section ProxyProducer]
+[section ProxyPortTraits]
+[endsect][/proxyporttraits]
 
-A type `PP` is a ['[ProxyProducerConcept]] if specifies the proxied producer
+[section ProxyPort]
+
+A type `PP` is a ['[ProxyPortConcept]] if specifies the proxied producer
 type, and if objects of the proxied type can be retreived from objects of
-[ProxyProducerConcept] type. If the proxied producer type is a valid
-[ProducerConcept], then 'PP' satisfies the [ProducerConcept] requirements
+[ProxyPortConcept] type. If the proxied producer type is a valid
+[PortConcept], then 'PP' satisfies the [PortConcept] requirements
 in the same way.
 
 [heading Notation]
 The following expressions are used in this document:
 
 [variablelist
- [[PP] [A ProxyProducer type.]]
+ [[PP] [A ProxyPort type.]]
     [[pp] [An object of type `PP`]]
 ]
 
@@ -187,7 +178,7 @@
 [table
     [[Name] [Expression] [Result Type] [Semantics]]
     [
- [Proxy Producer Category]
+ [Proxy Port Category]
         [`proxy_producer_category_of<PP>::type`
          [footnote `namespace boost::dataflow`]]
         [Any type]
@@ -196,7 +187,7 @@
         ]
     ]
     [
- [Proxied Producer Type]
+ [Proxied Port Type]
         [`proxied_producer_of<PP>::type`
          [footnote `namespace boost::dataflow`]]
         [Any type]
@@ -205,7 +196,7 @@
         ]
     ]
     [
- [Proxied Producer]
+ [Proxied Port]
         [`get_proxied_producer(pp)`
          [footnote `namespace boost::dataflow`]]
         []
@@ -215,15 +206,22 @@
     ]
 ]
 
+[heading Header]
+
+```
+ #include <boost/dataflow/support/proxy_port.hpp> // or
+ #include <boost/dataflow/support.hpp>
+```
+
 [heading Notes]
 
-To define a new [ProxyProducerConcept] class type, it is sufficient to define
+To define a new [ProxyPortConcept] class type, it is sufficient to define
 member typedefs `proxy_producer_category` and `proxy_producer_for`,
 and member function `get_proxied_producer`.
 
 [heading Examples]
 
-[endsect][/proxyproducer]
+[endsect][/proxyport]
 
-[section ProducerMap]
-[endsect][/proxyproducer]
\ No newline at end of file
+[section PortMap]
+[endsect][/port_map]
\ No newline at end of file

Deleted: sandbox/SOC/2007/signals/libs/dataflow/doc/producer_concepts.qbk
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/doc/producer_concepts.qbk 2007-10-23 20:14:11 EDT (Tue, 23 Oct 2007)
+++ (empty file)
@@ -1,229 +0,0 @@
-[section ProducerCategory]
-
-A ['[ProducerCategoryConcept]] specifies the traits of a [ProducerConcept].
-
-[heading Notation]
-[variablelist
- [[PC] [A ProducerCategory type.]]
- [[P] [A [ProducerConcept] type of producer category `PC`.]]
-]
-
-[heading Requirements]
-[table
- [[Name] [Expression] [Result Type] [Semantics]]
- [
- [Connections Stored]
- [`PC::connections_stored`]
- [connections::none, connections::one, connections::many]
- [The number of outgoing connections that `P` can store.]
- ]
- [
- [Producer Concept]
- [`PC::producer_concept`]
- [concepts::producer, concepts::single_type_producer,
- concepts::keyed_producer]
- [The most refined producer concept that `P` satisfies.]
- ]
-]
-
-[heading Notes]
-All these traits are in regards to the mechanism for which the `P` has
-producer category `PC`.
-
-[heading Examples]
-
-
-[endsect][/producercategory]
-
-
-[section Producer]
-
-A type `P` is a ['[ProducerConcept]] for a mechanism `M` if it specifies
-a producer category for that mechanism.
-To be useful, a [ProducerConcept] should likely be
-[ConnectableConcept] to at least one [ConsumerConcept]. Also, at least
-one component of a connected network should be [InvocableConcept].
-
-[heading Refinements]
-* [SingleTypeProducer]
-* [PhoenixProducerConcept]
-
-[heading Notation]
-The following expressions are used in this document:
-
-[variablelist
- [[P] [A Producer type.]]
- [[M] [A Mechanism type.]]
-]
-
-[heading Requirements]
-[table
- [[Name] [Expression] [Result Type] [Semantics]]
- [
- [Producer Category]
- [`producer_category_of<M, P>::type`
- [footnote `namespace boost::dataflow`]]
- [Any type]
- [
- The category of the producer, used for tag forwarding.
- ]
- ]
- [
- [Producer Trait]
- [`is_producer<M, P>::type`
- [footnote `namespace boost::dataflow`]]
- [mpl::true_ or boost::true_type]
- [
- A trait encapsulating adherence to the Producer
- concept.
- ]
- ]
-]
-
-[heading Notes]
-
-To specify that a type `P` is a [ProducerConcept] for a mechanism `M`,
-it suffices to provide a specification for `producer_category_of`.
-If the type is a class type which you can modify, you can achieve this by
-providing a `T::dataflow<M>::producer_category` typedef specifying the
-category. The Dataflow library provides a convenience class
-`producer` which you can inherit for this purpose.
-
-[heading Examples]
-
-[endsect][/producer]
-
-[section SingleTypeProducer]
-
-A type `P` is a ['[ProducerConcept]] if it defines a producer category,
-a produced type, and specifies whether it is invocable.
-To be useful, a [ProducerConcept] should likely be
-[ConnectableConcept] to at least one [ConsumerConcept]. Also, at least
-one component of a connected network should be [InvocableConcept].
-
-[heading Refinements]
-* [SingleTypeProducer]
-* [PhoenixProducerConcept]
-
-[heading Notation]
-The following expressions are used in this document:
-
-[variablelist
- [[P] [A Producer type.]]
-]
-
-[heading Requirements]
-[table
- [[Name] [Expression] [Result Type] [Semantics]]
- [
- [Producer Category]
- [`producer_category_of<P>::type`
- [footnote `namespace boost::dataflow`]]
- [Any type]
- [
- The category of the producer, used for tag forwarding.
- ]
- ]
- [
- [Produced Type]
- [`produced_type_of<P>::type`
- [footnote `namespace boost::dataflow`]]
- [Any type]
- [
- The type of data produced by the producer.
- [footnote This might
- mean different things for different producer categories - for
- example, a SignalProducer uses function types, whereas
- a PhoenixProducer uses object types.].
- ]
- ]
- [
- [Producer Trait]
- [`is_producer<P>::type`
- [footnote `namespace boost::dataflow`]]
- [mpl::true_ or boost::true_type]
- [
- *Semantics:* A trait encapsulating adherence to the Producer
- concept.
- ]
- ]
- [
- [Invocable]
- [`is_invocable<P>::type`
- [footnote `namespace boost::dataflow`]]
- [Boolean metafunction]
- [
- *Semantics:* A producer must specify if it is [InvocableConcept].
- ]
- ]
-]
-
-[heading Notes]
-
-To define a new [ProducerConcept] class type, it is sufficient to define
-member typedefs `producer_category` and `produced_type`.
-
-[heading Examples]
-
-[endsect][/singletypeproducer]
-
-[section ProxyProducer]
-
-A type `PP` is a ['[ProxyProducerConcept]] if specifies the proxied producer
-type, and if objects of the proxied type can be retreived from objects of
-[ProxyProducerConcept] type. If the proxied producer type is a valid
-[ProducerConcept], then 'PP' satisfies the [ProducerConcept] requirements
-in the same way.
-
-[heading Notation]
-The following expressions are used in this document:
-
-[variablelist
- [[PP] [A ProxyProducer type.]]
- [[pp] [An object of type `PP`]]
-]
-
-[heading Requirements]
-[table
- [[Name] [Expression] [Result Type] [Semantics]]
- [
- [Proxy Producer Category]
- [`proxy_producer_category_of<PP>::type`
- [footnote `namespace boost::dataflow`]]
- [Any type]
- [
- The category of the proxy producer, used for tag forwarding.
- ]
- ]
- [
- [Proxied Producer Type]
- [`proxied_producer_of<PP>::type`
- [footnote `namespace boost::dataflow`]]
- [Any type]
- [
- The proxied producer type.
- ]
- ]
- [
- [Proxied Producer]
- [`get_proxied_producer(pp)`
- [footnote `namespace boost::dataflow`]]
- []
- [
- Retrieves a reference to the proxied producer object.
- ]
- ]
-]
-
-[heading Notes]
-
-To define a new [ProxyProducerConcept] class type, it is sufficient to define
-member typedefs `proxy_producer_category` and `proxy_producer_for`,
-and member function `get_proxied_producer`.
-
-[heading Examples]
-
-[endsect][/proxyproducer]
-
-[section ProducerMap]
-[endsect][/proxyproducer]
\ No newline at end of file

Modified: sandbox/SOC/2007/signals/libs/dataflow/doc/signals/concepts.qbk
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/doc/signals/concepts.qbk (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/doc/signals/concepts.qbk 2007-10-23 20:14:11 EDT (Tue, 23 Oct 2007)
@@ -2,11 +2,11 @@
 
 [section SignalProducer]
 
-A [ProducerConcept] type `P` is a ['[SignalProducerConcept]] if it uses
+A [ProducerPortConcept] type `P` is a ['[SignalProducerConcept]] if it uses
 the boost::signal based data transport mechanism.
 
 [heading Refinement of]
-* [ProducerConcept]
+* [ProducerPortConcept]
 * [ConnectableConcept] with [SignalConsumerConcept] of compatible consumed type.
 
 [heading Notation]
@@ -53,7 +53,7 @@
 
 [heading Notes]
 
-To define a new [ProducerConcept] class type, it is sufficient to define
+To define a new [ProducerPortConcept] class type, it is sufficient to define
 member typedefs `producer_category` and `signal_type`, and specialize
 the `get_signal` template.
 
@@ -65,7 +65,7 @@
 data transport mechanism. I.e., it is [ConnectableConcept] to
 
 [heading Refinement of]
-* [ConsumerConcept]
+* [ConsumerPortConcept]
 * [ConnectableConcept] with [SignalProducerConcept] of compatible produced type.
 
 [heading Notation]

Modified: sandbox/SOC/2007/signals/libs/dataflow/example/VTK/Cone.cxx
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/example/VTK/Cone.cxx (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/example/VTK/Cone.cxx 2007-10-23 20:14:11 EDT (Tue, 23 Oct 2007)
@@ -88,10 +88,9 @@
   //
   vtkRenderWindow *renWin = vtkRenderWindow::New();
 // renWin->AddRenderer( ren1 );
- connect (ren1, renWin);
   renWin->SetSize( 300, 300 );
   
- *cone >>= *coneMapper >>= *coneActor >>= *ren1 >>= *renWin;
+ *cone >>= *coneMapper >>= *coneActor >>= *ren1 >>= renWin;
 
   //
   // Now we loop over 360 degreeees and render the cone each time.

Modified: sandbox/SOC/2007/signals/libs/dataflow/example/VTK/Jamfile.v2
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/example/VTK/Jamfile.v2 (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/example/VTK/Jamfile.v2 2007-10-23 20:14:11 EDT (Tue, 23 Oct 2007)
@@ -31,7 +31,7 @@
     ;
 
 exe Cone : Cone.cxx X11 Xt vtkCommon vtkRendering vtkFiltering vtkGraphics GL ;
-#exe Cone2 : Cone2.cxx X11 Xt vtkCommon vtkRendering vtkFiltering vtkGraphics GL ;
+exe Cone2 : Cone2.cxx X11 Xt vtkCommon vtkRendering vtkFiltering vtkGraphics GL ;
 #exe Cone3 : Cone3.cxx X11 Xt vtkCommon vtkRendering vtkFiltering vtkGraphics GL ;
 #exe Cone4 : Cone4.cxx X11 Xt vtkCommon vtkRendering vtkFiltering vtkGraphics GL ;
 #exe Cone5 : Cone5.cxx X11 Xt vtkCommon vtkRendering vtkFiltering vtkGraphics GL ;

Modified: sandbox/SOC/2007/signals/libs/dataflow/example/VTK/support.hpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/example/VTK/support.hpp (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/example/VTK/support.hpp 2007-10-23 20:14:11 EDT (Tue, 23 Oct 2007)
@@ -22,102 +22,105 @@
 
 //[ vtk_mechanism
 
-namespace boost { namespace dataflow {
-
-namespace vtk {
+namespace boost { namespace dataflow { namespace vtk {
 
 // The vtk mechanism tag
 struct mechanism;
 
-} // namespace boost::dataflow::vtk
+} } } // namespace boost::dataflow::vtk
 
 //]
 
 //[ vtk_algorithm_output_producer
-// Tag for vtkAlgorithmOutput objects, which serve as proxies for
-// vtkAlgorithm ouput ports.
-namespace vtk {
+namespace boost { namespace dataflow { namespace vtk {
 
+// PortTraits for vtkAlgorithmOutput objects, which produce data.
+// We specify the Mechanism (vtk::mechanism), PortCategory (ports::producer),
+// and the most refined concept which the port satisfies (ports::port).
 struct vtk_algorithm_output_producer
- : public port_traits<mechanism, ports::producer, concepts::producer> {};
+ : public port_traits<mechanism, ports::producer, concepts::port> {};
     
-} // namespace boost::dataflow::vtk
+} } } // namespace boost::dataflow::vtk
 
+// This macro specializes the port_traits_of template to the specified
+// PortTraits, and also verifies that the PortTraits requirements are satisfied.
+// The port_traits_of template is used by the Dataflow library to associate
+// a Port with its PortTraits.
 DATAFLOW_PORT_CATEGORY(vtkAlgorithmOutput, vtk::vtk_algorithm_output_producer)
-
 //]
 
 
 //[ vtk_algorithm_consumer
-namespace vtk {
+namespace boost { namespace dataflow { namespace vtk {
 
 struct vtk_algorithm_consumer
- : public port_traits<mechanism, ports::consumer, concepts::consumer> {};
+ : public port_traits<mechanism, ports::consumer, concepts::port> {};
     
-} // namespace boost::dataflow::vtk
+} } } // namespace boost::dataflow::vtk
 
+// Since vtkAlgorithm is typically inherited, we will specialize the
+// port_traits_of template for all its descendants.
 DATAFLOW_PORT_CATEGORY_ENABLE_IF(
     T,
     boost::is_base_of<vtkAlgorithm BOOST_PP_COMMA() T>,
     vtk::vtk_algorithm_consumer)
-
 //]
 
 //[ vtk_connect_impl_algorithm
-namespace extension {
+namespace boost { namespace dataflow { namespace extension {
 
- template<>
- struct binary_impl<vtk::mechanism, operations::connect, vtk::vtk_algorithm_output_producer, vtk::vtk_algorithm_consumer>
+template<>
+struct binary_operation_impl<operations::connect, vtk::vtk_algorithm_output_producer, vtk::vtk_algorithm_consumer>
+{
+ template<typename Producer, typename Consumer>
+ struct apply
     {
- template<typename Producer, typename Consumer>
- struct apply
+ static void call(Producer &producer, Consumer &consumer)
         {
- static void call(Producer &producer, Consumer &consumer)
- {
- consumer.AddInputConnection(&producer);
- }
- };
+ consumer.AddInputConnection(&producer);
+ }
     };
-
- template<>
- struct binary_impl<vtk::mechanism, operations::connect_only, vtk::vtk_algorithm_output_producer, vtk::vtk_algorithm_consumer>
+};
+
+template<>
+struct binary_operation_impl<operations::connect_only, vtk::vtk_algorithm_output_producer, vtk::vtk_algorithm_consumer>
+{
+ template<typename Producer, typename Consumer>
+ struct apply
     {
- template<typename Producer, typename Consumer>
- struct apply
+ static void call(Producer &producer, Consumer &consumer)
         {
- static void call(Producer &producer, Consumer &consumer)
- {
- consumer.SetInputConnection(&producer);
- }
- };
+ consumer.SetInputConnection(&producer);
+ }
     };
+};
     
-}
+} } } // namespace boost::dataflow::vtk
 
 //]
 
 
 //[ vtk_algorithm_proxy_producer
 
-namespace vtk {
+namespace boost { namespace dataflow { namespace vtk {
 
 struct vtk_algorithm_proxy_producer
- : public proxy_port_traits<vtkAlgorithmOutput> {};
+ : public proxy_port_traits<mechanism, ports::producer> {};
 
-} // namespace boost::dataflow::vtk
+} } } // namespace boost::dataflow::vtk
 
-DATAFLOW_PROXY_PORT_CATEGORY_ENABLE_IF(vtk::mechanism, ports::producer,
+DATAFLOW_PROXY_PORT_CATEGORY_ENABLE_IF(
     T,
     mpl::and_<
- typename boost::is_base_of<vtkAlgorithm BOOST_PP_COMMA() T> BOOST_PP_COMMA()
+ boost::is_base_of<vtkAlgorithm BOOST_PP_COMMA() T> BOOST_PP_COMMA()
         mpl::not_<boost::is_base_of<vtkMapper BOOST_PP_COMMA() T> >
>,
     vtk::vtk_algorithm_proxy_producer)
 
-namespace extension {
+namespace boost { namespace dataflow { namespace extension {
 
     template<>
- struct get_proxied_port_impl<vtk::mechanism, ports::producer, vtk::vtk_algorithm_proxy_producer>
+ struct get_port_impl<vtk::vtk_algorithm_proxy_producer>
     {
         template<typename ProxyProducer>
         struct apply
@@ -130,23 +133,24 @@
             }
         };
     };
-}
+
+} } } // namespace boost::dataflow::extension
 
 //]
 
 //[ vtk_actor_filter
 
-namespace vtk {
+namespace boost { namespace dataflow { namespace vtk {
 
 struct vtk_actor_producer
- : public port_traits<mechanism, ports::producer, concepts::producer>
+ : public port_traits<mechanism, ports::producer, concepts::port>
 {};
 
 struct vtk_actor_consumer
- : public port_traits<mechanism, ports::consumer, concepts::consumer>
+ : public port_traits<mechanism, ports::consumer, concepts::port>
 {};
 
-}
+} } } // namespace boost::dataflow::vtk
 
 DATAFLOW_PORT_CATEGORY_ENABLE_IF(
     T,
@@ -157,15 +161,15 @@
     T,
     boost::is_base_of<vtkActor BOOST_PP_COMMA() T>,
     vtk::vtk_actor_consumer)
-
+
 //]
 
 //[ vtk_mapper_producer
 
-namespace vtk {
+namespace boost { namespace dataflow { namespace vtk {
 
 struct vtk_mapper_producer
- : public port_traits<mechanism, ports::producer, concepts::producer> {};
+ : public port_traits<mechanism, ports::producer, concepts::port> {};
 
 struct vtk_mapper_proxy : public port<vtk_mapper_producer>
 {
@@ -181,85 +185,87 @@
 
 struct vtk_mapper_proxy_producer
     : public proxy_port_traits<
- //ports::producer,
- port_map<mechanism, ports::producer, vtk_mapper_map>
+ vtk::mechanism,
+ ports::producer
+// port_map<mechanism, ports::producer, vtk_mapper_map>
> {};
     
-}
+} } } // namespace boost::dataflow::vtk
 
-DATAFLOW_PROXY_PORT_CATEGORY_ENABLE_IF(vtk::mechanism, ports::producer,
+DATAFLOW_PROXY_PORT_CATEGORY_ENABLE_IF(
     T,
     boost::is_base_of<vtkMapper BOOST_PP_COMMA() T>,
     vtk::vtk_mapper_proxy_producer)
 
-namespace extension {
+namespace boost { namespace dataflow { namespace extension {
 
- template<>
- struct get_proxied_port_impl<vtk::mechanism, ports::producer, vtk::vtk_mapper_proxy_producer>
+template<>
+struct get_port_impl<vtk::vtk_mapper_proxy_producer>
+{
+ template<typename ProxyProducer>
+ struct apply
     {
- template<typename ProxyProducer>
- struct apply
+ typedef const port_map<vtk::mechanism, ports::producer, vtk::vtk_mapper_map> type;
+
+ static type call(ProxyProducer &t)
         {
- typedef const port_map<vtk::mechanism, ports::producer, vtk::vtk_mapper_map> type;
-
- static type call(ProxyProducer &t)
- {
- return vtk::vtk_mapper_map(t.GetNumberOfOutputPorts() ?
- *t.GetOutputPort() : *(vtkAlgorithmOutput *)NULL,
- vtk::vtk_mapper_proxy(&t));
- }
- };
+ return vtk::vtk_mapper_map(t.GetNumberOfOutputPorts() ?
+ *t.GetOutputPort() : *(vtkAlgorithmOutput *)NULL,
+ vtk::vtk_mapper_proxy(&t));
+ }
     };
-
- template<>
- struct binary_impl<vtk::mechanism, operations::connect_only, vtk::vtk_mapper_producer, vtk::vtk_actor_consumer>
+};
+
+template<>
+struct binary_operation_impl<operations::connect_only, vtk::vtk_mapper_producer, vtk::vtk_actor_consumer>
+{
+ template<typename Producer, typename Consumer>
+ struct apply
     {
- template<typename Producer, typename Consumer>
- struct apply
+ static void call(Producer &producer, Consumer &consumer)
         {
- static void call(Producer &producer, Consumer &consumer)
- {
- consumer.SetMapper(producer);
- }
- };
+ consumer.SetMapper(producer);
+ }
     };
-
- template<>
- struct binary_impl<vtk::mechanism, operations::connect, vtk::vtk_mapper_producer, vtk::vtk_actor_consumer>
+};
+
+template<>
+struct binary_operation_impl<operations::connect, vtk::vtk_mapper_producer, vtk::vtk_actor_consumer>
+{
+ template<typename Producer, typename Consumer>
+ struct apply
     {
- template<typename Producer, typename Consumer>
- struct apply
+ static void call(Producer &producer, Consumer &consumer)
         {
- static void call(Producer &producer, Consumer &consumer)
- {
- BOOST_ASSERT(!consumer.GetMapper());
- consumer.SetMapper(producer);
- }
- };
+ BOOST_ASSERT(!consumer.GetMapper());
+ consumer.SetMapper(producer);
+ }
     };
+};
+
+} } } // namespace boost::dataflow::extension
 
-}
 
 //]
 
 //[ vtk_setup_rest
 
-namespace vtk {
+namespace boost { namespace dataflow { namespace vtk {
 
 struct vtk_renderer_producer
- : public port_traits<mechanism, ports::producer, concepts::producer>
+ : public port_traits<mechanism, ports::producer, concepts::port>
 {};
 
 struct vtk_renderer_consumer
- : public port_traits<mechanism, ports::consumer, concepts::consumer>
+ : public port_traits<mechanism, ports::consumer, concepts::port>
 {};
 
 
 struct vtk_rendererwindow_consumer
- : public port_traits<mechanism, ports::consumer, concepts::consumer>
+ : public port_traits<mechanism, ports::consumer, concepts::port>
 {};
 
-}
+} } } // namespace boost::dataflow::vtk
 
 DATAFLOW_PORT_CATEGORY_ENABLE_IF(
     T,
@@ -276,67 +282,68 @@
     boost::is_base_of<vtkRenderWindow BOOST_PP_COMMA() T>,
     vtk::vtk_rendererwindow_consumer)
 
+namespace boost { namespace dataflow { namespace extension {
 
-
-namespace extension {
-
- template<>
- struct binary_impl<vtk::mechanism, operations::connect, vtk::vtk_actor_producer, vtk::vtk_renderer_consumer>
+template<>
+struct binary_operation_impl<operations::connect, vtk::vtk_actor_producer, vtk::vtk_renderer_consumer>
+{
+ template<typename Producer, typename Consumer>
+ struct apply
     {
- template<typename Producer, typename Consumer>
- struct apply
+ static void call(Producer &producer, Consumer &consumer)
         {
- static void call(Producer &producer, Consumer &consumer)
- {
- consumer.AddActor(&producer);
- }
- };
+ consumer.AddActor(&producer);
+ }
     };
+};
 
- template<>
- struct binary_impl<vtk::mechanism, operations::connect, vtk::vtk_renderer_producer, vtk::vtk_rendererwindow_consumer>
+template<>
+struct binary_operation_impl<operations::connect, vtk::vtk_renderer_producer, vtk::vtk_rendererwindow_consumer>
+{
+ template<typename Producer, typename Consumer>
+ struct apply
     {
- template<typename Producer, typename Consumer>
- struct apply
+ static void call(Producer &producer, Consumer &consumer)
         {
- static void call(Producer &producer, Consumer &consumer)
- {
- consumer.AddRenderer(&producer);
- }
- };
+ consumer.AddRenderer(&producer);
+ }
     };
-}
+};
+
+} } } // namespace boost::dataflow::extension
 
 //]
 
 //[ vtk_support_pointer
 
+namespace boost { namespace dataflow {
+
 namespace vtk {
 
-template<typename T>
-struct pointer_proxy_port : public proxy_port_traits<T> {};
+ template<typename T>
+ struct pointer_proxy_producer : public proxy_port_traits<vtk::mechanism, ports::producer> {};
 
-//template<typename T>
-//struct pointer_proxy_port : public proxy_port_traits<T> {};
+ template<typename T>
+ struct pointer_proxy_consumer : public proxy_port_traits<vtk::mechanism, ports::consumer> {};
 
-}
+} // namespace vtk
 
 template<typename T>
 struct proxy_port_traits_of<vtk::mechanism, ports::producer, T *>
 {
- typedef vtk::pointer_proxy_port<T> type;
+ typedef vtk::pointer_proxy_producer<T> type;
 };
 
 template<typename T>
 struct proxy_port_traits_of<vtk::mechanism, ports::consumer, T *>
 {
- typedef vtk::pointer_proxy_port<T> type;
+ typedef vtk::pointer_proxy_consumer<T> type;
 };
 
 namespace extension {
 
     template<typename T>
- struct get_proxied_port_impl<vtk::mechanism, ports::producer, vtk::pointer_proxy_port<T> >
+ struct get_port_impl<vtk::pointer_proxy_producer<T> >
     {
         template<typename ProxyProducer>
         struct apply
@@ -351,7 +358,7 @@
     };
 
     template<typename T>
- struct get_proxied_port_impl<vtk::mechanism, ports::consumer, vtk::pointer_proxy_port<T> >
+ struct get_port_impl<vtk::pointer_proxy_consumer<T> >
     {
         template<typename ProxyConsumer>
         struct apply
@@ -365,15 +372,26 @@
         };
     };
     
-}
+} // namespace extension
 
-//]
+} } // namespace boost::dataflow
 
-} }
+//]
 
 //[ vtk_specialize_connect
 #define DATAFLOW_TEMPLATE_MECHANISM boost::dataflow::vtk::mechanism
-#include <boost/dataflow/templates/connect.hpp>
+
+#define DATAFLOW_TEMPLATE_BINARY_OPERATION connect
+#include <boost/dataflow/templates/binary_operation.hpp>
+#undef DATAFLOW_TEMPLATE_BINARY_OPERATION
+
+#define DATAFLOW_TEMPLATE_BINARY_OPERATION connect_only
+#include <boost/dataflow/templates/binary_operation.hpp>
+#undef DATAFLOW_TEMPLATE_BINARY_OPERATION
+
 #undef DATAFLOW_TEMPLATE_MECHANISM
+// We now have connect and connect_only functions that each take a
+// vtk ProducerPort and vtk ConsumerPort as arguments, and try to connect them.
 //]
+
 #endif // BOOST_DATAFLOW_VTK_SUPPORT_HPP
\ No newline at end of file

Modified: sandbox/SOC/2007/signals/libs/dataflow/test/Jamfile.v2
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/test/Jamfile.v2 (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/test/Jamfile.v2 2007-10-23 20:14:11 EDT (Tue, 23 Oct 2007)
@@ -3,8 +3,6 @@
 # accompanying file LICENSE_1_0.txt or copy at
 # http://www.boost.org/LICENSE_1_0.txt)
 
-#build-project signals ;
-
 import testing ;
 
 project dataflow/test
@@ -14,9 +12,11 @@
       <define>BOOST_ALL_NO_LIB=1
     ;
 
-#run test_result_of_defined.cpp ;
 run test_port.cpp ;
 run test_proxy_port.cpp ;
 run test_unary_op.cpp ;
 run test_binary_op.cpp ;
 run test_keyed_port.cpp ;
+run test_component.cpp ;
+
+build-project signals ;

Modified: sandbox/SOC/2007/signals/libs/dataflow/test/my_producer_consumer.hpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/test/my_producer_consumer.hpp (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/test/my_producer_consumer.hpp 2007-10-23 20:14:11 EDT (Tue, 23 Oct 2007)
@@ -20,14 +20,14 @@
     : public df::port_traits<
         my_mechanism,
         df::ports::producer,
- df::concepts::producer>
+ df::concepts::port>
 {};
 
 struct my_consumer_traits
     : public df::port_traits<
         my_mechanism,
         df::ports::consumer,
- df::concepts::consumer>
+ df::concepts::port>
 {};
 
 struct my_producer : public df::port<my_producer_traits>

Modified: sandbox/SOC/2007/signals/libs/dataflow/test/signals/Jamfile.v2
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/test/signals/Jamfile.v2 (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/test/signals/Jamfile.v2 2007-10-23 20:14:11 EDT (Tue, 23 Oct 2007)
@@ -13,6 +13,7 @@
       <define>BOOST_ALL_NO_LIB=1
     ;
 
+run test_result_of_defined.cpp ;
 run test_bind_object.cpp ;
 run test_connect.cpp ;
 

Modified: sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_connect.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_connect.cpp (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_connect.cpp 2007-10-23 20:14:11 EDT (Tue, 23 Oct 2007)
@@ -9,9 +9,8 @@
 
 //[ test_connect
 
-struct receiver : public boost::dataflow::consumer<
- boost::dataflow::signals_mechanism,
- boost::dataflow::signal_consumer>
+struct receiver
+ : public boost::dataflow::port<boost::dataflow::signals::keyed_consumer>
 {
     typedef void result_type;
     
@@ -31,7 +30,7 @@
     boost::signal<void(int)> p;
     receiver r;
     
- boost::dataflow::connect<boost::dataflow::signals_mechanism>(p, r);
+ boost::dataflow::binary_operation<boost::dataflow::operations::connect, boost::dataflow::signals::mechanism>(p, r);
     
     p(3);
     

Modified: sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_disconnect.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_disconnect.cpp (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_disconnect.cpp 2007-10-23 20:14:11 EDT (Tue, 23 Oct 2007)
@@ -21,10 +21,14 @@
             signals::storage<void (float), signals::unfused> floater;
             floater(2.5f);
             signals::storage<void (float), signals::unfused> collector(0.0f);
-
+
+ banger | counter;
+ floater >>= collector;
+ connect(banger, floater.send_slot());
+/*
             banger
                 | counter
- | (floater >>= collector).send_slot();
+ | (floater >>= collector).send_slot();*/
             
             banger();
             BOOST_CHECK_EQUAL(counter.count(), 1);

Modified: sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_multi_args.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_multi_args.cpp (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_multi_args.cpp 2007-10-23 20:14:11 EDT (Tue, 23 Oct 2007)
@@ -25,8 +25,8 @@
 
 //[ test_multi_args_class2
 
-class SignalMultiCollector : public boost::dataflow::consumer<
- boost::dataflow::signals_mechanism, boost::dataflow::signal_consumer>
+class SignalMultiCollector
+ : public boost::dataflow::port<boost::dataflow::signals::keyed_consumer>
 {
         optional<float> last, last1, last2;
         int cnt;

Modified: sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_multi_type.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_multi_type.cpp (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_multi_type.cpp 2007-10-23 20:14:11 EDT (Tue, 23 Oct 2007)
@@ -14,8 +14,8 @@
 
 //[ test_multi_type_classes
 
-class SignalIntFloatCollector : public boost::dataflow::consumer<
- boost::dataflow::signals_mechanism, boost::dataflow::signal_consumer>
+class SignalIntFloatCollector : public boost::dataflow::port<
+ boost::dataflow::signals::keyed_consumer>
 {
     optional<int> last_int;
     optional<float> last_float;

Modified: sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_same_type.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_same_type.cpp (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_same_type.cpp 2007-10-23 20:14:11 EDT (Tue, 23 Oct 2007)
@@ -19,8 +19,8 @@
         signals::counter<void (), signals::unfused> other;
 }; // end class Signal2VoidCounter
 
-class Signal2VoidInputs : public boost::dataflow::consumer<
- boost::dataflow::signals_mechanism, boost::dataflow::signal_consumer>
+class Signal2VoidInputs
+ : public boost::dataflow::port<boost::dataflow::signals::keyed_consumer>
 {
         int result;
 public:

Modified: sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_storage.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_storage.cpp (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_storage.cpp 2007-10-23 20:14:11 EDT (Tue, 23 Oct 2007)
@@ -18,10 +18,7 @@
         signals::storage<void (), signals::unfused> banger;
         signals::storage<void (float), signals::unfused> floater(2.5f);
         signals::storage<void (float), signals::unfused> collector(0.0f);
-
- signals::slot_selector<void(), signals::storage<void (float), signals::unfused> >
- ::dataflow<dataflow::signals_mechanism>::get_proxied_producer(fusion::front(floater.send_slot()).second);
-
+
         // create the network (banger to floater.send, floater to collector)
         banger >>= floater.send_slot() >>= collector;
 
@@ -31,7 +28,7 @@
         BOOST_CHECK_EQUAL(collector.at<0>(), 2.5f);
 
         floater(1.5f); // change the value in floater
- boost::dataflow::invoke(floater); // we can also signal floater directly
+ invoke(floater); // we can also signal floater directly
         BOOST_CHECK_EQUAL(collector.at<0>(), 1.5f);
     //]
     }
@@ -52,7 +49,7 @@
         
         // change the value in floater
         floater(1.5f);
- floater.send(); // we can also signal floater directly
+ invoke(floater); // we can also signal floater directly
         BOOST_CHECK_EQUAL(collector.at<0>(), 1.5f);
         //]
     }

Added: sandbox/SOC/2007/signals/libs/dataflow/test/test_component.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2007/signals/libs/dataflow/test/test_component.cpp 2007-10-23 20:14:11 EDT (Tue, 23 Oct 2007)
@@ -0,0 +1,52 @@
+// Copyright Stjepan Rajko 2007. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/dataflow/support/component_operation.hpp>
+
+bool invoked = false;
+
+struct my_mechanism;
+
+struct my_component_traits
+{
+ typedef my_mechanism mechanism;
+};
+
+struct my_component
+{
+ typedef my_component_traits component_traits;
+};
+
+namespace boost { namespace dataflow { namespace extension {
+
+template<>
+struct component_operation_impl<operations::invoke, my_component_traits>
+{
+ template<typename Component>
+ struct apply
+ {
+ static void call(Component &)
+ {
+ invoked = true;
+ }
+ };
+};
+
+}}}
+
+#include <boost/test/included/test_exec_monitor.hpp>
+
+namespace df = boost::dataflow;
+
+int test_main(int, char* [])
+{
+ my_component c;
+
+ df::component_operation<df::operations::invoke, my_mechanism>(c);
+ BOOST_CHECK(invoked);
+
+ return 0;
+} // int test_main(int, char* [])
+

Modified: sandbox/SOC/2007/signals/libs/dataflow/test/test_keyed_port.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/test/test_keyed_port.cpp (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/test/test_keyed_port.cpp 2007-10-23 20:14:11 EDT (Tue, 23 Oct 2007)
@@ -12,21 +12,21 @@
 
 namespace df = boost::dataflow;
 
-bool connected = false;
+int connected = 0;
 bool connected_other = false;
 
 struct my_other_producer_traits
     : public df::port_traits<
         my_mechanism,
         df::ports::producer,
- df::concepts::producer>
+ df::concepts::port>
 {};
 
 struct my_other_consumer_traits
     : public df::port_traits<
         my_mechanism,
         df::ports::consumer,
- df::concepts::consumer>
+ df::concepts::port>
 {};
 
 struct my_other_producer : public df::port<my_other_producer_traits>
@@ -45,7 +45,7 @@
     {
         static void call(Producer &, Consumer &)
         {
- connected = true;
+ connected++;
         }
     };
 };
@@ -86,6 +86,30 @@
     
     df::binary_operation<df::operations::connect, my_mechanism>(producer_map, consumer);
     df::binary_operation<df::operations::connect, my_mechanism>(producer_map, other_consumer);
+
+ BOOST_CHECK_EQUAL(connected, 1);
+ BOOST_CHECK(connected_other);
+
+ typedef
+ boost::fusion::map<
+ boost::fusion::pair<my_consumer_traits, my_consumer &>,
+ boost::fusion::pair<my_other_consumer_traits, my_other_consumer &>
+ > proxy_map_type;
+
+ typedef
+ df::port_map<
+ my_mechanism,
+ df::ports::producer,
+ proxy_map_type
+ > proxy_type;
+ proxy_type proxy_map(proxy_map_type(consumer, other_consumer));
+
+ BOOST_CHECK(( df::is_proxy_port<my_mechanism, df::ports::consumer, proxy_type>::value ));
+ BOOST_CHECK(( df::is_port<my_mechanism, df::ports::consumer, proxy_type>::value ));
+
+ df::binary_operation<df::operations::connect, my_mechanism>(producer, proxy_map);
+
+ BOOST_CHECK_EQUAL(connected, 2);
 
     return 0;
 } // int test_main(int, char* [])

Modified: sandbox/SOC/2007/signals/libs/dataflow/test/test_proxy_port.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/test/test_proxy_port.cpp (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/test/test_proxy_port.cpp 2007-10-23 20:14:11 EDT (Tue, 23 Oct 2007)
@@ -32,6 +32,50 @@
> proxy_port_traits;
 };
 
+struct my_non_intrusive_proxy_producer
+{
+public:
+ my_producer p;
+};
+
+struct my_non_intrusive_proxy_producer2
+{
+public:
+ my_producer p;
+};
+
+struct my_non_intrusive_proxy_producer_traits
+ : public df::proxy_port_traits<my_mechanism, df::ports::producer>
+{};
+
+DATAFLOW_PROXY_PORT_CATEGORY(
+ my_non_intrusive_proxy_producer,
+ my_non_intrusive_proxy_producer_traits)
+
+DATAFLOW_PROXY_PORT_CATEGORY_ENABLE_IF(
+ T,
+ boost::is_same<T BOOST_PP_COMMA() my_non_intrusive_proxy_producer2>,
+ my_non_intrusive_proxy_producer_traits)
+
+namespace boost { namespace dataflow { namespace extension {
+
+ template<>
+ struct get_port_impl<my_non_intrusive_proxy_producer_traits>
+ {
+ template<typename T>
+ struct apply
+ {
+ typedef my_producer &type;
+ static type call(T &t)
+ {
+ return t.my_producer;
+ }
+ };
+ };
+
+
+} } }
+
 struct my_proxy_proxy_producer
 {
 public:
@@ -66,6 +110,7 @@
>::value ));
     
     BOOST_CHECK(( df::is_proxy_port<my_mechanism, df::ports::producer, my_proxy_producer>::value ));
+ BOOST_CHECK(( df::is_port<my_mechanism, df::ports::producer, my_proxy_producer>::value ));
 
     my_proxy_producer pp;
     BOOST_CHECK_EQUAL(&pp.p, (&df::get_port<my_mechanism, df::ports::producer>(pp)));
@@ -80,6 +125,13 @@
 
     const volatile my_proxy_proxy_producer cv_ppp(ppp);
     BOOST_CHECK_EQUAL(&cv_ppp.proxy.p, (&df::get_port<my_mechanism, df::ports::producer>(cv_ppp)));
+
+ BOOST_CHECK(( df::is_proxy_port<my_mechanism, df::ports::producer, my_non_intrusive_proxy_producer>::value ));
+ BOOST_CHECK(( df::is_proxy_port<my_mechanism, df::ports::producer, my_non_intrusive_proxy_producer2>::value ));
+
+ BOOST_CHECK(( df::is_port<my_mechanism, df::ports::producer, my_non_intrusive_proxy_producer>::value ));
+ BOOST_CHECK(( df::is_port<my_mechanism, df::ports::producer, my_non_intrusive_proxy_producer2>::value ));
+
     
     return 0;
 } // int test_main(int, char* [])

Deleted: sandbox/SOC/2007/signals/libs/dataflow/test/test_result_of_defined.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/test/test_result_of_defined.cpp 2007-10-23 20:14:11 EDT (Tue, 23 Oct 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)
-
-#include <boost/dataflow/signal/connection/detail/result_of_defined.hpp>
-#include <boost/fusion/sequence/container/map.hpp>
-#include <boost/dataflow/signal/component/junction.hpp>
-#include <boost/dataflow/signal/component/storage.hpp>
-
-#include <boost/test/included/test_exec_monitor.hpp>
-
-using namespace boost;
-
-struct nothing
-{
-};
-
-struct has_result_type
-{
- typedef void result_type;
-};
-
-struct has_result
-{
- template<typename FArgs>
- struct result;
-
- template<typename T>
- struct result<has_result(T)>
- {
- typedef void type;
- };
-};
-
-int test_main(int, char* [])
-{
-// bool value = signals::detail::result_of_defined<fusion::map<>(void)>::value;
- BOOST_CHECK(!signals::detail::result_of_defined<fusion::map<>(int)>::value);
- BOOST_CHECK(!signals::detail::result_of_defined<fusion::map<>()>::value);
- typedef boost::fusion::map<
- boost::fusion::pair<
- void (void),
- boost::signals::slot_selector<void (void),boost::signals::storage<void (float),boost::signals::unfused> >
- >,
- boost::fusion::pair<
- void (const boost::fusion::vector<> &),
- boost::signals::slot_selector<void (const boost::fusion::vector<> &),boost::signals::storage<void (float),boost::signals::unfused> >
- >
- > send_slot_map_type;
- BOOST_CHECK(!signals::detail::result_of_defined<send_slot_map_type()>::value);
- BOOST_CHECK(!signals::detail::result_of_defined<nothing(int)>::value);
- BOOST_CHECK(!signals::detail::result_of_defined<nothing()>::value);
- BOOST_CHECK(signals::detail::result_of_defined<has_result_type(int)>::value);
- BOOST_CHECK(signals::detail::result_of_defined<has_result_type()>::value);
- BOOST_CHECK(signals::detail::result_of_defined<has_result(int)>::value);
- BOOST_CHECK(!signals::detail::result_of_defined<has_result()>::value);
- BOOST_CHECK(!signals::detail::result_of_defined<has_result(float, float)>::value);
- bool junction_void_value = signals::detail::result_of_defined<
- signals::junction<void(), signals::unfused> ()>::value;
- BOOST_CHECK(junction_void_value);
-// bool junction_int_value = signals::detail::result_of_defined<
-// signals::junction<void(), signals::unfused> (int)>::value;
-// BOOST_CHECK(!junction_int_value);
-
- return 0;
-} // int test_main(int, char* [])


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