Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r49336 - in sandbox/dataflow-rewrite: boost/dataflow/blueprint boost/dataflow/generic boost/dataflow/generic/operation boost/dataflow/generic/port boost/dataflow/utility libs/dataflow/build libs/dataflow/build/xcodeide/dataflow.xcodeproj libs/dataflow/doc libs/dataflow/test libs/dataflow/test/blueprint libs/dataflow/test/generic
From: stipe_at_[hidden]
Date: 2008-10-14 21:36:42


Author: srajko
Date: 2008-10-14 21:36:37 EDT (Tue, 14 Oct 2008)
New Revision: 49336
URL: http://svn.boost.org/trac/boost/changeset/49336

Log:
add blueprint, port_binary_operation
Added:
   sandbox/dataflow-rewrite/boost/dataflow/blueprint/
   sandbox/dataflow-rewrite/boost/dataflow/blueprint/castable_polymorphic_object.hpp (contents, props changed)
   sandbox/dataflow-rewrite/boost/dataflow/blueprint/framework.hpp (contents, props changed)
   sandbox/dataflow-rewrite/boost/dataflow/blueprint/framework_entity.hpp (contents, props changed)
   sandbox/dataflow-rewrite/boost/dataflow/blueprint/framework_entity_adapter.hpp (contents, props changed)
   sandbox/dataflow-rewrite/boost/dataflow/blueprint/framework_object.hpp (contents, props changed)
   sandbox/dataflow-rewrite/boost/dataflow/blueprint/operation.hpp (contents, props changed)
   sandbox/dataflow-rewrite/boost/dataflow/blueprint/operation_adapter.hpp (contents, props changed)
   sandbox/dataflow-rewrite/boost/dataflow/blueprint/port.hpp (contents, props changed)
   sandbox/dataflow-rewrite/boost/dataflow/blueprint/port_adapter.hpp (contents, props changed)
   sandbox/dataflow-rewrite/boost/dataflow/blueprint/port_binary_operation.hpp (contents, props changed)
   sandbox/dataflow-rewrite/boost/dataflow/blueprint/port_binary_operation_implementation.hpp (contents, props changed)
   sandbox/dataflow-rewrite/boost/dataflow/blueprint/port_binary_operation_implementation_adapter.hpp (contents, props changed)
   sandbox/dataflow-rewrite/boost/dataflow/generic/operation/
   sandbox/dataflow-rewrite/boost/dataflow/generic/operation.hpp (contents, props changed)
   sandbox/dataflow-rewrite/boost/dataflow/generic/operation/semantics.hpp (contents, props changed)
   sandbox/dataflow-rewrite/boost/dataflow/generic/port_binary_operation.hpp (contents, props changed)
   sandbox/dataflow-rewrite/boost/dataflow/utility/all_of.hpp (contents, props changed)
   sandbox/dataflow-rewrite/boost/dataflow/utility/guarded_enable_if_type.hpp (contents, props changed)
   sandbox/dataflow-rewrite/libs/dataflow/build/file_template.py (contents, props changed)
      - copied, changed from r42135, /sandbox/template_under_construction/file_template.py
   sandbox/dataflow-rewrite/libs/dataflow/test/blueprint/
   sandbox/dataflow-rewrite/libs/dataflow/test/blueprint/Jamfile (contents, props changed)
   sandbox/dataflow-rewrite/libs/dataflow/test/blueprint/my_blueprint_framework.hpp (contents, props changed)
   sandbox/dataflow-rewrite/libs/dataflow/test/blueprint/my_blueprint_ports.hpp (contents, props changed)
   sandbox/dataflow-rewrite/libs/dataflow/test/blueprint/test_framework.cpp (contents, props changed)
   sandbox/dataflow-rewrite/libs/dataflow/test/blueprint/test_framework_entity.cpp (contents, props changed)
   sandbox/dataflow-rewrite/libs/dataflow/test/blueprint/test_framework_object.cpp (contents, props changed)
   sandbox/dataflow-rewrite/libs/dataflow/test/blueprint/test_operation.cpp (contents, props changed)
   sandbox/dataflow-rewrite/libs/dataflow/test/blueprint/test_port.cpp (contents, props changed)
   sandbox/dataflow-rewrite/libs/dataflow/test/blueprint/test_port_binary_operation.cpp (contents, props changed)
   sandbox/dataflow-rewrite/libs/dataflow/test/blueprint/test_port_binary_operation_implementation.cpp (contents, props changed)
   sandbox/dataflow-rewrite/libs/dataflow/test/generic/my_connect.hpp (contents, props changed)
   sandbox/dataflow-rewrite/libs/dataflow/test/generic/my_entity.hpp (contents, props changed)
   sandbox/dataflow-rewrite/libs/dataflow/test/generic/my_framework.hpp (contents, props changed)
   sandbox/dataflow-rewrite/libs/dataflow/test/generic/my_ports.hpp (contents, props changed)
   sandbox/dataflow-rewrite/libs/dataflow/test/generic/test_operation.cpp (contents, props changed)
   sandbox/dataflow-rewrite/libs/dataflow/test/generic/test_port_binary_operation.cpp (contents, props changed)
Text files modified:
   sandbox/dataflow-rewrite/boost/dataflow/generic/framework.hpp | 33 +++++-
   sandbox/dataflow-rewrite/boost/dataflow/generic/port/category.hpp | 11 +
   sandbox/dataflow-rewrite/boost/dataflow/generic/port/port.hpp | 11 +
   sandbox/dataflow-rewrite/boost/dataflow/generic/port/traits.hpp | 11 +
   sandbox/dataflow-rewrite/boost/dataflow/utility/enable_if_type.hpp | 13 -
   sandbox/dataflow-rewrite/libs/dataflow/build/file_template.py | 136 +++++++++++++++----------
   sandbox/dataflow-rewrite/libs/dataflow/build/xcodeide/dataflow.xcodeproj/project.pbxproj | 208 ++++++++++++++++++++++++++++++++++++++++
   sandbox/dataflow-rewrite/libs/dataflow/doc/Jamfile | 11 +
   sandbox/dataflow-rewrite/libs/dataflow/test/Jamfile | 1
   sandbox/dataflow-rewrite/libs/dataflow/test/generic/Jamfile | 3
   sandbox/dataflow-rewrite/libs/dataflow/test/generic/test_default_framework_of.cpp | 3
   sandbox/dataflow-rewrite/libs/dataflow/test/generic/test_framework.cpp | 5
   sandbox/dataflow-rewrite/libs/dataflow/test/generic/test_framework_entity.cpp | 3
   sandbox/dataflow-rewrite/libs/dataflow/test/generic/test_framework_entity_traits_of.cpp | 3
   sandbox/dataflow-rewrite/libs/dataflow/test/generic/test_port.cpp | 15 +-
   sandbox/dataflow-rewrite/libs/dataflow/test/generic/test_port_categories.cpp | 13 +
   16 files changed, 371 insertions(+), 109 deletions(-)

Added: sandbox/dataflow-rewrite/boost/dataflow/blueprint/castable_polymorphic_object.hpp
==============================================================================
--- (empty file)
+++ sandbox/dataflow-rewrite/boost/dataflow/blueprint/castable_polymorphic_object.hpp 2008-10-14 21:36:37 EDT (Tue, 14 Oct 2008)
@@ -0,0 +1,40 @@
+/*=================================---------------------------------------------
+ Copyright 2007,2008 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__BLUEPRINT__CASTABLE_POLYMORPHIC_OBJECT_HPP
+#define BOOST__DATAFLOW__BLUEPRINT__CASTABLE_POLYMORPHIC_OBJECT_HPP
+
+
+#include <typeinfo>
+
+
+namespace boost { namespace dataflow { namespace blueprint {
+
+class castable_polymorphic_object
+{
+public:
+ template<typename T>
+ castable_polymorphic_object(const T &t)
+ : m_type_info(typeid(t))
+ {}
+ virtual ~castable_polymorphic_object()
+ {}
+ template<typename T>
+ const T &get_as() const
+ { return *reinterpret_cast<const T *>(get_ptr()); }
+ const std::type_info &type_info() const
+ { return m_type_info; }
+private:
+ virtual const void * get_ptr() const = 0;
+ const std::type_info &m_type_info;
+};
+
+
+} } } // namespace boost::dataflow::blueprint
+
+#endif // BOOST__DATAFLOW__BLUEPRINT__CASTABLE_POLYMORPHIC_OBJECT_HPP

Added: sandbox/dataflow-rewrite/boost/dataflow/blueprint/framework.hpp
==============================================================================
--- (empty file)
+++ sandbox/dataflow-rewrite/boost/dataflow/blueprint/framework.hpp 2008-10-14 21:36:37 EDT (Tue, 14 Oct 2008)
@@ -0,0 +1,41 @@
+/*=================================---------------------------------------------
+ Copyright 2007,2008 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__BLUEPRINT__FRAMEWORK_HPP
+#define BOOST__DATAFLOW__BLUEPRINT__FRAMEWORK_HPP
+
+
+#include <boost/mpl/bool.hpp>
+
+
+namespace boost { namespace dataflow { namespace blueprint {
+
+template<typename BlueprintFramework>
+class framework_object;
+
+template<typename Framework> struct framework : public Framework
+{
+ typedef Framework framework_type;
+ typedef framework_object<Framework> framework_object_type;
+};
+
+
+template<typename T>
+struct is_blueprint_framework
+ : public mpl::false_
+{};
+
+template<typename Framework>
+struct is_blueprint_framework<framework<Framework> >
+ : public mpl::true_
+{};
+
+} } } // namespace boost::dataflow::blueprint
+
+
+#endif // BOOST__DATAFLOW__BLUEPRINT__FRAMEWORK_HPP

Added: sandbox/dataflow-rewrite/boost/dataflow/blueprint/framework_entity.hpp
==============================================================================
--- (empty file)
+++ sandbox/dataflow-rewrite/boost/dataflow/blueprint/framework_entity.hpp 2008-10-14 21:36:37 EDT (Tue, 14 Oct 2008)
@@ -0,0 +1,39 @@
+/*=================================---------------------------------------------
+ Copyright 2007,2008 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__BLUEPRINT__FRAMEWORK_ENTITY_HPP
+#define BOOST__DATAFLOW__BLUEPRINT__FRAMEWORK_ENTITY_HPP
+
+
+#include <boost/dataflow/blueprint/castable_polymorphic_object.hpp>
+
+
+namespace boost { namespace dataflow { namespace blueprint {
+
+template<typename BlueprintFramework>
+class framework_entity : public castable_polymorphic_object
+{
+public:
+ struct dataflow_traits
+ {
+ typedef BlueprintFramework framework;
+ };
+
+ template<typename Entity>
+ framework_entity(const Entity &entity)
+ : castable_polymorphic_object(entity)
+ {}
+ virtual ~framework_entity()
+ {}
+private:
+ virtual const void *get_ptr() const=0;
+};
+
+} } } // namespace boost::dataflow::blueprint
+
+#endif // BOOST__DATAFLOW__BLUEPRINT__FRAMEWORK_ENTITY_HPP

Added: sandbox/dataflow-rewrite/boost/dataflow/blueprint/framework_entity_adapter.hpp
==============================================================================
--- (empty file)
+++ sandbox/dataflow-rewrite/boost/dataflow/blueprint/framework_entity_adapter.hpp 2008-10-14 21:36:37 EDT (Tue, 14 Oct 2008)
@@ -0,0 +1,47 @@
+/*=================================---------------------------------------------
+ Copyright 2007,2008 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__BLUEPRINT__FRAMEWORK_ENTITY_ADAPTER_HPP
+#define BOOST__DATAFLOW__BLUEPRINT__FRAMEWORK_ENTITY_ADAPTER_HPP
+
+
+#include <boost/dataflow/blueprint/framework_entity.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+
+
+namespace boost { namespace dataflow { namespace blueprint {
+
+template<typename BlueprintFramework, typename EntityOrRef, typename Base=framework_entity<BlueprintFramework> >
+class framework_entity_adapter : public Base
+{
+public:
+ typedef typename remove_reference<EntityOrRef>::type entity_type;
+ framework_entity_adapter()
+ : Base(EntityOrRef())
+ {}
+ template<typename T>
+ framework_entity_adapter(const T &t)
+ : Base(t)
+ , m_entity(t)
+ {}
+ template<typename T>
+ framework_entity_adapter(T &t)
+ : Base(t)
+ , m_entity(t)
+ {}
+private:
+ virtual const void *get_ptr() const
+ {
+ return &m_entity;
+ };
+ EntityOrRef m_entity;
+};
+
+} } } // namespace boost::dataflow::blueprint
+
+#endif // BOOST__DATAFLOW__BLUEPRINT__FRAMEWORK_ENTITY_ADAPTER_HPP

Added: sandbox/dataflow-rewrite/boost/dataflow/blueprint/framework_object.hpp
==============================================================================
--- (empty file)
+++ sandbox/dataflow-rewrite/boost/dataflow/blueprint/framework_object.hpp 2008-10-14 21:36:37 EDT (Tue, 14 Oct 2008)
@@ -0,0 +1,80 @@
+/*=================================---------------------------------------------
+ Copyright 2007,2008 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__BLUEPRINT__FRAMEWORK_OBJECT_HPP
+#define BOOST__DATAFLOW__BLUEPRINT__FRAMEWORK_OBJECT_HPP
+
+#include <map>
+#include <typeinfo>
+
+namespace boost { namespace dataflow { namespace blueprint {
+
+struct port_binary_operation_key
+{
+protected:
+ port_binary_operation_key()
+ {}
+public:
+ bool operator == (const port_binary_operation_key &rhs) const
+ {
+ for(int i=0; i<3; i++)
+ if(*m_type_info[i] != *rhs.m_type_info[i])
+ return false;
+ return true;
+ }
+ bool operator < (const port_binary_operation_key &rhs) const
+ {
+ for(int i=0; i<3; i++)
+ {
+ if(m_type_info[i]->before(*rhs.m_type_info[i]))
+ return true;
+ if(!(*m_type_info[i] == *rhs.m_type_info[i]))
+ return false;
+ }
+ return false;
+ }
+protected:
+ const std::type_info *m_type_info[3];
+};
+
+template<typename Port1, typename Port2, typename Operation>
+class construct_port_binary_operation_key : public port_binary_operation_key
+{
+public:
+ construct_port_binary_operation_key()
+ {
+ m_type_info[0] = &typeid(Port1);
+ m_type_info[1] = &typeid(Port2);
+ m_type_info[2] = &typeid(Operation);
+ }
+};
+
+template<typename BlueprintFramework>
+class framework_object
+{
+public:
+ template<typename Port1, typename Port2, typename Operation>
+ void register_operation()
+ {
+ port_binary_operation_key key = construct_port_binary_operation_key<Port1,Port2,Operation>();
+ m_operation_implementations[key] = 1;
+ }
+ template<typename Port1, typename Port2, typename Operation>
+ bool has_registered_operation() const
+ {
+ port_binary_operation_key key = construct_port_binary_operation_key<Port1,Port2,Operation>();
+ return m_operation_implementations.find(key) != m_operation_implementations.end();
+ }
+private:
+ std::map<port_binary_operation_key, int> m_operation_implementations;
+};
+
+} } } // namespace boost::dataflow::blueprint
+
+
+#endif // BOOST__DATAFLOW__BLUEPRINT__FRAMEWORK_OBJECT_HPP

Added: sandbox/dataflow-rewrite/boost/dataflow/blueprint/operation.hpp
==============================================================================
--- (empty file)
+++ sandbox/dataflow-rewrite/boost/dataflow/blueprint/operation.hpp 2008-10-14 21:36:37 EDT (Tue, 14 Oct 2008)
@@ -0,0 +1,43 @@
+/*=================================---------------------------------------------
+ Copyright 2007,2008 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__BLUEPRINT__OPERATION_HPP
+#define BOOST__DATAFLOW__BLUEPRINT__OPERATION_HPP
+
+
+#include <boost/dataflow/generic/operation.hpp>
+#include <typeinfo>
+
+
+namespace boost { namespace dataflow { namespace blueprint {
+
+class operation : public dataflow::operation<semantics::unknown>
+{
+public:
+ template<typename Operation>
+ operation(const Operation &operation)
+ : m_type_info(typeid(operation))
+ {}
+ virtual ~operation()
+ {}
+ template<typename Operation>
+ const Operation &get_as() const
+ {
+ return *reinterpret_cast<const Operation *>(get_ptr());
+ }
+ const std::type_info &type_info() const
+ { return m_type_info; }
+private:
+ virtual const void * get_ptr() const = 0;
+ const std::type_info &m_type_info;
+};
+
+
+} } } // namespace boost::dataflow::blueprint
+
+#endif // BOOST__DATAFLOW__BLUEPRINT__OPERATION_HPP

Added: sandbox/dataflow-rewrite/boost/dataflow/blueprint/operation_adapter.hpp
==============================================================================
--- (empty file)
+++ sandbox/dataflow-rewrite/boost/dataflow/blueprint/operation_adapter.hpp 2008-10-14 21:36:37 EDT (Tue, 14 Oct 2008)
@@ -0,0 +1,36 @@
+/*=================================---------------------------------------------
+ Copyright 2007,2008 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__BLUEPRINT__OPERATION_ADAPTER_HPP
+#define BOOST__DATAFLOW__BLUEPRINT__OPERATION_ADAPTER_HPP
+
+
+#include <boost/dataflow/blueprint/operation.hpp>
+
+
+namespace boost { namespace dataflow { namespace blueprint {
+
+template<typename Operation>
+class operation_adapter : public operation
+{
+public:
+ operation_adapter(const Operation &op = Operation())
+ : operation(op)
+ , m_operation(op)
+ {}
+private:
+ virtual const void * get_ptr() const
+ {
+ return &m_operation;
+ };
+ Operation m_operation;
+};
+
+} } } // namespace boost::dataflow::blueprint
+
+#endif // BOOST__DATAFLOW__BLUEPRINT__OPERATION_ADAPTER_HPP

Added: sandbox/dataflow-rewrite/boost/dataflow/blueprint/port.hpp
==============================================================================
--- (empty file)
+++ sandbox/dataflow-rewrite/boost/dataflow/blueprint/port.hpp 2008-10-14 21:36:37 EDT (Tue, 14 Oct 2008)
@@ -0,0 +1,35 @@
+/*=================================---------------------------------------------
+ Copyright 2007,2008 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__BLUEPRINT__PORT_HPP
+#define BOOST__DATAFLOW__BLUEPRINT__PORT_HPP
+
+
+#include <boost/dataflow/blueprint/framework_entity.hpp>
+#include <boost/dataflow/generic/port/category.hpp>
+
+namespace boost { namespace dataflow { namespace blueprint {
+
+template<typename BlueprintFramework>
+class port : public framework_entity<BlueprintFramework>
+{
+ typedef framework_entity<BlueprintFramework> base_type;
+public:
+ template<typename T>
+ port(const T &t)
+ : base_type(t)
+ {}
+ struct dataflow_traits : public base_type::dataflow_traits
+ {
+ typedef ports::producer_consumer category;
+ };
+};
+
+} } } // namespace boost::dataflow::blueprint
+
+#endif // BOOST__DATAFLOW__BLUEPRINT__PORT_HPP

Added: sandbox/dataflow-rewrite/boost/dataflow/blueprint/port_adapter.hpp
==============================================================================
--- (empty file)
+++ sandbox/dataflow-rewrite/boost/dataflow/blueprint/port_adapter.hpp 2008-10-14 21:36:37 EDT (Tue, 14 Oct 2008)
@@ -0,0 +1,38 @@
+/*=================================---------------------------------------------
+ Copyright 2007,2008 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__BLUEPRINT__PORT_ADAPTER_HPP
+#define BOOST__DATAFLOW__BLUEPRINT__PORT_ADAPTER_HPP
+
+
+#include <boost/dataflow/blueprint/framework_entity_adapter.hpp>
+#include <boost/dataflow/blueprint/port.hpp>
+
+
+namespace boost { namespace dataflow { namespace blueprint {
+
+template<typename BlueprintFramework, typename PortOrRef, typename Base=port<BlueprintFramework> >
+class port_adapter : public framework_entity_adapter<BlueprintFramework, PortOrRef, Base>
+{
+ typedef framework_entity_adapter<BlueprintFramework, PortOrRef, Base> base_type;
+public:
+ port_adapter()
+ {}
+ template<typename T>
+ port_adapter(const T &t)
+ : base_type(t)
+ {}
+ template<typename T>
+ port_adapter(T &t)
+ : base_type(t)
+ {}
+};
+
+} } } // namespace boost::dataflow::blueprint
+
+#endif // BOOST__DATAFLOW__BLUEPRINT__PORT_ADAPTER_HPP

Added: sandbox/dataflow-rewrite/boost/dataflow/blueprint/port_binary_operation.hpp
==============================================================================
--- (empty file)
+++ sandbox/dataflow-rewrite/boost/dataflow/blueprint/port_binary_operation.hpp 2008-10-14 21:36:37 EDT (Tue, 14 Oct 2008)
@@ -0,0 +1,57 @@
+/*=================================---------------------------------------------
+ Copyright 2007,2008 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__BLUEPRINT__PORT_BINARY_OPERATION_HPP
+#define BOOST__DATAFLOW__BLUEPRINT__PORT_BINARY_OPERATION_HPP
+
+
+#include <boost/dataflow/generic/port_binary_operation.hpp>
+#include <boost/dataflow/generic/framework_entity/traits_of.hpp>
+#include <boost/dataflow/blueprint/framework.hpp>
+#include <boost/dataflow/blueprint/operation.hpp>
+
+
+namespace boost { namespace dataflow { namespace extension {
+
+template<typename Traits1, typename Traits2>
+struct port_binary_operation_impl<Traits1, Traits2, blueprint::operation,
+ typename enable_if<
+ mpl::and_<
+ blueprint::is_blueprint_framework<typename traits_of<Traits1>::type::framework>,
+ blueprint::is_blueprint_framework<typename traits_of<Traits2>::type::framework>
+ >
+ >::type>
+{
+ typedef void result_type;
+
+ template<typename Port1, typename Port2>
+ void operator()(Port1 &port1, Port2 &port2, const blueprint::operation &operation)
+ {}
+};
+
+template<typename Traits1, typename Traits2>
+struct port_binary_operation_will_succeed_impl<Traits1, Traits2, blueprint::operation,
+ typename enable_if<
+ mpl::and_<
+ blueprint::is_blueprint_framework<typename traits_of<Traits1>::type::framework>,
+ blueprint::is_blueprint_framework<typename traits_of<Traits2>::type::framework>
+ >
+ >::type>
+{
+ typedef bool result_type;
+
+ template<typename Port1, typename Port2>
+ bool operator()(Port1 &port1, Port2 &port2, const blueprint::operation &operation)
+ {
+ return false;
+ }
+};
+
+} } } // namespace boost::dataflow::extension
+
+#endif // BOOST__DATAFLOW__BLUEPRINT__PORT_BINARY_OPERATION_HPP

Added: sandbox/dataflow-rewrite/boost/dataflow/blueprint/port_binary_operation_implementation.hpp
==============================================================================
--- (empty file)
+++ sandbox/dataflow-rewrite/boost/dataflow/blueprint/port_binary_operation_implementation.hpp 2008-10-14 21:36:37 EDT (Tue, 14 Oct 2008)
@@ -0,0 +1,34 @@
+/*=================================---------------------------------------------
+ Copyright 2007,2008 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__BLUEPRINT__PORT_BINARY_OPERATION_IMPLEMENTATION_HPP
+#define BOOST__DATAFLOW__BLUEPRINT__PORT_BINARY_OPERATION_IMPLEMENTATION_HPP
+
+
+#include <boost/dataflow/generic/port_binary_operation.hpp>
+#include <boost/dataflow/generic/framework_entity/traits_of.hpp>
+#include <boost/dataflow/blueprint/framework.hpp>
+#include <boost/dataflow/blueprint/port.hpp>
+#include <boost/dataflow/blueprint/operation.hpp>
+
+
+namespace boost { namespace dataflow { namespace blueprint {
+
+template<typename BlueprintFramework>
+class port_binary_operation_implementation
+{
+ typedef port<BlueprintFramework> port_type;
+public:
+ virtual void invoke(port_type &port1, port_type &port2, const operation &op)=0;
+ virtual bool will_succeed(port_type &port1, port_type &port2, const operation &op)=0;
+ virtual ~port_binary_operation_implementation() {};
+};
+
+} } } // namespace boost::dataflow::blueprint
+
+#endif // BOOST__DATAFLOW__BLUEPRINT__PORT_BINARY_OPERATION_IMPLEMENTATION_HPP

Added: sandbox/dataflow-rewrite/boost/dataflow/blueprint/port_binary_operation_implementation_adapter.hpp
==============================================================================
--- (empty file)
+++ sandbox/dataflow-rewrite/boost/dataflow/blueprint/port_binary_operation_implementation_adapter.hpp 2008-10-14 21:36:37 EDT (Tue, 14 Oct 2008)
@@ -0,0 +1,54 @@
+/*=================================---------------------------------------------
+ Copyright 2007,2008 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__BLUEPRINT__PORT_BINARY_OPERATION_ADAPTER_HPP
+#define BOOST__DATAFLOW__BLUEPRINT__PORT_BINARY_OPERATION_ADAPTER_HPP
+
+
+#include <boost/dataflow/blueprint/port_binary_operation_implementation.hpp>
+#include <boost/dataflow/generic/port_binary_operation.hpp>
+#include <boost/dataflow/generic/framework_entity/traits_of.hpp>
+
+
+namespace boost { namespace dataflow { namespace blueprint {
+
+template<typename Port1, typename Port2, typename Operation, typename BlueprintFramework>
+class port_binary_operation_implementation_adapter
+ : public port_binary_operation_implementation<BlueprintFramework>
+{
+ typedef typename BlueprintFramework::framework_type framework_type;
+ typedef port<BlueprintFramework> port_type;
+public:
+ virtual void invoke(port_type &port1, port_type &port2, const operation &op)
+ {
+ if(!check_types(port1, port2, op))
+ return;
+ }
+ virtual bool will_succeed(port_type &port1, port_type &port2, const operation &op)
+ {
+ if(!check_types(port1, port2, op))
+ return false;
+
+ return dataflow::port_binary_operation_will_succeed_framework
+ <Operation, framework_type, framework_type>(
+ port1.template get_as<Port1>(),
+ port2.template get_as<Port2>(),
+ op.template get_as<Operation>());
+ }
+private:
+ bool check_types(port_type &port1, port_type &port2, const operation &op)
+ {
+ return ((port1.type_info() == typeid(Port1))
+ && (port2.type_info() == typeid(Port2))
+ && (op.type_info() == typeid(Operation)));
+ }
+};
+
+} } } // namespace boost::dataflow::blueprint
+
+#endif // BOOST__DATAFLOW__BLUEPRINT__PORT_BINARY_OPERATION_ADAPTER_HPP

Modified: sandbox/dataflow-rewrite/boost/dataflow/generic/framework.hpp
==============================================================================
--- sandbox/dataflow-rewrite/boost/dataflow/generic/framework.hpp (original)
+++ sandbox/dataflow-rewrite/boost/dataflow/generic/framework.hpp 2008-10-14 21:36:37 EDT (Tue, 14 Oct 2008)
@@ -10,20 +10,41 @@
 #define BOOST__DATAFLOW__GENERIC__FRAMEWORK_HPP
 
 
-#include <boost/type_traits/is_base_of.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/is_sequence.hpp>
+#include <boost/mpl/vector.hpp>
+#include <boost/utility/enable_if.hpp>
+
 
 namespace boost { namespace dataflow {
 
-/// Base class for Framework types.
-struct framework_base {};
+
+template<typename ConnectOperations>
+struct framework
+{
+ typedef ConnectOperations connect_operations;
+};
+
+namespace operations {
+
+struct connect {};
+
+}
 
 /// The default Framework argument for Dataflow templates.
-struct default_framework : framework_base {};
+struct default_framework
+ : public framework<mpl::vector<operations::connect> >
+{};
 
 /// Boolean metafunction determining whether a type is a Framework.
-template<typename T>
+template<typename T, typename Enable=void>
 struct is_framework
- : public is_base_of<framework_base, T> {};
+ : public mpl::false_ {};
+
+template<typename T>
+struct is_framework<T,
+ typename enable_if<mpl::is_sequence<typename T::connect_operations> >::type>
+ : public mpl::true_ {};
 
 
 } } // namespace boost::dataflow

Added: sandbox/dataflow-rewrite/boost/dataflow/generic/operation.hpp
==============================================================================
--- (empty file)
+++ sandbox/dataflow-rewrite/boost/dataflow/generic/operation.hpp 2008-10-14 21:36:37 EDT (Tue, 14 Oct 2008)
@@ -0,0 +1,47 @@
+/*=================================---------------------------------------------
+ Copyright 2007,2008 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__GENERIC__OPERATION_HPP
+#define BOOST__DATAFLOW__GENERIC__OPERATION_HPP
+
+
+#include <boost/dataflow/generic/operation/semantics.hpp>
+#include <boost/dataflow/utility/guarded_enable_if_type.hpp>
+#include <boost/mpl/bool.hpp>
+
+
+namespace boost { namespace dataflow {
+
+template<typename Semantics>
+struct operation
+{
+ typedef Semantics semantics;
+};
+
+
+/// Boolean Metafunction determining whether a type is a Operation.
+template<typename Operation, typename Enable=utility::enable_guard>
+struct is_operation : public mpl::false_
+{
+ /// INTERNAL ONLY
+ BOOST_MPL_ASSERT(( is_same<Enable, utility::enable_guard> ));
+};
+
+/// INTERNAL ONLY
+template<typename Operation>
+struct is_operation<Operation,
+ typename utility::guarded_enable_if_type<
+ typename Operation::semantics
+ >::type>
+ : public mpl::true_
+{};
+
+} } // namespace boost::dataflow
+
+
+#endif // BOOST__DATAFLOW__GENERIC__OPERATION_HPP

Added: sandbox/dataflow-rewrite/boost/dataflow/generic/operation/semantics.hpp
==============================================================================
--- (empty file)
+++ sandbox/dataflow-rewrite/boost/dataflow/generic/operation/semantics.hpp 2008-10-14 21:36:37 EDT (Tue, 14 Oct 2008)
@@ -0,0 +1,24 @@
+/*=================================---------------------------------------------
+ Copyright 2008 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__GENERIC__PORT__OPERATION__SEMANTICS_HPP
+#define BOOST__DATAFLOW__GENERIC__PORT__OPERATION__SEMANTICS_HPP
+
+namespace boost { namespace dataflow {
+
+/// OperationSemantics types.
+namespace semantics
+{
+ struct connect;
+ struct unknown;
+}
+
+} } // namespace boost::dataflow
+
+
+#endif // BOOST__DATAFLOW__GENERIC__PORT__OPERATION__SEMANTICS_HPP

Modified: sandbox/dataflow-rewrite/boost/dataflow/generic/port/category.hpp
==============================================================================
--- sandbox/dataflow-rewrite/boost/dataflow/generic/port/category.hpp (original)
+++ sandbox/dataflow-rewrite/boost/dataflow/generic/port/category.hpp 2008-10-14 21:36:37 EDT (Tue, 14 Oct 2008)
@@ -1,7 +1,10 @@
-// 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)
+/*=================================---------------------------------------------
+ Copyright 2007,2008 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__GENERIC__PORT__CATEGORY_HPP
 #define BOOST__DATAFLOW__GENERIC__PORT__CATEGORY_HPP

Modified: sandbox/dataflow-rewrite/boost/dataflow/generic/port/port.hpp
==============================================================================
--- sandbox/dataflow-rewrite/boost/dataflow/generic/port/port.hpp (original)
+++ sandbox/dataflow-rewrite/boost/dataflow/generic/port/port.hpp 2008-10-14 21:36:37 EDT (Tue, 14 Oct 2008)
@@ -1,7 +1,10 @@
-// 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)
+/*=================================---------------------------------------------
+ Copyright 2007,2008 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__GENERIC__PORT__PORT_HPP
 #define BOOST__DATAFLOW__GENERIC__PORT__PORT_HPP

Modified: sandbox/dataflow-rewrite/boost/dataflow/generic/port/traits.hpp
==============================================================================
--- sandbox/dataflow-rewrite/boost/dataflow/generic/port/traits.hpp (original)
+++ sandbox/dataflow-rewrite/boost/dataflow/generic/port/traits.hpp 2008-10-14 21:36:37 EDT (Tue, 14 Oct 2008)
@@ -1,7 +1,10 @@
-// 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)
+/*=================================---------------------------------------------
+ Copyright 2007,2008 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__GENERIC__PORT__TRAITS_HPP
 #define BOOST__DATAFLOW__GENERIC__PORT__TRAITS_HPP

Added: sandbox/dataflow-rewrite/boost/dataflow/generic/port_binary_operation.hpp
==============================================================================
--- (empty file)
+++ sandbox/dataflow-rewrite/boost/dataflow/generic/port_binary_operation.hpp 2008-10-14 21:36:37 EDT (Tue, 14 Oct 2008)
@@ -0,0 +1,306 @@
+/*=================================---------------------------------------------
+ Copyright 2007,2008 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__GENERIC__PORT_BINARY_OPERATION_HPP
+#define BOOST__DATAFLOW__GENERIC__PORT_BINARY_OPERATION_HPP
+
+
+#include <boost/mpl/assert.hpp>
+#include <boost/utility/result_of.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/dataflow/generic/framework_entity/default_framework_of.hpp>
+#include <boost/dataflow/generic/framework_entity/traits_of.hpp>
+#include <boost/dataflow/generic/port/port.hpp>
+namespace boost { namespace dataflow {
+
+namespace detail {
+
+ struct not_specialized
+ {};
+
+}
+
+namespace extension
+{
+ template<typename Traits1,typename Traits2,typename Operation,typename Enable=void>
+ struct port_binary_operation_impl
+ {
+ BOOST_MPL_ASSERT(( is_same<Enable, void> ));
+
+ typedef detail::not_specialized result_type;
+
+ template<typename T1,typename T2>
+ result_type operator()(T1 &t1,T2 &t2,const Operation &operation)
+ {
+ // Error: port_binary_operation_impl has not been
+ // specialized appropriately.
+ BOOST_MPL_ASSERT(( mpl::bool_<sizeof(T1)==0> ));
+ return result_type();
+ }
+ };
+
+ template<typename Traits1,typename Traits2,typename Operation,typename Enable=void>
+ struct port_binary_operation_will_succeed_impl
+ {
+ BOOST_MPL_ASSERT(( is_same<Enable, void> ));
+
+ typedef bool result_type;
+
+ template<typename T1,typename T2>
+ result_type operator()(T1 &t1,T2 &t2,const Operation &operation)
+ {
+ return
+ !is_same<
+ typename extension::port_binary_operation_impl<
+ Traits1,Traits2,Operation
+ >::result_type,
+ detail::not_specialized
+ >::value;
+ }
+ };
+}
+
+namespace detail
+{
+
+ template<typename T1,typename T2,typename Operation,typename Framework1=typename default_framework_of<T1>::type,typename Framework2=typename default_framework_of<T2>::type,typename Enable=void>
+ struct are_port_binary_operable_specialized
+ : public mpl::true_
+ {};
+
+ template<typename T1,typename T2,typename Operation,typename Framework1,typename Framework2>
+ struct are_port_binary_operable_specialized<
+ T1,T2,Operation,Framework1,Framework2
+ ,
+ typename enable_if<
+ is_same<
+ typename extension::port_binary_operation_impl<
+ typename traits_of<T1, Framework1>::type,typename traits_of<T2, Framework2>::type,Operation
+ >::result_type,
+ detail::not_specialized>
+ >::type>
+ : public mpl::false_
+ {};
+
+}
+
+template<typename T1,typename T2,typename Operation,typename Framework1=typename default_framework_of<T1>::type,typename Framework2=typename default_framework_of<T2>::type,typename Enable=void>
+struct are_port_binary_operable
+ : public mpl::false_
+{
+ BOOST_MPL_ASSERT((mpl::and_<is_port<T1,Framework1>,is_port<T2,Framework2> >));
+};
+
+template<typename T1,typename T2,typename Operation,typename Framework1,typename Framework2>
+struct are_port_binary_operable<
+ T1,T2,Operation,Framework1,Framework2,
+ typename enable_if<
+ detail::are_port_binary_operable_specialized<
+ T1,T2,Operation,Framework1,Framework2>
+ >::type>
+ : public mpl::true_
+{
+ BOOST_MPL_ASSERT((mpl::and_<is_port<T1,Framework1>,is_port<T2,Framework2> >));
+};
+
+namespace result_of {
+
+ template<typename T1,typename T2,typename Operation,typename Framework1=typename default_framework_of<T1>::type,typename Framework2=typename default_framework_of<T2>::type>
+ struct port_binary_operation
+ {
+ typedef typename boost::result_of<
+ extension::port_binary_operation_impl<
+ typename traits_of<T1, Framework1>::type,typename traits_of<T2, Framework2>::type,Operation
+ >
+ (T1,T2,Operation)
+ >::type type;
+ };
+
+}
+
+
+template<typename Operation,typename Framework1,typename Framework2,typename T1,typename T2>
+inline typename result_of::port_binary_operation<
+ T1,T2,Operation,Framework1,Framework2
+ >::type
+port_binary_operation_framework(T1 &t1,T2 &t2,const Operation &operation=Operation())
+{
+ return extension::port_binary_operation_impl<
+ typename traits_of<T1, Framework1>::type,typename traits_of<T2, Framework2>::type,Operation
+ >()(t1,t2,operation);
+}
+
+template<typename Operation,typename T1,typename T2>
+inline typename result_of::port_binary_operation<
+ T1,T2,Operation,typename default_framework_of<T1>::type,typename default_framework_of<T2>::type
+ >::type
+port_binary_operation(T1 &t1,T2 &t2,const Operation &operation=Operation())
+{
+ typedef typename default_framework_of<T1>::type Framework1;
+typedef typename default_framework_of<T2>::type Framework2;
+ return extension::port_binary_operation_impl<
+ typename traits_of<T1, Framework1>::type,typename traits_of<T2, Framework2>::type,Operation
+ >()(t1,t2,operation);
+}
+
+template<typename Operation,typename Framework1,typename Framework2,typename T1,typename T2>
+inline bool
+port_binary_operation_will_succeed_framework(T1 &t1,T2 &t2,const Operation &operation=Operation())
+{
+ return extension::port_binary_operation_will_succeed_impl<
+ typename traits_of<T1, Framework1>::type,typename traits_of<T2, Framework2>::type,Operation
+ >()(t1,t2,operation);
+}
+
+template<typename Operation,typename T1,typename T2>
+inline bool
+port_binary_operation_will_succeed(T1 &t1,T2 &t2,const Operation &operation=Operation())
+{
+ typedef typename default_framework_of<T1>::type Framework1;
+typedef typename default_framework_of<T2>::type Framework2;
+ return extension::port_binary_operation_will_succeed_impl<
+ typename traits_of<T1, Framework1>::type,typename traits_of<T2, Framework2>::type,Operation
+ >()(t1,t2,operation);
+}
+
+template<typename Operation,typename Framework1,typename Framework2,typename T1,typename T2>
+inline typename result_of::port_binary_operation<
+ T1,T2,Operation,Framework1,Framework2
+ >::type
+port_binary_operation_framework(const T1 &t1,T2 &t2,const Operation &operation=Operation())
+{
+ return extension::port_binary_operation_impl<
+ typename traits_of<T1, Framework1>::type,typename traits_of<T2, Framework2>::type,Operation
+ >()(t1,t2,operation);
+}
+
+template<typename Operation,typename T1,typename T2>
+inline typename result_of::port_binary_operation<
+ T1,T2,Operation,typename default_framework_of<T1>::type,typename default_framework_of<T2>::type
+ >::type
+port_binary_operation(const T1 &t1,T2 &t2,const Operation &operation=Operation())
+{
+ typedef typename default_framework_of<T1>::type Framework1;
+typedef typename default_framework_of<T2>::type Framework2;
+ return extension::port_binary_operation_impl<
+ typename traits_of<T1, Framework1>::type,typename traits_of<T2, Framework2>::type,Operation
+ >()(t1,t2,operation);
+}
+
+template<typename Operation,typename Framework1,typename Framework2,typename T1,typename T2>
+inline bool
+port_binary_operation_will_succeed_framework(const T1 &t1,T2 &t2,const Operation &operation=Operation())
+{
+ return extension::port_binary_operation_will_succeed_impl<
+ typename traits_of<T1, Framework1>::type,typename traits_of<T2, Framework2>::type,Operation
+ >()(t1,t2,operation);
+}
+
+template<typename Operation,typename T1,typename T2>
+inline bool
+port_binary_operation_will_succeed(const T1 &t1,T2 &t2,const Operation &operation=Operation())
+{
+ typedef typename default_framework_of<T1>::type Framework1;
+typedef typename default_framework_of<T2>::type Framework2;
+ return extension::port_binary_operation_will_succeed_impl<
+ typename traits_of<T1, Framework1>::type,typename traits_of<T2, Framework2>::type,Operation
+ >()(t1,t2,operation);
+}
+
+template<typename Operation,typename Framework1,typename Framework2,typename T1,typename T2>
+inline typename result_of::port_binary_operation<
+ T1,T2,Operation,Framework1,Framework2
+ >::type
+port_binary_operation_framework(T1 &t1,const T2 &t2,const Operation &operation=Operation())
+{
+ return extension::port_binary_operation_impl<
+ typename traits_of<T1, Framework1>::type,typename traits_of<T2, Framework2>::type,Operation
+ >()(t1,t2,operation);
+}
+
+template<typename Operation,typename T1,typename T2>
+inline typename result_of::port_binary_operation<
+ T1,T2,Operation,typename default_framework_of<T1>::type,typename default_framework_of<T2>::type
+ >::type
+port_binary_operation(T1 &t1,const T2 &t2,const Operation &operation=Operation())
+{
+ typedef typename default_framework_of<T1>::type Framework1;
+typedef typename default_framework_of<T2>::type Framework2;
+ return extension::port_binary_operation_impl<
+ typename traits_of<T1, Framework1>::type,typename traits_of<T2, Framework2>::type,Operation
+ >()(t1,t2,operation);
+}
+
+template<typename Operation,typename Framework1,typename Framework2,typename T1,typename T2>
+inline bool
+port_binary_operation_will_succeed_framework(T1 &t1,const T2 &t2,const Operation &operation=Operation())
+{
+ return extension::port_binary_operation_will_succeed_impl<
+ typename traits_of<T1, Framework1>::type,typename traits_of<T2, Framework2>::type,Operation
+ >()(t1,t2,operation);
+}
+
+template<typename Operation,typename T1,typename T2>
+inline bool
+port_binary_operation_will_succeed(T1 &t1,const T2 &t2,const Operation &operation=Operation())
+{
+ typedef typename default_framework_of<T1>::type Framework1;
+typedef typename default_framework_of<T2>::type Framework2;
+ return extension::port_binary_operation_will_succeed_impl<
+ typename traits_of<T1, Framework1>::type,typename traits_of<T2, Framework2>::type,Operation
+ >()(t1,t2,operation);
+}
+
+template<typename Operation,typename Framework1,typename Framework2,typename T1,typename T2>
+inline typename result_of::port_binary_operation<
+ T1,T2,Operation,Framework1,Framework2
+ >::type
+port_binary_operation_framework(const T1 &t1,const T2 &t2,const Operation &operation=Operation())
+{
+ return extension::port_binary_operation_impl<
+ typename traits_of<T1, Framework1>::type,typename traits_of<T2, Framework2>::type,Operation
+ >()(t1,t2,operation);
+}
+
+template<typename Operation,typename T1,typename T2>
+inline typename result_of::port_binary_operation<
+ T1,T2,Operation,typename default_framework_of<T1>::type,typename default_framework_of<T2>::type
+ >::type
+port_binary_operation(const T1 &t1,const T2 &t2,const Operation &operation=Operation())
+{
+ typedef typename default_framework_of<T1>::type Framework1;
+typedef typename default_framework_of<T2>::type Framework2;
+ return extension::port_binary_operation_impl<
+ typename traits_of<T1, Framework1>::type,typename traits_of<T2, Framework2>::type,Operation
+ >()(t1,t2,operation);
+}
+
+template<typename Operation,typename Framework1,typename Framework2,typename T1,typename T2>
+inline bool
+port_binary_operation_will_succeed_framework(const T1 &t1,const T2 &t2,const Operation &operation=Operation())
+{
+ return extension::port_binary_operation_will_succeed_impl<
+ typename traits_of<T1, Framework1>::type,typename traits_of<T2, Framework2>::type,Operation
+ >()(t1,t2,operation);
+}
+
+template<typename Operation,typename T1,typename T2>
+inline bool
+port_binary_operation_will_succeed(const T1 &t1,const T2 &t2,const Operation &operation=Operation())
+{
+ typedef typename default_framework_of<T1>::type Framework1;
+typedef typename default_framework_of<T2>::type Framework2;
+ return extension::port_binary_operation_will_succeed_impl<
+ typename traits_of<T1, Framework1>::type,typename traits_of<T2, Framework2>::type,Operation
+ >()(t1,t2,operation);
+}
+
+}}
+
+
+#endif // BOOST__DATAFLOW__GENERIC__PORT_BINARY_OPERATION_HPP

Added: sandbox/dataflow-rewrite/boost/dataflow/utility/all_of.hpp
==============================================================================
--- (empty file)
+++ sandbox/dataflow-rewrite/boost/dataflow/utility/all_of.hpp 2008-10-14 21:36:37 EDT (Tue, 14 Oct 2008)
@@ -0,0 +1,29 @@
+/*=================================---------------------------------------------
+ Copyright 2007,2008 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__ALL_OF_HPP
+#define BOOST__DATAFLOW__UTILITY__ALL_OF_HPP
+
+
+namespace boost { namespace dataflow {
+
+namespace utility
+{
+ 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 utility
+
+} } // namespace boost::dataflow
+
+#endif // BOOST__DATAFLOW__UTILITY__ALL_OF_HPP

Modified: sandbox/dataflow-rewrite/boost/dataflow/utility/enable_if_type.hpp
==============================================================================
--- sandbox/dataflow-rewrite/boost/dataflow/utility/enable_if_type.hpp (original)
+++ sandbox/dataflow-rewrite/boost/dataflow/utility/enable_if_type.hpp 2008-10-14 21:36:37 EDT (Tue, 14 Oct 2008)
@@ -10,6 +10,9 @@
 #define BOOST__DATAFLOW__UTILITY__ENABLE_IF_TYPE_HPP
 
 
+#include <boost/dataflow/utility/all_of.hpp>
+
+
 namespace boost { namespace dataflow {
     
 namespace utility
@@ -20,15 +23,7 @@
     {
         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 utility
 
 } } // namespace boost::dataflow

Added: sandbox/dataflow-rewrite/boost/dataflow/utility/guarded_enable_if_type.hpp
==============================================================================
--- (empty file)
+++ sandbox/dataflow-rewrite/boost/dataflow/utility/guarded_enable_if_type.hpp 2008-10-14 21:36:37 EDT (Tue, 14 Oct 2008)
@@ -0,0 +1,34 @@
+/*=================================---------------------------------------------
+ Copyright 2007,2008 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__GUARDED_ENABLE_IF_TYPE_HPP
+#define BOOST__DATAFLOW__UTILITY__GUARDED_ENABLE_IF_TYPE_HPP
+
+
+#include <boost/dataflow/utility/all_of.hpp>
+#include <boost/mpl/assert.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+
+namespace boost { namespace dataflow {
+
+namespace utility
+{
+ struct enable_guard;
+
+ template<typename T, typename Result=enable_guard>
+ struct guarded_enable_if_type
+ {
+ typedef Result type;
+ };
+
+} // namespace utility
+
+} } // namespace boost::dataflow
+
+#endif // BOOST__DATAFLOW__UTILITY__GUARDED_ENABLE_IF_TYPE_HPP

Copied: sandbox/dataflow-rewrite/libs/dataflow/build/file_template.py (from r42135, /sandbox/template_under_construction/file_template.py)
==============================================================================
--- /sandbox/template_under_construction/file_template.py (original)
+++ sandbox/dataflow-rewrite/libs/dataflow/build/file_template.py 2008-10-14 21:36:37 EDT (Tue, 14 Oct 2008)
@@ -9,6 +9,7 @@
 import sys
 import getopt
 import re
+import stat
 
 global template
 global log
@@ -208,13 +209,15 @@
     def append_content(self, content):
         self.__content__ += content
 
- def process_content(self, name, python=False):
+ def process_content(self, item, python=False):
+ name = item.source
         file_name = os.path.join(self.directory, name)
         if python:
             self.__content__ = ''
             global template
             template = self
             self.executing = file_name
+ self.item = item
             execfile(file_name + '.py')
             content = self.__content__
         else:
@@ -254,66 +257,87 @@
     def ignore(self, name):
         self.options.options['ignore'].append(os.path.normpath(name))
 
+ def handle_file(self, root, name):
+ pathname = (os.path.join(root, name))
+ if name.endswith('.py'):
+ content = self.read_content(pathname)
+
+ if content.startswith('# template script'):
+ execfile(pathname)
+ elif content.startswith('# template file'):
+ self.__python_list__.append(pathname[0:len(pathname)-3])
+ else:
+ self.__file_list__.append(pathname)
+ else:
+ self.__file_list__.append(pathname)
+
     def examine(self):
- self.directory = self.options.get('template')
- self.into = self.options.get('into',None,'')
+ template_option = self.options.get('template')
+ into_option = self.options.get('into',None,'')
+
+ if stat.S_ISDIR(os.stat(template_option)[stat.ST_MODE]):
+ self.directory = template_option
+ self.into = into_option
+ walk_tree = True
+ else:
+ self.directory = os.path.dirname(template_option)
+ self.into = os.path.dirname(into_option)
+ template_basename = os.path.basename(template_option)
+ template.name_replacement(template_basename[0:len(template_basename)-3], os.path.basename(into_option))
+
+ walk_tree = False
+
         ignore_list = self.options.get('ignore')
         fignore_list = self.options.get('fignore')
         
         cwd = os.getcwd()
         os.chdir(self.directory)
- for root, dirs, files in os.walk('.'):
- # strip the . from the root
- rest = list()
- rest_of_root = root
- while rest_of_root != '.':
- rest.insert(0, os.path.basename(rest_of_root))
- rest_of_root = os.path.dirname(rest_of_root)
- root = ''
- for item in rest:
- root = os.path.join(root, item)
- log.line(root)
-
- self.__dirs_clear__ = list()
- self.__files_clear__ = list()
-
- for name in files:
- if name.startswith('.') or ignore_list.count(os.path.normpath(os.path.join(root, name)))>0:
- continue
- fignored=False
- for item in fignore_list:
- if name.endswith(item) or name.endswith(item+'.py'):
- fignored=True
- break
- if fignored:
- continue
-
- pathname = (os.path.join(root, name))
- if name.endswith('.py'):
- content = self.read_content(os.path.join(root, name))
-
- if content.startswith('# template script'):
- execfile(pathname)
- elif content.startswith('# template file'):
- self.__python_list__.append(pathname[0:len(pathname)-3])
- else:
- self.__file_list__.append(pathname)
- else:
- self.__file_list__.append(pathname)
-
- for name in self.__files_clear__:
- self.__file_list__.remove(os.path.join(root, name))
-
- for name in dirs:
- if name.startswith('.') or \
- ignore_list.count(os.path.normpath(os.path.join(root, name)))>0:
- self.ignore_subdirectory(name)
- for name in self.__dirs_clear__:
- dirs.remove(name)
- for name in dirs:
- self.__directory_list__.append( (os.path.join(root, name)) )
+
+ if walk_tree:
+ for root, dirs, files in os.walk('.'):
+ # strip the . from the root
+ rest = list()
+ rest_of_root = root
+ while rest_of_root != '.':
+ rest.insert(0, os.path.basename(rest_of_root))
+ rest_of_root = os.path.dirname(rest_of_root)
+ root = ''
+ for item in rest:
+ root = os.path.join(root, item)
+ log.line(root)
+
+ self.__dirs_clear__ = list()
+ self.__files_clear__ = list()
+
+ for name in files:
+ if name.startswith('.') or ignore_list.count(os.path.normpath(os.path.join(root, name)))>0:
+ continue
+ fignored=False
+ for item in fignore_list:
+ if name.endswith(item) or name.endswith(item+'.py'):
+ fignored=True
+ break
+ if fignored:
+ continue
+
+ self.handle_file(root, name)
+
+ for name in self.__files_clear__:
+ self.__file_list__.remove(os.path.join(root, name))
+
+ for name in dirs:
+ if name.startswith('.') or \
+ ignore_list.count(os.path.normpath(os.path.join(root, name)))>0:
+ self.ignore_subdirectory(name)
+ for name in self.__dirs_clear__:
+ dirs.remove(name)
+ for name in dirs:
+ self.__directory_list__.append( (os.path.join(root, name)) )
+ else:
+ self.handle_file('', os.path.basename(template_option))
 
         os.chdir(cwd)
+
         return self.__directory_list__, self.__file_list__, self.__python_list__
 
     def ignore_subdirectory(self, name):
@@ -398,7 +422,7 @@
         if os.path.exists(path):
             log.message(path + ' already exists.')
             do_erase = options.get_boolean(
- None, None, 'Erase ' + path + '? [y/n] ')
+ 'erase', None, 'Erase ' + path + '? [y/n] ')
             if do_erase:
                 if os.path.isfile(path):
                     os.remove(path)
@@ -420,7 +444,7 @@
         for item in self.python_list:
             new_name = os.path.join(self.destination, item.destination)
             log.line(new_name)
- content = item.template.process_content(item.source, True)
+ content = item.template.process_content(item, True)
             set_content(new_name, content)
         log.end()
 
@@ -429,7 +453,7 @@
             template = item.template
             new_name = os.path.join(self.destination, item.destination)
             log.line(new_name)
- content = item.template.process_content(item.source)
+ content = item.template.process_content(item)
             if content:
                 set_content(new_name, content)
             else:

Modified: sandbox/dataflow-rewrite/libs/dataflow/build/xcodeide/dataflow.xcodeproj/project.pbxproj
==============================================================================
--- sandbox/dataflow-rewrite/libs/dataflow/build/xcodeide/dataflow.xcodeproj/project.pbxproj (original)
+++ sandbox/dataflow-rewrite/libs/dataflow/build/xcodeide/dataflow.xcodeproj/project.pbxproj 2008-10-14 21:36:37 EDT (Tue, 14 Oct 2008)
@@ -29,6 +29,17 @@
                         name = example;
                         productName = test;
                 };
+ 08A0FF910E8B40C1000F0F8F /* build clean */ = {
+ isa = PBXAggregateTarget;
+ buildConfigurationList = 08A0FF930E8B40C1000F0F8F /* Build configuration list for PBXAggregateTarget "build clean" */;
+ buildPhases = (
+ 08A0FF920E8B40C1000F0F8F /* ShellScript */,
+ );
+ dependencies = (
+ );
+ name = "build clean";
+ productName = test;
+ };
                 08C675740C139E1300D85379 /* test clean */ = {
                         isa = PBXAggregateTarget;
                         buildConfigurationList = 08C675750C139E3100D85379 /* Build configuration list for PBXAggregateTarget "test clean" */;
@@ -40,6 +51,17 @@
                         name = "test clean";
                         productName = "clean test";
                 };
+ 08D966C00E83BC3B00087C6F /* build */ = {
+ isa = PBXAggregateTarget;
+ buildConfigurationList = 08D966C20E83BC3B00087C6F /* Build configuration list for PBXAggregateTarget "build" */;
+ buildPhases = (
+ 08D966C10E83BC3B00087C6F /* ShellScript */,
+ );
+ dependencies = (
+ );
+ name = build;
+ productName = test;
+ };
                 08F0836C0C1DF6DE00687E1B /* example clean */ = {
                         isa = PBXAggregateTarget;
                         buildConfigurationList = 08F0836E0C1DF6DE00687E1B /* Build configuration list for PBXAggregateTarget "example clean" */;
@@ -76,7 +98,31 @@
 /* End PBXAggregateTarget section */
 
 /* Begin PBXFileReference section */
+ 0826E25F0EA51BBC0090AB4E /* port_binary_operation.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = port_binary_operation.hpp; sourceTree = "<group>"; };
+ 0826E26C0EA523AE0090AB4E /* test_port_binary_operation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = test_port_binary_operation.cpp; sourceTree = "<group>"; };
+ 0826E2AE0EA526F70090AB4E /* my_blueprint_ports.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = my_blueprint_ports.hpp; sourceTree = "<group>"; };
+ 0826E2DC0EA52A850090AB4E /* my_connect.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = my_connect.hpp; sourceTree = "<group>"; };
+ 0826E3130EA53A670090AB4E /* operation.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = operation.hpp; sourceTree = "<group>"; };
+ 0826E31A0EA53B690090AB4E /* semantics.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = semantics.hpp; sourceTree = "<group>"; };
+ 0826E32F0EA53E360090AB4E /* test_operation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = test_operation.cpp; sourceTree = "<group>"; };
+ 0826E3370EA53F0C0090AB4E /* guarded_enable_if_type.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = guarded_enable_if_type.hpp; sourceTree = "<group>"; };
+ 0826E33A0EA53F4C0090AB4E /* all_of.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = all_of.hpp; sourceTree = "<group>"; };
+ 0826E38D0EA542730090AB4E /* operation.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = operation.hpp; sourceTree = "<group>"; };
+ 0826E3950EA543F60090AB4E /* operation_adapter.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = operation_adapter.hpp; sourceTree = "<group>"; };
+ 0826E39B0EA5463A0090AB4E /* test_operation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = test_operation.cpp; sourceTree = "<group>"; };
+ 0826E3FA0EA5537B0090AB4E /* framework_object.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = framework_object.hpp; sourceTree = "<group>"; };
+ 0826E3FD0EA55D1B0090AB4E /* test_framework_object.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = test_framework_object.cpp; sourceTree = "<group>"; };
+ 0826E43A0EA562160090AB4E /* port_binary_operation_implementation.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = port_binary_operation_implementation.hpp; sourceTree = "<group>"; };
+ 0826E4470EA563930090AB4E /* port_binary_operation_implementation_adapter.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = port_binary_operation_implementation_adapter.hpp; sourceTree = "<group>"; };
+ 0826E44D0EA566F70090AB4E /* test_port_binary_operation_implementation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = test_port_binary_operation_implementation.cpp; sourceTree = "<group>"; };
+ 0826E4BB0EA57D110090AB4E /* castable_polymorphic_object.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = castable_polymorphic_object.hpp; sourceTree = "<group>"; };
+ 087535BE0E9C141200AD4E99 /* my_blueprint_framework.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = my_blueprint_framework.hpp; sourceTree = "<group>"; };
+ 087535C70E9C1BCF00AD4E99 /* framework_entity_adapter.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = framework_entity_adapter.hpp; sourceTree = "<group>"; };
+ 0875360D0E9C29BC00AD4E99 /* port_adapter.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = port_adapter.hpp; sourceTree = "<group>"; };
+ 08960FE40E8B60C400FC2A70 /* specializable_operation.hpp.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = specializable_operation.hpp.py; sourceTree = "<group>"; };
                 0897C7860E838AEA00DD0CF9 /* framework.qbk */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = framework.qbk; sourceTree = "<group>"; };
+ 08982F6D0E8C5F8F008C1918 /* test_port_binary_operation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = test_port_binary_operation.cpp; sourceTree = "<group>"; };
+ 0898B4700E83E6E1004F3E91 /* port_binary_operation.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = port_binary_operation.hpp; sourceTree = "<group>"; };
                 089971740E83014B00284E42 /* dataflow.qbk */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = dataflow.qbk; sourceTree = "<group>"; };
                 089971750E83014B00284E42 /* Jamfile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.jam; path = Jamfile; sourceTree = "<group>"; };
                 089971830E83058D00284E42 /* binary_operable.qbk */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = binary_operable.qbk; sourceTree = "<group>"; };
@@ -88,6 +134,10 @@
                 0899718B0E83058D00284E42 /* examples.qbk */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = examples.qbk; sourceTree = "<group>"; };
                 0899718C0E83058D00284E42 /* introduction.qbk */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = introduction.qbk; sourceTree = "<group>"; };
                 0899718F0E83065400284E42 /* generic.qbk */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = generic.qbk; sourceTree = "<group>"; };
+ 089A28B10E8D96F2000FCCC9 /* my_framework.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = my_framework.hpp; sourceTree = "<group>"; };
+ 089A28B50E8D9772000FCCC9 /* my_ports.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = my_ports.hpp; sourceTree = "<group>"; };
+ 089A28D80E8D99BC000FCCC9 /* my_entity.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = my_entity.hpp; sourceTree = "<group>"; };
+ 08A0FF8A0E8B4012000F0F8F /* file_template.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = file_template.py; sourceTree = "<group>"; };
                 08A77AB30E4F91AA00B8793E /* Jamroot */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = Jamroot; path = ../../../../Jamroot; sourceTree = SOURCE_ROOT; };
                 08A77AB40E4F91AB00B8793E /* LICENSE_1_0.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = LICENSE_1_0.txt; path = ../../../../LICENSE_1_0.txt; sourceTree = SOURCE_ROOT; };
                 08A77ADC0E4FB06600B8793E /* framework.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = framework.hpp; sourceTree = "<group>"; };
@@ -107,10 +157,18 @@
                 08D965CA0E83A94E00087C6F /* traits.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = traits.hpp; sourceTree = "<group>"; };
                 08D965DB0E83AD4900087C6F /* test_port.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = test_port.cpp; sourceTree = "<group>"; };
                 08D9667F0E83B40B00087C6F /* test_port_categories.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = test_port_categories.cpp; sourceTree = "<group>"; };
+ 08D966BD0E83BB8A00087C6F /* Jamfile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.jam; path = Jamfile; sourceTree = "<group>"; };
                 08DD9DF90E7B22CA008DC46A /* default_framework_of.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = default_framework_of.hpp; sourceTree = "<group>"; };
                 08DD9DFA0E7B22DD008DC46A /* test_default_framework_of.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = test_default_framework_of.cpp; sourceTree = "<group>"; };
                 08DD9DFB0E7B22EF008DC46A /* traits_of.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = traits_of.hpp; sourceTree = "<group>"; };
                 08DD9E020E7B23AA008DC46A /* test_framework_entity_traits_of.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = test_framework_entity_traits_of.cpp; sourceTree = "<group>"; };
+ 08ED9F2C0E9AFE2000894656 /* Jamfile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.jam; path = Jamfile; sourceTree = "<group>"; };
+ 08ED9F2D0E9AFE4C00894656 /* test_framework_entity.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = test_framework_entity.cpp; sourceTree = "<group>"; };
+ 08ED9F330E9AFF6600894656 /* test_framework.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = test_framework.cpp; sourceTree = "<group>"; };
+ 08ED9F3B0E9B059A00894656 /* port.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = port.hpp; sourceTree = "<group>"; };
+ 08ED9F3E0E9B06FB00894656 /* test_port.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = test_port.cpp; sourceTree = "<group>"; };
+ 08EE1D6A0E95348400EF3E66 /* framework_entity.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = framework_entity.hpp; sourceTree = "<group>"; };
+ 08EE1D7C0E95453200EF3E66 /* framework.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = framework.hpp; sourceTree = "<group>"; };
 /* End PBXFileReference section */
 
 /* Begin PBXGroup section */
@@ -127,6 +185,14 @@
                         );
                         sourceTree = "<group>";
                 };
+ 0826E3190EA53B560090AB4E /* operation */ = {
+ isa = PBXGroup;
+ children = (
+ 0826E31A0EA53B690090AB4E /* semantics.hpp */,
+ );
+ path = operation;
+ sourceTree = "<group>";
+ };
                 08668C4D0C19A16300ACB19A /* example */ = {
                         isa = PBXGroup;
                         children = (
@@ -172,6 +238,9 @@
                 08A439340E295B35009845FD /* build */ = {
                         isa = PBXGroup;
                         children = (
+ 08A0FF8A0E8B4012000F0F8F /* file_template.py */,
+ 08D966BD0E83BB8A00087C6F /* Jamfile */,
+ 08960FE40E8B60C400FC2A70 /* specializable_operation.hpp.py */,
                         );
                         name = build;
                         path = ..;
@@ -180,6 +249,7 @@
                 08A77ACC0E4F941C00B8793E /* dataflow */ = {
                         isa = PBXGroup;
                         children = (
+ 08EE1D690E9533ED00EF3E66 /* blueprint */,
                                 08A77AEC0E4FB4C800B8793E /* utility */,
                                 08A77ACD0E4F941C00B8793E /* generic */,
                         );
@@ -190,10 +260,13 @@
                 08A77ACD0E4F941C00B8793E /* generic */ = {
                         isa = PBXGroup;
                         children = (
+ 0898B4700E83E6E1004F3E91 /* port_binary_operation.hpp */,
                                 08D965C50E83A83600087C6F /* port */,
                                 08A77ADC0E4FB06600B8793E /* framework.hpp */,
                                 08B8F1AD0E512D31000545B8 /* framework_entity.hpp */,
                                 08B8F1AB0E512CF7000545B8 /* framework_entity */,
+ 0826E3130EA53A670090AB4E /* operation.hpp */,
+ 0826E3190EA53B560090AB4E /* operation */,
                         );
                         path = generic;
                         sourceTree = "<group>";
@@ -202,7 +275,9 @@
                         isa = PBXGroup;
                         children = (
                                 08A77AED0E4FB4C800B8793E /* enable_if_type.hpp */,
+ 0826E3370EA53F0C0090AB4E /* guarded_enable_if_type.hpp */,
                                 08A77AEE0E4FB4C800B8793E /* is_type.hpp */,
+ 0826E33A0EA53F4C0090AB4E /* all_of.hpp */,
                         );
                         path = utility;
                         sourceTree = "<group>";
@@ -218,6 +293,12 @@
                                 08DD9E020E7B23AA008DC46A /* test_framework_entity_traits_of.cpp */,
                                 08D965DB0E83AD4900087C6F /* test_port.cpp */,
                                 08D9667F0E83B40B00087C6F /* test_port_categories.cpp */,
+ 08982F6D0E8C5F8F008C1918 /* test_port_binary_operation.cpp */,
+ 0826E32F0EA53E360090AB4E /* test_operation.cpp */,
+ 089A28B10E8D96F2000FCCC9 /* my_framework.hpp */,
+ 089A28B50E8D9772000FCCC9 /* my_ports.hpp */,
+ 089A28D80E8D99BC000FCCC9 /* my_entity.hpp */,
+ 0826E2DC0EA52A850090AB4E /* my_connect.hpp */,
                         );
                         path = generic;
                         sourceTree = "<group>";
@@ -236,6 +317,7 @@
                 08C675960C13A03E00D85379 /* test */ = {
                         isa = PBXGroup;
                         children = (
+ 08ED9F2B0E9AFE0F00894656 /* blueprint */,
                                 08A77AFF0E4FC51C00B8793E /* generic */,
                                 08A77B010E4FC51C00B8793E /* Jamfile */,
                         );
@@ -253,6 +335,42 @@
                         path = port;
                         sourceTree = "<group>";
                 };
+ 08ED9F2B0E9AFE0F00894656 /* blueprint */ = {
+ isa = PBXGroup;
+ children = (
+ 08ED9F2C0E9AFE2000894656 /* Jamfile */,
+ 08ED9F2D0E9AFE4C00894656 /* test_framework_entity.cpp */,
+ 08ED9F330E9AFF6600894656 /* test_framework.cpp */,
+ 08ED9F3E0E9B06FB00894656 /* test_port.cpp */,
+ 0826E26C0EA523AE0090AB4E /* test_port_binary_operation.cpp */,
+ 0826E44D0EA566F70090AB4E /* test_port_binary_operation_implementation.cpp */,
+ 0826E39B0EA5463A0090AB4E /* test_operation.cpp */,
+ 0826E3FD0EA55D1B0090AB4E /* test_framework_object.cpp */,
+ 087535BE0E9C141200AD4E99 /* my_blueprint_framework.hpp */,
+ 0826E2AE0EA526F70090AB4E /* my_blueprint_ports.hpp */,
+ );
+ path = blueprint;
+ sourceTree = "<group>";
+ };
+ 08EE1D690E9533ED00EF3E66 /* blueprint */ = {
+ isa = PBXGroup;
+ children = (
+ 08EE1D7C0E95453200EF3E66 /* framework.hpp */,
+ 08EE1D6A0E95348400EF3E66 /* framework_entity.hpp */,
+ 087535C70E9C1BCF00AD4E99 /* framework_entity_adapter.hpp */,
+ 08ED9F3B0E9B059A00894656 /* port.hpp */,
+ 0875360D0E9C29BC00AD4E99 /* port_adapter.hpp */,
+ 0826E25F0EA51BBC0090AB4E /* port_binary_operation.hpp */,
+ 0826E43A0EA562160090AB4E /* port_binary_operation_implementation.hpp */,
+ 0826E4470EA563930090AB4E /* port_binary_operation_implementation_adapter.hpp */,
+ 0826E38D0EA542730090AB4E /* operation.hpp */,
+ 0826E3950EA543F60090AB4E /* operation_adapter.hpp */,
+ 0826E3FA0EA5537B0090AB4E /* framework_object.hpp */,
+ 0826E4BB0EA57D110090AB4E /* castable_polymorphic_object.hpp */,
+ );
+ path = blueprint;
+ sourceTree = "<group>";
+ };
                 08FD5DE40C1BA60700F00877 /* doc */ = {
                         isa = PBXGroup;
                         children = (
@@ -282,6 +400,8 @@
                                 08FD5E6D0C1BA8BC00F00877 /* doc clean */,
                                 08668C500C19A16F00ACB19A /* example */,
                                 08F0836C0C1DF6DE00687E1B /* example clean */,
+ 08D966C00E83BC3B00087C6F /* build */,
+ 08A0FF910E8B40C1000F0F8F /* build clean */,
                         );
                 };
 /* End PBXProject section */
@@ -313,6 +433,19 @@
                         shellPath = /bin/sh;
                         shellScript = "# shell script goes here\nstyle=`echo $BUILD_STYLE | sed 'y/DR/dr/'` \nbjam --v2 ../../example $style";
                 };
+ 08A0FF920E8B40C1000F0F8F /* ShellScript */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "# shell script goes here\nstyle=`echo $BUILD_STYLE | sed 'y/DR/dr/'` \nbjam ../../build $style clean";
+ };
                 08C675730C139E1300D85379 /* ShellScript */ = {
                         isa = PBXShellScriptBuildPhase;
                         buildActionMask = 2147483647;
@@ -326,6 +459,19 @@
                         shellPath = /bin/sh;
                         shellScript = "# shell script goes here\nstyle=`echo $BUILD_STYLE | sed 'y/DR/dr/'` \nbjam --v2 --clean ../../test $style";
                 };
+ 08D966C10E83BC3B00087C6F /* ShellScript */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "# shell script goes here\nstyle=`echo $BUILD_STYLE | sed 'y/DR/dr/'` \nbjam ../../build $style";
+ };
                 08F0836D0C1DF6DE00687E1B /* ShellScript */ = {
                         isa = PBXShellScriptBuildPhase;
                         buildActionMask = 2147483647;
@@ -426,6 +572,28 @@
                         };
                         name = Release;
                 };
+ 08A0FF940E8B40C1000F0F8F /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = NO;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ PRODUCT_NAME = test;
+ };
+ name = Debug;
+ };
+ 08A0FF950E8B40C1000F0F8F /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = YES;
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
+ PRODUCT_NAME = test;
+ ZERO_LINK = NO;
+ };
+ name = Release;
+ };
                 08C675760C139E3100D85379 /* Debug */ = {
                         isa = XCBuildConfiguration;
                         buildSettings = {
@@ -448,6 +616,28 @@
                         };
                         name = Release;
                 };
+ 08D966C30E83BC3B00087C6F /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = NO;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ PRODUCT_NAME = test;
+ };
+ name = Debug;
+ };
+ 08D966C40E83BC3B00087C6F /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = YES;
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
+ PRODUCT_NAME = test;
+ ZERO_LINK = NO;
+ };
+ name = Release;
+ };
                 08F0836F0C1DF6DE00687E1B /* Debug */ = {
                         isa = XCBuildConfiguration;
                         buildSettings = {
@@ -544,6 +734,15 @@
                         defaultConfigurationIsVisible = 0;
                         defaultConfigurationName = Release;
                 };
+ 08A0FF930E8B40C1000F0F8F /* Build configuration list for PBXAggregateTarget "build clean" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 08A0FF940E8B40C1000F0F8F /* Debug */,
+ 08A0FF950E8B40C1000F0F8F /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
                 08C675750C139E3100D85379 /* Build configuration list for PBXAggregateTarget "test clean" */ = {
                         isa = XCConfigurationList;
                         buildConfigurations = (
@@ -553,6 +752,15 @@
                         defaultConfigurationIsVisible = 0;
                         defaultConfigurationName = Release;
                 };
+ 08D966C20E83BC3B00087C6F /* Build configuration list for PBXAggregateTarget "build" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 08D966C30E83BC3B00087C6F /* Debug */,
+ 08D966C40E83BC3B00087C6F /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
                 08F0836E0C1DF6DE00687E1B /* Build configuration list for PBXAggregateTarget "example clean" */ = {
                         isa = XCConfigurationList;
                         buildConfigurations = (

Modified: sandbox/dataflow-rewrite/libs/dataflow/doc/Jamfile
==============================================================================
--- sandbox/dataflow-rewrite/libs/dataflow/doc/Jamfile (original)
+++ sandbox/dataflow-rewrite/libs/dataflow/doc/Jamfile 2008-10-14 21:36:37 EDT (Tue, 14 Oct 2008)
@@ -1,7 +1,10 @@
-# 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)
+#==================================---------------------------------------------
+# Copyright 2008 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)
+#----------------------------------------------===============================*/
 
 
 project boost/dataflow/doc ;

Modified: sandbox/dataflow-rewrite/libs/dataflow/test/Jamfile
==============================================================================
--- sandbox/dataflow-rewrite/libs/dataflow/test/Jamfile (original)
+++ sandbox/dataflow-rewrite/libs/dataflow/test/Jamfile 2008-10-14 21:36:37 EDT (Tue, 14 Oct 2008)
@@ -16,3 +16,4 @@
     ;
 
 build-project generic ;
+build-project blueprint ;

Added: sandbox/dataflow-rewrite/libs/dataflow/test/blueprint/Jamfile
==============================================================================
--- (empty file)
+++ sandbox/dataflow-rewrite/libs/dataflow/test/blueprint/Jamfile 2008-10-14 21:36:37 EDT (Tue, 14 Oct 2008)
@@ -0,0 +1,16 @@
+#==================================---------------------------------------------
+# Copyright 2008 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)
+#----------------------------------------------===============================*/
+
+
+run test_framework.cpp ;
+run test_framework_entity.cpp ;
+run test_port.cpp ;
+run test_port_binary_operation.cpp ;
+run test_port_binary_operation_implementation.cpp ;
+run test_operation.cpp ;
+run test_framework_object.cpp ;

Added: sandbox/dataflow-rewrite/libs/dataflow/test/blueprint/my_blueprint_framework.hpp
==============================================================================
--- (empty file)
+++ sandbox/dataflow-rewrite/libs/dataflow/test/blueprint/my_blueprint_framework.hpp 2008-10-14 21:36:37 EDT (Tue, 14 Oct 2008)
@@ -0,0 +1,16 @@
+/*=================================---------------------------------------------
+ Copyright 2008 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/dataflow/blueprint/framework.hpp>
+
+#include "../generic/my_framework.hpp"
+
+namespace df = boost::dataflow;
+
+typedef df::blueprint::framework<my_framework> my_blueprint_framework;

Added: sandbox/dataflow-rewrite/libs/dataflow/test/blueprint/my_blueprint_ports.hpp
==============================================================================
--- (empty file)
+++ sandbox/dataflow-rewrite/libs/dataflow/test/blueprint/my_blueprint_ports.hpp 2008-10-14 21:36:37 EDT (Tue, 14 Oct 2008)
@@ -0,0 +1,17 @@
+/*=================================---------------------------------------------
+ Copyright 2008 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/dataflow/blueprint/port_adapter.hpp>
+
+#include "my_blueprint_framework.hpp"
+#include "../generic/my_ports.hpp"
+
+
+typedef df::blueprint::port_adapter<my_blueprint_framework, my_port_producer> my_blueprint_port_producer;
+typedef df::blueprint::port_adapter<my_blueprint_framework, my_port_consumer> my_blueprint_port_consumer;

Added: sandbox/dataflow-rewrite/libs/dataflow/test/blueprint/test_framework.cpp
==============================================================================
--- (empty file)
+++ sandbox/dataflow-rewrite/libs/dataflow/test/blueprint/test_framework.cpp 2008-10-14 21:36:37 EDT (Tue, 14 Oct 2008)
@@ -0,0 +1,21 @@
+/*=================================---------------------------------------------
+ Copyright 2008 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 "my_blueprint_framework.hpp"
+
+#include <boost/type_traits/is_same.hpp>
+
+#define BOOST_TEST_MAIN
+#include <boost/test/unit_test.hpp>
+
+
+BOOST_AUTO_TEST_CASE( test )
+{
+ BOOST_CHECK((df::is_framework<my_blueprint_framework>::value));
+ BOOST_CHECK((boost::is_same<my_blueprint_framework::framework_type, my_framework>::value));
+}

Added: sandbox/dataflow-rewrite/libs/dataflow/test/blueprint/test_framework_entity.cpp
==============================================================================
--- (empty file)
+++ sandbox/dataflow-rewrite/libs/dataflow/test/blueprint/test_framework_entity.cpp 2008-10-14 21:36:37 EDT (Tue, 14 Oct 2008)
@@ -0,0 +1,30 @@
+/*=================================---------------------------------------------
+ Copyright 2008 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/dataflow/blueprint/framework_entity.hpp>
+#include <boost/dataflow/blueprint/framework_entity_adapter.hpp>
+
+#include "my_blueprint_framework.hpp"
+#include "../generic/my_ports.hpp"
+
+#define BOOST_TEST_MAIN
+#include <boost/test/unit_test.hpp>
+
+namespace df = boost::dataflow;
+
+
+BOOST_AUTO_TEST_CASE( test )
+{
+ my_port_producer p;
+ df::blueprint::framework_entity_adapter<my_blueprint_framework, my_port_producer &> ref_entity(p);
+ df::blueprint::framework_entity_adapter<my_blueprint_framework, my_port_producer> composition_entity;
+
+ BOOST_CHECK(ref_entity.type_info() == typeid(p));
+ BOOST_CHECK(composition_entity.type_info() == typeid(p));
+}

Added: sandbox/dataflow-rewrite/libs/dataflow/test/blueprint/test_framework_object.cpp
==============================================================================
--- (empty file)
+++ sandbox/dataflow-rewrite/libs/dataflow/test/blueprint/test_framework_object.cpp 2008-10-14 21:36:37 EDT (Tue, 14 Oct 2008)
@@ -0,0 +1,28 @@
+/*=================================---------------------------------------------
+ Copyright 2008 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/dataflow/blueprint/framework_object.hpp>
+
+#include "my_blueprint_framework.hpp"
+#include "../generic/my_connect.hpp"
+
+#define BOOST_TEST_MAIN
+#include <boost/test/unit_test.hpp>
+
+
+namespace df = boost::dataflow;
+
+
+BOOST_AUTO_TEST_CASE( test )
+{
+ df::blueprint::framework_object<my_blueprint_framework> object;
+ object.register_operation<my_port_producer, my_port_consumer, connect>();
+ BOOST_CHECK((object.has_registered_operation<my_port_producer, my_port_consumer, connect>()));
+ BOOST_CHECK((!object.has_registered_operation<my_port_consumer, my_port_producer, connect>()));
+}

Added: sandbox/dataflow-rewrite/libs/dataflow/test/blueprint/test_operation.cpp
==============================================================================
--- (empty file)
+++ sandbox/dataflow-rewrite/libs/dataflow/test/blueprint/test_operation.cpp 2008-10-14 21:36:37 EDT (Tue, 14 Oct 2008)
@@ -0,0 +1,25 @@
+/*=================================---------------------------------------------
+ Copyright 2008 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/dataflow/blueprint/operation_adapter.hpp>
+
+#include "../generic/my_connect.hpp"
+
+#define BOOST_TEST_MAIN
+#include <boost/test/unit_test.hpp>
+
+
+namespace df = boost::dataflow;
+
+
+BOOST_AUTO_TEST_CASE( test )
+{
+ df::blueprint::operation_adapter<connect> c;
+ df::blueprint::operation_adapter<connect> c10(10);
+}

Added: sandbox/dataflow-rewrite/libs/dataflow/test/blueprint/test_port.cpp
==============================================================================
--- (empty file)
+++ sandbox/dataflow-rewrite/libs/dataflow/test/blueprint/test_port.cpp 2008-10-14 21:36:37 EDT (Tue, 14 Oct 2008)
@@ -0,0 +1,23 @@
+/*=================================---------------------------------------------
+ Copyright 2008 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 "my_blueprint_ports.hpp"
+
+#define BOOST_TEST_MAIN
+#include <boost/test/unit_test.hpp>
+
+
+namespace df = boost::dataflow;
+
+
+BOOST_AUTO_TEST_CASE( test )
+{
+ my_blueprint_port_producer producer;
+ my_blueprint_port_consumer consumer;
+}

Added: sandbox/dataflow-rewrite/libs/dataflow/test/blueprint/test_port_binary_operation.cpp
==============================================================================
--- (empty file)
+++ sandbox/dataflow-rewrite/libs/dataflow/test/blueprint/test_port_binary_operation.cpp 2008-10-14 21:36:37 EDT (Tue, 14 Oct 2008)
@@ -0,0 +1,33 @@
+/*=================================---------------------------------------------
+ Copyright 2008 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/dataflow/blueprint/port_binary_operation.hpp>
+#include <boost/dataflow/blueprint/operation_adapter.hpp>
+
+#include "my_blueprint_ports.hpp"
+#include "../generic/my_connect.hpp"
+
+#define BOOST_TEST_MAIN
+#include <boost/test/unit_test.hpp>
+
+
+namespace df = boost::dataflow;
+
+
+BOOST_AUTO_TEST_CASE( test )
+{
+ my_blueprint_port_producer producer;
+ my_blueprint_port_consumer consumer;
+ df::blueprint::operation_adapter<connect> blueprint_connect;
+
+ BOOST_CHECK(( df::are_port_binary_operable<my_blueprint_port_producer, my_blueprint_port_consumer, df::blueprint::operation>::value ));
+ BOOST_CHECK(( df::are_port_binary_operable<my_blueprint_port_consumer, my_blueprint_port_producer, df::blueprint::operation>::value ));
+ BOOST_CHECK(( !df::port_binary_operation_will_succeed<df::blueprint::operation>(producer, consumer, blueprint_connect) ));
+ BOOST_CHECK(( !df::port_binary_operation_will_succeed<df::blueprint::operation>(consumer, producer, blueprint_connect) ));
+}

Added: sandbox/dataflow-rewrite/libs/dataflow/test/blueprint/test_port_binary_operation_implementation.cpp
==============================================================================
--- (empty file)
+++ sandbox/dataflow-rewrite/libs/dataflow/test/blueprint/test_port_binary_operation_implementation.cpp 2008-10-14 21:36:37 EDT (Tue, 14 Oct 2008)
@@ -0,0 +1,29 @@
+/*=================================---------------------------------------------
+ Copyright 2008 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/dataflow/blueprint/port_binary_operation_implementation_adapter.hpp>
+
+#include "my_blueprint_ports.hpp"
+#include "../generic/my_connect.hpp"
+
+#define BOOST_TEST_MAIN
+#include <boost/test/unit_test.hpp>
+
+
+namespace df = boost::dataflow;
+
+
+BOOST_AUTO_TEST_CASE( test )
+{
+ my_blueprint_port_producer producer;
+ my_blueprint_port_consumer consumer;
+
+ std::auto_ptr<df::blueprint::port_binary_operation_implementation<my_blueprint_framework> >
+ op(new df::blueprint::port_binary_operation_implementation_adapter<my_port_producer, my_port_consumer, connect, my_blueprint_framework>);
+}

Modified: sandbox/dataflow-rewrite/libs/dataflow/test/generic/Jamfile
==============================================================================
--- sandbox/dataflow-rewrite/libs/dataflow/test/generic/Jamfile (original)
+++ sandbox/dataflow-rewrite/libs/dataflow/test/generic/Jamfile 2008-10-14 21:36:37 EDT (Tue, 14 Oct 2008)
@@ -15,3 +15,6 @@
 
 run test_port_categories.cpp ;
 run test_port.cpp ;
+
+run test_port_binary_operation.cpp ;
+run test_operation.cpp ;

Added: sandbox/dataflow-rewrite/libs/dataflow/test/generic/my_connect.hpp
==============================================================================
--- (empty file)
+++ sandbox/dataflow-rewrite/libs/dataflow/test/generic/my_connect.hpp 2008-10-14 21:36:37 EDT (Tue, 14 Oct 2008)
@@ -0,0 +1,52 @@
+/*=================================---------------------------------------------
+ Copyright 2008 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/dataflow/generic/port_binary_operation.hpp>
+#include <boost/dataflow/generic/operation.hpp>
+#include "my_ports.hpp"
+
+
+struct connect : public df::operation<df::semantics::connect>
+{
+ connect()
+ : value()
+ {}
+ connect(int v)
+ : value(v)
+ {}
+ int value;
+};
+
+namespace boost { namespace dataflow { namespace extension {
+
+template<>
+struct port_binary_operation_impl<my_port_producer_traits, my_port_consumer_traits, connect>
+{
+ typedef int result_type;
+
+ template<typename Port1, typename Port2>
+ int operator()(Port1 &port1, Port2 &port2, connect op)
+ {
+ return op.value;
+ }
+};
+
+template<>
+struct port_binary_operation_will_succeed_impl<my_port_producer_traits, my_port_consumer_traits, connect>
+{
+ typedef bool result_type;
+
+ template<typename Port1, typename Port2>
+ bool operator()(Port1 &port1, Port2 &port2, connect op)
+ {
+ return op.value < 10;
+ }
+};
+
+}}}

Added: sandbox/dataflow-rewrite/libs/dataflow/test/generic/my_entity.hpp
==============================================================================

Added: sandbox/dataflow-rewrite/libs/dataflow/test/generic/my_framework.hpp
==============================================================================
--- (empty file)
+++ sandbox/dataflow-rewrite/libs/dataflow/test/generic/my_framework.hpp 2008-10-14 21:36:37 EDT (Tue, 14 Oct 2008)
@@ -0,0 +1,23 @@
+/*=================================---------------------------------------------
+ Copyright 2007,2008 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__TEST__GENERIC__MY_FRAMEWORK_HPP
+#define BOOST__DATAFLOW__TEST__GENERIC__MY_FRAMEWORK_HPP
+
+
+#include <boost/dataflow/generic/framework.hpp>
+#include <boost/mpl/vector.hpp>
+
+
+namespace df=boost::dataflow;
+
+struct my_framework : public df::framework<boost::mpl::vector<> >
+{};
+
+
+#endif // BOOST__DATAFLOW__TEST__GENERIC__MY_FRAMEWORK_HPP
\ No newline at end of file

Added: sandbox/dataflow-rewrite/libs/dataflow/test/generic/my_ports.hpp
==============================================================================
--- (empty file)
+++ sandbox/dataflow-rewrite/libs/dataflow/test/generic/my_ports.hpp 2008-10-14 21:36:37 EDT (Tue, 14 Oct 2008)
@@ -0,0 +1,28 @@
+/*=================================---------------------------------------------
+ Copyright 2007,2008 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__TEST__GENERIC__MY_PORT_HPP
+#define BOOST__DATAFLOW__TEST__GENERIC__MY_PORT_HPP
+
+#include <boost/dataflow/generic/port/port.hpp>
+
+#include "my_framework.hpp"
+
+namespace df=boost::dataflow;
+
+typedef df::port_traits<df::ports::producer, my_framework> my_port_producer_traits;
+
+struct my_port_producer : public df::port<my_port_producer_traits>
+{};
+
+typedef df::port_traits<df::ports::consumer, my_framework> my_port_consumer_traits;
+
+struct my_port_consumer : public df::port<my_port_consumer_traits>
+{};
+
+#endif // BOOST__DATAFLOW__TEST__GENERIC__MY_PORT_HPP
\ No newline at end of file

Modified: sandbox/dataflow-rewrite/libs/dataflow/test/generic/test_default_framework_of.cpp
==============================================================================
--- sandbox/dataflow-rewrite/libs/dataflow/test/generic/test_default_framework_of.cpp (original)
+++ sandbox/dataflow-rewrite/libs/dataflow/test/generic/test_default_framework_of.cpp 2008-10-14 21:36:37 EDT (Tue, 14 Oct 2008)
@@ -9,6 +9,7 @@
 
 #include <boost/dataflow/generic/framework_entity/default_framework_of.hpp>
 #include <boost/dataflow/generic/framework_entity/traits.hpp>
+#include "my_framework.hpp"
 
 #include <boost/preprocessor/comma.hpp>
 
@@ -18,8 +19,6 @@
 
 namespace df = boost::dataflow;
 
-struct my_framework : public df::framework_base
-{};
 
 struct no_traits
 {};

Modified: sandbox/dataflow-rewrite/libs/dataflow/test/generic/test_framework.cpp
==============================================================================
--- sandbox/dataflow-rewrite/libs/dataflow/test/generic/test_framework.cpp (original)
+++ sandbox/dataflow-rewrite/libs/dataflow/test/generic/test_framework.cpp 2008-10-14 21:36:37 EDT (Tue, 14 Oct 2008)
@@ -7,7 +7,7 @@
 -----------------------------------------------===============================*/
 
 
-#include <boost/dataflow/generic/framework.hpp>
+#include "my_framework.hpp"
 
 #define BOOST_TEST_MAIN
 #include <boost/test/unit_test.hpp>
@@ -17,9 +17,6 @@
 struct not_framework
 {};
 
-struct my_framework : public df::framework_base
-{};
-
 BOOST_AUTO_TEST_CASE( test )
 {
     BOOST_CHECK((df::is_framework<my_framework>::value));

Modified: sandbox/dataflow-rewrite/libs/dataflow/test/generic/test_framework_entity.cpp
==============================================================================
--- sandbox/dataflow-rewrite/libs/dataflow/test/generic/test_framework_entity.cpp (original)
+++ sandbox/dataflow-rewrite/libs/dataflow/test/generic/test_framework_entity.cpp 2008-10-14 21:36:37 EDT (Tue, 14 Oct 2008)
@@ -8,6 +8,7 @@
 
 
 #include <boost/dataflow/generic/framework_entity.hpp>
+#include "my_framework.hpp"
 
 #define BOOST_TEST_MAIN
 #include <boost/test/unit_test.hpp>
@@ -15,8 +16,6 @@
 
 namespace df = boost::dataflow;
 
-struct my_framework : public df::framework_base
-{};
 
 typedef df::traits<df::default_framework> default_traits;
 typedef df::traits<my_framework> my_traits;

Modified: sandbox/dataflow-rewrite/libs/dataflow/test/generic/test_framework_entity_traits_of.cpp
==============================================================================
--- sandbox/dataflow-rewrite/libs/dataflow/test/generic/test_framework_entity_traits_of.cpp (original)
+++ sandbox/dataflow-rewrite/libs/dataflow/test/generic/test_framework_entity_traits_of.cpp 2008-10-14 21:36:37 EDT (Tue, 14 Oct 2008)
@@ -8,6 +8,7 @@
 
 
 #include <boost/dataflow/generic/framework_entity/traits_of.hpp>
+#include "my_framework.hpp"
 
 #define BOOST_TEST_MAIN
 #include <boost/test/unit_test.hpp>
@@ -15,8 +16,6 @@
 
 namespace df = boost::dataflow;
 
-struct my_framework : public df::framework_base
-{};
 
 typedef df::traits<df::default_framework> default_traits;
 typedef df::traits<my_framework> my_traits;

Added: sandbox/dataflow-rewrite/libs/dataflow/test/generic/test_operation.cpp
==============================================================================
--- (empty file)
+++ sandbox/dataflow-rewrite/libs/dataflow/test/generic/test_operation.cpp 2008-10-14 21:36:37 EDT (Tue, 14 Oct 2008)
@@ -0,0 +1,22 @@
+/*=================================---------------------------------------------
+ Copyright 2007,2008 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/dataflow/generic/operation.hpp>
+
+#include "my_connect.hpp"
+
+#define BOOST_TEST_MAIN
+#include <boost/test/unit_test.hpp>
+
+namespace df=boost::dataflow;
+
+BOOST_AUTO_TEST_CASE( test )
+{
+ BOOST_CHECK((df::is_operation<connect>::value));
+}
\ No newline at end of file

Modified: sandbox/dataflow-rewrite/libs/dataflow/test/generic/test_port.cpp
==============================================================================
--- sandbox/dataflow-rewrite/libs/dataflow/test/generic/test_port.cpp (original)
+++ sandbox/dataflow-rewrite/libs/dataflow/test/generic/test_port.cpp 2008-10-14 21:36:37 EDT (Tue, 14 Oct 2008)
@@ -1,20 +1,21 @@
-// Copyright Stjepan Rajko 2007, 2008. 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)
+/*=================================---------------------------------------------
+ Copyright 2007,2008 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/dataflow/generic/port/port.hpp>
-
 #include <boost/dataflow/generic/framework_entity.hpp>
+#include "my_framework.hpp"
 
 #define BOOST_TEST_MAIN
 #include <boost/test/unit_test.hpp>
 
 namespace df=boost::dataflow;
 
-struct my_framework : public df::framework_base
-{};
 
 struct my_port : public df::port<df::port_traits<df::ports::producer, my_framework> >
 {};

Added: sandbox/dataflow-rewrite/libs/dataflow/test/generic/test_port_binary_operation.cpp
==============================================================================
--- (empty file)
+++ sandbox/dataflow-rewrite/libs/dataflow/test/generic/test_port_binary_operation.cpp 2008-10-14 21:36:37 EDT (Tue, 14 Oct 2008)
@@ -0,0 +1,56 @@
+/*=================================---------------------------------------------
+ Copyright 2007,2008 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 "my_connect.hpp"
+#include <boost/dataflow/generic/port/port.hpp>
+
+#include "my_ports.hpp"
+#include "my_entity.hpp"
+
+#include <boost/type_traits/is_same.hpp>
+
+#define BOOST_TEST_MAIN
+#include <boost/test/unit_test.hpp>
+
+namespace df=boost::dataflow;
+
+BOOST_AUTO_TEST_CASE( test )
+{
+ BOOST_CHECK((df::are_port_binary_operable<my_port_producer, my_port_consumer, connect>::value));
+ BOOST_CHECK((!df::are_port_binary_operable<my_port_consumer, my_port_producer, connect>::value));
+// BOOST_CHECK((!df::are_port_binary_operable<my_port_producer, my_port_consumer, connect, df::default_framework>::value));
+ BOOST_CHECK_EQUAL(
+ (df::port_binary_operation_will_succeed<connect>(my_port_consumer(), my_port_producer())),
+ 0);
+
+ BOOST_CHECK((
+ boost::is_same<
+ df::result_of::port_binary_operation<my_port_producer, my_port_consumer, connect>::type,
+ int
+ >::value));
+
+ BOOST_CHECK_EQUAL(
+ (df::port_binary_operation_framework<connect, my_framework, my_framework>(my_port_producer(), my_port_consumer(), connect(1))),
+ 1);
+ BOOST_CHECK_EQUAL(
+ (df::port_binary_operation<connect>(my_port_producer(), my_port_consumer(), connect(2))),
+ 2);
+ BOOST_CHECK_EQUAL(
+ (df::port_binary_operation_framework<connect, my_framework, my_framework>(my_port_producer(), my_port_consumer())),
+ 0);
+ BOOST_CHECK_EQUAL(
+ (df::port_binary_operation<connect>(my_port_producer(), my_port_consumer())),
+ 0);
+ BOOST_CHECK_EQUAL(
+ (df::port_binary_operation_will_succeed<connect>(my_port_producer(), my_port_consumer())),
+ 1);
+ BOOST_CHECK_EQUAL(
+ (df::port_binary_operation_will_succeed<connect>(my_port_producer(), my_port_consumer(), connect(11))),
+ 0);
+}
\ No newline at end of file

Modified: sandbox/dataflow-rewrite/libs/dataflow/test/generic/test_port_categories.cpp
==============================================================================
--- sandbox/dataflow-rewrite/libs/dataflow/test/generic/test_port_categories.cpp (original)
+++ sandbox/dataflow-rewrite/libs/dataflow/test/generic/test_port_categories.cpp 2008-10-14 21:36:37 EDT (Tue, 14 Oct 2008)
@@ -1,10 +1,13 @@
-// Copyright Stjepan Rajko 2007, 2008. 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)
+/*=================================---------------------------------------------
+ Copyright 2007,2008 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/dataflow/generic/port/categories.hpp>
+#include <boost/dataflow/generic/port/category.hpp>
 
 #define BOOST_TEST_MAIN
 #include <boost/test/unit_test.hpp>


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