Boost logo

Boost-Commit :

From: stipe_at_[hidden]
Date: 2007-12-22 18:54:08


Author: srajko
Date: 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
New Revision: 42251
URL: http://svn.boost.org/trac/boost/changeset/42251

Log:
started 0.9.0
Added:
   sandbox/SOC/2007/signals/boost/dataflow/blueprint/keyed_port_t.hpp (contents, props changed)
   sandbox/SOC/2007/signals/boost/dataflow/blueprint/vector_port_t.hpp (contents, props changed)
   sandbox/SOC/2007/signals/boost/dataflow/detail/transform_remove_reference.hpp (contents, props changed)
   sandbox/SOC/2007/signals/boost/dataflow/support/detail/traits_sequence.hpp
      - copied, changed from r41674, /sandbox/SOC/2007/signals/boost/dataflow/support/port/detail/port_traits_sequence.hpp
   sandbox/SOC/2007/signals/boost/dataflow/support/fusion_keyed_port.hpp
      - copied, changed from r41674, /sandbox/SOC/2007/signals/boost/dataflow/connection/port_map.hpp
   sandbox/SOC/2007/signals/boost/dataflow/support/fusion_port_vector.hpp (contents, props changed)
   sandbox/SOC/2007/signals/boost/dataflow/support/fusion_vector_port.hpp (contents, props changed)
   sandbox/SOC/2007/signals/boost/dataflow/support/port_vector.hpp (contents, props changed)
   sandbox/SOC/2007/signals/boost/dataflow/support/traits.hpp
      - copied, changed from r41674, /sandbox/SOC/2007/signals/boost/dataflow/support/port/traits.hpp
   sandbox/SOC/2007/signals/boost/dataflow/support/vector_port.hpp (contents, props changed)
   sandbox/SOC/2007/signals/boost/dataflow/utility/enable_if_type.hpp
      - copied, changed from r41673, /sandbox/SOC/2007/signals/boost/dataflow/detail/enable_if_defined.hpp
   sandbox/SOC/2007/signals/boost/dataflow/utility/forwardable.hpp (contents, props changed)
   sandbox/SOC/2007/signals/boost/dataflow/utility/is_type.hpp (contents, props changed)
   sandbox/SOC/2007/signals/boost/dataflow/utility/uuid_constant.hpp (contents, props changed)
   sandbox/SOC/2007/signals/libs/dataflow/doc/support/concepts/general.qbk (contents, props changed)
   sandbox/SOC/2007/signals/libs/dataflow/doc/utility/
   sandbox/SOC/2007/signals/libs/dataflow/doc/utility/utility.qbk (contents, props changed)
   sandbox/SOC/2007/signals/libs/dataflow/test/blueprint/
   sandbox/SOC/2007/signals/libs/dataflow/test/blueprint/Jamfile.v2 (contents, props changed)
   sandbox/SOC/2007/signals/libs/dataflow/test/blueprint/test_component.cpp (contents, props changed)
   sandbox/SOC/2007/signals/libs/dataflow/test/blueprint/test_port.cpp (contents, props changed)
   sandbox/SOC/2007/signals/libs/dataflow/test/test_complemented_port.cpp (contents, props changed)
   sandbox/SOC/2007/signals/libs/dataflow/test/test_entity.cpp (contents, props changed)
   sandbox/SOC/2007/signals/libs/dataflow/test/test_vector_port.cpp (contents, props changed)
Removed:
   sandbox/SOC/2007/signals/boost/dataflow/connection/port_map.hpp
   sandbox/SOC/2007/signals/boost/dataflow/detail/enable_if_defined.hpp
   sandbox/SOC/2007/signals/boost/dataflow/signals/connection/slot_selector.hpp
   sandbox/SOC/2007/signals/boost/dataflow/signals/detail/enable_if_defined.hpp
   sandbox/SOC/2007/signals/boost/dataflow/support/port/detail/port_traits_sequence.hpp
   sandbox/SOC/2007/signals/libs/dataflow/example/example.cpp
Text files modified:
   sandbox/SOC/2007/signals/boost/dataflow/blueprint/binary_operation.hpp | 31 +--
   sandbox/SOC/2007/signals/boost/dataflow/blueprint/binary_operation_t.hpp | 4
   sandbox/SOC/2007/signals/boost/dataflow/blueprint/component.hpp | 15 -
   sandbox/SOC/2007/signals/boost/dataflow/blueprint/get_port.hpp | 25 +-
   sandbox/SOC/2007/signals/boost/dataflow/blueprint/network.hpp | 14
   sandbox/SOC/2007/signals/boost/dataflow/blueprint/port.hpp | 125 ++++++++++++----
   sandbox/SOC/2007/signals/boost/dataflow/blueprint/port_t.hpp | 166 +++++++++------------
   sandbox/SOC/2007/signals/boost/dataflow/signals/component/applicator.hpp | 11 -
   sandbox/SOC/2007/signals/boost/dataflow/signals/component/chain.hpp | 2
   sandbox/SOC/2007/signals/boost/dataflow/signals/component/conditional.hpp | 11 -
   sandbox/SOC/2007/signals/boost/dataflow/signals/component/conditional_modifier.hpp | 10 -
   sandbox/SOC/2007/signals/boost/dataflow/signals/component/conditional_templated.hpp | 14 -
   sandbox/SOC/2007/signals/boost/dataflow/signals/component/detail/generic_template.hpp | 16 +
   sandbox/SOC/2007/signals/boost/dataflow/signals/component/filter.hpp | 83 +++++++---
   sandbox/SOC/2007/signals/boost/dataflow/signals/component/filter_base.hpp | 30 ++-
   sandbox/SOC/2007/signals/boost/dataflow/signals/component/multiplexer.hpp | 11
   sandbox/SOC/2007/signals/boost/dataflow/signals/component/socket_sender.hpp | 2
   sandbox/SOC/2007/signals/boost/dataflow/signals/component/storage.hpp | 36 ++--
   sandbox/SOC/2007/signals/boost/dataflow/signals/connection.hpp | 2
   sandbox/SOC/2007/signals/boost/dataflow/signals/connection/detail/result_of_defined.hpp | 6
   sandbox/SOC/2007/signals/boost/dataflow/signals/runtime_support.hpp | 6
   sandbox/SOC/2007/signals/boost/dataflow/signals/support.hpp | 64 +++++++-
   sandbox/SOC/2007/signals/boost/dataflow/support/binary_operation.hpp | 16 +
   sandbox/SOC/2007/signals/boost/dataflow/support/complemented_port.hpp | 23 +-
   sandbox/SOC/2007/signals/boost/dataflow/support/component.hpp | 113 +-------------
   sandbox/SOC/2007/signals/boost/dataflow/support/component_operation.hpp | 71 ++-------
   sandbox/SOC/2007/signals/boost/dataflow/support/default_port_provider.hpp | 48 -----
   sandbox/SOC/2007/signals/boost/dataflow/support/detail/traits_sequence.hpp | 18 +-
   sandbox/SOC/2007/signals/boost/dataflow/support/fusion_component.hpp | 61 -------
   sandbox/SOC/2007/signals/boost/dataflow/support/fusion_keyed_port.hpp | 58 ++++++-
   sandbox/SOC/2007/signals/boost/dataflow/support/invocable.hpp | 6
   sandbox/SOC/2007/signals/boost/dataflow/support/keyed_port.hpp | 160 ++++++++++++++++----
   sandbox/SOC/2007/signals/boost/dataflow/support/port.hpp | 1
   sandbox/SOC/2007/signals/boost/dataflow/support/port/category.hpp | 4
   sandbox/SOC/2007/signals/boost/dataflow/support/port/default_port_provider.hpp | 5
   sandbox/SOC/2007/signals/boost/dataflow/support/port/detail/proxy_port_traits_sequence.hpp | 2
   sandbox/SOC/2007/signals/boost/dataflow/support/port/port.hpp | 10
   sandbox/SOC/2007/signals/boost/dataflow/support/port/port_adapter.hpp | 59 +++++--
   sandbox/SOC/2007/signals/boost/dataflow/support/port/traits.hpp | 121 ---------------
   sandbox/SOC/2007/signals/boost/dataflow/support/proxy_port.hpp | 24 +-
   sandbox/SOC/2007/signals/boost/dataflow/support/reflective_component.hpp | 4
   sandbox/SOC/2007/signals/boost/dataflow/support/runtime.hpp | 9
   sandbox/SOC/2007/signals/boost/dataflow/support/tags.hpp | 35 +++
   sandbox/SOC/2007/signals/boost/dataflow/support/traits.hpp | 134 +++++++++--------
   sandbox/SOC/2007/signals/boost/dataflow/support/unary_operation.hpp | 2
   sandbox/SOC/2007/signals/boost/dataflow/templates/operator.hpp | 8
   sandbox/SOC/2007/signals/boost/dataflow/utility/enable_if_type.hpp | 12
   sandbox/SOC/2007/signals/libs/dataflow/build/xcodeide/signal_network.xcodeproj/project.pbxproj | 96 +++++++++---
   sandbox/SOC/2007/signals/libs/dataflow/doc/Jamfile.v2 | 31 +++
   sandbox/SOC/2007/signals/libs/dataflow/doc/components.qbk | 10
   sandbox/SOC/2007/signals/libs/dataflow/doc/dataflow.qbk | 26 ++-
   sandbox/SOC/2007/signals/libs/dataflow/doc/introduction/introduction.qbk | 43 +++--
   sandbox/SOC/2007/signals/libs/dataflow/doc/introduction/vtk_example.qbk | 52 +++---
   sandbox/SOC/2007/signals/libs/dataflow/doc/phoenix/concepts.qbk | 6
   sandbox/SOC/2007/signals/libs/dataflow/doc/rationale.qbk | 40 ++++
   sandbox/SOC/2007/signals/libs/dataflow/doc/signals/concepts.qbk | 12
   sandbox/SOC/2007/signals/libs/dataflow/doc/support/concepts/binary_operable.qbk | 12
   sandbox/SOC/2007/signals/libs/dataflow/doc/support/concepts/component.qbk | 2
   sandbox/SOC/2007/signals/libs/dataflow/doc/support/concepts/concepts.qbk | 9
   sandbox/SOC/2007/signals/libs/dataflow/doc/support/concepts/port.qbk | 56 +++++-
   sandbox/SOC/2007/signals/libs/dataflow/example/Jamfile.v2 | 8
   sandbox/SOC/2007/signals/libs/dataflow/example/VTK/vtk_dataflow_support.hpp | 296 ++++++++++++++++++---------------------
   sandbox/SOC/2007/signals/libs/dataflow/example/blueprint/blueprint_example.cpp | 31 ++-
   sandbox/SOC/2007/signals/libs/dataflow/example/signals/gil_example.cpp | 6
   sandbox/SOC/2007/signals/libs/dataflow/example/signals/intro_example.cpp | 4
   sandbox/SOC/2007/signals/libs/dataflow/example/signals/simple_example_components.hpp | 4
   sandbox/SOC/2007/signals/libs/dataflow/test/Jamfile.v2 | 6
   sandbox/SOC/2007/signals/libs/dataflow/test/my_producer_consumer.hpp | 8
   sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_chain.cpp | 2
   sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_connect.cpp | 2
   sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_filter.cpp | 13 +
   sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_multi_args.cpp | 2
   sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_multi_type.cpp | 2
   sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_same_type.cpp | 2
   sandbox/SOC/2007/signals/libs/dataflow/test/test_component.cpp | 24 +-
   sandbox/SOC/2007/signals/libs/dataflow/test/test_keyed_port.cpp | 34 ---
   sandbox/SOC/2007/signals/libs/dataflow/test/test_port.cpp | 27 +-
   sandbox/SOC/2007/signals/libs/dataflow/test/test_proxy_port.cpp | 4
   sandbox/SOC/2007/signals/libs/dataflow/test/test_reflective_component.cpp | 2
   sandbox/SOC/2007/signals/libs/dataflow/test/test_unary_op.cpp | 1
   80 files changed, 1309 insertions(+), 1252 deletions(-)

Modified: sandbox/SOC/2007/signals/boost/dataflow/blueprint/binary_operation.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/blueprint/binary_operation.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/blueprint/binary_operation.hpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -8,7 +8,6 @@
 
 #include <boost/dataflow/blueprint/port.hpp>
 
-
 namespace boost { namespace dataflow { namespace blueprint {
 
 template<typename Operation>
@@ -21,26 +20,20 @@
 };
 
 template<typename Operation>
-bool are_binary_operable(port &producer, port &consumer)
-{
- if ((producer.traits().category().uuid() != 0)
- || (consumer.traits().category().uuid() != 1))
- return false;
-
- if (producer.is_complemented_port())
+bool are_binary_operable(port &outgoing, port &incoming)
+{
+ if (outgoing.is_complemented_port())
     {
- complemented_port &cproducer = static_cast<complemented_port &>(producer);
- return cproducer.is_operable_with_complement<Operation>()
- && (cproducer.complement_type_info()
- == consumer.port_type_info());
+ return outgoing.as<complemented_port>().template is_operable_port_to_complement<Operation>()
+ && (outgoing.as<complemented_port>().complement_type_info()
+ == incoming.port_type_info());
     }
 
- if (consumer.is_complemented_port())
+ if (incoming.is_complemented_port())
     {
- complemented_port &cconsumer = static_cast<complemented_port &>(consumer);
- return cconsumer.is_operable_with_complement<Operation>()
- && (cconsumer.complement_type_info()
- == producer.port_type_info());
+ return incoming.as<complemented_port>().template is_operable_complement_to_port<Operation>()
+ && (incoming.as<complemented_port>().complement_type_info()
+ == outgoing.port_type_info());
     }
 
     return false;
@@ -52,9 +45,9 @@
     if(!are_binary_operable<Operation>(producer, consumer))
         throw std::exception();
     if (producer.is_complemented_port())
- return static_cast<complemented_port &>(producer).operation<Operation>();
+ return static_cast<complemented_port &>(producer).port_to_complement_operation<Operation>();
     if (consumer.is_complemented_port())
- return static_cast<complemented_port &>(consumer).operation<Operation>();
+ return static_cast<complemented_port &>(consumer).complement_to_port_operation<Operation>();
     return shared_ptr<binary_operation<Operation> >();
 }
 

Modified: sandbox/SOC/2007/signals/boost/dataflow/blueprint/binary_operation_t.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/blueprint/binary_operation_t.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/blueprint/binary_operation_t.hpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -39,8 +39,8 @@
     call_binary_operation(port &producer, port &consumer)
     {
             dataflow::binary_operation<Operation, Mechanism>(
- *(ProducerPort *) producer.get(),
- *(ConsumerPort *) consumer.get());
+ any_cast<ProducerPort &>(producer.get()),
+ any_cast<ConsumerPort &>(consumer.get()));
     }
 }
 

Modified: sandbox/SOC/2007/signals/boost/dataflow/blueprint/component.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/blueprint/component.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/blueprint/component.hpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -6,7 +6,7 @@
 #ifndef BOOST_DATAFLOW_BLUEPRINT_COMPONENT_HPP
 #define BOOST_DATAFLOW_BLUEPRINT_COMPONENT_HPP
 
-#include <boost/dataflow/blueprint/get_port.hpp>
+#include <boost/dataflow/blueprint/port_t.hpp>
 #include <boost/dataflow/support/component.hpp>
 #include <boost/dataflow/support/component_operation.hpp>
 #include <boost/dataflow/support/binary_operation.hpp>
@@ -18,8 +18,7 @@
 
 namespace boost { namespace dataflow { namespace blueprint {
 
-struct mechanism;
-
+/// Base class for all blueprint component types. Run-time analogue of the Component concept.
 class component
 {
 public:
@@ -31,7 +30,7 @@
     virtual ~component() {};
 };
 
-template<typename Component>
+template<typename Component, typename Tag=default_tag>
 class component_t : public component
 {
 public:
@@ -43,11 +42,11 @@
     
     void invoke()
     {
- component_operation<operations::invoke>(c);
+ component_operation<operations::invoke, Tag>(c);
     }
     size_t num_ports() const
     {
- return mpl::size<typename component_traits_of<Component>::type::ports>::value;
+ return mpl::size<typename traits_of<Component, Tag>::type::ports>::value;
     }
     port & get_port(int port_num)
     {
@@ -55,14 +54,14 @@
     }
     virtual std::auto_ptr<component> copy() const
     {
- return std::auto_ptr<component>(new component_t<Component>(*this));
+ return std::auto_ptr<component>(new component_t<Component, Tag>(*this));
     }
     Component &get() {return c;}
 private:
     void component_t_()
     {
         for(size_t i=0; i<num_ports(); i++)
- ports.push_back(blueprint::get_port<Component>(c, i));
+ ports.push_back(blueprint::get_port<Tag>(c, i));
     }
     Component c;
     ptr_vector<port> ports;

Modified: sandbox/SOC/2007/signals/boost/dataflow/blueprint/get_port.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/blueprint/get_port.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/blueprint/get_port.hpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -7,18 +7,19 @@
 #define BOOST_DATAFLOW_BLUEPRINT_GET_PORT_HPP
 
 #include <boost/dataflow/blueprint/port_t.hpp>
-#include <boost/dataflow/support/component.hpp>
+#include <boost/dataflow/support/port_vector.hpp>
 
 #include <boost/mpl/range_c.hpp>
 #include <boost/switch.hpp>
 
 #include <memory>
 
+
 namespace boost { namespace dataflow { namespace blueprint {
 
 namespace detail {
 
-template<typename Component>
+template<typename Component, typename Tag>
 struct get_port_case
 {
     typedef void result_type;
@@ -26,15 +27,13 @@
     void operator()(Case) const
     {
         ret.reset(new port_t<
- typename mpl::at_c<
- typename component_traits_of<Component>::type::ports,
- Case::value
+ typename result_of::get_port_c<
+ Component,
+ Case::value,
+ Tag
>::type,
- typename get_port_result_type<
- mpl::int_<Case::value>,
- Component
- >::type
- >(get_port<mpl::int_<Case::value>, Component >(c))); \
+ Tag
+ >(get_port_c<Case::value, Tag >(c)));
     }
     get_port_case(Component& c, std::auto_ptr<port> &ret) : c(c), ret(ret)
     {}
@@ -44,7 +43,7 @@
 
 } // namespace detail
 
-template<typename Component>
+template<typename Tag, typename Component>
 std::auto_ptr<port> get_port(Component &c, int port_num)
 {
     std::auto_ptr<port> ret;
@@ -52,9 +51,9 @@
         int,
         0,
         mpl::size<
- typename component_traits_of<Component>::type::ports>
+ typename traits_of<Component, Tag>::type::ports>
         ::value> range;
- boost::switch_<range>(port_num, detail::get_port_case<Component>(c, ret));
+ boost::switch_<range>(port_num, detail::get_port_case<Component, Tag>(c, ret));
     return ret;
 }
 

Added: sandbox/SOC/2007/signals/boost/dataflow/blueprint/keyed_port_t.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2007/signals/boost/dataflow/blueprint/keyed_port_t.hpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -0,0 +1,40 @@
+// 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_BLUEPRINT_KEYED_PORT_T_HPP
+#define BOOST_DATAFLOW_BLUEPRINT_KEYED_PORT_T_HPP
+
+#include <boost/dataflow/blueprint/vector_port_t.hpp>
+#include <boost/dataflow/support/keyed_port.hpp>
+
+
+namespace boost { namespace dataflow { namespace blueprint {
+
+template<typename PortOrRef, typename Tag>
+class port_t<
+ PortOrRef,
+ Tag,
+ typename enable_if<
+ is_keyed_port<
+ typename remove_reference<PortOrRef>::type,
+ Tag>
+ >::type >
+ : public detail::vector_port_impl<keyed_port, PortOrRef, Tag>
+{
+public:
+ port_t(typename call_traits<PortOrRef>::param_type p)
+ : detail::vector_port_impl<keyed_port, PortOrRef, Tag>(p)
+ {}
+
+ virtual port *clone() const
+ {
+ return new port_t(*this);
+ };
+
+};
+
+} } } // namespace boost::dataflow::blueprint
+
+#endif // BOOST_DATAFLOW_BLUEPRINT_KEYED_PORT_T_HPP
\ No newline at end of file

Modified: sandbox/SOC/2007/signals/boost/dataflow/blueprint/network.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/blueprint/network.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/blueprint/network.hpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -13,10 +13,10 @@
 #include <boost/graph/copy.hpp>
 
 #include <exception>
-#include <iostream>
 
 namespace boost { namespace dataflow { namespace blueprint {
 
+template<typename Tag>
 class network
 {
     struct node_t
@@ -32,8 +32,8 @@
 public:
     typedef boost::adjacency_list<
         boost::vecS, boost::vecS, boost::bidirectionalS, node_t, edge_t> graph_type;
- typedef graph_type::vertex_descriptor component_type;
- typedef graph_type::edge_descriptor connection_type;
+ typedef typename graph_type::vertex_descriptor component_type;
+ typedef typename graph_type::edge_descriptor connection_type;
 private:
     struct vc
     {
@@ -72,14 +72,14 @@
     component_type add_component()
     {
         typename graph_type::vertex_descriptor v = add_vertex(g);
- g[v].ptr.reset(new component_t<Component>());
+ g[v].ptr.reset(new component_t<Component, Tag>());
         return v;
     }
     template<typename Component, typename T0>
     component_type add_component(const T0 &t0)
     {
         typename graph_type::vertex_descriptor v = add_vertex(g);
- g[v].ptr.reset(new component_t<Component>(t0));
+ g[v].ptr.reset(new component_t<Component, Tag>(t0));
         return v;
     }
     template<typename Mechanism, typename ProducerPort, typename ConsumerPort>
@@ -101,7 +101,7 @@
     }
     void connect()
     {
- graph_type::edge_iterator it;
+ typename graph_type::edge_iterator it;
         for (it = edges(g).first; it!=edges(g).second; it++)
             g[*it].ptr->invoke(
                 g[source(*it, g)].ptr->get_port(g[*it].producer_port),
@@ -124,7 +124,7 @@
     void add_connection_(component_type p, int p_port, component_type c, int c_port,
         boost::shared_ptr<binary_operation<operations::connect> >)
     {
- graph_type::edge_descriptor e = add_edge(p, c, g).first;
+ typename graph_type::edge_descriptor e = add_edge(p, c, g).first;
         g[e].ptr = get_binary_operation<operations::connect>(get_port(p, p_port), get_port(c, c_port));
         g[e].producer_port = p_port;
         g[e].consumer_port = c_port;

Modified: sandbox/SOC/2007/signals/boost/dataflow/blueprint/port.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/blueprint/port.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/blueprint/port.hpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -10,6 +10,7 @@
 #include <boost/dataflow/support/complemented_port.hpp>
 #include <boost/dataflow/support/runtime.hpp>
 
+#include <boost/any.hpp>
 #include <boost/ptr_container/clone_allocator.hpp>
 #include <boost/shared_ptr.hpp>
 #include <string>
@@ -22,38 +23,42 @@
 class port_traits
 {
 public:
- port_traits(const runtime_info &mechanism, const runtime_info &category,
- const runtime_info &concept_info)
- : mechanism_(mechanism), category_(category), concept_(concept_info)
+ port_traits(const runtime_info &category, const runtime_info &tag)
+ : category_(category), tag_(tag)
     {}
- const runtime_info &mechanism() const
- { return mechanism_; }
     const runtime_info &category() const
     { return category_; }
- const runtime_info &concept_info() const
- { return concept_; }
+ const runtime_info &tag() const
+ { return tag_; }
 private:
- runtime_info mechanism_;
     runtime_info category_;
- runtime_info concept_;
+ runtime_info tag_;
 };
 
+class complemented_port;
+class vector_port;
+
+/// Base class for all blueprint port types. Run-time analogue of the Port concept.
 class port
 {
 public:
- port(const runtime_info &mechanism, const runtime_info &category,
- const runtime_info &concept_info)
- : traits_(mechanism, category, concept_info)
+ port(const runtime_info &category, const runtime_info &tag)
+ : traits_(category, tag)
     {}
     const port_traits &traits() const
     { return traits_; }
     
- virtual void *get()=0;
- bool is_complemented_port()
- {
- return traits_.concept_info().uuid()
- == runtime::property<concepts::complemented_port, int>()();
- }
+ virtual bool is_complemented_port() const
+ { return false; }
+ virtual bool is_vector_port() const
+ { return false; }
+ virtual bool is_keyed_port() const
+ { return false; }
+ template<typename T>
+ T &as()
+ { return *static_cast<T *>(this); }
+
+ virtual boost::any get()=0;
     virtual const std::type_info &port_type_info()=0;
     virtual ~port() {};
     virtual port *clone() const =0;
@@ -61,35 +66,91 @@
     port_traits traits_;
 };
 
+/// Base class for all blueprint complemented port types. Run-time analogue of the ComplementedPort concept.
 class complemented_port : public port
 {
 public:
- complemented_port(const runtime_info &mechanism,
- const runtime_info &category, const runtime_info &concept_info)
- : port(mechanism, category, concept_info)
+ complemented_port(const runtime_info &category, const runtime_info &tag)
+ : port(category, tag)
     {}
- virtual const std::type_info &complement_type_info()=0;
- virtual shared_ptr<binary_operation<operations::connect> > connector()=0;
- virtual shared_ptr<binary_operation<operations::extract> > extractor()=0;
+ virtual bool is_complemented_port() const
+ {
+ return true;
+ }
+ virtual const std::type_info &complement_type_info()=0;
+
+ virtual shared_ptr<binary_operation<operations::connect> > port_to_complement_connector()=0;
+ virtual shared_ptr<binary_operation<operations::connect> > complement_to_port_connector()=0;
+ virtual shared_ptr<binary_operation<operations::extract> > port_to_complement_extractor()=0;
+ virtual shared_ptr<binary_operation<operations::extract> > complement_to_port_extractor()=0;
+
     template<typename Operation>
     typename enable_if<
         is_same<Operation, operations::connect>,
         shared_ptr<binary_operation<Operation> >
- >::type operation()
- { return connector(); }
+ >::type port_to_complement_operation()
+ { return port_to_complement_connector(); }
+
+ template<typename Operation>
+ typename enable_if<
+ is_same<Operation, operations::extract>,
+ shared_ptr<binary_operation<Operation> >
+ >::type port_to_complement_operation()
+ { return port_to_complement_extractor(); }
+
+ template<typename Operation>
+ typename enable_if<
+ is_same<Operation, operations::connect>,
+ shared_ptr<binary_operation<Operation> >
+ >::type complement_to_port_operation()
+ { return complement_to_port_connector(); }
+
     template<typename Operation>
     typename enable_if<
         is_same<Operation, operations::extract>,
         shared_ptr<binary_operation<Operation> >
- >::type operation()
- { return extractor(); }
-template<typename Operation>
- bool is_operable_with_complement()
+ >::type complement_to_port_operation()
+ { return complement_to_port_extractor(); }
+
+ template<typename Operation>
+ bool is_operable_port_to_complement()
+ {
+ return is_operable_port_to_complement(runtime::property<Operation, int>()());
+ }
+
+ template<typename Operation>
+ bool is_operable_complement_to_port()
     {
- return is_operable_with_complement(runtime::property<Operation, int>()());
+ return is_operable_complement_to_port(runtime::property<Operation, int>()());
     }
 private:
- virtual bool is_operable_with_complement(int operation_uuid)=0;
+ virtual bool is_operable_port_to_complement(int operation_uuid)=0;
+ virtual bool is_operable_complement_to_port(int operation_uuid)=0;
+};
+
+class vector_port : public port
+{
+public:
+ vector_port(const runtime_info &category, const runtime_info &tag)
+ : port(category, tag)
+ {}
+
+ virtual bool is_vector_port() const
+ { return true; }
+
+ virtual size_t num_ports() const=0;
+ virtual port & get_port(int port_num)=0;
+};
+
+class keyed_port : public vector_port
+{
+public:
+ keyed_port(const runtime_info &category, const runtime_info &tag)
+ : vector_port(category, tag)
+ {}
+
+ virtual bool is_keyed_port() const
+ { return true; }
 };
 
 } } } // namespace boost::dataflow::blueprint

Modified: sandbox/SOC/2007/signals/boost/dataflow/blueprint/port_t.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/blueprint/port_t.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/blueprint/port_t.hpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -6,9 +6,11 @@
 #ifndef BOOST_DATAFLOW_BLUEPRINT_PORT_T_HPP
 #define BOOST_DATAFLOW_BLUEPRINT_PORT_T_HPP
 
-#include <boost/dataflow/blueprint/port.hpp>
 #include <boost/dataflow/blueprint/binary_operation_t.hpp>
+#include <boost/dataflow/blueprint/port.hpp>
+#include <boost/dataflow/utility/copy_cv.hpp>
 #include <boost/dataflow/support/port.hpp>
+
 #include <boost/call_traits.hpp>
 
 #include <typeinfo>
@@ -16,49 +18,40 @@
 
 namespace boost { namespace dataflow { namespace blueprint {
 
-template<typename T>
-struct initializer_type
-{
- typedef
- typename mpl::if_<
- is_reference<T>,
- T,
- typename call_traits<T>::const_reference
- >::type type;
-};
-
-template<typename Base, typename PortTraits, typename Port>
+template<typename Base, typename PortOrRef, typename Tag>
 class port_t_base : public Base
 {
+protected:
+ typedef typename remove_reference<PortOrRef>::type port_type;
+ typedef typename traits_of<port_type, Tag>::type port_traits_type;
 public:
- port_t_base(typename initializer_type<Port>::type p)
+ port_t_base(typename call_traits<PortOrRef>::param_type p)
         : Base(
- runtime_info(typename PortTraits::mechanism()),
- runtime_info(typename PortTraits::category()),
- runtime_info(typename PortTraits::concept()))
+ runtime_info(typename port_traits_type::category()),
+ runtime_info(typename port_traits_type::tag()))
         , p(p)
     {}
 
- void *get()
+ virtual boost::any get()
     {
- return &p;
+ return boost::any(&p);
     }
     virtual const std::type_info &port_type_info()
     {
- return typeid(Port);
+ return typeid(port_type);
     };
-private:
- Port p;
+protected:
+ PortOrRef p;
 };
 
-template<typename PortTraits, typename Port, typename Enable=void>
-class port_t : public port_t_base<port, PortTraits, Port>
+template<typename PortOrRef, typename Tag=default_tag, typename Enable=void>
+class port_t : public port_t_base<port, PortOrRef, Tag>
 {
     BOOST_MPL_ASSERT((is_same<Enable, void>));
 
 public:
- port_t(typename initializer_type<Port>::type p)
- : port_t_base<port, PortTraits, Port>(p)
+ port_t(typename call_traits<PortOrRef>::param_type p)
+ : port_t_base<port, PortOrRef, Tag>(p)
     {}
     virtual port *clone() const
     {
@@ -66,70 +59,58 @@
     };
 };
 
-template<typename PortTraits, typename Port>
+template<typename PortOrRef, typename Tag>
 class port_t<
- PortTraits,
- Port,
+ PortOrRef,
+ Tag,
     typename enable_if<
         is_complemented_port<
- typename PortTraits::mechanism,
- typename PortTraits::category,
- Port
- >
+ typename remove_reference<PortOrRef>::type,
+ Tag>
>::type >
- : public port_t_base<complemented_port, PortTraits, Port>
+ : public port_t_base<complemented_port, PortOrRef, Tag>
 {
-
- typedef
- typename remove_reference<
- typename get_port_result_type<
- typename PortTraits::mechanism,
- typename PortTraits::category,
- Port
- >::type
- >::type get_port_type;
-
- typedef typename remove_reference<Port>::type port_type;
+ typedef typename port_t::port_type port_type;
+ typedef typename port_t::port_traits_type port_traits_type;
 
     template<typename Operation>
     struct operation_type
     {
- typedef
- typename mpl::if_<
- is_same<typename PortTraits::category, ports::producer>,
- blueprint::binary_operation_t<
- Operation,
- typename PortTraits::mechanism,
- get_port_type,
- typename PortTraits::complement_port_type
- >,
- blueprint::binary_operation_t<
- Operation,
- typename PortTraits::mechanism,
- typename PortTraits::complement_port_type,
- get_port_type
- >
- >::type type;
+ typedef blueprint::binary_operation_t<
+ Operation,
+ port_type,
+ typename port_traits_type::complement_port_type,
+ Tag
+ > p_to_c;
+ typedef blueprint::binary_operation_t<
+ Operation,
+ typename port_traits_type::complement_port_type,
+ port_type,
+ Tag
+ > c_to_p;
     };
 
 public:
- port_t(typename initializer_type<Port>::type p)
- : port_t_base<complemented_port, PortTraits, Port>(p)
- , c(new typename operation_type<operations::connect>::type())
- , e(new typename operation_type<operations::extract>::type())
+ port_t(typename call_traits<PortOrRef>::param_type p)
+ : port_t_base<complemented_port, PortOrRef, Tag>(p)
+ , c_to_p_connector(new typename operation_type<operations::connect>::c_to_p())
+ , c_to_p_extractor(new typename operation_type<operations::extract>::c_to_p())
+ , p_to_c_connector(new typename operation_type<operations::connect>::p_to_c())
+ , p_to_c_extractor(new typename operation_type<operations::extract>::p_to_c())
     {}
     
- virtual shared_ptr<binary_operation<operations::connect> > connector()
- {
- return c;
- };
- virtual shared_ptr<binary_operation<operations::extract> > extractor()
- {
- return e;
- };
+ virtual shared_ptr<binary_operation<operations::connect> > port_to_complement_connector()
+ { return p_to_c_connector; }
+ virtual shared_ptr<binary_operation<operations::extract> > port_to_complement_extractor()
+ { return p_to_c_extractor; }
+ virtual shared_ptr<binary_operation<operations::connect> > complement_to_port_connector()
+ { return c_to_p_connector; }
+ virtual shared_ptr<binary_operation<operations::extract> > complement_to_port_extractor()
+ { return c_to_p_extractor; }
+
     virtual const std::type_info &complement_type_info()
     {
- return typeid(typename PortTraits::complement_port_type);
+ return typeid(typename port_traits_type::complement_port_type);
     }
     virtual port *clone() const
     {
@@ -137,36 +118,35 @@
     };
 
 private:
- virtual bool is_operable_with_complement(int operation_uuid)
+ virtual bool is_operable_port_to_complement(int operation_uuid)
     {
- typedef typename mpl::if_<
- is_same<typename PortTraits::category, ports::producer>,
- port_type,
- typename PortTraits::complement_port_type
- >::type producer_type;
- typedef typename mpl::if_<
- is_same<typename PortTraits::category, ports::producer>,
- typename PortTraits::complement_port_type,
- port_type
- >::type consumer_type;
-
+ typedef port_type outgoing_type;
+ typedef typename port_traits_type::complement_port_type incoming_type;
+
         if(operation_uuid == runtime::property<operations::connect, int>()())
             return dataflow::are_binary_operable<
- operations::connect, typename PortTraits::mechanism, producer_type, consumer_type>::type::value;
+ outgoing_type, incoming_type, operations::connect, Tag>::type::value;
 
         if(operation_uuid == runtime::property<operations::extract, int>()())
- return typename dataflow::are_binary_operable<
- operations::extract, typename PortTraits::mechanism, producer_type, consumer_type>::type();
-
+ return dataflow::are_binary_operable<
+ outgoing_type, incoming_type, operations::extract, Tag>::type::value;
+
         return false;
     };
+ virtual bool is_operable_complement_to_port(int operation_uuid)
+ {
+ return false;
+ }
 
- boost::shared_ptr<binary_operation<operations::connect> > c;
- boost::shared_ptr<binary_operation<operations::extract> > e;
+ boost::shared_ptr<binary_operation<operations::connect> > c_to_p_connector;
+ boost::shared_ptr<binary_operation<operations::extract> > c_to_p_extractor;
+ boost::shared_ptr<binary_operation<operations::connect> > p_to_c_connector;
+ boost::shared_ptr<binary_operation<operations::extract> > p_to_c_extractor;
 };
 
 } } } // namespace boost::dataflow::blueprint
 
-
+#include <boost/dataflow/blueprint/vector_port_t.hpp>
+#include <boost/dataflow/blueprint/keyed_port_t.hpp>
 
 #endif // BOOST_DATAFLOW_BLUEPRINT_GET_PORT_HPP
\ No newline at end of file

Added: sandbox/SOC/2007/signals/boost/dataflow/blueprint/vector_port_t.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2007/signals/boost/dataflow/blueprint/vector_port_t.hpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -0,0 +1,82 @@
+// 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_BLUEPRINT_VECTOR_PORT_T_HPP
+#define BOOST_DATAFLOW_BLUEPRINT_VECTOR_PORT_T_HPP
+
+#include <boost/dataflow/blueprint/port_t.hpp>
+#include <boost/dataflow/blueprint/get_port.hpp>
+#include <boost/dataflow/support/vector_port.hpp>
+#include <boost/dataflow/support/keyed_port.hpp>
+
+#include <boost/ptr_container/ptr_vector.hpp>
+
+
+namespace boost { namespace dataflow { namespace blueprint {
+
+namespace detail {
+
+ template<typename Base, typename PortOrRef, typename Tag>
+ class vector_port_impl
+ : public port_t_base<Base, PortOrRef, Tag>
+ {
+ typedef typename vector_port_impl::port_type port_type;
+ typedef typename vector_port_impl::port_traits_type port_traits_type;
+
+ public:
+ vector_port_impl(typename call_traits<PortOrRef>::param_type p)
+ : port_t_base<Base, PortOrRef, Tag>(p)
+ {
+ port_t_();
+ }
+
+ size_t num_ports() const
+ {
+ return mpl::size<typename traits_of<port_type, Tag>::type::ports>::value;
+ }
+ port & get_port(int port_num)
+ {
+ return ports[port_num];
+ }
+
+ private:
+ void port_t_()
+ {
+ for(size_t i=0; i<num_ports(); i++)
+ ports.push_back(blueprint::get_port<Tag>(vector_port_impl::p, i));
+ }
+ ptr_vector<port> ports;
+ };
+}
+
+template<typename PortOrRef, typename Tag>
+class port_t<
+ PortOrRef,
+ Tag,
+ typename enable_if<
+ mpl::and_<
+ is_vector_port<
+ typename remove_reference<PortOrRef>::type,
+ Tag>,
+ mpl::not_<is_keyed_port<
+ typename remove_reference<PortOrRef>::type,
+ Tag> >
+ >
+ >::type >
+ : public detail::vector_port_impl<vector_port, PortOrRef, Tag>
+{
+public:
+ port_t(typename call_traits<PortOrRef>::param_type p)
+ : detail::vector_port_impl<vector_port, PortOrRef, Tag>(p)
+ {}
+ virtual port *clone() const
+ {
+ return new port_t(*this);
+ };
+};
+
+} } } // namespace boost::dataflow::blueprint
+
+#endif // BOOST_DATAFLOW_BLUEPRINT_VECTOR_PORT_T_HPP
\ No newline at end of file

Deleted: sandbox/SOC/2007/signals/boost/dataflow/connection/port_map.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/connection/port_map.hpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
+++ (empty file)
@@ -1,72 +0,0 @@
-// Copyright 2007 Stjepan Rajko.
-// Distributed under the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-#ifndef BOOST_DATAFLOW_CONNECTION_PORT_MAP_HPP
-#define BOOST_DATAFLOW_CONNECTION_PORT_MAP_HPP
-
-#include <boost/dataflow/support/keyed_port.hpp>
-
-//#include <boost/fusion/sequence/intrinsic/value_at.hpp>
-#include <boost/fusion/sequence/intrinsic/at_key.hpp>
-#include <boost/fusion/sequence/intrinsic/front.hpp>
-#include <boost/type_traits/remove_const.hpp>
-#include <boost/type_traits/remove_reference.hpp>
-#include <boost/call_traits.hpp>
-#include <boost/type_traits/is_same.hpp>
-
-namespace boost { namespace dataflow {
-
-template<typename PortCategory, typename Tag=default_tag>
-struct fusion_map_port
- : public port_traits<PortCategory, concepts::keyed_port, Tag> {};
-
-template<typename PortCategory, typename T, typename Tag=default_tag>
-class port_map
-{
-
-public:
- typedef T map_type;
-
- port_map(const T& t) : t(t) {}
- map_type &map() const {return t;}
-
- typedef fusion_map_port<PortCategory, Tag> port_traits;
-
-private:
- mutable map_type t;
-};
-
-namespace extension
-{
- template<typename PortCategory, typename Tag, typename KeyPortTraits>
- struct get_keyed_port_impl<fusion_map_port<PortCategory, Tag>, KeyPortTraits>
- {
- template<typename FArgs> struct result;
-
- template<typename F, typename KeyedPort>
- struct result<F(KeyedPort &)>
- {
- typedef typename boost::fusion::result_of::at_key<
- typename KeyedPort::map_type,
- KeyPortTraits
- >::type type;
- };
-
- template<typename KeyedPort>
- typename result<get_keyed_port_impl(KeyedPort &)>::type
- operator()(KeyedPort &port)
- {
- return boost::fusion::at_key<
- KeyPortTraits
- >(port.map());
- }
- };
-}
-
-} } // namespace boost::dataflow
-
-#endif // BOOST_DATAFLOW_CONNECTION_PORT_MAP_HPP
-
-

Deleted: sandbox/SOC/2007/signals/boost/dataflow/detail/enable_if_defined.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/detail/enable_if_defined.hpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
+++ (empty file)
@@ -1,33 +0,0 @@
-// Copyright Stjepan Rajko 2007. Use, modification and
-// distribution is subject to the Boost Software License, Version
-// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-#ifndef DATAFLOW_DETAIL_ENABLE_IF_DEFINED_HPP
-#define DATAFLOW_DETAIL_ENABLE_IF_DEFINED_HPP
-
-#include <boost/type_traits/integral_constant.hpp>
-#include <boost/utility/enable_if.hpp>
-
-namespace boost { namespace dataflow {
-
-namespace detail
-{
- template<typename T, typename Result=void>
- struct enable_if_defined
- {
- typedef Result type;
- };
-
- struct void_;
-
- template<typename T0=void_, typename T1=void_, typename T2=void_,
- typename T3=void_, typename T4=void_, typename T5=void_>
- struct all_of
- {
- };
-}
-
-} } // namespace boost::dataflow
-
-#endif // DATAFLOW_DETAIL_ENABLE_IF_DEFINED_HPP

Added: sandbox/SOC/2007/signals/boost/dataflow/detail/transform_remove_reference.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2007/signals/boost/dataflow/detail/transform_remove_reference.hpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -0,0 +1,28 @@
+// 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_DETAIL_TRANSFORM_REMOVE_REFERENCE_HPP
+#define BOOST_DATAFLOW_DETAIL_TRANSFORM_REMOVE_REFERENCE_HPP
+
+#include <boost/mpl/transform.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+
+
+namespace boost { namespace dataflow {
+
+namespace detail
+{
+ template<typename T>
+ struct transform_remove_reference
+ {
+ typedef typename boost::mpl::transform<T,
+ boost::remove_reference<boost::mpl::_> >::type type;
+ };
+} // namespace detail
+
+}} // namespace boost::dataflow
+
+#endif // BOOST_DATAFLOW_DETAIL_TRANSFORM_REMOVE_REFERENCE_HPP
+

Modified: sandbox/SOC/2007/signals/boost/dataflow/signals/component/applicator.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/signals/component/applicator.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/signals/component/applicator.hpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -12,6 +12,7 @@
 #define SIGNAL_NETWORK_GENERIC_TYPENAME Member
 #define SIGNAL_NETWORK_GENERIC_MEMBERNAME member
 #define SIGNAL_NETWORK_GENERIC_TYPENAME2 Application
+#define SIGNAL_NETWORK_GENERIC_STANDARD_RESULT
 
 #include <boost/dataflow/signals/component/detail/generic_template.hpp>
 
@@ -19,16 +20,8 @@
 
 #else // SIGNAL_NETWORK_GENERIC_CLASS
 
- template <typename FArgs>
- struct result;
-
- template<typename T, typename Seq>
- struct result<T(const Seq &)> : public boost::enable_if<boost::fusion::traits::is_sequence<Seq>,
- typename base_type::signal_type::result_type> {};
-
     /** Applies an instance of Application to the Member object.
- */
-
+ */
     template <class Seq>
     typename result<applicator_impl(const Seq &)>::type
     operator()(const Seq &seq)

Modified: sandbox/SOC/2007/signals/boost/dataflow/signals/component/chain.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/signals/component/chain.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/signals/component/chain.hpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -22,7 +22,7 @@
 namespace detail
 {
     template<typename Signature, typename T>
- class chain_impl : public filter_base<chain<Signature, T>, typename T::signal_type>
+ class chain_impl : public filter_base<chain<Signature, T>, typename T::signal_type, mpl::vector<> >
     {
     protected:
         typedef typename boost::function_types::parameter_types<Signature>::type parameter_types;

Modified: sandbox/SOC/2007/signals/boost/dataflow/signals/component/conditional.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/signals/component/conditional.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/signals/component/conditional.hpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -11,6 +11,7 @@
 #define SIGNAL_NETWORK_GENERIC_TYPENAME Member
 #define SIGNAL_NETWORK_GENERIC_MEMBERNAME member
 #define SIGNAL_NETWORK_GENERIC_TYPENAME2 Condition
+#define SIGNAL_NETWORK_GENERIC_STANDARD_RESULT
 
 #include <boost/dataflow/signals/component/detail/generic_template.hpp>
 
@@ -20,14 +21,6 @@
 
 /** \brief Forwards an incoming signal if an specified condition evaluates to true.
 */
-//typedef typename base_type::signal_type::result_type result_type;
-
- template <typename FArgs>
- struct result;
-
- template<typename T, typename Seq>
- struct result<T(const Seq &)> : public boost::enable_if<boost::fusion::traits::is_sequence<Seq>,
- typename base_type::signal_type::result_type> {};
     
     /** Forwards the signal if the condition evaluates the true.
         \returns Return value of the sent signal if the condition evaluates to true,
@@ -40,7 +33,7 @@
         if (Condition()(member))
             return fused_out(seq);
         else
- return typename base_type::signal_type::result_type();
+ return typename conditional_impl::signal_type::result_type();
     }
 
 #endif // SIGNAL_NETWORK_GENERIC_CLASS

Modified: sandbox/SOC/2007/signals/boost/dataflow/signals/component/conditional_modifier.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/signals/component/conditional_modifier.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/signals/component/conditional_modifier.hpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -11,6 +11,7 @@
 #define SIGNAL_NETWORK_GENERIC_FILE <boost/dataflow/signals/component/conditional_modifier.hpp>
 #define SIGNAL_NETWORK_GENERIC_TYPENAME Modification
 #define SIGNAL_NETWORK_GENERIC_MEMBERNAME modification
+#define SIGNAL_NETWORK_GENERIC_STANDARD_RESULT
 
 #include <boost/dataflow/signals/component/detail/generic_template.hpp>
 
@@ -20,15 +21,6 @@
 
     /** Applies the Modification object to the received signal parameters.
     */
- template <typename Args>
- struct result;
-
- template <typename F, typename Seq>
- struct result<F(const Seq &seq)> : public boost::enable_if<
- boost::fusion::traits::is_sequence<Seq>,
- typename base_type::signal_type::result_type>
- {};
-
     template <class Seq>
     typename result<conditional_modifier_impl(const Seq &)>::type
     operator()(const Seq &seq)

Modified: sandbox/SOC/2007/signals/boost/dataflow/signals/component/conditional_templated.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/signals/component/conditional_templated.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/signals/component/conditional_templated.hpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -12,6 +12,7 @@
 #define SIGNAL_NETWORK_GENERIC_TYPENAME Member
 #define SIGNAL_NETWORK_GENERIC_MEMBERNAME member
 #define SIGNAL_NETWORK_GENERIC_TYPENAME2 Condition
+#define SIGNAL_NETWORK_GENERIC_STANDARD_RESULT
 
 #include <boost/dataflow/signals/component/detail/generic_template.hpp>
 
@@ -20,16 +21,7 @@
 #else // SIGNAL_NETWORK_GENERIC_CLASS
 
 /** \brief Forwards an incoming signal if an specified condition evaluates to true.
-*/
-//typedef typename base_type::signal_type::result_type result_type;
-
- template <typename FArgs>
- struct result;
-
- template<typename T, typename Seq>
- struct result<T(const Seq &)> : public boost::enable_if<boost::fusion::traits::is_sequence<Seq>,
- typename base_type::signal_type::result_type> {};
-
+*/
     /** Forwards the signal if the condition evaluates the true.
         \returns Return value of the sent signal if the condition evaluates to true,
         default constructed instance otherwise.
@@ -41,7 +33,7 @@
         if (Condition()(N, member))
             return fused_out(seq);
         else
- return typename base_type::signal_type::result_type();
+ return typename conditional_templated_impl::signal_type::result_type();
     }
 
 #endif // SIGNAL_NETWORK_CONDITIONAL_TEMPLATED_HPP

Modified: sandbox/SOC/2007/signals/boost/dataflow/signals/component/detail/generic_template.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/signals/component/detail/generic_template.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/signals/component/detail/generic_template.hpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -36,11 +36,16 @@
     typename SignalArgs
>
 class BOOST_PP_CAT(SIGNAL_NETWORK_GENERIC_CLASS,_impl)
- : public filter<Derived, Signature, typename OutSignal::filter_type, SignalArgs>
+ : public filter<
+ Derived,
+ Signature,
+ mpl::vector<
+ Signature,
+ typename fused_signal_type<Signature>::signature_type
+ >,
+ typename OutSignal::filter_type,
+ SignalArgs>
 {
-protected:
- typedef filter<Derived, Signature, typename OutSignal::filter_type, SignalArgs> base_type;
-
 public:
     SIGNAL_NETWORK_GENERIC_CLASS_IMPL() {}
     template<typename T1>
@@ -54,7 +59,7 @@
     
     template<typename T, typename Seq>
     struct result<T(const Seq &)> : public boost::enable_if<boost::fusion::traits::is_sequence<Seq>,
- typename base_type::signal_type::result_type> {};
+ typename SIGNAL_NETWORK_GENERIC_CLASS_IMPL::signal_type::result_type> {};
 # endif // SIGNAL_NETWORK_GENERIC_STANDARD_RESULT
 
 # include SIGNAL_NETWORK_GENERIC_FILE
@@ -99,6 +104,7 @@
     SIGNAL_NETWORK_GENERIC_CLASS(const T1 &t1) : base_type(t1) {}
     template<typename T1, typename T2>
     SIGNAL_NETWORK_GENERIC_CLASS(const T1 &t1, const T2 &t2) : base_type(t1, t2) {}
+
 };
 
 } } // namespace boost::signals

Modified: sandbox/SOC/2007/signals/boost/dataflow/signals/component/filter.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/signals/component/filter.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/signals/component/filter.hpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -53,8 +53,26 @@
     typedef GroupCompare group_compare_type;
 };
 
-template<typename Signature,
- typename Combiner = boost::last_value<typename boost::function_traits<Signature>::result_type>,
+
+template<typename T, typename Enable=void>
+struct is_signal_args : public mpl::false_
+{};
+
+template<typename T>
+struct is_signal_args<
+ T,
+ typename dataflow::utility::enable_if_type<
+ dataflow::utility::all_of<
+ typename T::combiner_type,
+ typename T::group_type,
+ typename T::group_compare_type
+ >
+ >::type>
+ : public mpl::true_
+{};
+
+template<typename OutSignature,
+ typename Combiner = boost::last_value<typename boost::function_traits<OutSignature>::result_type>,
     typename Group = int,
     typename GroupCompare = std::less<Group> >
 struct default_signal_args
@@ -62,44 +80,50 @@
     typedef signal_args<Combiner, Group, GroupCompare> type;
 };
 
-template<typename Signature, typename SignalArgs>
+template<typename OutSignature, typename SignalArgs>
 struct signal_from_args
 {
     typedef boost::signal<
- Signature,
+ OutSignature,
         typename SignalArgs::combiner_type,
         typename SignalArgs::group_type,
         typename SignalArgs::group_compare_type
> type;
 };
 
+
 /// Provides a basis for filters (components that receive and send a signal).
-/** \param Signature The signature of the signal being sent out.
+/** \param OutSignature The signature of the signal being sent out.
 
 Use this class as a base class for classes that produce a signal
 of a particular signature.
 */
 template<
     typename Derived,
- typename Signature,
+ typename OutSignature,
+ typename InSignatures=mpl::vector<>,
     typename OutSignal=SIGNAL_NETWORK_DEFAULT_OUT,
- typename SignalArgs=typename default_signal_args<Signature>::type
+ typename SignalArgs=typename default_signal_args<OutSignature>::type
>
 class filter;
 
 /** \brief Unfused version of the filter class
 */
-template<typename Derived, typename Signature, typename SignalArgs>
-class filter<Derived, Signature, unfused, SignalArgs>
+template<typename Derived, typename OutSignature, typename InSignatures, typename SignalArgs>
+class filter<Derived, OutSignature, InSignatures, unfused, SignalArgs>
     : public filter_base<
         Derived,
- typename signal_from_args<Signature, SignalArgs>::type >
+ typename signal_from_args<OutSignature, SignalArgs>::type,
+ InSignatures >
 {
+ BOOST_MPL_ASSERT(( mpl::is_sequence<InSignatures> ));
+ BOOST_MPL_ASSERT(( is_signal_args<SignalArgs> ));
+
 public:
     // the type of the signal
- typedef typename signal_from_args<Signature, SignalArgs>::type signal_type;
+ typedef typename signal_from_args<OutSignature, SignalArgs>::type signal_type;
     // the signature of the output signal
- typedef Signature signature_type;
+ typedef OutSignature signature_type;
 
         filter(const filter &) {}
         filter(){}
@@ -118,16 +142,19 @@
 
 /** \brief Combined version of the filter class
 */
-template<typename Derived, typename Signature, typename SignalArgs>
-class filter<Derived, Signature, combined, SignalArgs>
-: public filter<Derived, Signature, unfused, SignalArgs>
+template<typename Derived, typename OutSignature, typename InSignatures, typename SignalArgs>
+class filter<Derived, OutSignature, InSignatures, combined, SignalArgs>
+: public filter<Derived, OutSignature, InSignatures, unfused, SignalArgs>
 {
+ BOOST_MPL_ASSERT(( mpl::is_sequence<InSignatures> ));
+ BOOST_MPL_ASSERT(( is_signal_args<SignalArgs> ));
+
 public:
     filter() : fused_out(filter::out) {}
         filter(const filter &) : fused_out(filter::out){}
     const filter &operator = (const filter &) {return *this;}
     
- typedef typename boost::function_types::parameter_types<Signature>::type parameter_types;
+ typedef typename boost::function_types::parameter_types<OutSignature>::type parameter_types;
     typedef typename boost::fusion::result_of::as_vector<parameter_types>::type parameter_vector;
     typedef typename filter::signal_type::result_type fused_signature_type (const parameter_vector &);
 
@@ -138,10 +165,10 @@
 
 namespace detail
 {
- template<typename Signature, typename SignalArgs=typename default_signal_args<Signature>::type>
+ template<typename OutSignature, typename SignalArgs=typename default_signal_args<OutSignature>::type>
     struct fused_signal_type
     {
- typedef typename boost::function_types::parameter_types<Signature>::type parameter_types;
+ typedef typename boost::function_types::parameter_types<OutSignature>::type parameter_types;
         typedef typename boost::fusion::result_of::as_vector<parameter_types>::type parameter_vector;
         typedef typename SignalArgs::combiner_type::result_type signature_type (const parameter_vector &);
         typedef typename SignalArgs::combiner_type::result_type fused_signature_type (const parameter_vector &);
@@ -151,22 +178,26 @@
 
 /** \brief Fused version of the filter class
 */
-template<typename Derived, typename Signature, typename SignalArgs>
-class filter<Derived, Signature, fused, SignalArgs>
+template<typename Derived, typename OutSignature, typename InSignatures, typename SignalArgs>
+class filter<Derived, OutSignature, InSignatures, fused, SignalArgs>
 : public filter_base<
     Derived,
- typename detail::fused_signal_type<Signature, SignalArgs>::signal_type>
+ typename detail::fused_signal_type<OutSignature, SignalArgs>::signal_type,
+ InSignatures>
 {
+ BOOST_MPL_ASSERT(( mpl::is_sequence<InSignatures> ));
+ BOOST_MPL_ASSERT(( is_signal_args<SignalArgs> ));
+
 public:
         filter(const filter &) {}
         filter(){}
     const filter &operator = (const filter &) {return *this;}
 
- typedef typename detail::fused_signal_type<Signature, SignalArgs>::parameter_types parameter_types;
- typedef typename detail::fused_signal_type<Signature, SignalArgs>::parameter_vector parameter_vector;
- typedef typename detail::fused_signal_type<Signature, SignalArgs>::signature_type signature_type;
- typedef typename detail::fused_signal_type<Signature, SignalArgs>::fused_signature_type fused_signature_type;
- typedef typename detail::fused_signal_type<Signature, SignalArgs>::signal_type signal_type;
+ typedef typename detail::fused_signal_type<OutSignature, SignalArgs>::parameter_types parameter_types;
+ typedef typename detail::fused_signal_type<OutSignature, SignalArgs>::parameter_vector parameter_vector;
+ typedef typename detail::fused_signal_type<OutSignature, SignalArgs>::signature_type signature_type;
+ typedef typename detail::fused_signal_type<OutSignature, SignalArgs>::fused_signature_type fused_signature_type;
+ typedef typename detail::fused_signal_type<OutSignature, SignalArgs>::signal_type signal_type;
 
         /// Returns the default out signal.
         signal_type &default_signal() const

Modified: sandbox/SOC/2007/signals/boost/dataflow/signals/component/filter_base.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/signals/component/filter_base.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/signals/component/filter_base.hpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -13,14 +13,17 @@
 #include <boost/signal.hpp>
 
 
-namespace boost { namespace signals {
-
-template<typename Filter, typename Signal>
+namespace boost { namespace signals {
+
+template<typename Filter, typename Signal, typename OutSignatures>
 struct filter_component_traits
     : public dataflow::fusion_component_traits<
         fusion::vector<
             Signal &,
- const dataflow::port_adapter<Filter, dataflow::signals::call_consumer, dataflow::signals::tag> >,
+ dataflow::port_adapter<
+ Filter,
+ dataflow::signals::call_consumer<OutSignatures>,
+ dataflow::signals::tag> >,
         mpl::map<
             mpl::pair<dataflow::default_port_selector
                 <dataflow::directions::outgoing, dataflow::signals::connect_mechanism>,
@@ -28,24 +31,23 @@
             mpl::pair<dataflow::default_port_selector
                 <dataflow::directions::incoming, dataflow::signals::connect_mechanism>,
                 mpl::int_<1> >
- > >
-{};
-
-template<typename Filter, typename Signal>
-class filter_base : public dataflow::component<filter_component_traits<Filter, Signal> >
+ >,
+ dataflow::signals::tag>
 {
-public:
-// using dataflow::component<filter_component_traits<Filter, Signal> >::component_traits;
-
     template<typename Component>
- typename filter_base::component_traits::port_result_types get_ports(Component &component)
+ static typename filter_component_traits::fusion_ports get_ports(Component &component)
     {
- return typename filter_base::component_traits::port_result_types(
+ return typename filter_component_traits::fusion_ports(
             component.default_signal(),
             component);
     };
 };
 
+template<typename Filter, typename Signal, typename OutSignatures>
+class filter_base : public dataflow::component<filter_component_traits<Filter, Signal, OutSignatures> >
+{
+};
+
 } }
 
 #endif // SIGNAL_NETWORK_FILTER_BASE_HPP

Modified: sandbox/SOC/2007/signals/boost/dataflow/signals/component/multiplexer.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/signals/component/multiplexer.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/signals/component/multiplexer.hpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -6,9 +6,8 @@
 #ifndef SIGNAL_NETWORK_MULTIPLEXER_HPP
 #define SIGNAL_NETWORK_MULTIPLEXER_HPP
 
-#include <boost/dataflow/connection/port_map.hpp>
+#include <boost/dataflow/support/fusion_keyed_port.hpp>
 #include <boost/dataflow/signals/component/conditional_templated.hpp>
-#include <boost/dataflow/signals/connection/slot_selector.hpp>
 
 #include <boost/config.hpp>
 #include <boost/fusion/container/map.hpp>
@@ -47,22 +46,22 @@
     void select(int selector)
     { multiplexer::member = selector; }
     
- slot_selector<void(int), multiplexer>
+ boost::function<void(int)>
     select_slot()
     {
         return make_slot_selector<void(int)> (&multiplexer::select, *this);
     }
     
     typedef boost::fusion::map<
- boost::fusion::pair<boost::dataflow::signals::producer<Signature>, slot_selector<Signature, multiplexer> >,
+ boost::fusion::pair<boost::dataflow::signals::producer<Signature>, boost::function<Signature> >,
         boost::fusion::pair<
             boost::dataflow::signals::producer<typename multiplexer::fused_signature_type>,
- slot_selector<typename multiplexer::fused_signature_type, multiplexer>
+ boost::function<typename multiplexer::fused_signature_type>
>
> slot_map;
     
     template<int N>
- boost::dataflow::port_map<boost::dataflow::ports::consumer, slot_map, boost::dataflow::signals::tag>
+ boost::dataflow::fusion_keyed_port<boost::dataflow::ports::consumer, slot_map, boost::dataflow::signals::tag>
     slot()
     {
         return slot_map

Modified: sandbox/SOC/2007/signals/boost/dataflow/signals/component/socket_sender.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/signals/component/socket_sender.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/signals/component/socket_sender.hpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -58,7 +58,7 @@
 template<typename Signature>
 class socket_sender : public boost::fusion::unfused_inherited<
     detail::socket_sender_impl<Signature>, typename boost::function_types::parameter_types<Signature>::type >,
- public boost::dataflow::port<boost::dataflow::signals::call_consumer>
+ public boost::dataflow::port<boost::dataflow::signals::call_consumer<> >
 {
     typedef boost::fusion::unfused_inherited<
         detail::socket_sender_impl<Signature>,

Modified: sandbox/SOC/2007/signals/boost/dataflow/signals/component/storage.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/signals/component/storage.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/signals/component/storage.hpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -6,11 +6,10 @@
 #ifndef BOOST_DATAFLOW_SIGNALS_COMPONENT_STORAGE_HPP
 #define BOOST_DATAFLOW_SIGNALS_COMPONENT_STORAGE_HPP
 
-#include <boost/dataflow/connection/port_map.hpp>
+#include <boost/dataflow/support/fusion_keyed_port.hpp>
 #include <boost/dataflow/detail/make_ref.hpp>
 #include <boost/dataflow/signals/component/conditional_modifier.hpp>
 #include <boost/dataflow/signals/component/detail/storable.hpp>
-#include <boost/dataflow/signals/connection/slot_selector.hpp>
 
 #include <boost/mpl/map.hpp>
 #include <boost/fusion/container/vector.hpp>
@@ -23,11 +22,6 @@
 template<typename Signature, typename OutSignal, typename SignalArgs>
 class storage;
 
-template<typename Storage>
-struct storage_component_traits
- : public filter_component_traits<Storage, typename Storage::signal_type>
-{};
-
 namespace detail
 {
 }
@@ -76,6 +70,11 @@
     };
 
 
+template<typename Storage>
+struct storage_component_traits
+ : public Storage::base_type::dataflow_traits
+{};
+
 /** \brief Stores and transmits arguments received from a signal.
     \param Signature Signature of the signal sent.
 */
@@ -91,15 +90,16 @@
     OutSignal,
     SignalArgs>
 {
-protected:
+public:
     typedef conditional_modifier<storage, storage_modifier<Signature>, Signature, OutSignal, SignalArgs> base_type;
+protected:
         using base_type::modification;
 public:
     typedef typename storage_modifier<Signature>::parameter_types parameter_types;
     typedef typename storage_modifier<Signature>::storable_types storable_types;
     typedef typename storage_modifier<Signature>::storable_vector storable_vector;
     
- typedef storage_component_traits<storage> component_traits;
+ typedef storage_component_traits<storage> dataflow_traits;
 
         storage(const storage &rhs) : base_type(rhs.modification) {}
 
@@ -158,14 +158,14 @@
     }
 
     typedef boost::fusion::map<
- boost::fusion::pair<boost::dataflow::signals::producer<void()>, slot_selector<void (), storage> >,
+ boost::fusion::pair<boost::dataflow::signals::producer<void()>, boost::function<void ()> >,
         boost::fusion::pair<
             boost::dataflow::signals::producer<void(const boost::fusion::vector<> &)>,
- slot_selector<void (const boost::fusion::vector<> &), storage>
+ boost::function<void (const boost::fusion::vector<> &)>
>
> send_map;
 
- boost::dataflow::port_map<boost::dataflow::ports::consumer, send_map, dataflow::signals::tag>
+ boost::dataflow::fusion_keyed_port<boost::dataflow::ports::consumer, send_map, dataflow::signals::tag>
     send_slot()
     {
         return send_map
@@ -175,9 +175,9 @@
     /** \return The slot selector for the related at function.
     */
     template<int N>
- slot_selector
+ boost::function
 #ifndef DOXYGEN_DOCS_BUILD
- <typename boost::fusion::result_of::at_c<storable_vector, N>::type (), storage>
+ <typename boost::fusion::result_of::at_c<storable_vector, N>::type ()>
 #endif
     at_slot()
     {
@@ -188,9 +188,9 @@
     /** \return The slot selector for the value_at function.
     */
     template<int N>
- slot_selector
+ boost::function
 #ifndef DOXYGEN_DOCS_ONLY
- <typename boost::mpl::at_c<parameter_types, N>::type (), storage>
+ <typename boost::mpl::at_c<parameter_types, N>::type ()>
 #endif
     value_at_slot()
         {
@@ -210,8 +210,10 @@
 namespace extension {
     
     template<typename T>
- struct component_operation_impl<operations::invoke, boost::signals::storage_component_traits<T> >
+ struct component_operation_impl<boost::signals::storage_component_traits<T>, operations::invoke >
     {
+ typedef void result_type;
+
         template<typename Invocable>
         void operator()(Invocable &invocable)
         {

Modified: sandbox/SOC/2007/signals/boost/dataflow/signals/connection.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/signals/connection.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/signals/connection.hpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -8,6 +8,6 @@
 
 #include <boost/dataflow/signals/support.hpp>
 #include <boost/dataflow/signals/connection/operators.hpp>
-#include <boost/dataflow/signals/connection/slot_selector.hpp>
+//#include <boost/dataflow/signals/connection/slot_selector.hpp>
 
 #endif
\ No newline at end of file

Modified: sandbox/SOC/2007/signals/boost/dataflow/signals/connection/detail/result_of_defined.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/signals/connection/detail/result_of_defined.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/signals/connection/detail/result_of_defined.hpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -6,7 +6,7 @@
 #ifndef SIGNAL_NETWORK_RESULT_OF_DEFINED_HPP
 #define SIGNAL_NETWORK_RESULT_OF_DEFINED_HPP
 
-#include <boost/dataflow/detail/enable_if_defined.hpp>
+#include <boost/dataflow/utility/enable_if_type.hpp>
 
 #include <boost/function_types/function_type.hpp>
 #include <boost/function_types/parameter_types.hpp>
@@ -27,14 +27,14 @@
     struct has_result_type : public boost::false_type {};
         
     template<typename T>
- struct has_result_type<T, typename boost::dataflow::detail::enable_if_defined<typename T::result_type>::type>
+ struct has_result_type<T, typename boost::dataflow::utility::enable_if_type<typename T::result_type>::type>
         : public boost::true_type {};
 
     template<typename F, typename FArgs, typename Enable=void>
     struct result_defined : public boost::false_type {};
 
     template<typename F, typename FArgs>
- struct result_defined<F, FArgs, typename boost::dataflow::detail::enable_if_defined<typename F::template result<FArgs>::type >::type>
+ struct result_defined<F, FArgs, typename boost::dataflow::utility::enable_if_type<typename F::template result<FArgs>::type >::type>
         : public boost::true_type {};
 
     template<typename T, typename Enable=void>

Deleted: sandbox/SOC/2007/signals/boost/dataflow/signals/connection/slot_selector.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/signals/connection/slot_selector.hpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
+++ (empty file)
@@ -1,75 +0,0 @@
-/*
- * signal.hpp
- * signal_network
- *
- * Created by Stjepan Rajko on 7/3/07.
- * Copyright 2007 __MyCompanyName__. All rights reserved.
- *
- */
-
-#ifndef SIGNAL_NETWORK_SLOT_SELECTOR_HPP
-#define SIGNAL_NETWORK_SLOT_SELECTOR_HPP
-
-#include <boost/dataflow/signals/connection/detail/bind_object.hpp>
-#include <boost/dataflow/signals/support.hpp>
-#include <boost/dataflow/signals/component/filter_base.hpp>
-
-namespace boost { namespace dataflow { namespace signals {
-
-struct slot_selector_consumer
- : public boost::dataflow::port_traits<ports::consumer, concepts::keyed_port, tag> {};
-
-} } // 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
-{
- typedef boost::dataflow::signals::slot_selector_consumer port_traits;
-
- typedef Signature signature_type;
- typedef T class_type;
-
- T &object;
- typename detail::slot_type<Signature, T>::type func;
-
- slot_selector(typename detail::slot_type<Signature, T>::type func, T &object)
- : object(object), func(func) {}
-};
-
-/** \brief Allows arbitrary member functions to serve as slots.
-*/
-template<typename Signature, typename T>
-slot_selector<Signature, T> make_slot_selector(typename detail::slot_type<Signature, T>::type func, T &object)
-{
- return slot_selector<Signature, T>(func, object);
-}
-
-} }
-
-namespace boost { namespace dataflow {
-
-namespace extension {
-
- template<typename Signature>
- struct get_keyed_port_impl<
- signals::slot_selector_consumer, signals::producer<Signature> >
- {
- typedef const boost::function<Signature> result_type;
-
- template<typename Consumer>
- result_type operator()(Consumer &consumer)
- {
- 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);
- }
- };
-
-}
-
-} } // namespace boost::signals
-
-#endif // SIGNAL_NETWORK_SLOT_SELECTOR_HPP
\ No newline at end of file

Deleted: sandbox/SOC/2007/signals/boost/dataflow/signals/detail/enable_if_defined.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/signals/detail/enable_if_defined.hpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
+++ (empty file)
@@ -1,31 +0,0 @@
-// Copyright Stjepan Rajko 2007. Use, modification and
-// distribution is subject to the Boost Software License, Version
-// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-#ifndef SIGNAL_NETWORK_ENABLE_IF_DEFINED_HPP
-#define SIGNAL_NETWORK_ENABLE_IF_DEFINED_HPP
-
-#include <boost/type_traits/integral_constant.hpp>
-#include <boost/utility/enable_if.hpp>
-
-namespace boost { namespace signals {
-
-namespace detail
-{
-/* template<typename T>
- struct defined : public boost::true_type {};
-
- template<typename T, typename Result=void>
- struct enable_if_defined : public boost::enable_if<defined<T>, Result>
- {};*/
- template<typename T, typename Result=void>
- struct enable_if_defined
- {
- typedef Result type;
- };
-}
-
-} } // namespace boost::signals
-
-#endif // SIGNAL_NETWORK_ENABLE_IF_DEFINED_HPP

Modified: sandbox/SOC/2007/signals/boost/dataflow/signals/runtime_support.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/signals/runtime_support.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/signals/runtime_support.hpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -9,9 +9,7 @@
 #include <boost/dataflow/support/runtime.hpp>
 #include <boost/dataflow/signals/support.hpp>
 
-DATAFLOW_RUNTIME_PROPERTY(signals::mechanism, const char *, "signals connection")
-DATAFLOW_RUNTIME_PROPERTY(signals::mechanism, int, 10)
-DATAFLOW_RUNTIME_PROPERTY(signals::extract_mechanism, const char *, "signals extraction")
-DATAFLOW_RUNTIME_PROPERTY(signals::extract_mechanism, int, 11)
+DATAFLOW_RUNTIME_PROPERTY(signals::tag, const char *, "Dataflow.Signals")
+DATAFLOW_RUNTIME_PROPERTY(signals::tag, int, 10)
 
 #endif // DATAFLOW_SIGNALS_RUNTIME_SUPPORT_HPP
\ No newline at end of file

Modified: sandbox/SOC/2007/signals/boost/dataflow/signals/support.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/signals/support.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/signals/support.hpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -7,15 +7,17 @@
 #define SIGNAL_NETWORK_SIGNAL_SUPPORT_HPP
 
 #include <boost/dataflow/support.hpp>
+#include <boost/dataflow/support/port/port_adapter.hpp>
 #include <boost/dataflow/signals/connection/detail/bind_object.hpp>
-#include <boost/signal.hpp>
 
+#include <boost/mpl/vector.hpp>
+#include <boost/signal.hpp>
 
 namespace boost { namespace dataflow {
 
 namespace signals {
 
-struct tag {};
+struct tag : public default_tag {};
 struct connect_mechanism {};
 struct extract_mechanism {};
 
@@ -28,13 +30,39 @@
 
 template<typename T>
 struct consumer
- : public port_traits<ports::consumer, concepts::port, tag>
+ : public port_traits<ports::consumer, tag>
 {
     typedef T signature_type;
 };
 
+namespace detail
+{
+ template<typename T>
+ struct wrap_producer
+ {
+ typedef producer<T> type;
+ };
+
+ template<typename T>
+ struct wrap_function
+ {
+ typedef boost::function<T> type;
+ };
+}
+
+template<typename SignatureSequence=mpl::vector<> >
 struct call_consumer
- : public port_traits<ports::consumer, concepts::keyed_port, tag>
+ : public keyed_port_traits<
+ ports::consumer,
+ typename mpl::transform<
+ SignatureSequence,
+ detail::wrap_producer<mpl::_1>
+ >::type,
+ typename mpl::transform<
+ SignatureSequence,
+ detail::wrap_function<mpl::_1>
+ >::type,
+ tag>
 {};
 
 template<typename T>
@@ -47,29 +75,31 @@
 } // namespace signals
 
 template<typename Signature, typename Combiner, typename Group, typename GroupCompare>
-struct register_port_traits<boost::signal<Signature, Combiner, Group, GroupCompare>, signals::tag >
+struct register_traits<boost::signal<Signature, Combiner, Group, GroupCompare>, signals::tag >
 {
     typedef signals::producer<Signature> type;
 };
 
 template<typename Signature>
-struct register_port_traits<boost::function<Signature>, signals::tag >
+struct register_traits<boost::function<Signature>, signals::tag >
 {
     typedef signals::consumer<Signature> type;
 };
 
 namespace extension
 {
- template<typename Signature>
- struct get_keyed_port_impl<signals::call_consumer, signals::producer<Signature> >
+ template<typename SignatureSequence, typename Signature>
+ struct get_keyed_port_impl<signals::call_consumer<SignatureSequence>, signals::producer<Signature> >
     {
         typedef const boost::function<Signature> result_type;
         
         template<typename ConsumerPort>
         result_type operator()(ConsumerPort &consumer)
         {
- return boost::signals::detail::bind_object<Signature, ConsumerPort>()
- (static_cast<typename boost::signals::detail::slot_type<Signature, ConsumerPort>::type>(&ConsumerPort::operator()), consumer);
+ typedef typename get_object_type<ConsumerPort>::type object_type;
+
+ return boost::signals::detail::bind_object<Signature, object_type>()
+ (static_cast<typename boost::signals::detail::slot_type<Signature, object_type>::type>(&object_type::operator()), get_object(consumer));
         };
     };
 
@@ -106,9 +136,19 @@
 #undef DATAFLOW_TEMPLATE_TAG
 
 template<typename Component>
-inline void invoke(Component &component)
+inline typename enable_if<
+ dataflow::is_component<Component, dataflow::signals::tag>,
+ void
+>::type invoke(Component &component)
+{
+ boost::dataflow::component_operation<boost::dataflow::operations::invoke, dataflow::signals::tag>(component);
+}
+
+template<typename Signature, typename T>
+boost::function<Signature> make_slot_selector(typename detail::slot_type<Signature, T>::type func, T &object)
 {
- boost::dataflow::component_operation<boost::dataflow::operations::invoke>(component);
+ return boost::signals::detail::bind_object<Signature, T>()
+ (static_cast<typename boost::signals::detail::slot_type<Signature, T>::type>(func), object);
 }
 
 } } // namespace boost::phoenix

Modified: sandbox/SOC/2007/signals/boost/dataflow/support/binary_operation.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/support/binary_operation.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/support/binary_operation.hpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -7,6 +7,8 @@
 #define BOOST_DATAFLOW_SUPPORT_BINARY_OPERATION_HPP
 
 #include <boost/dataflow/support/port.hpp>
+#include <boost/call_traits.hpp>
+#include <boost/dataflow/utility/forwardable.hpp>
 
 // ***************************************
 // * binary_operation, are_binary_operable
@@ -16,7 +18,7 @@
 #define DATAFLOW_SPECIALIZABLE_OPERATION_TYPENAME_TEMPLATES typename Operation
 #define DATAFLOW_SPECIALIZABLE_OPERATION_TEMPLATES Operation
 #define DATAFLOW_SPECIALIZABLE_OPERATION_ARITY 2
-#define DATAFLOW_SPECIALIZABLE_OPERATION_TRAITS_OF port_traits_of
+#define DATAFLOW_SPECIALIZABLE_OPERATION_TRAITS_OF traits_of
 #define DATAFLOW_SPECIALIZABLE_OPERATION_HAS_TRAITS is_port
 #include <boost/dataflow/support/detail/make_specializable_operation.hpp>
 
@@ -28,11 +30,15 @@
 binary_operation(OutgoingPort &outgoing, IncomingPort &incoming)
 {
     extension::binary_operation_impl<
- typename default_port_traits_of<OutgoingPort, directions::outgoing, Mechanism, Tag>::type,
- typename default_port_traits_of<IncomingPort, directions::incoming, Mechanism, Tag>::type,
+ typename default_traits_of<OutgoingPort, directions::outgoing, Mechanism, Tag>::type,
+ typename default_traits_of<IncomingPort, directions::incoming, Mechanism, Tag>::type,
         Operation>
- ()(get_default_port<directions::outgoing, Mechanism, Tag>(outgoing),
- get_default_port<directions::incoming, Mechanism, Tag>(incoming));
+ ()(static_cast<typename utility::forwardable<
+ typename result_of::get_default_port<OutgoingPort, directions::outgoing, Mechanism, Tag>::type>::type >
+ (get_default_port<directions::outgoing, Mechanism, Tag>(outgoing)),
+ static_cast<typename utility::forwardable<
+ typename result_of::get_default_port<IncomingPort, directions::incoming, Mechanism, Tag>::type>::type >
+ (get_default_port<directions::incoming, Mechanism, Tag>(incoming)));
 }
 
 template<typename OutgoingPort, typename IncomingPort>

Modified: sandbox/SOC/2007/signals/boost/dataflow/support/complemented_port.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/support/complemented_port.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/support/complemented_port.hpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -13,7 +13,7 @@
 /// Convenience class for ComplementedPortTraits types.
 template<typename PortCategory, typename ComplementPort, typename Tag=default_tag>
 struct complemented_port_traits
- : public port_traits<PortCategory, concepts::complemented_port, Tag>
+ : public port_traits<PortCategory, Tag>
 {
     typedef ComplementPort complement_port_type; ///< complement Port type.
 };
@@ -26,12 +26,11 @@
 /// INTERNAL ONLY
 template<typename PortTraits>
 struct is_complemented_port_traits<PortTraits,
- typename detail::enable_if_defined<
- detail::all_of<
- typename PortTraits::mechanism,
+ typename utility::enable_if_type<
+ utility::all_of<
             typename PortTraits::category,
- typename PortTraits::concept,
- typename PortTraits::complement_port_type
+ typename PortTraits::complement_port_type,
+ typename PortTraits::tag
>
>::type>
  : public mpl::true_
@@ -41,20 +40,16 @@
 };
 
 /// Boolean metafunction determining whether a type is a ComplementedPort.
-template<typename Mechanism, typename PortCategory, typename T, typename Enable=void>
+template<typename T, typename Tag=default_tag, typename Enable=void>
 struct is_complemented_port : public mpl::false_
 {};
 
 /// INTERNAL ONLY
-template<typename Mechanism, typename PortCategory, typename T>
-struct is_complemented_port<Mechanism, PortCategory, T,
+template<typename T, typename Tag>
+struct is_complemented_port<T, Tag,
         typename enable_if<
             is_complemented_port_traits<
- typename port_traits_of<
- Mechanism,
- PortCategory,
- typename remove_cv<T>::type
- >::type
+ typename traits_of<T, Tag>::type
>
>::type >
     : public mpl::true_ {};

Modified: sandbox/SOC/2007/signals/boost/dataflow/support/component.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/support/component.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/support/component.hpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -6,7 +6,8 @@
 #ifndef BOOST_DATAFLOW_SUPPORT_COMPONENT_HPP
 #define BOOST_DATAFLOW_SUPPORT_COMPONENT_HPP
 
-#include <boost/dataflow/detail/enable_if_defined.hpp>
+#include <boost/dataflow/utility/enable_if_type.hpp>
+#include <boost/dataflow/support/port_vector.hpp>
 
 #include <boost/mpl/and.hpp>
 #include <boost/mpl/assert.hpp>
@@ -24,23 +25,18 @@
 namespace boost { namespace dataflow {
 
 /// Convenience base class for ComponentTraits types.
-template<typename PortSequence, typename DefaultPorts=mpl::map<>, typename ComponentConcept=concepts::component, typename Tag=default_tag>
+template<typename PortSequence, typename DefaultPorts=mpl::map<>, typename Tag=default_tag>
 struct component_traits
+ : public traits<Tag>
 {
     /// MPL Sequence of exposed port types.
     typedef PortSequence ports;
     /// MPL Sequence of default ports.
     typedef DefaultPorts default_ports;
- /// Concept the Component models.
- typedef ComponentConcept concept;
- /// Tag.
- typedef Tag tag;
     /// INTERNAL ONLY
     BOOST_MPL_ASSERT((mpl::is_sequence<PortSequence>));
     /// INTERNAL ONLY
     BOOST_MPL_ASSERT((mpl::is_sequence<DefaultPorts>));
- /// INTERNAL ONLY
- BOOST_MPL_ASSERT((is_base_of<concepts::component, ComponentConcept>));
 };
 
 /// Boolean metafunction determining whether a type is a ComponentTraits.
@@ -54,38 +50,16 @@
 /// INTERNAL ONLY
 template<typename ComponentTraits>
 struct is_component_traits<ComponentTraits,
- typename detail::enable_if_defined<
- detail::all_of<
+ typename utility::enable_if_type<
+ utility::all_of<
             typename ComponentTraits::ports,
             typename ComponentTraits::default_ports,
- typename ComponentTraits::concept,
             typename ComponentTraits::tag
>
>::type>
  : public mpl::true_
 {};
 
-/// Metafunction returning the ComponentTraits of a Component.
-template<typename T, typename Tag=default_tag, typename Enable=void>
-struct component_traits_of
-{
- /// INTERNAL ONLY
- BOOST_MPL_ASSERT((is_same<Enable, void>));
-};
-
-#ifndef DOXYGEN_DOCS_BUILD
-// Specialization allowing intrusive specification of the ComponentTraits.
-template<typename T, typename Tag>
-struct component_traits_of<
- T,
- Tag,
- typename detail::enable_if_defined<typename T::component_traits>::type >
-{
- typedef typename T::component_traits type;
- BOOST_MPL_ASSERT(( is_component_traits<type> ));
-};
-#endif // DOXYGEN_DOCS_BUILD
-
 /// Boolean metafunction determining whether a type is a Component.
 template<typename T, typename Tag=default_tag, typename Enable=void>
 struct is_component
@@ -96,8 +70,8 @@
 struct is_component<
     T,
     Tag,
- typename detail::enable_if_defined<
- typename component_traits_of<T, Tag>::type
+ typename enable_if<
+ is_component_traits<typename traits_of<T, Tag>::type>
>::type >
     : public mpl::true_ {};
 
@@ -106,70 +80,10 @@
 struct component
 {
     /// ComponentTraits of the Component.
- typedef ComponentTraits component_traits;
+ typedef ComponentTraits dataflow_traits;
 };
 
 #ifndef DOXYGEN_DOCS_BUILD
-namespace extension {
-
- template<typename ComponentTraits, typename Enable=void>
- struct get_port_impl
- {
- BOOST_MPL_ASSERT((is_same<Enable, void>));
-
- typedef void result_type;
-
- typedef void not_specialized;
-
- template<typename Component, int N>
- void operator()(Component &, mpl::int_<N>)
- {
- // Error: get_port_impl has not been
- // implemented for ComponentTraits.
- BOOST_STATIC_ASSERT(sizeof(Component)==0);
- }
- };
-
-} // namespace extension
-
-namespace result_of
-{
- template<typename Component, int N>
- struct get_port_c
- {
- typedef typename boost::result_of<
- extension::get_port_impl<
- typename component_traits_of<Component>::type
- >(Component &, mpl::int_<N>)>::type type;
- };
-
- template<typename Component, typename N>
- struct get_port
- {
- typedef typename get_port_c<Component, N::value>::type type;
- };
-}
-
-template<int N, typename Component>
-inline typename result_of::get_port_c<Component, N>::type
-get_port_c(Component &component)
-{
- return
- extension::get_port_impl<
- typename component_traits_of<Component>::type
- >()(component, mpl::int_<N>());
-}
-
-template<typename N, typename Component>
-inline typename result_of::get_port<Component, N>::type
-get_port(Component &component)
-{
- return
- extension::get_port_impl<
- typename component_traits_of<Component>::type
- >()(component, mpl::int_<N::value>());
-}
-
 template<typename Direction, typename Mechanism=default_mechanism>
 struct default_port_selector
 {
@@ -177,11 +91,6 @@
     typedef Mechanism mechanism;
 };
 
-template<typename T, typename Tag>
-struct traits_of<T, Tag, typename enable_if<is_component<T> >::type>
- : public component_traits_of<T>
-{};
-
 namespace extension {
 
     template<typename ComponentTraits, typename Direction, typename Mechanism>
@@ -210,13 +119,13 @@
         template<typename F, typename Component>
         struct result<F(Component &)>
         {
- typedef typename result_of::get_port<Component, port_number>::type type;
+ typedef typename result_of::get_port<Component, port_number, typename ComponentTraits::tag>::type type;
         };
         
         template<typename Component>
         typename result<get_default_port_impl(Component &)>::type operator()(Component &c)
         {
- return get_port<port_number>(c);
+ return get_port<port_number, typename ComponentTraits::tag>(c);
         }
     };
     

Modified: sandbox/SOC/2007/signals/boost/dataflow/support/component_operation.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/support/component_operation.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/support/component_operation.hpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -8,71 +8,36 @@
 
 #include <boost/dataflow/support/component.hpp>
 
-#include <boost/static_assert.hpp>
 
+// ***************************************
+// * component_operation
+// ***************************************
+#define DATAFLOW_SPECIALIZABLE_OPERATION_NAME component_operation
+#define DATAFLOW_SPECIALIZABLE_OPERATION_CHECK is_component_operable
+#define DATAFLOW_SPECIALIZABLE_OPERATION_TYPENAME_TEMPLATES typename Operation
+#define DATAFLOW_SPECIALIZABLE_OPERATION_TEMPLATES Operation
+#define DATAFLOW_SPECIALIZABLE_OPERATION_ARITY 1
+#define DATAFLOW_SPECIALIZABLE_OPERATION_TRAITS_OF traits_of
+#define DATAFLOW_SPECIALIZABLE_OPERATION_HAS_TRAITS is_component
+#include <boost/dataflow/support/detail/make_specializable_operation.hpp>
 
 namespace boost { namespace dataflow {
 
-namespace detail {
- struct not_implemented;
-}
-
 namespace operations
 {
     struct invoke;
 }
 
-namespace extension
+template<typename Component>
+inline typename enable_if<
+ dataflow::is_component<Component>,
+ void
+>::type invoke(Component &component)
 {
- template<typename Operation, typename ComponentTraits, typename Enable=void>
- struct component_operation_impl
- {
- BOOST_MPL_ASSERT((is_same<Enable, void>));
-
- struct detail
- {
- typedef void not_specialized;
- };
-
- template<typename Component>
- void operator()(Component &)
- {
- // Error: component_operation_impl Operation has not been
- // implemented for ComponentTraits.
- BOOST_STATIC_ASSERT(sizeof(Component)==0);
- }
- };
-}
-
-template<typename Operation, typename T, typename Enable=void>
-struct implements_component_operation
- : public mpl::true_
-{
- BOOST_MPL_ASSERT((is_same<Enable, void>));
-};
-
-template<typename Operation, typename T>
-struct implements_component_operation<
- Operation,
- T,
- typename detail::enable_if_defined<
- typename extension::component_operation_impl<
- Operation,
- typename component_traits_of<T>::type
- >::detail::not_specialized
- >::type
->
- : public mpl::false_ {};
-
-template<typename Operation, typename Component>
-void component_operation(Component &component)
-{
- extension::component_operation_impl<
- Operation,
- typename component_traits_of<Component>::type
- >()(component);
+ boost::dataflow::component_operation<boost::dataflow::operations::invoke, default_tag>(component);
 }
 
 } } // namespace boost::dataflow
 
+
 #endif // BOOST_DATAFLOW_SUPPORT_COMPONENT_OPERATION_HPP

Modified: sandbox/SOC/2007/signals/boost/dataflow/support/default_port_provider.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/support/default_port_provider.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/support/default_port_provider.hpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -6,48 +6,12 @@
 #ifndef BOOST_DATAFLOW_SUPPORT_DEFAULT_PORT_PROVIDER_HPP
 #define BOOST_DATAFLOW_SUPPORT_DEFAULT_PORT_PROVIDER_HPP
 
-#include <boost/dataflow/detail/enable_if_defined.hpp>
-#include <boost/dataflow/support/tags.hpp>
+#include <boost/dataflow/utility/enable_if_type.hpp>
+#include <boost/dataflow/support/traits.hpp>
 
 #include <boost/mpl/bool.hpp>
 #include <boost/type_traits/remove_reference.hpp>
 
-namespace boost { namespace dataflow {
-
-/// Metafunction returning the traits of a type.
-template<typename T, typename Tag=default_tag, typename Enable=void>
-struct traits_of
-{
-#ifdef DOXYGEN_DOCS_BUILD
- /// The traits of T.
- typedef detail::unspecified type;
-#endif
-};
-
-/// Boolean Metafunction determining whether a type has traits.
-template<typename T, typename Tag=default_tag, typename Enable=void>
-struct has_traits : public mpl::false_
-{
-#ifdef DOXYGEN_DOCS_BUILD
- /// Integral Constant value type
- typedef bool value_type;
- /// true if T has traits, false otherwise.
- typedef detail::unspecified value;
- /// Boolean Integral Constant
- typedef detail::unspecified type;
-#endif
-};
-
-/// INTERNAL ONLY
-template<typename T, typename Tag>
-struct has_traits<
- T,
- Tag,
- typename detail::enable_if_defined<typename traits_of<T, Tag>::type>::type >
- : public mpl::true_
-{};
-
-} } // namespace boost::dataflow
 
 // ***************************************
 // * get_default_port, has_default_port
@@ -81,10 +45,10 @@
 #define DATAFLOW_SPECIALIZABLE_OPERATION_TYPENAME_TEMPLATES_WDEFAULTS typename Direction, typename Mechanism=default_mechanism
 #define DATAFLOW_SPECIALIZABLE_OPERATION_TYPENAME_TEMPLATES typename Direction, typename Mechanism
 #define DATAFLOW_SPECIALIZABLE_OPERATION_TEMPLATES Direction, Mechanism
-#define DATAFLOW_SPECIALIZABLE_OPERATION_USE_TAG_IN_IMPL
+//#define DATAFLOW_SPECIALIZABLE_OPERATION_USE_TAG_IN_IMPL
 #define DATAFLOW_SPECIALIZABLE_OPERATION_ARITY 1
 #define DATAFLOW_SPECIALIZABLE_OPERATION_TRAITS_OF traits_of
-#define DATAFLOW_SPECIALIZABLE_OPERATION_HAS_TRAITS has_traits
+#define DATAFLOW_SPECIALIZABLE_OPERATION_HAS_TRAITS is_entity
 #include <boost/dataflow/support/detail/make_specializable_operation.hpp>
 
 #endif // DOXYGEN_DOCS_BUILD
@@ -92,10 +56,10 @@
 
 /// Metafunction returning the PortTraits of a default Port.
 template<typename T, typename Direction, typename Mechanism=default_mechanism, typename Tag=default_tag, typename Enable=void>
-struct default_port_traits_of
+struct default_traits_of
 {
 #ifndef DOXYGEN_DOCS_BUILD
- typedef typename port_traits_of<
+ typedef typename traits_of<
         typename remove_reference<
             typename result_of::get_default_port<T, Direction, Mechanism, Tag>::type
>::type,

Copied: sandbox/SOC/2007/signals/boost/dataflow/support/detail/traits_sequence.hpp (from r41674, /sandbox/SOC/2007/signals/boost/dataflow/support/port/detail/port_traits_sequence.hpp)
==============================================================================
--- /sandbox/SOC/2007/signals/boost/dataflow/support/port/detail/port_traits_sequence.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/support/detail/traits_sequence.hpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -21,16 +21,16 @@
 namespace detail {
 
     template<typename Tag, typename T, int N>
- struct lazy_is_same_port_traits_tag
+ struct lazy_is_same_traits_tag
     {
- typedef typename is_same<Tag, typename mpl::at_c<typename T::port_traits, N>::type::tag>::type type;
+ typedef typename is_same<Tag, typename mpl::at_c<typename T::dataflow_traits, N>::type::tag>::type type;
     };
     
 }
 
 } }
 
- #define BOOST_PP_ITERATION_PARAMS_1 (3, (0, 2, <boost/dataflow/support/port/detail/port_traits_sequence.hpp>))
+ #define BOOST_PP_ITERATION_PARAMS_1 (3, (0, 2, <boost/dataflow/support/detail/traits_sequence.hpp>))
     #include BOOST_PP_ITERATE()
 
     #endif
@@ -41,23 +41,23 @@
 
 
 template<typename T, typename Tag>
-struct port_traits_of<
+struct traits_of<
     T,
     Tag,
     typename enable_if<
         mpl::and_<
- mpl::is_sequence<typename T::port_traits>,
+ mpl::is_sequence<typename T::dataflow_traits>,
             typename mpl::less<
                 mpl::int_<BOOST_PP_ITERATION()>,
- typename mpl::size<typename T::port_traits>::type
+ typename mpl::size<typename T::dataflow_traits>::type
>::type,
- detail::lazy_is_same_port_traits_tag<Tag, T, BOOST_PP_ITERATION()>
+ detail::lazy_is_same_traits_tag<Tag, T, BOOST_PP_ITERATION()>
>
>::type
>
 {
- typedef typename mpl::at_c<typename T::port_traits, BOOST_PP_ITERATION()>::type type;
- BOOST_MPL_ASSERT(( is_port_traits<type> ));
+ typedef typename mpl::at_c<typename T::dataflow_traits, BOOST_PP_ITERATION()>::type type;
+ BOOST_MPL_ASSERT(( is_traits<type> ));
 };
 
 }}

Modified: sandbox/SOC/2007/signals/boost/dataflow/support/fusion_component.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/support/fusion_component.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/support/fusion_component.hpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -6,76 +6,25 @@
 #ifndef BOOST_DATAFLOW_SUPPORT_FUSION_COMPONENT_HPP
 #define BOOST_DATAFLOW_SUPPORT_FUSION_COMPONENT_HPP
 
+#include <boost/dataflow/detail/transform_remove_reference.hpp>
 #include <boost/dataflow/support/component.hpp>
+#include <boost/dataflow/support/fusion_port_vector.hpp>
 
-#include <boost/mpl/map.hpp>
-#include <boost/mpl/transform.hpp>
-#include <boost/fusion/container/vector.hpp>
-#include <boost/fusion/sequence/intrinsic/value_at.hpp>
-#include <boost/fusion/sequence/intrinsic/at.hpp>
-#include <boost/fusion/include/mpl.hpp>
-#include <boost/fusion/include/adapted.hpp>
 
 namespace boost { namespace dataflow {
 
-#ifndef DOXYGEN_DOCS_BUILD
-namespace detail
-{
- template<typename T>
- struct transform_remove_reference
- {
- typedef typename boost::mpl::transform<T,
- boost::remove_reference<boost::mpl::_> >::type type;
- };
-} // namespace detail
-#endif // DOXYGEN_DOCS_BUILD
-
 /// Convenience base class for FusionComponentTraits types.
-template<typename Sequence, typename DefaultPorts=mpl::map<> >
+template<typename Sequence, typename DefaultPorts=mpl::map<>, typename Tag=default_tag >
 struct fusion_component_traits
     : public component_traits<
         typename detail::transform_remove_reference<Sequence>::type,
         DefaultPorts,
- concepts::fusion_component>
+ Tag>
 {
     /// MPL Sequence of result types for get_port
- typedef Sequence port_result_types;
+ typedef Sequence fusion_ports;
 };
 
-#ifndef DOXYGEN_DOCS_BUILD
-namespace extension {
-
- template<typename ComponentTraits>
- struct get_port_impl<
- ComponentTraits,
- typename enable_if<
- is_same<
- typename ComponentTraits::concept,
- concepts::fusion_component>
- >::type >
- {
- template<typename FArgs>
- struct result;
-
- template<typename F, typename Component, typename N>
- struct result<F(Component &, N)>
- {
- typedef typename fusion::result_of::value_at<
- typename ComponentTraits::port_result_types,
- N>::type type;
- };
-
- template<typename Component, typename N>
- typename result<get_port_impl(Component &, N)>::type
- operator()(Component &c, N)
- {
- return fusion::at<N>(c.get_ports(c));
- }
- };
-
-} // namespace extension
-#endif // DOXYGEN_DOCS_BUILD
-
 }}
 
 #endif // BOOST_DATAFLOW_SUPPORT_FUSION_COMPONENT_HPP

Copied: sandbox/SOC/2007/signals/boost/dataflow/support/fusion_keyed_port.hpp (from r41674, /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/support/fusion_keyed_port.hpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -8,31 +8,69 @@
 
 #include <boost/dataflow/support/keyed_port.hpp>
 
+#include <boost/call_traits.hpp>
 //#include <boost/fusion/sequence/intrinsic/value_at.hpp>
+#include <boost/fusion/include/as_vector.hpp>
+#include <boost/fusion/include/mpl.hpp>
+#include <boost/fusion/include/transform.hpp>
 #include <boost/fusion/sequence/intrinsic/at_key.hpp>
 #include <boost/fusion/sequence/intrinsic/front.hpp>
+#include <boost/fusion/support/pair.hpp>
+#include <boost/type_traits/is_same.hpp>
 #include <boost/type_traits/remove_const.hpp>
 #include <boost/type_traits/remove_reference.hpp>
-#include <boost/call_traits.hpp>
-#include <boost/type_traits/is_same.hpp>
 
 namespace boost { namespace dataflow {
 
-template<typename PortCategory, typename Tag=default_tag>
-struct fusion_map_port
- : public port_traits<PortCategory, concepts::keyed_port, Tag> {};
+namespace detail {
+ struct get_pair_first
+ {
+ template<typename FArgs> struct result;
+
+ template<typename F, typename First, typename Second>
+ struct result<F(fusion::pair<First, Second>)>
+ {
+ typedef First type;
+ };
+ };
+ struct get_pair_second_dereferenced
+ {
+ template<typename FArgs> struct result;
+
+ template<typename F, typename First, typename Second>
+ struct result<F(fusion::pair<First, Second>)>
+ {
+ typedef typename remove_reference<Second>::type type;
+ };
+ };
+}
+
+template<typename PortCategory, typename Map, typename Tag=default_tag>
+struct fusion_keyed_port_traits
+ : public keyed_port_traits<
+ PortCategory,
+ typename fusion::result_of::transform<
+ typename fusion::result_of::as_vector<Map>::type,
+ detail::get_pair_first
+ >::type,
+ typename fusion::result_of::transform<
+ typename fusion::result_of::as_vector<Map>::type,
+ detail::get_pair_second_dereferenced
+ >::type,
+ Tag>
+{};
 
 template<typename PortCategory, typename T, typename Tag=default_tag>
-class port_map
+class fusion_keyed_port
 {
 
 public:
     typedef T map_type;
     
- port_map(const T& t) : t(t) {}
+ fusion_keyed_port(const T& t) : t(t) {}
     map_type &map() const {return t;}
     
- typedef fusion_map_port<PortCategory, Tag> port_traits;
+ typedef fusion_keyed_port_traits<PortCategory, T, Tag> dataflow_traits;
 
 private:
     mutable map_type t;
@@ -40,8 +78,8 @@
 
 namespace extension
 {
- template<typename PortCategory, typename Tag, typename KeyPortTraits>
- struct get_keyed_port_impl<fusion_map_port<PortCategory, Tag>, KeyPortTraits>
+ template<typename PortCategory, typename Map, typename Tag, typename KeyPortTraits>
+ struct get_keyed_port_impl<fusion_keyed_port_traits<PortCategory, Map, Tag>, KeyPortTraits>
     {
         template<typename FArgs> struct result;
         

Added: sandbox/SOC/2007/signals/boost/dataflow/support/fusion_port_vector.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2007/signals/boost/dataflow/support/fusion_port_vector.hpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -0,0 +1,68 @@
+// 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_SUPPORT_FUSION_PORT_VECTOR_HPP
+#define BOOST_DATAFLOW_SUPPORT_FUSION_PORT_VECTOR_HPP
+
+#include <boost/dataflow/detail/transform_remove_reference.hpp>
+#include <boost/dataflow/support/port_vector.hpp>
+
+#include <boost/fusion/container/vector.hpp>
+#include <boost/fusion/include/adapted.hpp>
+#include <boost/fusion/include/is_sequence.hpp>
+#include <boost/fusion/include/mpl.hpp>
+#include <boost/fusion/sequence/intrinsic/at.hpp>
+
+
+namespace boost { namespace dataflow {
+
+template<typename T, typename Enable=void>
+struct is_fusion_port_vector_traits
+ : public mpl::false_ {};
+
+template<typename T>
+struct is_fusion_port_vector_traits<
+ T,
+ typename enable_if<
+ mpl::and_<
+ is_traits<T>,
+ fusion::traits::is_sequence<typename T::fusion_ports>
+ > >::type >
+ : public mpl::true_
+{};
+
+#ifndef DOXYGEN_DOCS_BUILD
+namespace extension {
+
+ template<typename Traits>
+ struct get_port_impl<
+ Traits,
+ typename enable_if<is_fusion_port_vector_traits<Traits> >::type >
+ {
+ template<typename FArgs>
+ struct result;
+
+ template<typename F, typename Entity, typename N>
+ struct result<F(Entity &, N)>
+ {
+ typedef typename fusion::result_of::value_at<
+ typename Traits::fusion_ports,
+ N>::type type;
+ };
+
+ template<typename Entity, typename N>
+ typename result<get_port_impl(Entity &, N)>::type
+ operator()(Entity &c, N)
+ {
+ return fusion::at<N>(Traits::get_ports(c));
+ }
+ };
+
+} // namespace extension
+#endif // DOXYGEN_DOCS_BUILD
+
+}}
+
+#endif // BOOST_DATAFLOW_SUPPORT_FUSION_PORT_VECTOR_HPP
\ No newline at end of file

Added: sandbox/SOC/2007/signals/boost/dataflow/support/fusion_vector_port.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2007/signals/boost/dataflow/support/fusion_vector_port.hpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -0,0 +1,50 @@
+// 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_VECTOR_PORT_HPP
+#define BOOST_DATAFLOW_SUPPORT_VECTOR_PORT_HPP
+
+#include <boost/dataflow/detail/transform_remove_reference.hpp>
+#include <boost/dataflow/support/fusion_port_vector.hpp>
+#include <boost/dataflow/support/vector_port.hpp>
+
+#include <boost/fusion/sequence/intrinsic/at.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+
+namespace boost { namespace dataflow {
+
+template<typename PortCategory, typename PortSequence, typename Tag=default_tag>
+struct fusion_vector_port_traits
+ : public port_traits<PortCategory, Tag>
+{
+ typename detail::transform_remove_reference<PortSequence>::type ports;
+ /// MPL Sequence of result types for get_port
+ typedef PortSequence fusion_ports;
+
+ template<typename VectorPort>
+ static fusion_ports & get_ports(const VectorPort &vector_port)
+ { return vector_port.t; }
+};
+
+template<typename PortCategory, typename T, typename Tag=default_tag>
+class fusion_vector_port
+{
+public:
+ typedef fusion_vector_port_traits<PortCategory, T, Tag> dataflow_traits;
+ typedef T vector_type;
+
+ fusion_vector_port(const T& t) : t(t) {}
+
+private:
+ mutable T t;
+
+ friend struct fusion_vector_port_traits<PortCategory, T, Tag>;
+};
+
+} } // namespace boost::dataflow
+
+#endif // BOOST_DATAFLOW_SUPPORT_VECTOR_PORT_HPP
+

Modified: sandbox/SOC/2007/signals/boost/dataflow/support/invocable.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/support/invocable.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/support/invocable.hpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -6,7 +6,7 @@
 #ifndef BOOST_DATAFLOW_SUPPORT_INVOCABLE_HPP
 #define BOOST_DATAFLOW_SUPPORT_INVOCABLE_HPP
 
-#include <boost/dataflow/detail/enable_if_defined.hpp>
+#include <boost/dataflow/utility/enable_if_type.hpp>
 
 #include <boost/static_assert.hpp>
 #include <boost/type_traits/integral_constant.hpp>
@@ -26,7 +26,7 @@
 template<typename T>
 struct invocable_category_of<
     T,
- typename detail::enable_if_defined<typename T::invocable_category>::type >
+ typename utility::enable_if_type<typename T::invocable_category>::type >
 {
     typedef typename T::invocable_category type;
 };
@@ -34,7 +34,7 @@
 template<typename T>
 struct is_invocable<
     T,
- typename detail::enable_if_defined<invocable_category_of<T> >::type >
+ typename utility::enable_if_type<invocable_category_of<T> >::type >
 : public boost::true_type {};
 
 namespace extension

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-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -6,55 +6,107 @@
 #ifndef BOOST_DATAFLOW_SUPPORT_KEYED_PORT_HPP
 #define BOOST_DATAFLOW_SUPPORT_KEYED_PORT_HPP
 
+#include <boost/dataflow/utility/is_type.hpp>
 #include <boost/dataflow/support/binary_operation.hpp>
+#include <boost/dataflow/support/vector_port.hpp>
+#include <boost/mpl/transform.hpp>
 
-#include <boost/utility/result_of.hpp>
-#include <boost/static_assert.hpp>
-#include <boost/type_traits/integral_constant.hpp>
-#include <boost/type_traits/is_same.hpp>
-
+#ifndef DOXYGEN_DOCS_BUILD
+// ***************************************
+// * get_keyed_port, has_keyed_port
+// ***************************************
+#define DATAFLOW_SPECIALIZABLE_OPERATION_NAME get_keyed_port
+#define DATAFLOW_SPECIALIZABLE_OPERATION_CHECK has_keyed_port
+#define DATAFLOW_SPECIALIZABLE_OPERATION_TYPENAME_TEMPLATES typename KeyPortTag
+#define DATAFLOW_SPECIALIZABLE_OPERATION_TEMPLATES KeyPortTag
+#define DATAFLOW_SPECIALIZABLE_OPERATION_ARITY 1
+#define DATAFLOW_SPECIALIZABLE_OPERATION_TRAITS_OF traits_of
+#define DATAFLOW_SPECIALIZABLE_OPERATION_HAS_TRAITS is_port
+#include <boost/dataflow/support/detail/make_specializable_operation.hpp>
+#endif // DOXYGEN_DOCS_BUILD
 
 namespace boost { namespace dataflow {
 
-namespace extension
+/// Convenience class for KeyedPortTraits types.
+/** \param PortCategory The category of the port.
+ \param KeySequence MPL Seqence of key types (PortTraits types).
+ \param PortSequence MPL Sequence of Ports.
+ \param Tag Tag.
+*/
+template<typename PortCategory, typename KeySequence, typename PortSequence, typename Tag=default_tag>
+struct keyed_port_traits
+ : public vector_port_traits<
+ PortCategory,
+ PortSequence,
+ Tag>
+{
+ /// MPL Seqence of key types (PortTraits types).
+ typedef KeySequence port_keys;
+};
+
+/// Boolean Metafunction determining whether a type is a KeyedPortTraits.
+template<typename Traits, typename Enable=detail::enable_guard>
+struct is_keyed_port_traits : public mpl::false_
+{
+ /// INTERNAL ONLY
+ BOOST_MPL_ASSERT(( is_same<Enable, detail::enable_guard> ));
+};
+
+/// INTERNAL ONLY
+template<typename Traits>
+struct is_keyed_port_traits
+ <Traits,
+ typename enable_if<
+ mpl::and_<
+ is_vector_port_traits<Traits>,
+ utility::is_type<typename Traits::port_keys>
+ >,
+ detail::enable_guard
+ >::type>
+ : public mpl::true_
+{
+ /// INTERNAL ONLY
+ BOOST_MPL_ASSERT(( mpl::is_sequence<typename Traits::port_keys> ));
+};
+
+/// Boolean Metafunction determining whether a type is a KeyedPort.
+/** is_vector_port<T, Tag> is an Integral Constant of type bool.
+ It evaluates to true if T models VectorPort, false otherwise.
+*/
+template<typename T, typename Tag=default_tag, typename Enable=void>
+struct is_keyed_port
+ : public mpl::false_
 {
- template<typename KeyedPortTag, typename KeyPortTag>
- struct get_keyed_port_impl
- {
- typedef detail::not_specialized result_type;
+#ifdef DOXYGEN_DOCS_BUILD
+ /// Integral Constant value type
+ typedef bool value_type;
+ /// true if T models Port, false otherwise.
+ typedef detail::unspecified value;
+ /// Integral Constant
+ typedef detail::unspecified type;
+#endif
+};
+
+/// INTERNAL ONLY
+template<typename T, typename Tag>
+struct is_keyed_port<
+ T,
+ Tag,
+ typename enable_if<
+ is_keyed_port_traits<typename traits_of<T, Tag>::type>
+ >::type >
+ : public mpl::true_ {};
 
- template<typename KeyedPort, typename Key>
- result_type operator()(KeyedPort &)
- {
- // Error: get_keyed_port_impl has not been implemented
- // for KeyedPortTag and KeyPort.
- BOOST_STATIC_ASSERT(sizeof(KeyedPort)==0);
- return result_type();
- }
- };
-}
 
-template<typename KeyPortTraits, typename Tag, typename KeyedPort>
-inline typename boost::result_of<
- extension::get_keyed_port_impl<
- typename port_traits_of<KeyedPort, Tag>::type,
- KeyPortTraits
- > (KeyedPort &)
->::type
-get_keyed_port(KeyedPort &p)
-{
- return extension::get_keyed_port_impl<
- typename port_traits_of<KeyedPort, Tag>::type,
- KeyPortTraits
- >()(p);
-}
 
+#ifndef DOXYGEN_DOCS_BUILD
 namespace extension
 {
     template<typename ProducerTag, typename ConsumerTag, typename Operation>
     struct binary_operation_impl<ProducerTag, ConsumerTag, Operation,
             typename enable_if<
- boost::is_same<typename ProducerTag::concept, concepts::keyed_port>
+ is_keyed_port_traits<ProducerTag>
+// has_keyed_port<port<ProducerTag>, ConsumerTag, typename ProducerTag::tag>
>::type >
     {
         typedef void result_type;
@@ -70,7 +122,8 @@
     template<typename ProducerTag, typename ConsumerTag, typename Operation>
     struct binary_operation_impl<ProducerTag, ConsumerTag, Operation,
             typename enable_if<
- boost::is_same<typename ConsumerTag::concept, concepts::keyed_port>
+ is_keyed_port_traits<ConsumerTag>
+// has_keyed_port<port<ConsumerTag>, ProducerTag, typename ConsumerTag::tag>
>::type >
     {
         typedef void result_type;
@@ -82,8 +135,43 @@
                 (producer, get_keyed_port<ProducerTag, typename ConsumerTag::tag>(consumer));
         }
     };
+
+
+ template<typename KeyedPortTraits>
+ struct get_port_impl<
+ KeyedPortTraits,
+ typename enable_if<is_keyed_port_traits<KeyedPortTraits> >::type>
+ {
+ template<typename FArgs> struct result;
+
+ template<typename F, typename Port, int N>
+ struct result<F(Port &, mpl::int_<N>)>
+ {
+ typedef typename result_of::get_keyed_port<
+ Port,
+ typename mpl::at<
+ typename KeyedPortTraits::port_keys,
+ mpl::int_<N> >::type,
+ typename KeyedPortTraits::tag
+ >::type type;
+ };
+
+ template<typename Port, int N>
+ typename result<get_port_impl(Port &, mpl::int_<N>)>::type
+ operator()(Port &port, mpl::int_<N>)
+ {
+ return get_keyed_port<
+ typename mpl::at<
+ typename KeyedPortTraits::port_keys,
+ mpl::int_<N>
+ >::type,
+ typename KeyedPortTraits::tag
+ >(port);
+ }
+ };
 
 }
+#endif // DOXYGEN_DOCS_BUILD
 
 } } // namespace boost::dataflow
 

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-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -6,7 +6,6 @@
 #ifndef BOOST_DATAFLOW_SUPPORT_PORT_HPP
 #define BOOST_DATAFLOW_SUPPORT_PORT_HPP
 
-#include <boost/dataflow/support/port/traits.hpp>
 #include <boost/dataflow/support/port/port.hpp>
 #include <boost/dataflow/support/port/default_port_provider.hpp>
 

Modified: sandbox/SOC/2007/signals/boost/dataflow/support/port/category.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/support/port/category.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/support/port/category.hpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -6,7 +6,7 @@
 #ifndef BOOST_DATAFLOW_SUPPORT_PORT_CATEGORY_HPP
 #define BOOST_DATAFLOW_SUPPORT_PORT_CATEGORY_HPP
 
-#include <boost/dataflow/detail/enable_if_defined.hpp>
+#include <boost/dataflow/utility/enable_if_type.hpp>
 #include <boost/mpl/bool.hpp>
 
 namespace boost { namespace dataflow {
@@ -32,7 +32,7 @@
 template<typename PortCategory>
 struct is_port_category<
     PortCategory,
- typename detail::enable_if_defined<
+ typename utility::enable_if_type<
         typename PortCategory::complement
>::type>
  : public mpl::true_

Modified: sandbox/SOC/2007/signals/boost/dataflow/support/port/default_port_provider.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/support/port/default_port_provider.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/support/port/default_port_provider.hpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -16,11 +16,6 @@
 
 namespace boost { namespace dataflow {
 
-template<typename T, typename Tag>
-struct traits_of<T, Tag, typename enable_if<is_port<T, Tag> >::type>
- : public port_traits_of<T, Tag>
-{};
-
 namespace extension {
 
     template<typename PortTraits, typename Direction, typename Mechanism>

Deleted: sandbox/SOC/2007/signals/boost/dataflow/support/port/detail/port_traits_sequence.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/support/port/detail/port_traits_sequence.hpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
+++ (empty file)
@@ -1,65 +0,0 @@
-// Copyright 2007 Stjepan Rajko.
-// Distributed under the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-#if !BOOST_PP_IS_ITERATING
-
- #ifndef DATAFLOW_SUPPORT_PORT_TRAITS_SEQUENCE_HPP
- #define DATAFLOW_SUPPORT_PORT_TRAITS_SEQUENCE_HPP
-
- #include <boost/preprocessor/iteration/iterate.hpp>
-
- #include <boost/mpl/at.hpp>
- #include <boost/mpl/int.hpp>
- #include <boost/mpl/less.hpp>
- #include <boost/mpl/size.hpp>
-
-
-namespace boost { namespace dataflow {
-
-namespace detail {
-
- template<typename Tag, typename T, int N>
- struct lazy_is_same_port_traits_tag
- {
- typedef typename is_same<Tag, typename mpl::at_c<typename T::port_traits, N>::type::tag>::type type;
- };
-
-}
-
-} }
-
- #define BOOST_PP_ITERATION_PARAMS_1 (3, (0, 2, <boost/dataflow/support/port/detail/port_traits_sequence.hpp>))
- #include BOOST_PP_ITERATE()
-
- #endif
-
-#else
-
-namespace boost { namespace dataflow {
-
-
-template<typename T, typename Tag>
-struct port_traits_of<
- T,
- Tag,
- typename enable_if<
- mpl::and_<
- mpl::is_sequence<typename T::port_traits>,
- typename mpl::less<
- mpl::int_<BOOST_PP_ITERATION()>,
- typename mpl::size<typename T::port_traits>::type
- >::type,
- detail::lazy_is_same_port_traits_tag<Tag, T, BOOST_PP_ITERATION()>
- >
- >::type
->
-{
- typedef typename mpl::at_c<typename T::port_traits, BOOST_PP_ITERATION()>::type type;
- BOOST_MPL_ASSERT(( is_port_traits<type> ));
-};
-
-}}
-
-#endif

Modified: sandbox/SOC/2007/signals/boost/dataflow/support/port/detail/proxy_port_traits_sequence.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/support/port/detail/proxy_port_traits_sequence.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/support/port/detail/proxy_port_traits_sequence.hpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -44,7 +44,7 @@
 
 
 template<typename Mechanism, typename PortCategory, typename T>
-struct proxy_port_traits_of<Mechanism, PortCategory, T,
+struct proxy_traits_of<Mechanism, PortCategory, T,
     typename enable_if<
         mpl::and_<
             mpl::is_sequence<typename T::proxy_port_traits>,

Modified: sandbox/SOC/2007/signals/boost/dataflow/support/port/port.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/support/port/port.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/support/port/port.hpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -6,7 +6,7 @@
 #ifndef BOOST_DATAFLOW_SUPPORT_PORT_PORT_HPP
 #define BOOST_DATAFLOW_SUPPORT_PORT_PORT_HPP
 
-#include <boost/dataflow/detail/enable_if_defined.hpp>
+#include <boost/dataflow/utility/enable_if_type.hpp>
 #include <boost/dataflow/support/port/traits.hpp>
 #include <boost/dataflow/support/tags.hpp>
 
@@ -38,8 +38,8 @@
 struct is_port<
     T,
     Tag,
- typename detail::enable_if_defined<
- typename port_traits_of<T, Tag>::type
+ typename enable_if<
+ is_port_traits<typename traits_of<T, Tag>::type>
>::type >
     : public mpl::true_ {};
 
@@ -48,7 +48,9 @@
 struct port
 {
     /// PortTraits for the Port.
- typedef PortTraits port_traits;
+ typedef PortTraits dataflow_traits;
+ /// INTERNAL ONLY
+ BOOST_MPL_ASSERT(( is_port_traits<PortTraits> ));
 };
 
 } } // namespace boost::dataflow

Modified: sandbox/SOC/2007/signals/boost/dataflow/support/port/port_adapter.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/support/port/port_adapter.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/support/port/port_adapter.hpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -12,33 +12,54 @@
 namespace boost { namespace dataflow {
 
 template<typename T, typename PortTraits, typename Tag=default_tag>
-struct port_adapter_traits : public PortTraits
-{};
-
-template<typename T, typename PortTraits, typename Tag=default_tag>
-struct port_adapter : public port<port_adapter_traits<T, PortTraits, Tag> >
+struct port_adapter : public port<PortTraits >
 {
     port_adapter(T & object) : object(object) {}
     T & object;
 };
 
-namespace extension
+template<typename T>
+inline T &get_object(T &t)
+{
+ return t;
+}
+
+template<typename T>
+inline const T&get_object(const T &t)
+{
+ return t;
+}
+
+template<typename T, typename PortTraits, typename Tag>
+inline T&get_object(const port_adapter<T, PortTraits, Tag> &t)
+{
+ return t.object;
+}
+
+template<typename T, typename PortTraits, typename Tag>
+inline T&get_object(port_adapter<T, PortTraits, Tag> &t)
 {
- template<typename T, typename PortTraits, typename Tag, typename KeyPortTraits>
- struct get_keyed_port_impl<port_adapter_traits<T, PortTraits, Tag>, KeyPortTraits >
- {
- typedef typename boost::result_of<
- get_keyed_port_impl<PortTraits, KeyPortTraits>(T &)
- >::type result_type;
-
- template<typename PortAdapter>
- result_type operator()(PortAdapter &adapter)
- {
- return get_keyed_port_impl<PortTraits, KeyPortTraits>()(adapter.object);
- };
- };
+ return t.object;
 }
 
+template<typename T>
+struct get_object_type
+{
+ typedef T type;
+};
+
+template<typename T, typename PortTraits, typename Tag>
+struct get_object_type<port_adapter<T, PortTraits, Tag> >
+{
+ typedef T type;
+};
+
+template<typename T, typename PortTraits, typename Tag>
+struct get_object_type<const port_adapter<T, PortTraits, Tag> >
+{
+ typedef T type;
+};
+
 }} // namespace boost::dataflow
 
 #endif // DATAFLOW_SUPPORT_PORT_ADAPTER_HPP
\ No newline at end of file

Modified: sandbox/SOC/2007/signals/boost/dataflow/support/port/traits.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/support/port/traits.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/support/port/traits.hpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -6,39 +6,22 @@
 #ifndef BOOST_DATAFLOW_SUPPORT_PORT_TRAITS_HPP
 #define BOOST_DATAFLOW_SUPPORT_PORT_TRAITS_HPP
 
-#include <boost/dataflow/detail/enable_if_defined.hpp>
 #include <boost/dataflow/support/port/category.hpp>
-#include <boost/dataflow/support/tags.hpp>
+#include <boost/dataflow/support/traits.hpp>
 
-#include <boost/mpl/assert.hpp>
-#include <boost/mpl/bool.hpp>
-#include <boost/mpl/is_sequence.hpp>
-#include <boost/type_traits/is_base_of.hpp>
-#include <boost/type_traits/is_same.hpp>
-#include <boost/type_traits/remove_cv.hpp>
 
 namespace boost { namespace dataflow {
 
 /// Convenience class for PortTraits types.
-template<typename PortCategory, typename PortConcept=concepts::port,
- typename Tag=default_tag>
-struct port_traits
+template<typename PortCategory, typename Tag=default_tag>
+struct port_traits : public traits<Tag>
 {
     /// The PortCategory of the port.
     typedef PortCategory category;
- /// The PortConcept of the port.
- typedef PortConcept concept;
- /// The Tag of the port.
- typedef Tag tag;
     /// INTERNAL ONLY
     BOOST_MPL_ASSERT(( is_port_category<PortCategory> ));
- /// INTERNAL ONLY
- BOOST_MPL_ASSERT(( is_base_of<concepts::port, PortConcept> ));
 };
 
-namespace detail {
- struct enable_guard;
-}
 
 /// Boolean Metafunction determining whether a type is a PortTraits.
 template<typename PortTraits, typename Enable=detail::enable_guard>
@@ -51,10 +34,9 @@
 /// INTERNAL ONLY
 template<typename PortTraits>
 struct is_port_traits<PortTraits,
- typename detail::enable_if_defined<
- detail::all_of<
+ typename utility::enable_if_type<
+ utility::all_of<
             typename PortTraits::category,
- typename PortTraits::concept,
             typename PortTraits::tag
>,
         detail::enable_guard
@@ -64,102 +46,11 @@
     /// INTERNAL ONLY
     BOOST_MPL_ASSERT(( is_port_category<typename PortTraits::category> ));
     /// INTERNAL ONLY
- BOOST_MPL_ASSERT((is_base_of<concepts::port, typename PortTraits::concept>));
-};
-
-/// Metafunction returning the PortTraits of a type.
-template<typename T, typename Tag=default_tag, typename Enable=void>
-struct port_traits_of
-{
-#ifdef DOXYGEN_DOCS_BUILD
- typedef detail::unspecified type; ///< PortTraits type.
-#endif
+ BOOST_MPL_ASSERT(( is_tag<typename PortTraits::tag>));
 };
 
-/// INTERNAL ONLY
-/** Specialization allowing intrusive specification of the PortTraits.
-*/
-template<typename T>
-struct port_traits_of<
- T,
- typename T::port_traits::tag,
- typename enable_if<
- mpl::not_<mpl::is_sequence<typename T::port_traits> >
- >::type
->
-{
- /// INTERNAL ONLY
- typedef typename T::port_traits type;
- /// INTERNAL ONLY
- BOOST_MPL_ASSERT(( is_port_traits<type> ));
-};
-
-} }
-
-// Specialization allowing intrusive specification of a sequence of PortTraits.
-#include <boost/dataflow/support/port/detail/port_traits_sequence.hpp>
-
-namespace boost { namespace dataflow {
-
-/// Allows registration of PortTraits for all cv-qualified versions of a type.
-template<typename T, typename Tag=default_tag, typename Enable=void>
-struct register_port_traits
-{};
-
-
-// Specialization allowing non-intrusive specification of the PortTraits.
-
-/// INTERNAL ONLY
-template<typename T, typename Tag>
-struct port_traits_of<
- T,
- Tag,
- typename detail::enable_if_defined<
- typename register_port_traits<
- typename remove_cv<T>::type,
- Tag
- >::type
- >::type
->
-{
- /// INTERNAL ONLY
- typedef
- typename register_port_traits<
- typename remove_cv<T>::type,
- Tag
- >::type type;
- /// INTERNAL ONLY
- BOOST_MPL_ASSERT(( is_port_traits<type> ));
-};
 
 } } // namespace boost::dataflow
 
-/// Macro simplifying non-intrusive specification of a type's PortTraits.
-#define DATAFLOW_PORT_TRAITS(Type,PortTraits) \
-namespace boost { namespace dataflow { \
-template<> \
-struct register_port_traits< \
- Type, \
- PortTraits::tag> \
-{ \
- 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_TRAITS_ENABLE_IF(Type,Cond,PortTraits) \
-namespace boost { namespace dataflow { \
-template<typename Type> \
-struct register_port_traits< \
- Type, \
- PortTraits::tag, \
- typename boost::enable_if< Cond >::type> \
-{ \
- typedef PortTraits type; \
- BOOST_MPL_ASSERT(( is_port_traits<type> )); \
-}; \
-}}
 
 #endif // BOOST_DATAFLOW_SUPPORT_PORT_TRAITS_HPP

Added: sandbox/SOC/2007/signals/boost/dataflow/support/port_vector.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2007/signals/boost/dataflow/support/port_vector.hpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -0,0 +1,113 @@
+// 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_SUPPORT_PORT_VECTOR_HPP
+#define BOOST_DATAFLOW_SUPPORT_PORT_VECTOR_HPP
+
+#include <boost/dataflow/support/traits.hpp>
+#include <boost/mpl/is_sequence.hpp>
+
+namespace boost { namespace dataflow {
+
+template<typename PortSequence, typename Tag=default_tag>
+struct port_vector_traits
+ : public traits<Tag>
+{
+ typedef PortSequence ports;
+ BOOST_MPL_ASSERT(( mpl::is_sequence<PortSequence> ));
+};
+
+#ifndef DOXYGEN_DOCS_BUILD
+namespace extension {
+
+ template<typename ComponentTraits, typename Enable=void>
+ struct get_port_impl
+ {
+ BOOST_MPL_ASSERT((is_same<Enable, void>));
+
+ typedef void result_type;
+
+ typedef void not_specialized;
+
+ template<typename Component, int N>
+ void operator()(Component &, mpl::int_<N>)
+ {
+ // Error: get_port_impl has not been
+ // implemented for ComponentTraits.
+ BOOST_STATIC_ASSERT(sizeof(Component)==0);
+ }
+ };
+
+} // namespace extension
+
+namespace result_of
+{
+ template<typename Component, int N, typename Tag=default_tag>
+ struct get_port_c
+ {
+ typedef typename boost::result_of<
+ extension::get_port_impl<
+ typename traits_of<Component, Tag>::type
+ >(Component &, mpl::int_<N>)>::type type;
+ };
+
+ template<typename Component, typename N, typename Tag=default_tag>
+ struct get_port
+ {
+ typedef typename get_port_c<Component, N::value, Tag>::type type;
+ };
+}
+
+template<int N, typename Tag, typename Component>
+inline typename result_of::get_port_c<Component, N, Tag>::type
+get_port_c(Component &component)
+{
+ return
+ extension::get_port_impl<
+ typename traits_of<Component, Tag>::type
+ >()(component, mpl::int_<N>());
+}
+
+template<int N, typename Component>
+inline typename lazy_enable_if<
+ is_entity<Component>,
+ result_of::get_port_c<Component, N>
+>::type
+get_port_c(Component &component)
+{
+ return
+ extension::get_port_impl<
+ typename traits_of<Component>::type
+ >()(component, mpl::int_<N>());
+}
+
+template<typename N, typename Tag, typename Component>
+inline typename result_of::get_port<Component, N, Tag>::type
+get_port(Component &component)
+{
+ return
+ extension::get_port_impl<
+ typename traits_of<Component, Tag>::type
+ >()(component, mpl::int_<N::value>());
+}
+
+template<typename N, typename Component>
+inline typename lazy_enable_if<
+ is_entity<Component>,
+ result_of::get_port<Component, N>
+>::type
+get_port(Component &component)
+{
+ return
+ extension::get_port_impl<
+ typename traits_of<Component>::type
+ >()(component, mpl::int_<N::value>());
+}
+
+#endif // DOXYGEN_DOCS_BUILD
+
+} } // namespace boost::dataflow
+
+#endif // BOOST_DATAFLOW_SUPPORT_COMPONENT_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-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -29,8 +29,8 @@
 
 template<typename T>
 struct is_proxy_port_traits<T,
- typename detail::enable_if_defined<
- detail::all_of<
+ typename utility::enable_if_type<
+ utility::all_of<
             typename T::mechanism,
             typename T::category
>
@@ -47,11 +47,11 @@
 {};
 
 template<typename Mechanism, typename PortCategory, typename T, typename Enable=void>
-struct proxy_port_traits_of;
+struct proxy_traits_of;
 
 /// Specialization allowing intrusive specification of the PortTraits.
 template<typename Mechanism, typename PortCategory, typename T>
-struct proxy_port_traits_of<Mechanism, PortCategory, T,
+struct proxy_traits_of<Mechanism, PortCategory, T,
     typename enable_if<
         mpl::and_<
             mpl::not_<mpl::is_sequence<typename T::proxy_port_traits> >,
@@ -74,8 +74,8 @@
 
 template<typename Mechanism, typename PortCategory, typename T>
 struct is_proxy_port<Mechanism, PortCategory, T,
- typename detail::enable_if_defined<
- typename proxy_port_traits_of<
+ typename utility::enable_if_type<
+ typename proxy_traits_of<
                 Mechanism,
                 PortCategory,
                 typename boost::remove_cv<T>::type
@@ -92,7 +92,7 @@
 {
     return
         extension::get_port_impl<
- typename proxy_port_traits_of<Mechanism, PortCategory, T>::type
+ typename proxy_traits_of<Mechanism, PortCategory, T>::type
>()(t);
 }
 
@@ -157,7 +157,7 @@
             result_of<
                 typename
                 extension::get_port_impl<
- typename proxy_port_traits_of<
+ typename proxy_traits_of<
                         Mechanism,
                         PortCategory,
                         typename remove_cv<T>::type
@@ -167,11 +167,11 @@
 };
 
 template<typename Mechanism, typename PortCategory, typename T>
-struct port_traits_of<Mechanism, PortCategory, T,
+struct traits_of<Mechanism, PortCategory, T,
     typename boost::enable_if<is_proxy_port<Mechanism, PortCategory, T> >::type>
 {
     typedef
- typename port_traits_of<
+ typename traits_of<
             Mechanism,
             PortCategory,
             typename remove_cv<
@@ -187,7 +187,7 @@
 #define DATAFLOW_PROXY_PORT_TRAITS(ProxyPort,ProxyPortCategory) \
 namespace boost { namespace dataflow { \
 template<> \
-struct proxy_port_traits_of< \
+struct proxy_traits_of< \
     ProxyPortCategory::mechanism, \
     ProxyPortCategory::category, \
     ProxyPort> \
@@ -200,7 +200,7 @@
 #define DATAFLOW_PROXY_PORT_TRAITS_ENABLE_IF(P,Cond,ProxyPortCategory) \
 namespace boost { namespace dataflow { \
 template<typename P> \
-struct proxy_port_traits_of< \
+struct proxy_traits_of< \
     typename ProxyPortCategory::mechanism, \
     typename ProxyPortCategory::category, \
     P, \

Modified: sandbox/SOC/2007/signals/boost/dataflow/support/reflective_component.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/support/reflective_component.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/support/reflective_component.hpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -47,7 +47,7 @@
 {
     typedef typename result_of<
     extension::get_port_impl<
- typename component_traits_of<Mechanism, Component>::type
+ typename traits_of<Mechanism, Component>::type
>(Component &, T)>::type type;
 };
 
@@ -57,7 +57,7 @@
 {
     return
         extension::get_port_impl<
- typename component_traits_of<Mechanism, Component>::type
+ typename traits_of<Mechanism, Component>::type
>()(component, T());
 }
 

Modified: sandbox/SOC/2007/signals/boost/dataflow/support/runtime.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/support/runtime.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/support/runtime.hpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -35,6 +35,11 @@
     { return name_.c_str(); }
     int uuid() const
     { return uuid_; }
+ template<typename T>
+ bool is() const
+ {
+ return uuid_ == runtime::property<T,int>()();
+ }
 private:
     std::string name_;
     int uuid_;
@@ -58,10 +63,6 @@
 DATAFLOW_RUNTIME_PROPERTY(ports::producer, int, 0)
 DATAFLOW_RUNTIME_PROPERTY(ports::consumer, const char *, "consumer")
 DATAFLOW_RUNTIME_PROPERTY(ports::consumer, int, 1)
-DATAFLOW_RUNTIME_PROPERTY(concepts::port, const char *, "port")
-DATAFLOW_RUNTIME_PROPERTY(concepts::port, int, 0)
-DATAFLOW_RUNTIME_PROPERTY(concepts::complemented_port, const char *, "complemented_port")
-DATAFLOW_RUNTIME_PROPERTY(concepts::complemented_port, int, 1)
 
 DATAFLOW_RUNTIME_PROPERTY(operations::connect, const char *, "connect")
 DATAFLOW_RUNTIME_PROPERTY(operations::connect, int, 0)

Modified: sandbox/SOC/2007/signals/boost/dataflow/support/tags.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/support/tags.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/support/tags.hpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -6,11 +6,21 @@
 #ifndef BOOST_DATAFLOW_SUPPORT_TAGS_HPP
 #define BOOST_DATAFLOW_SUPPORT_TAGS_HPP
 
+#include <boost/type_traits/is_base_of.hpp>
 
 namespace boost { namespace dataflow {
 
 /// The default Tag argument for Dataflow templates.
-struct default_tag {};
+struct tag {};
+
+/// The default Tag argument for Dataflow templates.
+struct default_tag : tag {};
+
+/// Boolean metafunction determining whether a type is a Tag.
+template<typename T>
+struct is_tag
+ : public is_base_of<tag, T> {};
+
 /// The default Mechanism argument for Dataflow templates.
 struct default_mechanism {};
 
@@ -33,20 +43,33 @@
     };
 }
 
-namespace concepts
+/*namespace concepts
 {
+ struct entity {};
+
+ struct port_vector : public entity {};
+ struct fusion_port_vector : public port_vector {};
+
     /// PortConcept type specifying the Port concept.
- struct port {};
+ struct port : public entity {};
     /// PortConcept tag specifying the KeyedPort concept.
- struct keyed_port : public port {};
+ struct vector_port : public port {};
+ struct fusion_vector_port : public port, public fusion_port_vector {};
+ /// PortConcept tag specifying the KeyedPort concept.
+ struct keyed_port : public vector_port {};
     /// PortConcept tag specifying the ComplementedPort concept.
     struct complemented_port : public port {};
     /// ComponentConcept tag specifying the Component concept.
- struct component {};
+ struct component : port_vector {};
     /// ComponentConcept tag specifying the FusionComponent concept.
- struct fusion_component : public component {};
+ struct fusion_component : public component, public fusion_port_vector {};
 }
 
+template<typename T>
+struct is_concept
+ : public is_base_of<concepts::entity, T> {};*/
+
+
 namespace operations {
     /// Tag specifying the connect binary operation.
     struct connect {};

Copied: sandbox/SOC/2007/signals/boost/dataflow/support/traits.hpp (from r41674, /sandbox/SOC/2007/signals/boost/dataflow/support/port/traits.hpp)
==============================================================================
--- /sandbox/SOC/2007/signals/boost/dataflow/support/port/traits.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/support/traits.hpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -3,12 +3,11 @@
 // accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 
-#ifndef BOOST_DATAFLOW_SUPPORT_PORT_TRAITS_HPP
-#define BOOST_DATAFLOW_SUPPORT_PORT_TRAITS_HPP
+#ifndef BOOST_DATAFLOW_SUPPORT_TRAITS_HPP
+#define BOOST_DATAFLOW_SUPPORT_TRAITS_HPP
 
-#include <boost/dataflow/detail/enable_if_defined.hpp>
-#include <boost/dataflow/support/port/category.hpp>
 #include <boost/dataflow/support/tags.hpp>
+#include <boost/dataflow/utility/enable_if_type.hpp>
 
 #include <boost/mpl/assert.hpp>
 #include <boost/mpl/bool.hpp>
@@ -16,106 +15,96 @@
 #include <boost/type_traits/is_base_of.hpp>
 #include <boost/type_traits/is_same.hpp>
 #include <boost/type_traits/remove_cv.hpp>
+#include <boost/utility/enable_if.hpp>
 
 namespace boost { namespace dataflow {
 
-/// Convenience class for PortTraits types.
-template<typename PortCategory, typename PortConcept=concepts::port,
- typename Tag=default_tag>
-struct port_traits
-{
- /// The PortCategory of the port.
- typedef PortCategory category;
- /// The PortConcept of the port.
- typedef PortConcept concept;
+/// Convenience class for Traits types.
+template<typename Tag>
+struct traits
+{
     /// The Tag of the port.
     typedef Tag tag;
     /// INTERNAL ONLY
- BOOST_MPL_ASSERT(( is_port_category<PortCategory> ));
- /// INTERNAL ONLY
- BOOST_MPL_ASSERT(( is_base_of<concepts::port, PortConcept> ));
+ BOOST_MPL_ASSERT(( is_tag<Tag> ));
 };
 
 namespace detail {
     struct enable_guard;
 }
 
-/// Boolean Metafunction determining whether a type is a PortTraits.
-template<typename PortTraits, typename Enable=detail::enable_guard>
-struct is_port_traits : public mpl::false_
+/// Boolean Metafunction determining whether a type is a Traits.
+template<typename Traits, typename Enable=detail::enable_guard>
+struct is_traits : public mpl::false_
 {
     /// INTERNAL ONLY
     BOOST_MPL_ASSERT(( is_same<Enable, detail::enable_guard> ));
 };
 
 /// INTERNAL ONLY
-template<typename PortTraits>
-struct is_port_traits<PortTraits,
- typename detail::enable_if_defined<
- detail::all_of<
- typename PortTraits::category,
- typename PortTraits::concept,
- typename PortTraits::tag
+template<typename Traits>
+struct is_traits<Traits,
+ typename utility::enable_if_type<
+ utility::all_of<
+ typename Traits::tag
>,
         detail::enable_guard
>::type>
  : public mpl::true_
 {
     /// INTERNAL ONLY
- BOOST_MPL_ASSERT(( is_port_category<typename PortTraits::category> ));
- /// INTERNAL ONLY
- BOOST_MPL_ASSERT((is_base_of<concepts::port, typename PortTraits::concept>));
+ BOOST_MPL_ASSERT(( is_tag<typename Traits::tag> ));
 };
 
-/// Metafunction returning the PortTraits of a type.
+/// Metafunction returning the Traits of a type.
 template<typename T, typename Tag=default_tag, typename Enable=void>
-struct port_traits_of
+struct traits_of
 {
 #ifdef DOXYGEN_DOCS_BUILD
- typedef detail::unspecified type; ///< PortTraits type.
+ typedef detail::unspecified type; ///< Traits type.
 #endif
 };
 
 /// INTERNAL ONLY
-/** Specialization allowing intrusive specification of the PortTraits.
+/** Specialization allowing intrusive specification of the Traits.
 */
 template<typename T>
-struct port_traits_of<
+struct traits_of<
     T,
- typename T::port_traits::tag,
+ typename T::dataflow_traits::tag,
     typename enable_if<
- mpl::not_<mpl::is_sequence<typename T::port_traits> >
+ mpl::not_<mpl::is_sequence<typename T::dataflow_traits> >
>::type
>
 {
     /// INTERNAL ONLY
- typedef typename T::port_traits type;
+ typedef typename T::dataflow_traits type;
     /// INTERNAL ONLY
- BOOST_MPL_ASSERT(( is_port_traits<type> ));
+ BOOST_MPL_ASSERT(( is_traits<type> ));
 };
 
 } }
 
-// Specialization allowing intrusive specification of a sequence of PortTraits.
-#include <boost/dataflow/support/port/detail/port_traits_sequence.hpp>
+// Specialization allowing intrusive specification of a sequence of Traits.
+#include <boost/dataflow/support/detail/traits_sequence.hpp>
 
 namespace boost { namespace dataflow {
 
-/// Allows registration of PortTraits for all cv-qualified versions of a type.
+/// Allows registration of Traits for all cv-qualified versions of a type.
 template<typename T, typename Tag=default_tag, typename Enable=void>
-struct register_port_traits
+struct register_traits
 {};
 
 
-// Specialization allowing non-intrusive specification of the PortTraits.
+// Specialization allowing non-intrusive specification of the Traits.
 
 /// INTERNAL ONLY
 template<typename T, typename Tag>
-struct port_traits_of<
+struct traits_of<
     T,
     Tag,
- typename detail::enable_if_defined<
- typename register_port_traits<
+ typename utility::enable_if_type<
+ typename register_traits<
             typename remove_cv<T>::type,
             Tag
>::type
@@ -124,42 +113,65 @@
 {
     /// INTERNAL ONLY
     typedef
- typename register_port_traits<
+ typename register_traits<
             typename remove_cv<T>::type,
             Tag
>::type type;
     /// INTERNAL ONLY
- BOOST_MPL_ASSERT(( is_port_traits<type> ));
+ BOOST_MPL_ASSERT(( is_traits<type> ));
 };
 
+/// Boolean Metafunction determining whether a type has traits.
+template<typename T, typename Tag=default_tag, typename Enable=void>
+struct is_entity : public mpl::false_
+{
+#ifdef DOXYGEN_DOCS_BUILD
+ /// Integral Constant value type
+ typedef bool value_type;
+ /// true if T models Entity, false otherwise.
+ typedef detail::unspecified value;
+ /// Integral Constant
+ typedef detail::unspecified type;
+#endif
+};
+
+/// INTERNAL ONLY
+template<typename T, typename Tag>
+struct is_entity<
+ T,
+ Tag,
+ typename utility::enable_if_type<typename traits_of<T, Tag>::type>::type >
+ : public mpl::true_
+{};
+
 } } // namespace boost::dataflow
 
-/// Macro simplifying non-intrusive specification of a type's PortTraits.
-#define DATAFLOW_PORT_TRAITS(Type,PortTraits) \
+/// Macro simplifying non-intrusive specification of a type's Traits.
+#define DATAFLOW_TRAITS(Type,Traits) \
 namespace boost { namespace dataflow { \
 template<> \
-struct register_port_traits< \
+struct register_traits< \
     Type, \
- PortTraits::tag> \
+ Traits::tag> \
 { \
- typedef PortTraits type; \
- BOOST_MPL_ASSERT(( is_port_traits<type> )); \
+ typedef Traits type; \
+ BOOST_MPL_ASSERT(( is_traits<type> )); \
 }; \
 }}
 
 /// Macro simplifying non-intrusive specification of multiple types'
-/// PortTraits, using a boost::enable_if condition.
-#define DATAFLOW_PORT_TRAITS_ENABLE_IF(Type,Cond,PortTraits) \
+/// Traits, using a boost::enable_if condition.
+#define DATAFLOW_TRAITS_ENABLE_IF(Type,Cond,Traits) \
 namespace boost { namespace dataflow { \
 template<typename Type> \
-struct register_port_traits< \
+struct register_traits< \
     Type, \
- PortTraits::tag, \
+ typename Traits::tag, \
     typename boost::enable_if< Cond >::type> \
 { \
- typedef PortTraits type; \
- BOOST_MPL_ASSERT(( is_port_traits<type> )); \
+ typedef Traits type; \
+ BOOST_MPL_ASSERT(( is_traits<type> )); \
 }; \
 }}
 
-#endif // BOOST_DATAFLOW_SUPPORT_PORT_TRAITS_HPP
+#endif // BOOST_DATAFLOW_SUPPORT_TRAITS_HPP

Modified: sandbox/SOC/2007/signals/boost/dataflow/support/unary_operation.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/support/unary_operation.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/support/unary_operation.hpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -18,7 +18,7 @@
 #define DATAFLOW_SPECIALIZABLE_OPERATION_TYPENAME_TEMPLATES typename Operation
 #define DATAFLOW_SPECIALIZABLE_OPERATION_TEMPLATES Operation
 #define DATAFLOW_SPECIALIZABLE_OPERATION_ARITY 1
-#define DATAFLOW_SPECIALIZABLE_OPERATION_TRAITS_OF port_traits_of
+#define DATAFLOW_SPECIALIZABLE_OPERATION_TRAITS_OF traits_of
 #define DATAFLOW_SPECIALIZABLE_OPERATION_HAS_TRAITS is_port
 #include <boost/dataflow/support/detail/make_specializable_operation.hpp>
 

Added: sandbox/SOC/2007/signals/boost/dataflow/support/vector_port.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2007/signals/boost/dataflow/support/vector_port.hpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -0,0 +1,82 @@
+// 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_VECTOR_PORT_HPP
+#define BOOST_DATAFLOW_SUPPORT_VECTOR_PORT_HPP
+
+#include <boost/dataflow/support/port/traits.hpp>
+#include <boost/dataflow/support/port_vector.hpp>
+#include <boost/dataflow/utility/is_type.hpp>
+#include <boost/mpl/is_sequence.hpp>
+
+namespace boost { namespace dataflow {
+
+/// Convenience class for VectorPortTraits types.
+template<typename PortCategory, typename PortSequence, typename Tag=default_tag>
+struct vector_port_traits
+ : public port_traits<PortCategory, Tag>
+{
+ /// MPL Seqence of Port types.
+ typedef PortSequence ports;
+ /// INTERNAL ONLY
+ BOOST_MPL_ASSERT(( mpl::is_sequence<PortSequence> ));
+};
+
+/// Boolean Metafunction determining whether a type is a KeyedPortTraits.
+template<typename Traits, typename Enable=detail::enable_guard>
+struct is_vector_port_traits : public mpl::false_
+{
+ /// INTERNAL ONLY
+ BOOST_MPL_ASSERT(( is_same<Enable, detail::enable_guard> ));
+};
+
+/// INTERNAL ONLY
+template<typename Traits>
+struct is_vector_port_traits<
+ Traits,
+ typename enable_if<
+ mpl::and_<
+ is_port_traits<Traits>,
+ utility::is_type<typename Traits::ports>
+ >,
+ detail::enable_guard
+ >::type>
+ : public mpl::true_
+{
+ /// INTERNAL ONLY
+ BOOST_MPL_ASSERT(( mpl::is_sequence<typename Traits::ports> ));
+};
+
+/// Boolean Metafunction determining whether a type is a VectorPort.
+/** is_vector_port<T, Tag> is an Integral Constant of type bool.
+ It evaluates to true if T models VectorPort, false otherwise.
+*/
+template<typename T, typename Tag=default_tag, typename Enable=void>
+struct is_vector_port
+ : public mpl::false_
+{
+#ifdef DOXYGEN_DOCS_BUILD
+ /// Integral Constant value type
+ typedef bool value_type;
+ /// true if T models Port, false otherwise.
+ typedef detail::unspecified value;
+ /// Integral Constant
+ typedef detail::unspecified type;
+#endif
+};
+
+/// INTERNAL ONLY
+template<typename T, typename Tag>
+struct is_vector_port<
+ T,
+ Tag,
+ typename enable_if<
+ is_vector_port_traits<typename traits_of<T, Tag>::type>
+ >::type >
+ : public mpl::true_ {};
+
+} } // namespace boost::dataflow
+
+#endif // BOOST_DATAFLOW_SUPPORT_VECTOR_PORT_HPP
\ No newline at end of file

Modified: sandbox/SOC/2007/signals/boost/dataflow/templates/operator.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/templates/operator.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/templates/operator.hpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -18,8 +18,8 @@
 #endif
     
 template<typename OutgoingPort, typename IncomingPort>
-inline typename enable_if<
- mpl::and_<
+inline typename boost::enable_if<
+ boost::mpl::and_<
         boost::dataflow::has_default_port<OutgoingPort, boost::dataflow::directions::outgoing, DATAFLOW_TEMPLATE_MECHANISM, DATAFLOW_TEMPLATE_TAG>,
         boost::dataflow::has_default_port<IncomingPort, boost::dataflow::directions::incoming, DATAFLOW_TEMPLATE_MECHANISM, DATAFLOW_TEMPLATE_TAG>
>, OutgoingPort &
@@ -28,8 +28,8 @@
 { DATAFLOW_TEMPLATE_BINARY_OPERATION(outgoing, incoming); return outgoing;}
 
 template<typename OutgoingPort, typename IncomingPort>
-inline typename enable_if<
- mpl::and_<
+inline typename boost::enable_if<
+ boost::mpl::and_<
         boost::dataflow::has_default_port<OutgoingPort, boost::dataflow::directions::outgoing, DATAFLOW_TEMPLATE_MECHANISM, DATAFLOW_TEMPLATE_TAG>,
         boost::dataflow::has_default_port<IncomingPort, boost::dataflow::directions::incoming, DATAFLOW_TEMPLATE_MECHANISM, DATAFLOW_TEMPLATE_TAG>
>, OutgoingPort &

Copied: sandbox/SOC/2007/signals/boost/dataflow/utility/enable_if_type.hpp (from r41673, /sandbox/SOC/2007/signals/boost/dataflow/detail/enable_if_defined.hpp)
==============================================================================
--- /sandbox/SOC/2007/signals/boost/dataflow/detail/enable_if_defined.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/utility/enable_if_type.hpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -3,18 +3,16 @@
 // 1.0. (See accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 
-#ifndef DATAFLOW_DETAIL_ENABLE_IF_DEFINED_HPP
-#define DATAFLOW_DETAIL_ENABLE_IF_DEFINED_HPP
+#ifndef DATAFLOW_UTILITY_ENABLE_IF_TYPE_HPP
+#define DATAFLOW_UTILITY_ENABLE_IF_TYPE_HPP
 
-#include <boost/type_traits/integral_constant.hpp>
-#include <boost/utility/enable_if.hpp>
 
 namespace boost { namespace dataflow {
     
-namespace detail
+namespace utility
 {
     template<typename T, typename Result=void>
- struct enable_if_defined
+ struct enable_if_type
     {
         typedef Result type;
     };
@@ -30,4 +28,4 @@
 
 } } // namespace boost::dataflow
 
-#endif // DATAFLOW_DETAIL_ENABLE_IF_DEFINED_HPP
+#endif // DATAFLOW_UTILITY_ENABLE_IF_TYPE_HPP

Added: sandbox/SOC/2007/signals/boost/dataflow/utility/forwardable.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2007/signals/boost/dataflow/utility/forwardable.hpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -0,0 +1,28 @@
+// 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_UTILITY_FORWARDABLE_HPP
+#define BOOST_DATAFLOW_UTILITY_FORWARDABLE_HPP
+
+#include <boost/mpl/if.hpp>
+#include <boost/type_traits/is_reference.hpp>
+
+namespace boost { namespace dataflow { namespace utility {
+
+template<typename T>
+struct forwardable
+{
+ typedef const T & type;
+};
+
+template<typename T>
+struct forwardable<T &>
+{
+ typedef T & type;
+};
+
+} } }
+
+#endif // BOOST_DATAFLOW_UTILITY_FORWARDABLE_HPP
\ No newline at end of file

Added: sandbox/SOC/2007/signals/boost/dataflow/utility/is_type.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2007/signals/boost/dataflow/utility/is_type.hpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -0,0 +1,23 @@
+// 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_UTILITY_IS_TYPE_HPP
+#define BOOST_DATAFLOW_UTILITY_IS_TYPE_HPP
+
+#include <boost/mpl/bool.hpp>
+
+namespace boost { namespace dataflow {
+
+namespace utility {
+
+template<typename T>
+struct is_type
+ : public mpl::true_ {};
+
+} // namespace utility
+
+} } // namespace boost::dataflow
+
+#endif // BOOST_DATAFLOW_SUPPORT_KEYED_PORT_HPP

Added: sandbox/SOC/2007/signals/boost/dataflow/utility/uuid_constant.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2007/signals/boost/dataflow/utility/uuid_constant.hpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -0,0 +1,37 @@
+// 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_UTILITY_UUID_CONSTANT_HPP
+#define BOOST_DATAFLOW_UTILITY_UUID_CONSTANT_HPP
+
+#include <boost/mpl/and.hpp>
+#include <boost/mpl/equal_to.hpp>
+#include <boost/mpl/integral_c.hpp>
+#include <stdint>
+
+
+namespace boost { namespace dataflow { namespace utility {
+
+template<uint32_t Word1, uint32_t Word2, uint32_t Word3, uint32_t Word4>
+struct uuid_constant
+{
+ typedef mpl::integral_c<uint32_t, Word1> word1;
+ typedef mpl::integral_c<uint32_t, Word2> word2;
+ typedef mpl::integral_c<uint32_t, Word3> word3;
+ typedef mpl::integral_c<uint32_t, Word4> word4;
+};
+
+template<typename Uuid1, typename Uuid2>
+struct is_same_uuid
+ : public typename mpl::and_<
+ mpl::equal_to<Uuid1::word1, Uuid2::word1>,
+ mpl::equal_to<Uuid1::word2, Uuid2::word2>,
+ mpl::equal_to<Uuid1::word3, Uuid2::word3>,
+ mpl::equal_to<Uuid1::word4, Uuid2::word4> >::type
+{};
+
+}}} // namespace boost::dataflow::utility
+
+#endif // BOOST_DATAFLOW_UTILITY_UUID_CONSTANT_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-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -84,10 +84,11 @@
                 080612F30CF20A4A00F9DDF9 /* complemented_port.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = complemented_port.hpp; sourceTree = "<group>"; };
                 08061C2D0CBEE985002DC710 /* binary_operation.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = binary_operation.hpp; sourceTree = "<group>"; };
                 08061C980CBEF0C6002DC710 /* keyed_port.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = keyed_port.hpp; sourceTree = "<group>"; };
- 08061CC40CBEF3F7002DC710 /* port_map.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = port_map.hpp; sourceTree = "<group>"; };
                 0812D6370CF1283B0047236E /* binary_operation_t.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = binary_operation_t.hpp; sourceTree = "<group>"; };
                 0812D6380CF1283B0047236E /* binary_operation.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = binary_operation.hpp; sourceTree = "<group>"; };
                 0812D63C0CF140F30047236E /* component.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = component.hpp; sourceTree = "<group>"; };
+ 0815AE780D0B7C88007ED135 /* is_type.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = is_type.hpp; sourceTree = "<group>"; };
+ 0815AEC90D0B814E007ED135 /* test_complemented_port.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = test_complemented_port.cpp; sourceTree = "<group>"; };
                 08256FE60CEBDFEC003EC1B4 /* network.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = network.hpp; sourceTree = "<group>"; };
                 082761BE0C6037A90030E557 /* invocable.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = invocable.hpp; sourceTree = "<group>"; };
                 083FD3B90C62A4CB00EF3F6B /* concepts.qbk */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = concepts.qbk; sourceTree = "<group>"; };
@@ -96,6 +97,7 @@
                 084467150CE790B300B3CFDF /* test_reflective_component.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = test_reflective_component.cpp; sourceTree = "<group>"; };
                 0844671B0CE7918C00B3CFDF /* reflective_component.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = reflective_component.hpp; sourceTree = "<group>"; };
                 084482560CA0B37200B88137 /* operators.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = operators.hpp; sourceTree = "<group>"; };
+ 084B11CE0D08EB2C00491E27 /* forwardable.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = forwardable.hpp; sourceTree = "<group>"; };
                 084D2E6E0CE7DFE900E861FA /* gil_example.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = gil_example.cpp; sourceTree = "<group>"; };
                 08668C4E0C19A16300ACB19A /* simple_distributed_example.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = simple_distributed_example.cpp; sourceTree = "<group>"; };
                 08668C4F0C19A16300ACB19A /* Jamfile.v2 */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Jamfile.v2; sourceTree = "<group>"; };
@@ -133,15 +135,14 @@
                 08EF9B3D0C5D506A00D4D206 /* replace_return_type.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = replace_return_type.hpp; sourceTree = "<group>"; };
                 08EF9B3E0C5D506A00D4D206 /* result_of_defined.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = result_of_defined.hpp; sourceTree = "<group>"; };
                 08EF9B3F0C5D506A00D4D206 /* slot_type.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = slot_type.hpp; sourceTree = "<group>"; };
- 08EF9B420C5D506A00D4D206 /* slot_selector.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = slot_selector.hpp; sourceTree = "<group>"; };
                 08EF9B440C5D506A00D4D206 /* connection.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = connection.hpp; sourceTree = "<group>"; };
- 08EF9B460C5D506A00D4D206 /* enable_if_defined.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = enable_if_defined.hpp; sourceTree = "<group>"; };
                 08EF9B470C5D506A00D4D206 /* unfused_typed_class.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = unfused_typed_class.hpp; sourceTree = "<group>"; };
                 08EF9B520C5D537F00D4D206 /* support.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = support.hpp; sourceTree = "<group>"; };
                 08EFED440C1CD55100097C80 /* timing_example.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = timing_example.cpp; sourceTree = "<group>"; };
+ 08EFF41A0D0DAFEC004182AE /* enable_if_type.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = enable_if_type.hpp; sourceTree = "<group>"; };
+ 08F01A280D0A0D68002CDBAF /* transform_remove_reference.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = transform_remove_reference.hpp; sourceTree = "<group>"; };
                 08F01F970C470EB700C0ED27 /* support.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = support.hpp; sourceTree = "<group>"; };
                 08F01FA30C47132000C0ED27 /* support.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = support.hpp; sourceTree = "<group>"; };
- 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>"; };
                 08F077830C63F736003D448D /* components.qbk */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = components.qbk; sourceTree = "<group>"; };
@@ -150,7 +151,10 @@
                 08F09E820D00ACCD00DE0BFC /* fusion_component.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = fusion_component.hpp; sourceTree = "<group>"; };
                 08F09F2E0D00B5C300DE0BFC /* my_producer_consumer_operations.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = my_producer_consumer_operations.hpp; sourceTree = "<group>"; };
                 08F179B80D00832F005FDC23 /* make_specializable_operation.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = make_specializable_operation.hpp; sourceTree = "<group>"; };
- 08F1CD280CC55A5100EB5B4A /* port_traits_sequence.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = port_traits_sequence.hpp; sourceTree = "<group>"; };
+ 08F1A9970D0B5DE200D3812E /* traits.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = traits.hpp; sourceTree = "<group>"; };
+ 08F1A9990D0B5E3900D3812E /* traits.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = traits.hpp; sourceTree = "<group>"; };
+ 08F1A9A60D0B605000D3812E /* traits_sequence.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = traits_sequence.hpp; sourceTree = "<group>"; };
+ 08F1AAA40D0B69D200D3812E /* test_entity.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = test_entity.cpp; 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>"; };
@@ -164,6 +168,7 @@
                 08F22FD70C4C87C50027D364 /* static_value.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = static_value.hpp; sourceTree = "<group>"; };
                 08F230020C4C894E0027D364 /* advance.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = advance.hpp; sourceTree = "<group>"; };
                 08F230430C4C8D810027D364 /* static_function.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = static_function.hpp; sourceTree = "<group>"; };
+ 08F244EA0D1B682D00EC9B03 /* keyed_port_t.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = keyed_port_t.hpp; sourceTree = "<group>"; };
                 08F2464B0CA86D85001C3D41 /* Cone2.cxx */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Cone2.cxx; sourceTree = "<group>"; };
                 08F2464C0CA86D85001C3D41 /* Cone3.cxx */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Cone3.cxx; sourceTree = "<group>"; };
                 08F2464D0CA86D85001C3D41 /* Cone4.cxx */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Cone4.cxx; sourceTree = "<group>"; };
@@ -175,8 +180,17 @@
                 08F2647A0CEA9DE800DA01C9 /* vtk_example.qbk */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = vtk_example.qbk; sourceTree = "<group>"; };
                 08F26C8B0CBF1CBA00EDC3F6 /* test_port.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = test_port.cpp; sourceTree = "<group>"; };
                 08F26D630CBF2D4100EDC3F6 /* test_proxy_port.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = test_proxy_port.cpp; sourceTree = "<group>"; };
+ 08F2A7C20D0C597000AED0BC /* utility.qbk */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = utility.qbk; sourceTree = "<group>"; };
+ 08F2A83A0D0C634200AED0BC /* fusion_vector_port.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = fusion_vector_port.hpp; sourceTree = "<group>"; };
+ 08F2A85A0D0C663C00AED0BC /* fusion_keyed_port.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = fusion_keyed_port.hpp; sourceTree = "<group>"; };
                 08F2C31B0CAD961F00F9100C /* vtk_dataflow_support.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = vtk_dataflow_support.hpp; sourceTree = "<group>"; };
                 08F2D3A90CCADDE00042A3FF /* underlying_type.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = underlying_type.hpp; sourceTree = "<group>"; };
+ 08F2D4A60D0B0C640054E4A2 /* fusion_port_vector.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = fusion_port_vector.hpp; sourceTree = "<group>"; };
+ 08F2D4D10D0B106F0054E4A2 /* test_vector_port.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = test_vector_port.cpp; sourceTree = "<group>"; };
+ 08F322240D09F136007C1658 /* port_vector.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = port_vector.hpp; sourceTree = "<group>"; };
+ 08F3226F0D0A026B007C1658 /* general.qbk */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = general.qbk; sourceTree = "<group>"; };
+ 08F322740D0A0445007C1658 /* vector_port.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = vector_port.hpp; sourceTree = "<group>"; };
+ 08F346EC0D0CFE9700A037A3 /* vector_port_t.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = vector_port_t.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>"; };
                 08F3592D0CED1EC400E2BBFB /* blueprint.qbk */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = blueprint.qbk; sourceTree = "<group>"; };
@@ -191,10 +205,11 @@
                 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>"; };
                 08F448760CD5368000E128A8 /* simple_example_components.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = simple_example_components.hpp; sourceTree = "<group>"; };
+ 08F49B8B0D08946200D0CF0E /* uuid_constant.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = uuid_constant.hpp; sourceTree = "<group>"; };
+ 08F49BFE0D08AD9400D0CF0E /* test_component.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = test_component.cpp; 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>"; };
                 08F59F200D01B5E6007CD201 /* category.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = category.hpp; sourceTree = "<group>"; };
- 08F59F280D01B6D9007CD201 /* traits.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = traits.hpp; sourceTree = "<group>"; };
                 08F59F460D01B9D4007CD201 /* default_port_provider.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = default_port_provider.hpp; sourceTree = "<group>"; };
                 08F59F4E0D01BC56007CD201 /* default_port_provider.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = default_port_provider.hpp; sourceTree = "<group>"; };
                 08F59F520D01BD19007CD201 /* port.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = port.hpp; sourceTree = "<group>"; };
@@ -204,6 +219,8 @@
                 08F59F7D0D01C0D2007CD201 /* port.qbk */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = port.qbk; sourceTree = "<group>"; };
                 08F59F7E0D01C0D2007CD201 /* unary_operable.qbk */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = unary_operable.qbk; sourceTree = "<group>"; };
                 08F59F820D01C122007CD201 /* support.qbk */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = support.qbk; sourceTree = "<group>"; };
+ 08F5FF070D07082200FDBAEE /* Jamfile.v2 */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Jamfile.v2; sourceTree = "<group>"; };
+ 08F5FF130D070A1400FDBAEE /* test_port.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = test_port.cpp; 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>"; };
@@ -287,11 +304,11 @@
                 08668C4D0C19A16300ACB19A /* example */ = {
                         isa = PBXGroup;
                         children = (
+ 08668C4F0C19A16300ACB19A /* Jamfile.v2 */,
                                 08EBA7590CFF8B6D0080E225 /* example.cpp */,
                                 08FFDD6E0CEB709A009318A8 /* blueprint */,
                                 08F98B3F0CD018E7009D642B /* signals */,
                                 0800AC2F0C8CA99700994538 /* VTK */,
- 08668C4F0C19A16300ACB19A /* Jamfile.v2 */,
                                 08EFED440C1CD55100097C80 /* timing_example.cpp */,
                                 08FC26060C46049400F59CDD /* edit_distance.cpp */,
                                 08F9462E0C46C2F000E224E4 /* fibonacci.cpp */,
@@ -304,9 +321,10 @@
                         isa = PBXGroup;
                         children = (
                                 08C675970C13A03E00D85379 /* Jamfile.v2 */,
+ 08F5FF060D07082200FDBAEE /* blueprint */,
+ 08F71D3D0CA3547C0010099E /* signals */,
                                 084467150CE790B300B3CFDF /* test_reflective_component.cpp */,
                                 08B9D4190CC3D0790050F10B /* test_binary_op.cpp */,
- 08F71D3D0CA3547C0010099E /* signals */,
                                 08F26C8B0CBF1CBA00EDC3F6 /* test_port.cpp */,
                                 08F26D630CBF2D4100EDC3F6 /* test_proxy_port.cpp */,
                                 08B9D41E0CC3D0A80050F10B /* my_producer_consumer.hpp */,
@@ -314,6 +332,9 @@
                                 08F21F770CC6A2EB00DE649A /* test_unary_op.cpp */,
                                 08F21FC20CC6B3E600DE649A /* test_component.cpp */,
                                 08F09F2E0D00B5C300DE0BFC /* my_producer_consumer_operations.hpp */,
+ 08F2D4D10D0B106F0054E4A2 /* test_vector_port.cpp */,
+ 08F1AAA40D0B69D200D3812E /* test_entity.cpp */,
+ 0815AEC90D0B814E007ED135 /* test_complemented_port.cpp */,
                         );
                         name = test;
                         path = ../../test;
@@ -328,7 +349,6 @@
                                 08EF9B390C5D506A00D4D206 /* connection */,
                                 08EF9B440C5D506A00D4D206 /* connection.hpp */,
                                 08EF9B450C5D506A00D4D206 /* detail */,
- 08EF9B480C5D506A00D4D206 /* trait */,
                                 08F417350CFA466000C10A54 /* runtime_support.hpp */,
                         );
                         path = signals;
@@ -376,7 +396,6 @@
                         isa = PBXGroup;
                         children = (
                                 08EF9B3B0C5D506A00D4D206 /* detail */,
- 08EF9B420C5D506A00D4D206 /* slot_selector.hpp */,
                                 084482560CA0B37200B88137 /* operators.hpp */,
                         );
                         path = connection;
@@ -396,22 +415,15 @@
                 08EF9B450C5D506A00D4D206 /* detail */ = {
                         isa = PBXGroup;
                         children = (
- 08EF9B460C5D506A00D4D206 /* enable_if_defined.hpp */,
                                 08EF9B470C5D506A00D4D206 /* unfused_typed_class.hpp */,
                         );
                         path = detail;
                         sourceTree = "<group>";
                 };
- 08EF9B480C5D506A00D4D206 /* trait */ = {
- isa = PBXGroup;
- children = (
- );
- path = trait;
- sourceTree = "<group>";
- };
                 08F01F950C470E1500C0ED27 /* support */ = {
                         isa = PBXGroup;
                         children = (
+ 08F1A9970D0B5DE200D3812E /* traits.hpp */,
                                 08F59F460D01B9D4007CD201 /* default_port_provider.hpp */,
                                 08F418080CBD69FE007E7F7A /* port.hpp */,
                                 08F1CD260CC55A2A00EB5B4A /* port */,
@@ -420,6 +432,7 @@
                                 08F418AB0CBD7668007E7F7A /* proxy_port.hpp */,
                                 08061C2D0CBEE985002DC710 /* binary_operation.hpp */,
                                 08061C980CBEF0C6002DC710 /* keyed_port.hpp */,
+ 08F2A85A0D0C663C00AED0BC /* fusion_keyed_port.hpp */,
                                 08F21FAD0CC6ABCF00DE649A /* component.hpp */,
                                 08F21FB90CC6B29600DE649A /* component_operation.hpp */,
                                 0844671B0CE7918C00B3CFDF /* reflective_component.hpp */,
@@ -428,6 +441,10 @@
                                 08F417460CFA486200C10A54 /* tags.hpp */,
                                 08F09E820D00ACCD00DE0BFC /* fusion_component.hpp */,
                                 08F179B70D008313005FDC23 /* detail */,
+ 08F322240D09F136007C1658 /* port_vector.hpp */,
+ 08F2D4A60D0B0C640054E4A2 /* fusion_port_vector.hpp */,
+ 08F322740D0A0445007C1658 /* vector_port.hpp */,
+ 08F2A83A0D0C634200AED0BC /* fusion_vector_port.hpp */,
                         );
                         path = support;
                         sourceTree = "<group>";
@@ -435,8 +452,8 @@
                 08F0216A0C473AE000C0ED27 /* detail */ = {
                         isa = PBXGroup;
                         children = (
- 08F0216B0C473AF000C0ED27 /* enable_if_defined.hpp */,
                                 08F22ECE0C4BF6130027D364 /* make_ref.hpp */,
+ 08F01A280D0A0D68002CDBAF /* transform_remove_reference.hpp */,
                         );
                         path = detail;
                         sourceTree = "<group>";
@@ -447,7 +464,6 @@
                                 08F348500C492B320096097F /* operator */,
                                 08F022C20C47556200C0ED27 /* group.hpp */,
                                 08F022C70C47565600C0ED27 /* operators.hpp */,
- 08061CC40CBEF3F7002DC710 /* port_map.hpp */,
                         );
                         path = connection;
                         sourceTree = "<group>";
@@ -464,6 +480,7 @@
                 08F179B70D008313005FDC23 /* detail */ = {
                         isa = PBXGroup;
                         children = (
+ 08F1A9A60D0B605000D3812E /* traits_sequence.hpp */,
                                 08F179B80D00832F005FDC23 /* make_specializable_operation.hpp */,
                         );
                         path = detail;
@@ -472,9 +489,9 @@
                 08F1CD260CC55A2A00EB5B4A /* port */ = {
                         isa = PBXGroup;
                         children = (
+ 08F1A9990D0B5E3900D3812E /* traits.hpp */,
                                 08F59F520D01BD19007CD201 /* port.hpp */,
                                 08F59F4E0D01BC56007CD201 /* default_port_provider.hpp */,
- 08F59F280D01B6D9007CD201 /* traits.hpp */,
                                 08F59F200D01B5E6007CD201 /* category.hpp */,
                                 08F1CD270CC55A2A00EB5B4A /* detail */,
                                 08F972FB0D0471FA00ABF6C1 /* port_adapter.hpp */,
@@ -485,7 +502,6 @@
                 08F1CD270CC55A2A00EB5B4A /* detail */ = {
                         isa = PBXGroup;
                         children = (
- 08F1CD280CC55A5100EB5B4A /* port_traits_sequence.hpp */,
                                 08F217BB0CC570CD00F9A91B /* proxy_port_traits_sequence.hpp */,
                         );
                         path = detail;
@@ -521,10 +537,20 @@
                                 08BD9B090CEB9E3D0069AFE2 /* port.hpp */,
                                 08EF045E0CEBF1AD002ABBBC /* port_t.hpp */,
                                 08256FE60CEBDFEC003EC1B4 /* network.hpp */,
+ 08F346EC0D0CFE9700A037A3 /* vector_port_t.hpp */,
+ 08F244EA0D1B682D00EC9B03 /* keyed_port_t.hpp */,
                         );
                         path = blueprint;
                         sourceTree = "<group>";
                 };
+ 08F2A7C10D0C596600AED0BC /* utility */ = {
+ isa = PBXGroup;
+ children = (
+ 08F2A7C20D0C597000AED0BC /* utility.qbk */,
+ );
+ path = utility;
+ sourceTree = "<group>";
+ };
                 08F348500C492B320096097F /* operator */ = {
                         isa = PBXGroup;
                         children = (
@@ -536,8 +562,12 @@
                 08F348960CC021CE006D0A67 /* utility */ = {
                         isa = PBXGroup;
                         children = (
+ 08EFF41A0D0DAFEC004182AE /* enable_if_type.hpp */,
                                 08F348970CC021E0006D0A67 /* copy_cv.hpp */,
                                 08F2D3A90CCADDE00042A3FF /* underlying_type.hpp */,
+ 08F49B8B0D08946200D0CF0E /* uuid_constant.hpp */,
+ 084B11CE0D08EB2C00491E27 /* forwardable.hpp */,
+ 0815AE780D0B7C88007ED135 /* is_type.hpp */,
                         );
                         path = utility;
                         sourceTree = "<group>";
@@ -575,10 +605,21 @@
                                 08F59F7C0D01C0D2007CD201 /* concepts.qbk */,
                                 08F59F7D0D01C0D2007CD201 /* port.qbk */,
                                 08F59F7E0D01C0D2007CD201 /* unary_operable.qbk */,
+ 08F3226F0D0A026B007C1658 /* general.qbk */,
                         );
                         path = concepts;
                         sourceTree = "<group>";
                 };
+ 08F5FF060D07082200FDBAEE /* blueprint */ = {
+ isa = PBXGroup;
+ children = (
+ 08F5FF070D07082200FDBAEE /* Jamfile.v2 */,
+ 08F5FF130D070A1400FDBAEE /* test_port.cpp */,
+ 08F49BFE0D08AD9400D0CF0E /* test_component.cpp */,
+ );
+ path = blueprint;
+ sourceTree = "<group>";
+ };
                 08F71D3D0CA3547C0010099E /* signals */ = {
                         isa = PBXGroup;
                         children = (
@@ -634,13 +675,13 @@
                 08FC25BA0C45B60E00F59CDD /* dataflow */ = {
                         isa = PBXGroup;
                         children = (
+ 08F01F950C470E1500C0ED27 /* support */,
+ 08EF9B200C5D506A00D4D206 /* signals */,
                                 08F265440CEAC22400DA01C9 /* blueprint */,
                                 08F348960CC021CE006D0A67 /* utility */,
                                 08F079940CA88EAB001E6E24 /* templates */,
- 08EF9B200C5D506A00D4D206 /* signals */,
                                 08F022C10C47556200C0ED27 /* connection */,
                                 08F0216A0C473AE000C0ED27 /* detail */,
- 08F01F950C470E1500C0ED27 /* support */,
                                 08FC25CA0C45CF5B00F59CDD /* phoenix */,
                                 08F01F970C470EB700C0ED27 /* support.hpp */,
                         );
@@ -681,11 +722,12 @@
                         isa = PBXGroup;
                         children = (
                                 08FD5E4D0C1BA60800F00877 /* Jamfile.v2 */,
+ 08F264770CEA9DE800DA01C9 /* introduction */,
                                 08F59F780D01C019007CD201 /* support */,
+ 08FB7BEE0C6157AE00BD4EC2 /* signals */,
                                 08F3592C0CED1E9F00E2BBFB /* blueprint */,
- 08F264770CEA9DE800DA01C9 /* introduction */,
                                 083FD3C00C62A75100EF3F6B /* phoenix */,
- 08FB7BEE0C6157AE00BD4EC2 /* signals */,
+ 08F2A7C10D0C596600AED0BC /* utility */,
                                 08FD5E4E0C1BA60800F00877 /* dataflow.qbk */,
                                 08F36DFB0C41375B00E2F9A1 /* dataflow_table.xml */,
                                 08FA6A050C41E11800434913 /* rationale.qbk */,
@@ -701,8 +743,8 @@
                 08FFDD6E0CEB709A009318A8 /* blueprint */ = {
                         isa = PBXGroup;
                         children = (
- 08FFDD6F0CEB70AD009318A8 /* blueprint_example.cpp */,
                                 08FFDD740CEB71A2009318A8 /* Jamfile.v2 */,
+ 08FFDD6F0CEB70AD009318A8 /* blueprint_example.cpp */,
                         );
                         path = blueprint;
                         sourceTree = "<group>";

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-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -17,6 +17,8 @@
 doxygen dataflow_blueprint_doxygen
    :
       [ glob ../../../boost/dataflow/blueprint/port.hpp ]
+ [ glob ../../../boost/dataflow/blueprint/component.hpp ]
+ [ glob ../../../boost/dataflow/blueprint/binary_operation.hpp ]
    :
         <doxygen:param>TAB_SIZE=4
         <doxygen:param>EXAMPLE_PATH=../test
@@ -37,6 +39,7 @@
    
 doxygen dataflow_support_doxygen
    :
+ [ glob ../../../boost/dataflow/support/traits.hpp ]
       [ glob ../../../boost/dataflow/support/port/category.hpp ]
       [ glob ../../../boost/dataflow/support/port/traits.hpp ]
       [ glob ../../../boost/dataflow/support/port/port.hpp ]
@@ -45,6 +48,29 @@
       [ glob ../../../boost/dataflow/support/tags.hpp ]
       [ glob ../../../boost/dataflow/support/component.hpp ]
       [ glob ../../../boost/dataflow/support/fusion_component.hpp ]
+ [ glob ../../../boost/dataflow/support/vector_port.hpp ]
+ [ glob ../../../boost/dataflow/support/keyed_port.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=NO
+ <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>INCLUDE_PATH=$(BOOST_ROOT)
+ <doxygen:param>PREDEFINED=DOXYGEN_DOCS_BUILD
+ ;
+
+doxygen dataflow_utility_doxygen
+ :
+ [ glob ../../../boost/dataflow/utility/*.hpp ]
    :
         <doxygen:param>TAB_SIZE=4
         <doxygen:param>EXAMPLE_PATH=../test
@@ -66,8 +92,9 @@
 boostbook standalone
    :
       dataflow_xml
- dataflow_blueprint_doxygen
+ dataflow_utility_doxygen
       dataflow_support_doxygen
+ dataflow_blueprint_doxygen
     :
         # pull in the online .css and images
         <xsl:param>project.root=http://beta.boost.org/development
@@ -79,7 +106,7 @@
         <xsl:param>chunk.first.sections=1
         <xsl:param>chunk.section.depth=10
         <xsl:param>toc.section.depth=4
- <xsl:param>toc.max.depth=3
+ <xsl:param>toc.max.depth=2
         <xsl:param>generate.section.toc.level=4
     ;
     

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-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -3,7 +3,7 @@
 [section producer_group]
 
 [heading Model of]
-* [ProducerPort]
+* producer [Port]
 
 [heading Description]
 
@@ -24,7 +24,7 @@
 [section consumer_group]
 
 [heading Model of]
-* [ProducerPort]
+* producer [Port]
 
 [heading Description]
 
@@ -45,8 +45,8 @@
 [section consumer_map]
 
 A [consumer_map] groups together multiple consumers, keyed by type they consume.
-When a [ProducerPort] is connected to a [consumer_map], the consumer
-whose key matches the [ProducerPort]'s produced type will be chosen for
+When a producer [Port] is connected to a [consumer_map], the consumer
+whose key matches the producer [Port]'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 [ProducerPort]'s outgoing signal
+a connection is made, based on the producer [Port]'s outgoing signal
 signature.
 
 [endsect][/consumer_map]

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-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -1,6 +1,6 @@
 [article Dataflow
     [quickbook 1.4]
- [version 0.8.2]
+ [version 0.9.0]
     [authors [Rajko, Stjepan]]
     [copyright 2007 Stjepan Rajko]
     [purpose Generic dataflow lirary providing support for data producers,
@@ -13,8 +13,9 @@
 ]
 
 [template concepts[] [link dataflow.support.concepts concepts]]
-[template Tag[] [link dataflow.support.concepts.port_related.tag [^Tag]]]
-[template Mechanism[] [link dataflow.support.concepts.port_related.mechanism [^Mechanism]]]
+[template Tag[] [link dataflow.support.concepts.general.tag [^Tag]]]
+[template Traits[] [link dataflow.support.concepts.general.entity [^Traits]]]
+[template Entity[] [link dataflow.support.concepts.general.entity [^Entity]]]
 [template PortCategory[] [link dataflow.support.concepts.port_related.portcategory [^PortCategory]]]
 [template PortTraits[] [link dataflow.support.concepts.port_related.port [^PortTraits]]]
 [template Port[] [link dataflow.support.concepts.port_related.port [^Port]]]
@@ -22,7 +23,12 @@
 [template ConsumerPort[] [link dataflow.support.concepts.port_related.port [^ConsumerPort]]]
 [template ComplementedPort[] [link dataflow.support.concepts.port_related.complementedport [^ComplementedPort]]]
 [template ComplementedPortTraits[] [link dataflow.support.concepts.port_related.complementedport [^ComplementedPortTraits]]]
+[template PortVector[] [link dataflow.support.concepts.general.portvector [^PortVector]]]
+[template PortVectorTraits[] [link dataflow.support.concepts.general.portvector [^PortVectorTraits]]]
+[template VectorPort[] [link dataflow.support.concepts.port_related.vectorport [^VectorPort]]]
+[template VectorPortTraits[] [link dataflow.support.concepts.port_related.vectorport [^VectorPortTraitr]]]
 [template KeyedPort[] [link dataflow.support.concepts.port_related.keyedport [^KeyedPort]]]
+[template KeyedPortTraits[] [link dataflow.support.concepts.port_related.keyedport [^KeyedPortTraitr]]]
 
 [template ProxyPortTraits[] [link dataflow.support.concepts.port_related.proxyporttraits [^ProxyPortTraits]]]
 [template ProxyPort[] [link dataflow.support.concepts.port_related.proxyport [^ProxyPort]]]
@@ -106,18 +112,20 @@
 [template vtkRenderer[] [@http://www.vtk.org/doc/nightly/html/classvtkAlgorithm.html ['vtkRenderer]]]
 
 [template blueprint[] [link dataflow.future.blueprint blueprint]]
+[template FuturePin[] [link dataflow.future.pin pin]]
+[template rationale[] [link dataflow.development.rationale rationale]]
 
 [template is_port_category[] [classref boost::dataflow::is_port_category is_port_category]]
 [template port_traits[] [classref boost::dataflow::port_traits [^port_traits]]]
-[template port_traits_of[] [classref boost::dataflow::port_traits_of port_traits_of]]
-[template register_port_traits[] [classref boost::dataflow::register_port_traits register_port_traits]]
+[template traits_of[] [classref boost::dataflow::traits_of traits_of]]
+[template register_traits[] [classref boost::dataflow::register_traits register_traits]]
 [template is_port[] [classref boost::dataflow::is_port [^is_port]]]
 [template port[] [classref boost::dataflow::port [^port]]]
 [template complemented_port_traits[] [classref boost::dataflow::complemented_port_traits [^complemented_port_traits]]]
 [template is_complemented_port[] [classref boost::dataflow::is_complemented_port [^is_complemented_port]]]
 
-[template DATAFLOW_PORT_TRAITS[] [macroref DATAFLOW_PORT_TRAITS DATAFLOW_PORT_TRAITS]]
-[template DATAFLOW_PORT_TRAITS_ENABLE_IF[] [macroref DATAFLOW_PORT_TRAITS_ENABLE_IF DATAFLOW_PORT_TRAITS_ENABLE_IF]]
+[template DATAFLOW_TRAITS[] [macroref DATAFLOW_TRAITS DATAFLOW_TRAITS]]
+[template DATAFLOW_TRAITS_ENABLE_IF[] [macroref DATAFLOW_TRAITS_ENABLE_IF DATAFLOW_TRAITS_ENABLE_IF]]
 [template default_tag[] [classref boost::dataflow::default_tag [^concepts::default_tag]]]
 
 [import ../test/test_port.cpp]
@@ -163,7 +171,9 @@
 
 [include blueprint/blueprint.qbk]
 
-[include phoenix.qbk]
+[/[include phoenix.qbk]]
+
+[include utility/utility.qbk]
 
 [section Development]
 

Modified: sandbox/SOC/2007/signals/libs/dataflow/doc/introduction/introduction.qbk
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/doc/introduction/introduction.qbk (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/doc/introduction/introduction.qbk 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -19,10 +19,11 @@
 The idea behind providing a generic dataflow library is that
 other data transport mechanisms and dataflow frameworks can be easily adapted for
 use with the library, and benefit from layers built on top of the generic layer.
-There is an example on how to do that for [VTK], and there is also an
+
+[/There is an example on how to do that for [VTK], and there is also an
 implementation of an (experimental and currently broken) layer based
 connections made through simple object pointers, with support for using
-[BoostPhoenix2] actors for data processing ([DataflowPhoenix]).
+[BoostPhoenix2] actors for data processing ([DataflowPhoenix]).]
 
 * If you would like some more information about why one would want to connect
   objects into a dataflow network, read about
@@ -195,33 +196,36 @@
 * The [DataflowBlueprint] layer, built on top of the generic layer and providing
   runtime reflection and network modeling using the [BoostGraph].
 
-There is also a (currently very experimental) [DataflowPhoenix] layer,
+[/There is also a (currently very experimental) [DataflowPhoenix] layer,
 which uses object pointers with support for
-[BoostPhoenix] actors specifying how the data is processed.
+[BoostPhoenix] actors specifying how the data is processed.]
 
 [heading Generic dataflow layer]
 
 There are generic properties of dataflow programs which do not depend on the
 underlying dataflow framework or data transport mechanism,
-and can be exploited to develop generic dataflow code.
-The generic dataflow layer captures some of these properties, and
+and can be exploited to develop generic dataflow code. Currently, the generic
+layer addresses mostly connection and extraction aspects - the [rationale]
+section discusses why.
+
+[/The generic dataflow layer captures some of these properties, and
 has been sucessfully adapted to three
 different data transport mechanisms ([BoostSignals], pointers in conjunction
-with [BoostPhoenix2], and [VTK] pipelines).
+with [BoostPhoenix2], and [VTK] pipelines).]
 
-Currently, the most useful functionality gained by developing a Dataflow
+At the moment, the most useful functionality gained by developing a Dataflow
 support layer is the ability to connect components in a clean, readable
 manner. As more generic code is developed on top of
 the generic dataflow layer (such as the recently started [DataflowBlueprint]),
 providing a Dataflow support layer for your
 favorite dataflow framework will be more beneficial.
 
-See the [link dataflow.future future directions] of the Dataflow library
-for an idea of what might become available in the future for data transport
-mechanisms with Dataflow library support.
+See the [link dataflow.future future directions] section
+for an idea of what might become available in the future for dataflow frameworks
+with Dataflow library support.
 
-* If you would like to implement Dataflow support for the data transport
-mechanism you are working with, see the
+* If you would like to implement Dataflow support for the dataflow framework
+you are working with, see the
 [link dataflow.introduction.examples.new_layer example] showing
 how the [VTK] support layer was developed.
 * If you are interested in developing generic code on top of the dataflow
@@ -377,11 +381,18 @@
 The Dataflow library uses the trunk version of Boost - it might not work
 perfectly with release versions of boost.
 
-Version 0.8.2 (under construction)
-* Moved functionality from port related concepts to the component concepts.
-* Adapted the Dataflow.Signals layer and tests, most of the rest still broken.
+Version 0.9.0 (under construction)
+
+* Revamped concepts one more time
+* added the port_adapter class to replace old ProxyPort functionality
+* slot_selector is now useless - replaced with just boost::function
+* Adapted the Dataflow.Signals layer, tests, and examples.
 * Started adding Doxygen-generated support layer reference.
 
+To Do:
+
+* Revise docs
+
 Version 0.8.1
  \[[@http://www.boost-consulting.com/vault/index.php?direction=&order=&directory=Dataflow& available in the Boost vault]\]
 

Modified: sandbox/SOC/2007/signals/libs/dataflow/doc/introduction/vtk_example.qbk
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/doc/introduction/vtk_example.qbk (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/doc/introduction/vtk_example.qbk 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -1,6 +1,6 @@
-[section:new_layer Implementing support for a new mechanism (VTK)]
+[section:new_layer Implementing support for a new framework (VTK)]
 
-This example shows how to implement support for a particular mechanism.
+This example shows how to implement support for a particular dataflow framework.
 Our victim is [VTK], a 3D visualization toolkit, which uses a data pipeline
 to move data from a source to the display (with possible transformations,
 scene construction etc. on the way). For example, here is an excerpt from
@@ -27,17 +27,16 @@
 
 ```
     // make the connections
- connect(cone, coneMapper);
- connect(coneMapper, coneActor);
- connect(coneActor, ren1);
- connect(ren1, renWin);
+ connect(*cone, *coneMapper);
+ connect(*coneMapper, *coneActor);
+ connect(*coneActor, *ren1);
+ connect(*ren1, *renWin);
 ```
 
 or even more concisely and clearly,
 
 ```
     // make the connections
- // C++ rules prevent us from removing all of the pointer dereferencing here
     *cone >>= *coneMapper >>= *coneActor >>= *ren1 >>= *renWin;
 ```
 
@@ -55,26 +54,25 @@
 ]
 
 [heading Next]
-[link dataflow.introduction.examples.new_layer.mechanism
+[link dataflow.introduction.examples.new_layer.tag
     Setting up the Mechanism]
 
-[section:mechanism Setting up the Mechanism]
+[section:tag Setting up the Tag]
 
-The first thing we'll do is create a tag for the VTK [Mechanism], in
-namespace `boost::dataflow::vtk`. Since there are currently no requirements
-for a [Mechanism], this is as simple as declaring a new type to be used
-as the mechanism tag:
+The first thing we'll do is create a [Tag] for the VTK framework, in
+namespace `boost::dataflow::vtk`. All we have to do is inherit from
+`default_tag`:
 
-[vtk_mechanism]
+[vtk_tag]
 
-We will now use this tag in reference to the [VTK] dataflow mechanism.
+We will now use this tag in reference to the [VTK] dataflow framework.
 
 [heading Next]
 [link dataflow.introduction.examples.new_layer.producerconsumer
- Setting up a ProducerPort and ConsumerPort]
+ Setting up a producer Port and a consumer Port]
 [endsect][/mechanism]
 
-[section:producerconsumer Setting up a ProducerPort and ConsumerPort]
+[section:producerconsumer Setting up a producer Port and a consumer Port]
 
 Now that we have the mechanism, let's cover the basic data pipeline,
 which is implemented using the
@@ -82,7 +80,7 @@
 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 [ProducerPort]
+In Dataflow concepts, [vtkAlgorithmOutput] can be made a producer [Port]
 - it corresponds to a single data output point. We support it as such by
 defining a [PortTraits] type, and associating it with
 [vtkAlgorithmOutput]:
@@ -92,7 +90,7 @@
 [note More details about registering [PortTraits] for a [Port]
 can be found on the [Port] documentation page.]
 
-Now that we have a [ProducerPort], we need a [ConsumerPort].
+Now that we have a producer [Port], we need a consumer [Port].
 [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:
@@ -108,7 +106,7 @@
 
 [section:connectable Making things Connectable]
 
-With the pair of [ProducerPort] and [ConsumerPort] registered, we
+With the pair of producer [Port] and consumer [Port] registered, we
 can make them [Connectable] and/or [OnlyConnectable].
 All we need to do is specialize the implementation for the appropriate
 [PortTraits]:
@@ -188,23 +186,23 @@
 
 In the VTK example above, both `vtkConeSource` and `vtkPolyDataMapper`
 inherit [vtkAlgorithm].
-With the [vtkAlgorithmOutput] [ProducerPort] and
-[vtkAlgorithm] [ConsumerPort] we've set up,
+With the [vtkAlgorithmOutput] producer [Port] and
+[vtkAlgorithm] consumer [Port] 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 [ProducerPort]. Since [vtkAlgorithm]
+we need to make [vtkAlgorithm] a producer [Port]. Since [vtkAlgorithm]
 forms its output connections using [vtkAlgorithmOutput] objects
 returned through the `GetOutputPort` member functions, and we've already
-configured [vtkAlgorithmOutput] as a [ProducerPort], we can make use
+configured [vtkAlgorithmOutput] as a producer [Port], we can make use
 of the [ProxyPort] concept provided by the dataflow library.
-In effect, we will make [vtkAlgorithm] delegate it's [ProducerPort]
+In effect, we will make [vtkAlgorithm] delegate it's producer [Port]
 functionality to [vtkAlgorithmOutput]:
 
 [vtk_algorithm_proxy_producer]
 
-Now, [vtkAlgorithm] is a [ProducerPort].
+Now, [vtkAlgorithm] is a producer [Port].
 
 [heading What we can do with what we have so far]
 
@@ -222,7 +220,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 [ProducerPort] and a [ConsumerPort]:
+for a [vtkActor] as both a producer [Port] and a consumer [Port]:
 
 [vtk_actor_filter]
 

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-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -2,12 +2,12 @@
 
 [section PhoenixProducer]
 
-A [ProducerPort] type `P` is a ['[PhoenixProducer]] if it uses
+A producer [Port] type `P` is a ['[PhoenixProducer]] if it uses
 the underlying pointer based data transport mechanism. It is
 [Connectable] with a compatible [PhoenixConsumer].
 
 [heading Refinement of]
-* [ProducerPort]
+* producer [Port]
 * [Invocable]
 
 [heading Notation]
@@ -65,7 +65,7 @@
 [PhoenixProducer] of compatible produced type.
 
 [heading Refinement of]
-* [ConsumerPort]
+* consumer [Port]
 * [Connectable] with [PhoenixProducer] of compatible produced type.
 
 [heading Notation]

Modified: sandbox/SOC/2007/signals/libs/dataflow/doc/rationale.qbk
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/doc/rationale.qbk (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/doc/rationale.qbk 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -1,5 +1,31 @@
 [section Rationale]
 
+[heading General focus of the library]
+
+* The generic dataflow layer focuses mostly on connection and extraction
+ functionality of a dataflow framework. The reason I started with connection
+ and extraction is that it is the single most uniformly present
+ aspect of dataflow frameworks (going to the very definition of dataflow).
+ While there are many other
+ functionalities that can be part of a dataflow framework (such as memory
+ management and different kinds of scheduling), these vary much more from
+ one dataflow framework to another, and are much harder to capture in the
+ generic layer. While concepts related to memory management and scheduling
+ might be added to the generic layer in the future, I believe they are not
+ essential in the first version of this library.
+
+* The only dataflow framework included is [DataflowSignals] for two reasons.
+ One, a [BoostSignals]-based framework was the original focus of this project;
+ And two, [DataflowSignals] makes use of existing Boost functionality to make
+ the implementation of the dataflow framework extremely simple. There is no
+ doubt that implementing other kinds of dataflow frameworks would be useful
+ (e.g., the [FuturePin]-based approach proposed by Tobias Schwinger, or
+ something like the simulation-oriented
+ [@http://en.wikipedia.org/wiki/DEVS Coupled DEVS model]).
+ However, implementing a whole new framework would take significant
+ time and effort, and I don't
+ believe that it is essential in the first version of this library.
+
 [heading Naming conventions]
 
 * I encountered the term /dataflow/ after starting this library. Although
@@ -27,13 +53,13 @@
   [@http://www.boost.org/more/generic_programming.html#tag_dispatching here]),
   but might be problematic where the result type is not fixed (and in the
   future all of the operations will probably be modified to return a value
- where appropriate.
-* Port operations (as parts of [BinaryOperable] and
- [UnaryOperable] concepts) have been rolled into a single class
- template with the operation selected by type because all of these operations
- share [ProxyPort] and (for [BinaryOperable]) [KeyedPort]
- resolution. [ComponentOperable] operations have been implemented
- the same way for consistency.
+ where appropriate).
+* Most operations (as parts of [BinaryOperable],
+ [UnaryOperable], and [ComponentOperable] concepts) have been rolled into a
+ single class
+ template with the operation selected by type because of some shared
+ functionality (e.g., [KeyedPort] resolution), and this way they can also be
+ treated in a generic fashion in code built on top of the generic layer.
   
 [endsect]
   

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-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -22,10 +22,10 @@
 [table
     [[Name] [Expression] [Result Type] [Semantics]]
     [
- [Mechanism]
+ [Tag]
         [`PT::mechanism`]
         [`dataflow::signals::mechanism`]
- [[Mechanism] type tag.]
+ [[Tag] type tag.]
     ]
     [
         [Signature]
@@ -39,12 +39,12 @@
 
 [section SignalProducer]
 
-A [ProducerPort] type `P` is a ['[SignalProducer]] if its
+A producer [Port] type `P` is a ['[SignalProducer]] if its
 [PortTraits] is a [SignalPortTraits], and the `get_port` function
 returns the underlying `boost::signal`.
 
 [heading Refinement of]
-* [ProducerPort]
+* producer [Port]
 * [Connectable] with [SignalConsumer] of same signature.
 
 [heading Notation]
@@ -85,12 +85,12 @@
 
 [section SignalConsumer]
 
-A [ConsumerPort] type `P` is a ['[SignalConsumer]] if its
+A consumer [Port] type `P` is a ['[SignalConsumer]] if its
 [PortTraits] is a [SignalPortTraits], and the `get_port` function
 returns the underlying `boost::function`.
 
 [heading Refinement of]
-* [ConsumerPort]
+* consumer [Port]
 * [Connectable] with [SignalProducer] of same signature.
 
 [heading Notation]

Modified: sandbox/SOC/2007/signals/libs/dataflow/doc/support/concepts/binary_operable.qbk
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/doc/support/concepts/binary_operable.qbk (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/doc/support/concepts/binary_operable.qbk 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -1,6 +1,6 @@
 [section:binaryoperable BinaryOperable (Connectable, OnlyConnectable, Disconnectable, Extractable) ]
 
-A [ProducerPort] `P` and [ConsumerPort] `C` are /BinaryOperable/
+A producer [Port] `P` and consumer [Port] `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`.
 
@@ -15,11 +15,11 @@
 The following expressions are used in this document:
 
 [variablelist
- [[P] [A [ProducerPort] type.]]
- [[C_C] [A [ConsumerPort] [Connectable] with `P`]]
- [[C_O] [A [ConsumerPort] [OnlyConnectable] with `P`]]
- [[C_D] [A [ConsumerPort] [Disconnectable] with `P`]]
- [[C_E] [A [ConsumerPort] [Extractable] with `P`]]
+ [[P] [A producer [Port] type.]]
+ [[C_C] [A consumer [Port] [Connectable] with `P`]]
+ [[C_O] [A consumer [Port] [OnlyConnectable] with `P`]]
+ [[C_D] [A consumer [Port] [Disconnectable] with `P`]]
+ [[C_E] [A consumer [Port] [Extractable] with `P`]]
     [[p] [An object of type P.]]
     [[c_c] [An object of type C_C.]]
     [[c_o] [An object of type C_O.]]

Modified: sandbox/SOC/2007/signals/libs/dataflow/doc/support/concepts/component.qbk
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/doc/support/concepts/component.qbk (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/doc/support/concepts/component.qbk 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -21,7 +21,7 @@
     [[Name] [Expression] [Result Type] [Semantics]]
     [
         [Component Traits]
- [`component_traits_of<M, C>::type`]
+ [`traits_of<M, C>::type`]
         [`CT`]
         [
             The [ComponentTraits] of the component.

Modified: sandbox/SOC/2007/signals/libs/dataflow/doc/support/concepts/concepts.qbk
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/doc/support/concepts/concepts.qbk (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/doc/support/concepts/concepts.qbk 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -38,7 +38,7 @@
 implementation.
 
 In the Dataflow library, most port related class templates are keyed through
-a [Mechanism] type tag. For example, the [DataflowSignals] layer
+a [Tag] type tag. For example, the [DataflowSignals] layer
 uses two mechanisms for its ports and related operations - one mechanism
 is used for lasting connections between a `signal` and a `function`, while
 another is used for one-time extractions of data.
@@ -76,7 +76,7 @@
 It is often the case that a port delegates its [Port]
 functionality to some other element. For example, a
 class that is a [DataflowSignals] component might delegate its
-[ProducerPort] functionality to a member boost::signal. It can
+producer [Port] functionality to a member boost::signal. It can
 do so by declaring itself a [ProxyProducerPort] for the boost::signal.
 
 [heading Port Operations]
@@ -134,6 +134,8 @@
 
 Invocation is captured more formally by the [Invocable] concept.
 
+[include general.qbk]
+
 [section Port related]
 
 [section Mechanism]
@@ -149,10 +151,11 @@
 The following code declares the [VTK] mechanism tag - it is a part of
 the [vtk_example example showing how to provide a VTK support layer].
 
-[vtk_mechanism]
+[vtk_tag]
 
 [endsect][/mechanism]
 
+
 [include port.qbk]
 
 [include binary_operable.qbk]

Added: sandbox/SOC/2007/signals/libs/dataflow/doc/support/concepts/general.qbk
==============================================================================
--- (empty file)
+++ sandbox/SOC/2007/signals/libs/dataflow/doc/support/concepts/general.qbk 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -0,0 +1,95 @@
+[section:general General]
+
+[section:entity Entity,Traits]
+
+[heading Notation]
+
+[variablelist
+ [[T] [A [Traits] type.]]
+]
+
+[heading Requirements]
+
+[table
+]
+
+[heading Header]
+
+The types, templates, and functions shown here are declared in the following
+files:
+
+```
+ #include <boost/dataflow/support.hpp>
+```
+
+[endsect][/entity]
+
+[section:portvector PortVector, PortVectorTraits]
+
+[heading Notation]
+
+[variablelist
+ [[`T`] [A [Tag] type. If omitted, `T` defaults to [default_tag].]]
+ [[PV] [A [PortVector] type.]]
+ [[PVT] [[PortVectorTraits] of `PV` for `T`.]]
+ [[pv] [An object of type `PV`.]]
+ [[I] [An integer in the range \[0, # of [Port]s exposed by `PV`)]]
+ [[IC] [An IntegralConstant with value in the range \[0, # of [Port]s exposed by `PV`)]]
+]
+
+[heading PortVector Requirements]
+[table
+ [[Name] [Expression] [Result Type] [Semantics]]
+ [
+ [PortVector Traits]
+ [`traits_of<>::type`]
+ [`PVT`]
+ [
+ The [ComponentTraits] of the component.
+ ]
+ ]
+ [
+ [ GetPort ]
+ [`get_port_c<M, I>(c)`]
+ []
+ [
+ Returns the I'th [PortVectorTraits] exposed by `C`
+ ]
+ ]
+ [
+ [ GetPort ]
+ [`get_port<M, IC>(c)`]
+ []
+ [
+ Returns the IC'th [PortVectorTraits] exposed by `C`
+ ]
+ ]
+]
+
+[heading PortVectorTraits Requirements]
+[table
+ [[Name] [Expression] [Result Type] [Semantics]]
+ [
+ [Port Traits]
+ [`PVT::ports`]
+ [MPL Sequence of [PortTraits] types]
+ [
+ An enumeration of the [PortTraits] of the exposed
+ [Port]s.
+ ]
+ ]
+]
+
+[heading Header]
+
+The types, templates, and functions shown here are declared in the following
+files:
+
+```
+ #include <boost/dataflow/support.hpp>
+```
+
+[endsect][/entity]
+
+
+[endsect]

Modified: sandbox/SOC/2007/signals/libs/dataflow/doc/support/concepts/port.qbk
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/doc/support/concepts/port.qbk (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/doc/support/concepts/port.qbk 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -85,7 +85,7 @@
     [[Name] [Expression] [Result Type] [Semantics]]
     [
         [Port Traits]
- [[^[port_traits_of]<P, T>::type]]
+ [[^[traits_of]<P, T>::type]]
         [`PT`]
         [
             The [PortTraits] of the port.
@@ -126,10 +126,10 @@
         [The most refined producer concept that `P` satisfies.]
     ]
     [
- [Mechanism]
+ [Tag]
         [`PT::tag`]
         [any type]
- [[Mechanism] type tag.]
+ [[Tag] type tag.]
     ]
 ]
 
@@ -152,11 +152,11 @@
 [PortTraits] of a type `P`, thereby making it a [Port].
 
 Non-intrusive registration is typically done by providing a specialization of
-the [register_port_traits] template (either directly, or through the provided
-macros [DATAFLOW_PORT_TRAITS] and [DATAFLOW_PORT_TRAITS_ENABLE_IF]). This will
-specialize [port_traits_of] for all cv-qualified versions of type `P`.
+the [register_traits] template (either directly, or through the provided
+macros [DATAFLOW_TRAITS] and [DATAFLOW_TRAITS_ENABLE_IF]). This will
+specialize [traits_of] for all cv-qualified versions of type `P`.
 If cv-qualified versions of type `P` should have different [PortTraits]s,
-[port_traits_of] should be specialized directly.
+[traits_of] should be specialized directly.
 
 Intrusive registration can be done by providing
 a `P::port_traits` member type, which can be either a [PortTraits]
@@ -170,7 +170,7 @@
 
 [heading Examples]
 
-All of the below examples use the following [Mechanism] and
+All of the below examples use the following [Tag] and
 [PortTraits] types:
 
 [port_registration_example_prep]
@@ -184,8 +184,8 @@
 
 [heading Non-intrusive registration]
 
-Non-intrusive registration is done by specializing the `register_port_traits`
-template. Since the `register_port_traits` template is keyed by [Mechanism]
+Non-intrusive registration is done by specializing the `register_traits`
+template. Since the `register_traits` template is keyed by [Tag]
 and [PortCategory], this is rather verbose:
 
 [port_registration_example_non_intrusive]
@@ -198,7 +198,7 @@
 
 [heading Non-intrusive mass registration]
 
-The [register_port_traits] template has an Enable template parameter for use with
+The [register_traits] template has an Enable template parameter for use with
 `boost::enable_if`. Hence, we can register a number of types at the same time:
 
 [port_registration_example_non_intrusive_enable_if]
@@ -256,7 +256,7 @@
     [[Name] [Expression] [Result Type] [Semantics]]
     [
         [Port Traits]
- [`port_traits_of<M, PC, P>::type`]
+ [`traits_of<M, PC, P>::type`]
         [`PT`]
         [
             The [ComplementedPortTraits] of the port.
@@ -285,7 +285,35 @@
 
 [endsect]
 
-[section KeyedPort]
+[section:vectorport VectorPort, VectorPortTraits]
+
+A [VectorPort] type `VP` is a [Port] that is composed of a number of
+sub-[Port]s.
+
+[heading VectorPort Refines]
+* [Port]
+* [PortVector]
+
+[heading VectorPortTraits Refines]
+* [PortTraits]
+* [PortVectorTraits]
+
+
+[endsect][/vectorport]
+
+[section:keyedport KeyedPort, KeyedPortTraits]
+
+A [KeyedPort] type `KP` is a [VectorPort] whose sub-[Port]s are accessible
+by key. Whenever a binary operation is performed between a [Port] of type `P`
+and `KP`, it is forwarded to the binary operation between `P` and the
+sub-[Port] in `KP` keyed by the [PortTraits] of `P`.
+
+[heading KeyedPort Refines]
+* [VectorPort]
+
+[heading VectorPortTraits Refines]
+* [VectorPortTraits]
+
 [endsect][/keyed_port]
 
 [section ProxyPort, ProxyPortTraits]
@@ -310,7 +338,7 @@
     [[Name] [Expression] [Result Type] [Semantics]]
     [
         [Proxy Port Traits]
- [`proxy_port_traits_of<PP>::type`]
+ [`proxy_traits_of<PP>::type`]
         [[ProxyPortTraits] type.]
         [
             The traits of the proxy port.

Added: sandbox/SOC/2007/signals/libs/dataflow/doc/utility/utility.qbk
==============================================================================
--- (empty file)
+++ sandbox/SOC/2007/signals/libs/dataflow/doc/utility/utility.qbk 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -0,0 +1,5 @@
+[section:utility Miscellaneous utilities]
+
+[xinclude ../dataflow_utility_doxygen.xml]
+
+[endsect]
\ No newline at end of file

Modified: sandbox/SOC/2007/signals/libs/dataflow/example/Jamfile.v2
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/example/Jamfile.v2 (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/example/Jamfile.v2 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -3,9 +3,9 @@
 # accompanying file LICENSE_1_0.txt or copy at
 # http://www.boost.org/LICENSE_1_0.txt)
 
-#build-project VTK ;
-#build-project signals ;
-#build-project blueprint ;
+build-project VTK ;
+build-project signals ;
+build-project blueprint ;
 
 project dataflow/example
     : requirements
@@ -17,4 +17,4 @@
 # exe timing_example : timing_example.cpp ;
 #exe edit_distance : edit_distance.cpp ;
 #exe fibonacci : fibonacci.cpp ;
-exe example : example.cpp ;
+#exe example : example.cpp ;

Modified: sandbox/SOC/2007/signals/libs/dataflow/example/VTK/vtk_dataflow_support.hpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/example/VTK/vtk_dataflow_support.hpp (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/example/VTK/vtk_dataflow_support.hpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -12,7 +12,9 @@
 #include "vtkRenderWindow.h"
 
 #include <boost/dataflow/support.hpp>
-#include <boost/dataflow/connection/port_map.hpp>
+#include <boost/dataflow/support/port/port_adapter.hpp>
+#include <boost/dataflow/support/fusion_component.hpp>
+#include <boost/dataflow/support/fusion_keyed_port.hpp>
 
 #include <boost/assert.hpp>
 #include <boost/mpl/and.hpp>
@@ -24,8 +26,8 @@
 
 namespace boost { namespace dataflow { namespace vtk {
 
-// The vtk mechanism tag
-struct mechanism;
+// The vtk framework tag
+struct tag : public default_tag {};
 
 } } } // namespace boost::dataflow::vtk
 
@@ -35,18 +37,18 @@
 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).
+// We specify the PortCategory (ports::producer) and Tag (vtk::tag).
+
 struct vtk_algorithm_output_producer
- : public port_traits<mechanism, ports::producer, concepts::port> {};
+ : public port_traits<ports::producer, tag> {};
     
 } } } // namespace boost::dataflow::vtk
 
-// This macro specializes the port_traits_of template to the specified
+// This macro specializes the 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
+// The traits_of template is used by the Dataflow library to associate
 // a Port with its PortTraits.
-DATAFLOW_PORT_TRAITS(vtkAlgorithmOutput, vtk::vtk_algorithm_output_producer)
+DATAFLOW_TRAITS(vtkAlgorithmOutput *, vtk::vtk_algorithm_output_producer)
 //]
 
 
@@ -54,16 +56,16 @@
 namespace boost { namespace dataflow { namespace vtk {
 
 struct vtk_algorithm_consumer
- : public port_traits<mechanism, ports::consumer, concepts::port> {};
+ : public port_traits<ports::consumer, vtk::tag> {};
     
 } } } // namespace boost::dataflow::vtk
 
 // Since vtkAlgorithm is typically inherited, we will specialize the
-// port_traits_of template for all its descendants.
-DATAFLOW_PORT_TRAITS_ENABLE_IF(
+// traits_of template for all its descendants.
+/*DATAFLOW_TRAITS_ENABLE_IF(
     T,
     boost::is_base_of<vtkAlgorithm BOOST_PP_COMMA() T>,
- vtk::vtk_algorithm_consumer)
+ vtk::vtk_algorithm_consumer)*/
 //]
 
 //[ vtk_connect_impl_algorithm
@@ -75,20 +77,24 @@
 // producer PortTraits (vtk::vtk_algorithm_output_producer)
 // consumer PortTraits (vtk::vtk_algorithm_consumer)
 template<>
-struct binary_operation_impl<operations::connect, vtk::vtk_algorithm_output_producer, vtk::vtk_algorithm_consumer>
+struct binary_operation_impl<vtk::vtk_algorithm_output_producer, vtk::vtk_algorithm_consumer, operations::connect>
 {
+ typedef void result_type;
+
     template<typename Producer, typename Consumer>
     void operator()(Producer &producer, Consumer &consumer)
     {
- consumer.AddInputConnection(&producer);
+ get_object(consumer).AddInputConnection(get_object(producer));
     }
 };
 
 // To implement OnlyConnectable, we do the same thing except now the operation
 // is operations::connect_only
 template<>
-struct binary_operation_impl<operations::connect_only, vtk::vtk_algorithm_output_producer, vtk::vtk_algorithm_consumer>
+struct binary_operation_impl<vtk::vtk_algorithm_output_producer, vtk::vtk_algorithm_consumer, operations::connect_only>
 {
+ typedef void result_type;
+
     template<typename Producer, typename Consumer>
     void operator()(Producer &producer, Consumer &consumer)
     {
@@ -105,39 +111,48 @@
 
 namespace boost { namespace dataflow { namespace vtk {
 
+namespace detail {
+
+ typedef mpl::map<
+ mpl::pair<dataflow::default_port_selector
+ <dataflow::directions::outgoing>,
+ mpl::int_<0> >,
+ mpl::pair<dataflow::default_port_selector
+ <dataflow::directions::incoming>,
+ mpl::int_<1> >
+ >::type default_map;
+
+}
+
 // First we need a ProxyPortTraits type
-struct vtk_algorithm_proxy_producer
- : public proxy_port_traits<mechanism, ports::producer> {};
+template<typename T>
+struct vtk_algorithm_component_traits
+ : public dataflow::fusion_component_traits<
+ fusion::vector<
+ vtkAlgorithmOutput *,
+ dataflow::port_adapter<T, vtk_algorithm_consumer, tag> >,
+ detail::default_map,
+ tag>
+{
+ template<typename Component>
+ static typename vtk_algorithm_component_traits::fusion_ports get_ports(Component &c)
+ {
+ return typename vtk_algorithm_component_traits::fusion_ports(c.GetOutputPort(), c);
+ }
+};
 
 } } } // namespace boost::dataflow::vtk
 
 // Then we associate all descendants of vtkAlgorithm with the ProxyPortTraits.
 // vtkMapper is a descendant of vtkAlgorithm, but we want to exclude it's
 // descendants from this registration because they will be treated differently.
-DATAFLOW_PROXY_PORT_TRAITS_ENABLE_IF(
+DATAFLOW_TRAITS_ENABLE_IF(
     T,
     mpl::and_<
         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 boost { namespace dataflow { namespace extension {
-
-// Finally, we specialize the get_port_impl functor template.
- template<>
- struct get_port_impl<vtk::vtk_algorithm_proxy_producer>
- {
- typedef vtkAlgorithmOutput & result_type;
-
- template<typename ProxyProducer>
- result_type operator()(ProxyProducer &t)
- {
- return *t.GetOutputPort();
- }
- };
-
-} } } // namespace boost::dataflow::extension
+ vtk::vtk_algorithm_component_traits<T>)
 
 //]
 
@@ -146,24 +161,35 @@
 namespace boost { namespace dataflow { namespace vtk {
 
 struct vtk_actor_producer
- : public port_traits<mechanism, ports::producer, concepts::port>
+ : public port_traits<ports::producer, tag>
 {};
 
 struct vtk_actor_consumer
- : public port_traits<mechanism, ports::consumer, concepts::port>
+ : public port_traits<ports::consumer, tag>
 {};
 
-} } } // namespace boost::dataflow::vtk
+template<typename T>
+struct vtk_actor_component_traits
+ : public dataflow::fusion_component_traits<
+ fusion::vector<
+ dataflow::port_adapter<T, vtk_actor_producer, tag>,
+ dataflow::port_adapter<T, vtk_actor_consumer, tag> >,
+ detail::default_map,
+ tag>
+{
+ template<typename Component>
+ static typename vtk_actor_component_traits::fusion_ports get_ports(Component &c)
+ {
+ return typename vtk_actor_component_traits::fusion_ports(c, c);
+ }
+};
 
-DATAFLOW_PORT_TRAITS_ENABLE_IF(
- T,
- boost::is_base_of<vtkActor BOOST_PP_COMMA() T>,
- vtk::vtk_actor_producer)
+} } } // namespace boost::dataflow::vtk
 
-DATAFLOW_PORT_TRAITS_ENABLE_IF(
+DATAFLOW_TRAITS_ENABLE_IF(
     T,
     boost::is_base_of<vtkActor BOOST_PP_COMMA() T>,
- vtk::vtk_actor_consumer)
+ vtk::vtk_actor_component_traits<T>)
 
 //]
 
@@ -173,67 +199,53 @@
 
 // First we need a PortTraits type that we will use for vtkMapper connections.
 struct vtk_mapper_producer
- : public port_traits<mechanism, ports::producer, concepts::port> {};
-
-// Since vtkMapper itself will have multiple "faces" (depending on what we
-// are connecting to it), we will define a proxy type for vtkMapper that we
-// will use to specify that we want to use the mapper output for a vtkActor.
-// (rather than wanting to use the output for a vtkAlgorithm, in for which
-// we can use vtkAlgorithmOutput as the proxy object).
-struct vtk_mapper_proxy : public port<vtk_mapper_producer>
-{
- vtkMapper *ptr;
- vtk_mapper_proxy(vtkMapper *mapper) : ptr(mapper) {}
- operator vtkMapper * () const {return ptr;}
-};
+ : public port_traits<ports::producer, tag> {};
 
 // Next, we define a fusion map type to hold the mapping between consumers
 // and Port types.
 typedef boost::fusion::map<
- boost::fusion::pair<vtk::vtk_algorithm_consumer, vtkAlgorithmOutput &>,
- boost::fusion::pair<vtk::vtk_actor_consumer, vtk_mapper_proxy>
+ boost::fusion::pair<vtk::vtk_algorithm_consumer, vtkAlgorithmOutput *>,
+ boost::fusion::pair<vtk::vtk_actor_consumer, port_adapter<vtkMapper, vtk_mapper_producer> >
> vtk_mapper_map;
 
 // ...And a ProxyPortTraits type...
-struct vtk_mapper_proxy_producer
- : public proxy_port_traits<
- vtk::mechanism,
- ports::producer
- > {};
+template<typename T>
+struct vtk_mapper_component_traits
+ : public dataflow::fusion_component_traits<
+ fusion::vector<
+ fusion_keyed_port<ports::producer, vtk::vtk_mapper_map, tag>,
+ dataflow::port_adapter<T, vtk_algorithm_consumer, tag> >,
+ detail::default_map,
+ tag>
+{
+ template<typename Component>
+ static typename vtk_mapper_component_traits::fusion_ports get_ports(Component &c)
+ {
+ return typename vtk_mapper_component_traits::fusion_ports(
+ fusion_keyed_port<ports::producer, vtk::vtk_mapper_map, tag>(
+ vtk::vtk_mapper_map(c.GetNumberOfOutputPorts() ? c.GetOutputPort() : (vtkAlgorithmOutput *)NULL,
+ port_adapter<vtkMapper, vtk_mapper_producer>(c))),
+ c);
+ }
+};
     
 } } } // namespace boost::dataflow::vtk
 
 // ... that we associate with vtkMapper descendants.
-DATAFLOW_PROXY_PORT_TRAITS_ENABLE_IF(
+DATAFLOW_TRAITS_ENABLE_IF(
     T,
     boost::is_base_of<vtkMapper BOOST_PP_COMMA() T>,
- vtk::vtk_mapper_proxy_producer)
+ vtk::vtk_mapper_component_traits<T>)
 
 namespace boost { namespace dataflow { namespace extension {
 
-// Now we specialize the get_port_imple functor template that will return
-// a port_map for a port with vtk_mapper_proxy_producer ProxyPortTraits.
-// The port_map object is a KeyedPort and takes care of providing the
-// appropriate Port depending on the consumer.
-template<>
-struct get_port_impl<vtk::vtk_mapper_proxy_producer>
-{
- typedef const port_map<vtk::mechanism, ports::producer, vtk::vtk_mapper_map> result_type;
-
- template<typename ProxyProducer>
- result_type operator()(ProxyProducer &t)
- {
- return vtk::vtk_mapper_map(t.GetNumberOfOutputPorts() ?
- *t.GetOutputPort() : *(vtkAlgorithmOutput *)NULL,
- vtk::vtk_mapper_proxy(&t));
- }
-};
-
 // Finally, we provide implementations for connect and connect_only
 // between vtk_mapper_producer and vtk_actor_consumer
 template<>
-struct binary_operation_impl<operations::connect_only, vtk::vtk_mapper_producer, vtk::vtk_actor_consumer>
+struct binary_operation_impl<vtk::vtk_mapper_producer, vtk::vtk_actor_consumer, operations::connect_only>
 {
+ typedef void result_type;
+
     template<typename Producer, typename Consumer>
     void operator()(Producer &producer, Consumer &consumer)
     {
@@ -242,13 +254,15 @@
 };
 
 template<>
-struct binary_operation_impl<operations::connect, vtk::vtk_mapper_producer, vtk::vtk_actor_consumer>
+struct binary_operation_impl<vtk::vtk_mapper_producer, vtk::vtk_actor_consumer, operations::connect>
 {
+ typedef void result_type;
+
     template<typename Producer, typename Consumer>
     void operator()(Producer &producer, Consumer &consumer)
     {
- BOOST_ASSERT(!consumer.GetMapper());
- consumer.SetMapper(producer);
+ BOOST_ASSERT(!get_object(consumer).GetMapper());
+ get_object(consumer).SetMapper(&get_object(producer));
     }
 };
 
@@ -262,31 +276,41 @@
 namespace boost { namespace dataflow { namespace vtk {
 
 struct vtk_renderer_producer
- : public port_traits<mechanism, ports::producer, concepts::port>
+ : public port_traits<ports::producer, tag>
 {};
 
 struct vtk_renderer_consumer
- : public port_traits<mechanism, ports::consumer, concepts::port>
+ : public port_traits<ports::consumer, tag>
 {};
 
+template<typename T>
+struct vtk_renderer_component_traits
+ : public dataflow::fusion_component_traits<
+ fusion::vector<
+ dataflow::port_adapter<T, vtk_renderer_producer, tag>,
+ dataflow::port_adapter<T, vtk_renderer_consumer, tag> >,
+ detail::default_map,
+ tag>
+{
+ template<typename Component>
+ static typename vtk_renderer_component_traits::fusion_ports get_ports(Component &c)
+ {
+ return typename vtk_renderer_component_traits::fusion_ports(c, c);
+ }
+};
 
 struct vtk_rendererwindow_consumer
- : public port_traits<mechanism, ports::consumer, concepts::port>
+ : public port_traits<ports::consumer, tag>
 {};
 
 } } } // namespace boost::dataflow::vtk
 
-DATAFLOW_PORT_TRAITS_ENABLE_IF(
- T,
- boost::is_base_of<vtkRenderer BOOST_PP_COMMA() T>,
- vtk::vtk_renderer_producer)
-
-DATAFLOW_PORT_TRAITS_ENABLE_IF(
+DATAFLOW_TRAITS_ENABLE_IF(
     T,
     boost::is_base_of<vtkRenderer BOOST_PP_COMMA() T>,
- vtk::vtk_renderer_consumer)
+ vtk::vtk_renderer_component_traits<T>)
 
-DATAFLOW_PORT_TRAITS_ENABLE_IF(
+DATAFLOW_TRAITS_ENABLE_IF(
     T,
     boost::is_base_of<vtkRenderWindow BOOST_PP_COMMA() T>,
     vtk::vtk_rendererwindow_consumer)
@@ -294,22 +318,26 @@
 namespace boost { namespace dataflow { namespace extension {
 
 template<>
-struct binary_operation_impl<operations::connect, vtk::vtk_actor_producer, vtk::vtk_renderer_consumer>
+struct binary_operation_impl<vtk::vtk_actor_producer, vtk::vtk_renderer_consumer, operations::connect>
 {
+ typedef void result_type;
+
     template<typename Producer, typename Consumer>
     void operator()(Producer &producer, Consumer &consumer)
     {
- consumer.AddActor(&producer);
+ get_object(consumer).AddActor(&get_object(producer));
     }
 };
 
 template<>
-struct binary_operation_impl<operations::connect, vtk::vtk_renderer_producer, vtk::vtk_rendererwindow_consumer>
+struct binary_operation_impl<vtk::vtk_renderer_producer, vtk::vtk_rendererwindow_consumer, operations::connect>
 {
+ typedef void result_type;
+
     template<typename Producer, typename Consumer>
     void operator()(Producer &producer, Consumer &consumer)
     {
- consumer.AddRenderer(&producer);
+ get_object(consumer).AddRenderer(&get_object(producer));
     }
 };
 
@@ -319,66 +347,13 @@
 
 //[ vtk_support_pointer
 
-namespace boost { namespace dataflow {
-
-namespace vtk {
-
- template<typename T>
- struct pointer_proxy_producer : public proxy_port_traits<vtk::mechanism, ports::producer> {};
-
- 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_producer<T> type;
-};
-
-template<typename T>
-struct proxy_port_traits_of<vtk::mechanism, ports::consumer, T *>
-{
- typedef vtk::pointer_proxy_consumer<T> type;
-};
-
-namespace extension {
-
- template<typename T>
- struct get_port_impl<vtk::pointer_proxy_producer<T> >
- {
- typedef T & result_type;
-
- template<typename ProxyProducer>
- result_type operator()(ProxyProducer &t)
- {
- return *t;
- }
- };
-
- template<typename T>
- struct get_port_impl<vtk::pointer_proxy_consumer<T> >
- {
- typedef T & result_type;
-
- template<typename ProxyConsumer>
- result_type operator()(ProxyConsumer &t)
- {
- return *t;
- }
- };
-
-} // namespace extension
-
-} } // namespace boost::dataflow
-
 //]
 
 //[ vtk_specialize_connect
 // the include templates expect DATAFLOW_TEMPLATE_TAG to have
 // the mechanism type
-#define DATAFLOW_TEMPLATE_TAG boost::dataflow::vtk::mechanism
+#define DATAFLOW_TEMPLATE_TAG boost::dataflow::vtk::tag
+#define DATAFLOW_TEMPLATE_MECHANISM boost::dataflow::default_mechanism
 
 // the binary_operation.hpp template expects DATAFLOW_TEMPLATE_BINARY_OPERATION
 # define DATAFLOW_TEMPLATE_BINARY_OPERATION connect
@@ -400,6 +375,7 @@
 
 # undef DATAFLOW_TEMPLATE_BINARY_OPERATION
 
+#undef DATAFLOW_TEMPLATE_MECHANISM
 #undef DATAFLOW_TEMPLATE_TAG
 
 // We now have connect and connect_only functions that each take a

Modified: sandbox/SOC/2007/signals/libs/dataflow/example/blueprint/blueprint_example.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/example/blueprint/blueprint_example.cpp (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/example/blueprint/blueprint_example.cpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -5,7 +5,12 @@
 // accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 
+#include <iostream>
+
 #include <boost/dataflow/blueprint/network.hpp>
+#include <boost/dataflow/blueprint/binary_operation_t.hpp>
+#include <boost/dataflow/blueprint/port_t.hpp>
+
 #include <boost/dataflow/signals/component/storage.hpp>
 #include <boost/dataflow/signals/runtime_support.hpp>
 
@@ -20,7 +25,7 @@
 
 class blueprint_example
 {
- typedef blueprint::network network_type;
+ typedef blueprint::network<df::signals::tag> network_type;
 
     // The network.
     network_type network;
@@ -31,8 +36,7 @@
 public:
     blueprint_example()
     {
- // Add the components to the network. So far, ONLY signals::storage
- // models the Component concept.
+ // Add the components to the network.
         source = network.add_component<signals::storage<void(int)> >(100),
         sink = network.add_component<signals::storage<void(int)> >(0),
         source_float = network.add_component<signals::storage<void(float)> >(100.1f),
@@ -55,7 +59,7 @@
         print_connectability_info("source", source, 0, "sink_float", sink_float, 1);
         std::cout << std::endl;
         
- // Make some connections
+/* // Make some connections
         std::cout << "Making blueprint connections: source to sink, source_float to sink_float..." << std::endl;
         network.add_connection(source, 0, sink, 1);
         network.add_connection(source_float, 0, sink_float, 1);
@@ -78,15 +82,24 @@
         std::cout << "Testing the original network..." << std::endl << std::endl;
         test_network(network);
         std::cout << "Testing the network copy..." << std::endl << std::endl;
- test_network(network_copy);
+ test_network(network_copy);*/
     }
     void print_port_info(const char *c_name, network_type::component_type c)
     {
         std::cout << "\t" << c_name << " has " << network[c].num_ports() << " ports. " << std::endl;
         for (size_t i=0; i<network[c].num_ports(); i++)
+ {
+ blueprint::port &p = network.get_port(c, i);
             std::cout << "\t\tport " << i << " is a "
- << (network.get_port(c, i).traits().mechanism().name()) << " "
- << (network.get_port(c, i).traits().category().name()) << std::endl;
+ << (p.traits().tag().name()) << " "
+ << (p.traits().category().name())
+ << (p.is_complemented_port() ? " (complemented_port)" : "");
+ if (p.is_vector_port())
+ std::cout << " (vector_port x " << p.as<blueprint::vector_port>().num_ports() << ")";
+ std::cout
+ << (network.get_port(c, i).is_keyed_port() ? " (keyed_port)" : "")
+ << std::endl;
+ }
         std::cout << std::endl;
     }
     void print_connectability_info(
@@ -99,7 +112,7 @@
             << "connectable to " << dst_name << " port " << dst_port << std::endl;
     }
 
- template<typename T>
+/* template<typename T>
     void output_component_value(
         network_type &network, const char *c_name, typename network_type::component_type c)
     {
@@ -137,7 +150,7 @@
         
         // Output the values at the sinks:
         output_component_values(network);
- }
+ }*/
 };
 
 int main()

Deleted: sandbox/SOC/2007/signals/libs/dataflow/example/example.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/example/example.cpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
+++ (empty file)
@@ -1,17 +0,0 @@
-// Copyright 2007 Stjepan Rajko.
-// Distributed under the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-#include <boost/mpl/is_sequence.hpp>
-#include <boost/mpl/at.hpp>
-#include <boost/fusion/container/vector.hpp>
-#include <boost/fusion/include/mpl.hpp>
-
-using namespace boost;
-
-int main()
-{
- BOOST_MPL_ASSERT(( mpl::at<fusion::vector<mpl::true_>, mpl::int_<0> >::type ));
- BOOST_MPL_ASSERT(( mpl::is_sequence<fusion::vector<int> > ));
-}

Modified: sandbox/SOC/2007/signals/libs/dataflow/example/signals/gil_example.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/example/signals/gil_example.cpp (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/example/signals/gil_example.cpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -21,7 +21,7 @@
 
 //[ gil_example_image_generator
 
-class image_generator : public signals::filter<void(const gil::gray8_image_t &)>
+class image_generator : public signals::filter<image_generator, void(const gil::gray8_image_t &)>
 {
 public:
     // constructed with the width, height, and initial grayscale value of the image
@@ -48,7 +48,7 @@
 
 //[ gil_example_noise_adder
 
-class noise_adder : public signals::filter<void(const gil::gray8_image_t &)>
+class noise_adder : public signals::filter<noise_adder, void(const gil::gray8_image_t &)>
 {
 public:
     noise_adder() : dist(0, 10), generator(mt, dist)
@@ -93,7 +93,7 @@
 class image_display
 {
 public:
- typedef dataflow::signals::call_consumer port_traits;
+ typedef dataflow::signals::call_consumer<> dataflow_traits;
     
     // Upon receiving an image, cout an ASCII approximation.
     void operator()(const gil::gray8_image_t &image)

Modified: sandbox/SOC/2007/signals/libs/dataflow/example/signals/intro_example.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/example/signals/intro_example.cpp (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/example/signals/intro_example.cpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -13,7 +13,7 @@
 {
     int cnt;
 public:
- typedef dataflow::signals::call_consumer port_traits;
+ typedef dataflow::signals::call_consumer<> dataflow_traits;
     
     SignalVoidCounter() : cnt(0) {}
     void operator()()
@@ -32,7 +32,7 @@
 {
     int cnt;
 public:
- typedef dataflow::signals::call_consumer port_traits;
+ typedef dataflow::signals::call_consumer<> dataflow_traits;
     
     FusedSignalVoidCounter() : cnt(0) {}
     void operator()(const fusion::vector<> &)

Modified: sandbox/SOC/2007/signals/libs/dataflow/example/signals/simple_example_components.hpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/example/signals/simple_example_components.hpp (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/example/signals/simple_example_components.hpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -17,7 +17,7 @@
 // This will be our data processor. The signature void(double) designates
 // the output signal (we will be sending out a double). The signals
 // we can receive depend on how we overload operator().
-class processor : public signals::filter<void (double)>
+class processor : public signals::filter<processor, void (double)>
 {
 public:
     // Initialize the Gaussian noise generator.
@@ -40,7 +40,7 @@
 class output
 {
 public:
- typedef dataflow::signals::call_consumer port_traits;
+ typedef dataflow::signals::call_consumer<> dataflow_traits;
     
     void operator()(double x)
     {

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-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -12,12 +12,14 @@
       <define>BOOST_ALL_NO_LIB=1
     ;
 
+run test_entity.cpp ;
 run test_port.cpp ;
-#run test_proxy_port.cpp ;
 run test_unary_op.cpp ;
 run test_binary_op.cpp ;
+run test_complemented_port.cpp ;
 run test_keyed_port.cpp ;
+run test_vector_port.cpp ;
 run test_component.cpp ;
-#run test_reflective_component.cpp ;
 
 build-project signals ;
+build-project blueprint ;

Added: sandbox/SOC/2007/signals/libs/dataflow/test/blueprint/Jamfile.v2
==============================================================================
--- (empty file)
+++ sandbox/SOC/2007/signals/libs/dataflow/test/blueprint/Jamfile.v2 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -0,0 +1,16 @@
+# 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)
+
+import testing ;
+
+project dataflow/test/signals
+ : requirements
+ <include>../../../..
+ <library>/boost/signals//boost_signals/<link>static
+ <define>BOOST_ALL_NO_LIB=1
+ ;
+
+run test_port.cpp ;
+run test_component.cpp ;

Added: sandbox/SOC/2007/signals/libs/dataflow/test/blueprint/test_component.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2007/signals/libs/dataflow/test/blueprint/test_component.cpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -0,0 +1,36 @@
+// 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/blueprint/component.hpp>
+#include <boost/dataflow/signals/runtime_support.hpp>
+#include <boost/dataflow/signals/component/storage.hpp>
+
+#include <boost/test/included/test_exec_monitor.hpp>
+
+namespace df = boost::dataflow;
+namespace blueprint = df::blueprint;
+using namespace boost;
+
+
+int test_main(int, char* [])
+{
+ blueprint::component_t<signals::storage<void(int)>, df::signals::tag > source, sink;
+
+ BOOST_CHECK_EQUAL(source.num_ports(), 2u);
+ BOOST_CHECK(source.get_port(0).traits().category().is<df::ports::producer>());
+ BOOST_CHECK(source.get_port(1).traits().category().is<df::ports::consumer>());
+ BOOST_CHECK(source.get_port(1).is_vector_port());
+ BOOST_CHECK_EQUAL(source.get_port(1).as<blueprint::vector_port>().num_ports(), 2u);
+ if(source.get_port(1).is_vector_port() &&
+ source.get_port(1).as<blueprint::vector_port>().num_ports() == 2u)
+ {
+ BOOST_CHECK(source.get_port(1).as<blueprint::vector_port>().get_port(0)
+ .traits().category().is<df::ports::consumer>());
+ BOOST_CHECK(source.get_port(1).as<blueprint::vector_port>().get_port(1)
+ .traits().category().is<df::ports::consumer>());
+ }
+ return 0;
+}
+

Added: sandbox/SOC/2007/signals/libs/dataflow/test/blueprint/test_port.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2007/signals/libs/dataflow/test/blueprint/test_port.cpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -0,0 +1,39 @@
+// 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/blueprint/port_t.hpp>
+#include <boost/dataflow/signals/runtime_support.hpp>
+
+#include <boost/test/included/test_exec_monitor.hpp>
+
+namespace df = boost::dataflow;
+namespace blueprint = df::blueprint;
+using namespace boost;
+
+struct collect
+{
+ collect() : stored() {}
+ void operator()(int x)
+ {
+ stored = x;
+ };
+ int stored;
+};
+
+int test_main(int, char* [])
+{
+ boost::signal<void(int)> source_signal;
+ collect collector;
+
+ blueprint::port_t<boost::signal<void(int)> &, df::signals::tag > source(source_signal);
+ blueprint::port_t<boost::function<void(int)>, df::signals::tag > sink(boost::ref(collector));
+
+ BOOST_CHECK((df::is_complemented_port<boost::signal<void(int)>, df::signals::tag>::value));
+ BOOST_CHECK(source.is_complemented_port());
+ BOOST_CHECK(!sink.is_complemented_port());
+ BOOST_CHECK(blueprint::are_binary_operable<df::operations::connect>(source, sink));
+ BOOST_CHECK(!blueprint::are_binary_operable<df::operations::extract>(source, sink));
+ return 0;
+}
\ No newline at end of file

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-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -17,15 +17,11 @@
 struct my_mechanism;
 
 struct my_producer_traits
- : public df::port_traits<
- df::ports::producer,
- df::concepts::port>
+ : public df::port_traits<df::ports::producer>
 {};
 
 struct my_consumer_traits
- : public df::port_traits<
- df::ports::consumer,
- df::concepts::port>
+ : public df::port_traits<df::ports::consumer>
 {};
 
 struct my_producer : public df::port<my_producer_traits>

Modified: sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_chain.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_chain.cpp (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_chain.cpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -23,7 +23,7 @@
         void operator()(float x) {out(2*x);}
 };
 
-class FusedDoublerClass : public signals::filter<FusedDoublerClass, void (float), signals::fused>
+class FusedDoublerClass : public signals::filter<FusedDoublerClass, void (float), mpl::vector<>, signals::fused>
 {
 public:
     typedef void result_type;

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-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -10,7 +10,7 @@
 //[ test_connect
 
 struct receiver
- : public boost::dataflow::port<boost::dataflow::signals::call_consumer>
+ : public boost::dataflow::port<boost::dataflow::signals::call_consumer<> >
 {
     receiver() : stored(0) {}
     

Modified: sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_filter.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_filter.cpp (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_filter.cpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -14,14 +14,14 @@
 
 //[ test_filter_classes
 
-class DoublerClass : public signals::filter<DoublerClass, void (int)>
+class DoublerClass : public signals::filter<DoublerClass, void (int), mpl::vector<void(int)> >
 {
 public:
     void operator()(int x) {out(2*x);}
 };
 
 struct receiver
- : public boost::dataflow::port<boost::dataflow::signals::call_consumer>
+ : public boost::dataflow::port<boost::dataflow::signals::call_consumer<> >
 {
     receiver() : stored(0) {}
     
@@ -37,7 +37,7 @@
     int stored;
 };
 
-class FusedDoublerClass : public signals::filter<FusedDoublerClass, void (int), signals::fused>
+class FusedDoublerClass : public signals::filter<FusedDoublerClass, void (int), mpl::vector<>, signals::fused>
 {
 public:
     void operator()(const fusion::vector<int> &x)
@@ -64,6 +64,13 @@
         doubler1(1);
         
         BOOST_CHECK_EQUAL(collector.stored, 4);
+ BOOST_CHECK_EQUAL((
+ mpl::size<
+ df::traits_of<
+ df::result_of::get_port_c<DoublerClass, 1, df::signals::tag>::type,
+ df::signals::tag
+ >::type::ports
+ >::value), 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-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -26,7 +26,7 @@
 //[ test_multi_args_class2
 
 class SignalMultiCollector
- : public boost::dataflow::port<boost::dataflow::signals::call_consumer>
+ : public boost::dataflow::port<boost::dataflow::signals::call_consumer<> >
 {
         optional<float> last, last1, last2;
         int cnt;

Modified: sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_multi_type.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_multi_type.cpp (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_multi_type.cpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -15,7 +15,7 @@
 //[ test_multi_type_classes
 
 class SignalIntFloatCollector : public boost::dataflow::port<
- boost::dataflow::signals::call_consumer>
+ boost::dataflow::signals::call_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-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -20,7 +20,7 @@
 }; // end class Signal2VoidCounter
 
 class Signal2VoidInputs
- : public boost::dataflow::port<boost::dataflow::signals::call_consumer>
+ : public boost::dataflow::port<boost::dataflow::signals::call_consumer<> >
 {
         int result;
 public:

Added: sandbox/SOC/2007/signals/libs/dataflow/test/test_complemented_port.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2007/signals/libs/dataflow/test/test_complemented_port.cpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -0,0 +1,23 @@
+// 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/complemented_port.hpp>
+
+#include <boost/test/included/test_exec_monitor.hpp>
+
+namespace df = boost::dataflow;
+
+typedef df::port_traits<df::ports::producer> some_traits;
+typedef df::complemented_port_traits<df::ports::consumer, some_traits> my_traits;
+
+struct entity
+{
+ typedef my_traits dataflow_traits;
+};
+
+int test_main(int, char* [])
+{
+ return 0;
+}
\ No newline at end of file

Modified: sandbox/SOC/2007/signals/libs/dataflow/test/test_component.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/test/test_component.cpp (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/test/test_component.cpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -10,6 +10,8 @@
 #include <boost/dataflow/support/fusion_component.hpp>
 #include <boost/mpl/map.hpp>
 
+#include <boost/test/included/test_exec_monitor.hpp>
+
 using namespace boost;
 
 namespace df=boost::dataflow;
@@ -30,25 +32,27 @@
             mpl::int_<1> >
>
>
-{};
+{
+ template<typename Component>
+ static typename my_component_traits::fusion_ports get_ports(Component &c)
+ {
+ return typename my_component_traits::fusion_ports(c.p, c.c);
+ }
+};
 
 struct my_component : public boost::dataflow::component<my_component_traits>
 {
     my_producer p;
     my_consumer c;
-
- template<typename Component>
- my_component_traits::port_result_types get_ports(Component &)
- {
- return my_component_traits::port_result_types(p, c);
- }
 };
 
 namespace boost { namespace dataflow { namespace extension {
 
 template<>
-struct component_operation_impl<operations::invoke, my_component_traits>
+struct component_operation_impl<my_component_traits, operations::invoke>
 {
+ typedef void result_type;
+
     template<typename Component>
     void operator()(Component &)
     {
@@ -58,15 +62,13 @@
 
 }}}
 
-#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>(c);
+ invoke(c);
     BOOST_CHECK(invoked);
     
     BOOST_CHECK_EQUAL((&df::get_port<boost::mpl::int_<0> >(c)), &c.p);

Added: sandbox/SOC/2007/signals/libs/dataflow/test/test_entity.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2007/signals/libs/dataflow/test/test_entity.cpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 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)
+
+#include <boost/dataflow/support/traits.hpp>
+
+#include <boost/test/included/test_exec_monitor.hpp>
+
+namespace df = boost::dataflow;
+
+typedef df::traits<df::default_tag> my_traits;
+
+struct entity
+{
+ typedef my_traits dataflow_traits;
+};
+
+int test_main(int, char* [])
+{
+ BOOST_CHECK(df::is_traits<my_traits>::value);
+ BOOST_CHECK(df::is_entity<entity>::value);
+
+ 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-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -5,7 +5,8 @@
 
 #include "my_producer_consumer.hpp"
 #include <boost/dataflow/support/keyed_port.hpp>
-#include <boost/dataflow/connection/port_map.hpp>
+#include <boost/dataflow/support/fusion_keyed_port.hpp>
+#include <boost/dataflow/support/port_vector.hpp>
 
 #include <boost/fusion/container/map.hpp>
 #include <boost/test/included/test_exec_monitor.hpp>
@@ -16,15 +17,11 @@
 bool connected_other = false;
 
 struct my_other_producer_traits
- : public df::port_traits<
- df::ports::producer,
- df::concepts::port>
+ : public df::port_traits<df::ports::producer>
 {};
 
 struct my_other_consumer_traits
- : public df::port_traits<
- df::ports::consumer,
- df::concepts::port>
+ : public df::port_traits<df::ports::consumer>
 {};
 
 struct my_other_producer : public df::port<my_other_producer_traits>
@@ -74,7 +71,7 @@
             boost::fusion::pair<my_other_consumer_traits, my_other_producer &>
> map_type;
         
- df::port_map<
+ df::fusion_keyed_port<
         df::ports::producer,
         map_type
> producer_map(map_type(producer, other_producer));
@@ -85,25 +82,8 @@
     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<
- 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>(producer, proxy_map);
-
- BOOST_CHECK_EQUAL(connected, 2);*/
+ BOOST_CHECK_EQUAL(&producer, &df::get_port_c<0>(producer_map));
+ BOOST_CHECK_EQUAL(&other_producer, &df::get_port_c<1>(producer_map));
 
     return 0;
 } // int test_main(int, char* [])

Modified: sandbox/SOC/2007/signals/libs/dataflow/test/test_port.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/test/test_port.cpp (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/test/test_port.cpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -13,13 +13,13 @@
 // for different port registrations
 
 //[ port_registration_example_prep
-typedef df::port_traits<df::ports::producer, df::concepts::port> producer_traits;
-typedef df::port_traits<df::ports::consumer, df::concepts::port> consumer_traits;
+typedef df::port_traits<df::ports::producer> producer_traits;
+typedef df::port_traits<df::ports::consumer> consumer_traits;
 
-struct some_tag;
+struct some_tag : public df::default_tag {};
 struct whatever;
 
-typedef df::port_traits<df::ports::consumer, df::concepts::port, some_tag> other_consumer_traits;
+typedef df::port_traits<df::ports::consumer, some_tag> other_consumer_traits;
 
 //]
 
@@ -29,7 +29,7 @@
 struct intrusive_producer_port
 {
     // intrusive_producer_port is a ProducerPort
- typedef producer_traits port_traits;
+ typedef producer_traits dataflow_traits;
 };
 
 // Intrusive registration of a multiple ports
@@ -37,7 +37,7 @@
 {
     // intrusive_producer_port is a ProducerPort for the default_tag,
     // and a ConsumerPort for some_tag
- typedef boost::mpl::vector<producer_traits, other_consumer_traits> port_traits;
+ typedef boost::mpl::vector<producer_traits, other_consumer_traits> dataflow_traits;
 };
 //]
 
@@ -50,9 +50,9 @@
 
 namespace boost { namespace dataflow {
 
-// register_port_traits holds the PortTraits type of a Port
+// register_traits holds the PortTraits type of a Port
 template<>
-struct register_port_traits<non_intrusive_port>
+struct register_traits<non_intrusive_port>
 {
     typedef producer_traits type;
 };
@@ -69,7 +69,7 @@
 // Can't or don't want to modify the type
 };
 
-DATAFLOW_PORT_TRAITS(non_intrusive_port2, producer_traits)
+DATAFLOW_TRAITS(non_intrusive_port2, producer_traits)
 
 //]
 
@@ -82,9 +82,9 @@
 
 namespace boost { namespace dataflow {
 
-// register_port_traits holds the PortTraits type of a Port
+// register_traits holds the PortTraits type of a Port
 template<typename T>
-struct register_port_traits<
+struct register_traits<
     T,
     default_tag,
     typename boost::enable_if<
@@ -108,7 +108,7 @@
 {
 };
 
-DATAFLOW_PORT_TRAITS_ENABLE_IF(
+DATAFLOW_TRAITS_ENABLE_IF(
     T,
     boost::is_base_of<non_intrusive_port_base2 BOOST_PP_COMMA() T>,
     producer_traits)
@@ -131,7 +131,8 @@
     
     BOOST_CHECK(!df::is_port_traits<incomplete>::value);
     BOOST_CHECK(!df::is_port_traits<empty>::value);
-
+
+
     BOOST_CHECK(( df::is_port<my_producer>::value ));
     BOOST_CHECK(( df::is_port<my_consumer>::value ));
     

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-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -29,7 +29,7 @@
         df::ports::producer,
         my_producer,
         get_my_producer
- > proxy_port_traits;
+ > proxy_dataflow_traits;
 };
 
 struct my_non_intrusive_proxy_producer
@@ -93,7 +93,7 @@
         my_mechanism,
         df::ports::producer,
         my_proxy_producer,
- get_my_proxy_producer> proxy_port_traits;
+ get_my_proxy_producer> proxy_dataflow_traits;
 };
 
 int test_main(int, char* [])

Modified: sandbox/SOC/2007/signals/libs/dataflow/test/test_reflective_component.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/test/test_reflective_component.cpp (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/test/test_reflective_component.cpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -22,7 +22,7 @@
 
 struct my_component
 {
- typedef my_component_traits component_traits;
+ typedef my_component_traits dataflow_traits;
 
     my_consumer consumer;
     my_producer producer;

Modified: sandbox/SOC/2007/signals/libs/dataflow/test/test_unary_op.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/test/test_unary_op.cpp (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/test/test_unary_op.cpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -31,7 +31,6 @@
 int test_main(int, char* [])
 {
     my_producer p;
- my_consumer c;
     
     BOOST_CHECK((df::is_unary_operable<my_producer, df::operations::disconnect_all>::value));
     

Added: sandbox/SOC/2007/signals/libs/dataflow/test/test_vector_port.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2007/signals/libs/dataflow/test/test_vector_port.cpp 2007-12-22 18:53:59 EST (Sat, 22 Dec 2007)
@@ -0,0 +1,35 @@
+// 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 "my_producer_consumer.hpp"
+#include <boost/dataflow/support/fusion_vector_port.hpp>
+#include <boost/fusion/include/vector.hpp>
+
+#include <boost/test/included/test_exec_monitor.hpp>
+
+namespace df = boost::dataflow;
+namespace fusion = boost::fusion;
+
+typedef fusion::vector<my_producer &, my_consumer &> vector_type;
+
+struct multi_port
+ : public df::fusion_vector_port<df::ports::producer,vector_type>
+{
+ multi_port() : df::fusion_vector_port<df::ports::producer,vector_type>(
+ vector_type(p, c)) {}
+
+ my_producer p;
+ my_consumer c;
+};
+
+int test_main(int, char* [])
+{
+ multi_port mp;
+
+ BOOST_CHECK_EQUAL(&mp.p, &df::get_port_c<0>(mp));
+ BOOST_CHECK_EQUAL(&mp.c, &df::get_port_c<1>(mp));
+
+ 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