Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r50097 - in sandbox/dataflow-rewrite: boost/dataflow/managed libs/dataflow/build/xcodeide/dataflow.xcodeproj libs/dataflow/example/vivid libs/dataflow/test/managed
From: stipe_at_[hidden]
Date: 2008-12-03 16:15:04


Author: srajko
Date: 2008-12-03 16:15:03 EST (Wed, 03 Dec 2008)
New Revision: 50097
URL: http://svn.boost.org/trac/boost/changeset/50097

Log:
renamed managed::fusion_component to io_component
Added:
   sandbox/dataflow-rewrite/boost/dataflow/managed/io_component.hpp (contents, props changed)
      - copied, changed from r49950, /sandbox/dataflow-rewrite/boost/dataflow/managed/fusion_component.hpp
   sandbox/dataflow-rewrite/libs/dataflow/test/managed/test_io_component.cpp (contents, props changed)
      - copied, changed from r49950, /sandbox/dataflow-rewrite/libs/dataflow/test/managed/test_fusion_component.cpp
Removed:
   sandbox/dataflow-rewrite/boost/dataflow/managed/fusion_component.hpp
   sandbox/dataflow-rewrite/libs/dataflow/test/managed/test_fusion_component.cpp
Text files modified:
   sandbox/dataflow-rewrite/boost/dataflow/managed/io_component.hpp | 10 +++++-----
   sandbox/dataflow-rewrite/libs/dataflow/build/xcodeide/dataflow.xcodeproj/project.pbxproj | 37 +++++++++++++++++++++++++++++++++----
   sandbox/dataflow-rewrite/libs/dataflow/example/vivid/vivid_managed_example.cpp | 24 ++++++++++++------------
   sandbox/dataflow-rewrite/libs/dataflow/test/managed/Jamfile | 3 +--
   sandbox/dataflow-rewrite/libs/dataflow/test/managed/test_io_component.cpp | 4 ++--
   5 files changed, 53 insertions(+), 25 deletions(-)

Deleted: sandbox/dataflow-rewrite/boost/dataflow/managed/fusion_component.hpp
==============================================================================
--- sandbox/dataflow-rewrite/boost/dataflow/managed/fusion_component.hpp 2008-12-03 16:15:03 EST (Wed, 03 Dec 2008)
+++ (empty file)
@@ -1,141 +0,0 @@
-// 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_MANAGED_FUSION_COMPONENT_HPP
-#define BOOST_DATAFLOW_MANAGED_FUSION_COMPONENT_HPP
-
-#include <boost/dataflow/detail/make_ref.hpp>
-#include <boost/dataflow/generic/static_vector.hpp>
-#include <boost/dataflow/managed/port.hpp>
-#include <boost/dataflow/managed/component.hpp>
-//#include <boost/dataflow/support/component_operation.hpp>
-#include <boost/dataflow/utility/forced_sequence.hpp>
-//#include <boost/fusion/container/lazy_sequence.hpp>
-#include <boost/fusion/include/as_vector.hpp>
-#include <boost/fusion/include/size.hpp>
-#include <boost/fusion/include/transform.hpp>
-#include <boost/mpl/map.hpp>
-#include <boost/mpl/joint_view.hpp>
-#include <boost/mpl/vector.hpp>
-#include <boost/mpl/range_c.hpp>
-#include <boost/mpl/transform.hpp>
-
-
-namespace boost { namespace dataflow { namespace managed {
-
-namespace detail
-{
- struct add_reference;
-
- template<typename T, typename PortCategory>
- struct make_managed_port
- {
- typedef managed::port<T, PortCategory> type;
- };
-
- template<typename ConsumerSignatures, typename ProducerSignatures>
- struct make_fusion_ports
- {
- typedef typename fusion::result_of::as_vector<
- mpl::joint_view<
- typename mpl::transform<
- ConsumerSignatures,
- make_managed_port<mpl::_1, ports::consumer>
- >::type,
- typename mpl::transform<
- ProducerSignatures,
- make_managed_port<mpl::_1, ports::producer>
- >::type
- >
- >::type type;
- };
-
-}
-
-template<typename InTypes, typename OutTypes>
-struct component_traits
- : public dataflow::static_vector_traits
- <
- typename detail::make_fusion_ports<InTypes, OutTypes>::type,
- managed::framework
- >
-{};
-
-namespace detail {
-
- struct component_f
- {
- typedef component &result_type;
-
- component_f(component &c)
- : m_component(c) {}
-
- template<typename Index>
- result_type operator()(Index) const
- { return m_component; }
-
- mutable result_type m_component;
- };
-
-}
-
-template<typename InTypes, typename OutTypes=InTypes>
-class fusion_component : public component
-{
-public:
- typedef typename dataflow::utility::forced_sequence<InTypes>::type in_types_sequence;
- typedef typename dataflow::utility::forced_sequence<OutTypes>::type out_types_sequence;
-
- typedef component_traits<in_types_sequence, out_types_sequence> dataflow_traits;
- typedef typename detail::make_fusion_ports<in_types_sequence, out_types_sequence>::type ports_type;
-
- fusion_component(network &n)
- : component(n)
- , m_ports(fusion::transform(mpl::range_c<int,0,fusion::result_of::size<ports_type>::type::value>(), detail::component_f(*this)))
- {}
- template<int Index>
- typename fusion::result_of::at_c<ports_type, Index>::type port()
- { return fusion::at_c<Index>(m_ports); }
- ports_type &ports()
- { return m_ports; }
-protected:
- ports_type m_ports;
-};
-
-}
-
-namespace extension {
-
-/* template<typename InTypesSequence, typename OutTypesSequence>
- struct component_operation_impl<managed::component_traits<InTypesSequence,OutTypesSequence>, operations::invoke >
- {
- typedef void result_type;
-
- template<typename Component>
- void operator()(Component &component)
- {
- component.invoke();
- }
- };*/
-
-
- template<typename InTypesSequence, typename OutTypesSequence>
- struct entities_impl<managed::component_traits<InTypesSequence,OutTypesSequence> >
- {
- typedef typename managed::component_traits<InTypesSequence,OutTypesSequence>::entity_sequence & result_type;
-
- template<typename Entity>
- result_type operator()(Entity &entity) const
- {
- return entity.ports();
- }
-
- };
-
-}
-
-} }
-
-#endif // BOOST_DATAFLOW_MANAGED_FUSION_COMPONENT_HPP

Copied: sandbox/dataflow-rewrite/boost/dataflow/managed/io_component.hpp (from r49950, /sandbox/dataflow-rewrite/boost/dataflow/managed/fusion_component.hpp)
==============================================================================
--- /sandbox/dataflow-rewrite/boost/dataflow/managed/fusion_component.hpp (original)
+++ sandbox/dataflow-rewrite/boost/dataflow/managed/io_component.hpp 2008-12-03 16:15:03 EST (Wed, 03 Dec 2008)
@@ -3,8 +3,8 @@
 // accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 
-#ifndef BOOST_DATAFLOW_MANAGED_FUSION_COMPONENT_HPP
-#define BOOST_DATAFLOW_MANAGED_FUSION_COMPONENT_HPP
+#ifndef BOOST_DATAFLOW_MANAGED_IO_COMPONENT_HPP
+#define BOOST_DATAFLOW_MANAGED_IO_COMPONENT_HPP
 
 #include <boost/dataflow/detail/make_ref.hpp>
 #include <boost/dataflow/generic/static_vector.hpp>
@@ -82,7 +82,7 @@
 }
 
 template<typename InTypes, typename OutTypes=InTypes>
-class fusion_component : public component
+class io_component : public component
 {
 public:
     typedef typename dataflow::utility::forced_sequence<InTypes>::type in_types_sequence;
@@ -91,7 +91,7 @@
     typedef component_traits<in_types_sequence, out_types_sequence> dataflow_traits;
     typedef typename detail::make_fusion_ports<in_types_sequence, out_types_sequence>::type ports_type;
     
- fusion_component(network &n)
+ io_component(network &n)
         : component(n)
         , m_ports(fusion::transform(mpl::range_c<int,0,fusion::result_of::size<ports_type>::type::value>(), detail::component_f(*this)))
     {}
@@ -138,4 +138,4 @@
 
 } }
 
-#endif // BOOST_DATAFLOW_MANAGED_FUSION_COMPONENT_HPP
+#endif // BOOST_DATAFLOW_MANAGED_IO_COMPONENT_HPP

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-12-03 16:15:03 EST (Wed, 03 Dec 2008)
@@ -160,6 +160,8 @@
                 08AA90410EAD43BA00409A2E /* Jamfile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.jam; path = Jamfile; sourceTree = "<group>"; };
                 08AA90440EAD43F700409A2E /* test_factory_window.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = test_factory_window.cpp; sourceTree = "<group>"; };
                 08AA90690EAD46A000409A2E /* Jamfile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.jam; path = Jamfile; sourceTree = "<group>"; };
+ 08AB471E0EE72D7F0068375D /* io_component.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = io_component.hpp; sourceTree = "<group>"; };
+ 08AB471F0EE72D940068375D /* test_io_component.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = test_io_component.cpp; sourceTree = "<group>"; };
                 08AB81AA0EC7A1F700A2B98A /* traits.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = traits.hpp; sourceTree = "<group>"; };
                 08AB81AB0EC7A20200A2B98A /* static_vector.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = static_vector.hpp; sourceTree = "<group>"; };
                 08AB81BB0EC7A50200A2B98A /* test_static_vector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = test_static_vector.cpp; sourceTree = "<group>"; };
@@ -171,8 +173,9 @@
                 08AD7BC50EDD17F6002E9432 /* dynamic_vector.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = dynamic_vector.hpp; sourceTree = "<group>"; };
                 08ADD5040EDCC92D00838188 /* test_static_vector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = test_static_vector.cpp; sourceTree = "<group>"; };
                 08ADD5080EDCC9A400838188 /* my_blueprint_static_vector.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = my_blueprint_static_vector.hpp; sourceTree = "<group>"; };
+ 08AEB3CA0EE71604009245DB /* component.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = component.cpp; sourceTree = "<group>"; };
+ 08AEB3CC0EE71617009245DB /* Jamfile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.jam; path = Jamfile; sourceTree = "<group>"; };
                 08B3CBF30EC8B532002D2124 /* component.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = component.hpp; sourceTree = "<group>"; };
- 08B3CBF40EC8B532002D2124 /* fusion_component.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = fusion_component.hpp; sourceTree = "<group>"; };
                 08B3CBF50EC8B532002D2124 /* network.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = network.hpp; sourceTree = "<group>"; };
                 08B3CBF60EC8B532002D2124 /* port.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = port.hpp; sourceTree = "<group>"; };
                 08B3CBF70EC8B532002D2124 /* runtime_support.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = runtime_support.hpp; sourceTree = "<group>"; };
@@ -181,7 +184,6 @@
                 08B3CC000EC8B6C2002D2124 /* framework_context_fwd.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = framework_context_fwd.hpp; sourceTree = "<group>"; };
                 08B3CC220EC8B7D3002D2124 /* my_framework_with_context.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = my_framework_with_context.hpp; sourceTree = "<group>"; };
                 08B3CC240EC8B823002D2124 /* Jamfile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.jam; path = Jamfile; sourceTree = "<group>"; };
- 08B3CC250EC8B823002D2124 /* test_fusion_component.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = test_fusion_component.cpp; sourceTree = "<group>"; };
                 08B3CC260EC8B823002D2124 /* test_network.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = test_network.cpp; sourceTree = "<group>"; };
                 08B3CC270EC8B823002D2124 /* test_port.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = test_port.cpp; sourceTree = "<group>"; };
                 08B3CC640EC8C73E002D2124 /* make_ref.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = make_ref.hpp; sourceTree = "<group>"; };
@@ -227,6 +229,7 @@
                                 08A77ACC0E4F941C00B8793E /* dataflow */,
                                 08A77AB30E4F91AA00B8793E /* Jamroot */,
                                 08A77AB40E4F91AB00B8793E /* LICENSE_1_0.txt */,
+ 08AEB3C80EE71604009245DB /* src */,
                                 08A439340E295B35009845FD /* build */,
                                 08FD5DE40C1BA60700F00877 /* doc */,
                                 08668C4D0C19A16300ACB19A /* example */,
@@ -310,6 +313,7 @@
                 08A439340E295B35009845FD /* build */ = {
                         isa = PBXGroup;
                         children = (
+ 08AEB3CB0EE71617009245DB /* managed */,
                                 08A0FF8A0E8B4012000F0F8F /* file_template.py */,
                                 08D966BD0E83BB8A00087C6F /* Jamfile */,
                                 08960FE40E8B60C400FC2A70 /* specializable_operation.hpp.py */,
@@ -446,11 +450,36 @@
                         path = dynamic_vector;
                         sourceTree = "<group>";
                 };
+ 08AEB3C80EE71604009245DB /* src */ = {
+ isa = PBXGroup;
+ children = (
+ 08AEB3C90EE71604009245DB /* managed */,
+ );
+ name = src;
+ path = ../../src;
+ sourceTree = SOURCE_ROOT;
+ };
+ 08AEB3C90EE71604009245DB /* managed */ = {
+ isa = PBXGroup;
+ children = (
+ 08AEB3CA0EE71604009245DB /* component.cpp */,
+ );
+ path = managed;
+ sourceTree = "<group>";
+ };
+ 08AEB3CB0EE71617009245DB /* managed */ = {
+ isa = PBXGroup;
+ children = (
+ 08AEB3CC0EE71617009245DB /* Jamfile */,
+ );
+ path = managed;
+ sourceTree = "<group>";
+ };
                 08B3CBF20EC8B532002D2124 /* managed */ = {
                         isa = PBXGroup;
                         children = (
+ 08AB471E0EE72D7F0068375D /* io_component.hpp */,
                                 08B3CBF30EC8B532002D2124 /* component.hpp */,
- 08B3CBF40EC8B532002D2124 /* fusion_component.hpp */,
                                 08B3CBF50EC8B532002D2124 /* network.hpp */,
                                 08B3CBF60EC8B532002D2124 /* port.hpp */,
                                 08B3CBF70EC8B532002D2124 /* runtime_support.hpp */,
@@ -463,7 +492,7 @@
                         isa = PBXGroup;
                         children = (
                                 08B3CC240EC8B823002D2124 /* Jamfile */,
- 08B3CC250EC8B823002D2124 /* test_fusion_component.cpp */,
+ 08AB471F0EE72D940068375D /* test_io_component.cpp */,
                                 08B3CC260EC8B823002D2124 /* test_network.cpp */,
                                 08B3CC270EC8B823002D2124 /* test_port.cpp */,
                         );

Modified: sandbox/dataflow-rewrite/libs/dataflow/example/vivid/vivid_managed_example.cpp
==============================================================================
--- sandbox/dataflow-rewrite/libs/dataflow/example/vivid/vivid_managed_example.cpp (original)
+++ sandbox/dataflow-rewrite/libs/dataflow/example/vivid/vivid_managed_example.cpp 2008-12-03 16:15:03 EST (Wed, 03 Dec 2008)
@@ -13,7 +13,7 @@
 #include <boost/guigl/application.hpp>
 #include <boost/guigl/widget/button.hpp>
 
-#include <boost/dataflow/managed/fusion_component.hpp>
+#include <boost/dataflow/managed/io_component.hpp>
 #include <boost/dataflow/managed/network.hpp>
 
 #include <boost/assign/std/vector.hpp>
@@ -22,17 +22,17 @@
 namespace blueprint=boost::dataflow::blueprint;
 namespace guigl=boost::guigl;
 
-using df::managed::fusion_component;
+using df::managed::io_component;
 
 typedef df::blueprint::framework<df::managed::framework> managed_blueprint_framework;
 
 // the input/output component (link between GUI and dataflow network)
-class io : public fusion_component<bool>, public guigl::widget::button
+class io : public io_component<bool>, public guigl::widget::button
 {
 public:
     typedef guigl::widget::button runtime_base_class_type;
     io(df::managed::network &network)
- : fusion_component<bool>(network)
+ : io_component<bool>(network)
         , guigl::widget::button(guigl::_size(100,100))
     {
 // anchor(glv::Place::CL);
@@ -54,11 +54,11 @@
 };
 
 // logical NOT component.
-class not_operation : public fusion_component<bool>
+class not_operation : public io_component<bool>
 {
 public:
     not_operation(df::managed::network &network)
- : fusion_component<bool>(network)
+ : io_component<bool>(network)
     {}
     void invoke()
     {
@@ -68,10 +68,10 @@
 };
 
 // logical AND component.
-class and_operation : public fusion_component<boost::mpl::vector<bool,bool>,bool>
+class and_operation : public io_component<boost::mpl::vector<bool,bool>,bool>
 {
 public:
- typedef fusion_component<boost::mpl::vector<bool,bool>,bool> base_type;
+ typedef io_component<boost::mpl::vector<bool,bool>,bool> base_type;
     
     and_operation(df::managed::network &network)
         : base_type(network)
@@ -86,10 +86,10 @@
 };
 
 // logical OR component.
-class or_operation : public fusion_component<boost::mpl::vector<bool,bool>,bool>
+class or_operation : public io_component<boost::mpl::vector<bool,bool>,bool>
 {
 public:
- typedef fusion_component<boost::mpl::vector<bool,bool>,bool> base_type;
+ typedef io_component<boost::mpl::vector<bool,bool>,bool> base_type;
     
     or_operation(df::managed::network &network)
         : base_type(network)
@@ -104,11 +104,11 @@
 };
 
 // This component requests a network update.
-class update_network : public fusion_component<bool>
+class update_network : public io_component<bool>
 {
 public:
     update_network(df::managed::network &network)
- : fusion_component<bool>(network)
+ : io_component<bool>(network)
     {}
     void invoke()
     {

Modified: sandbox/dataflow-rewrite/libs/dataflow/test/managed/Jamfile
==============================================================================
--- sandbox/dataflow-rewrite/libs/dataflow/test/managed/Jamfile (original)
+++ sandbox/dataflow-rewrite/libs/dataflow/test/managed/Jamfile 2008-12-03 16:15:03 EST (Wed, 03 Dec 2008)
@@ -15,4 +15,4 @@
 
 run test_port.cpp ;
 run test_network.cpp ;
-run test_fusion_component.cpp ;
+run test_io_component.cpp ;

Deleted: sandbox/dataflow-rewrite/libs/dataflow/test/managed/test_fusion_component.cpp
==============================================================================
--- sandbox/dataflow-rewrite/libs/dataflow/test/managed/test_fusion_component.cpp 2008-12-03 16:15:03 EST (Wed, 03 Dec 2008)
+++ (empty file)
@@ -1,30 +0,0 @@
-/*=================================---------------------------------------------
- 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/managed/fusion_component.hpp>
-#include <boost/dataflow/managed/network.hpp>
-
-#include <boost/test/included/test_exec_monitor.hpp>
-
-int test_main(int, char* [])
-{
- using namespace boost;
- using boost::fusion::at_c;
- namespace df=boost::dataflow;
- df::managed::network network;
- df::managed::fusion_component<bool> c(network);
-
- BOOST_CHECK_EQUAL(&at_c<0>(df::entities(c)), &c.port<0>());
- BOOST_CHECK_EQUAL(&at_c<1>(df::entities(c)), &c.port<1>());
-
- return 0;
-} // int test_main(int, char* [])
-
-
-

Copied: sandbox/dataflow-rewrite/libs/dataflow/test/managed/test_io_component.cpp (from r49950, /sandbox/dataflow-rewrite/libs/dataflow/test/managed/test_fusion_component.cpp)
==============================================================================
--- /sandbox/dataflow-rewrite/libs/dataflow/test/managed/test_fusion_component.cpp (original)
+++ sandbox/dataflow-rewrite/libs/dataflow/test/managed/test_io_component.cpp 2008-12-03 16:15:03 EST (Wed, 03 Dec 2008)
@@ -7,7 +7,7 @@
 -----------------------------------------------===============================*/
 
 
-#include <boost/dataflow/managed/fusion_component.hpp>
+#include <boost/dataflow/managed/io_component.hpp>
 #include <boost/dataflow/managed/network.hpp>
 
 #include <boost/test/included/test_exec_monitor.hpp>
@@ -18,7 +18,7 @@
     using boost::fusion::at_c;
     namespace df=boost::dataflow;
     df::managed::network network;
- df::managed::fusion_component<bool> c(network);
+ df::managed::io_component<bool> c(network);
 
     BOOST_CHECK_EQUAL(&at_c<0>(df::entities(c)), &c.port<0>());
     BOOST_CHECK_EQUAL(&at_c<1>(df::entities(c)), &c.port<1>());


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