Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r49950 - in sandbox/dataflow-rewrite: boost/dataflow/generic boost/dataflow/generic/static_vector boost/dataflow/managed libs/dataflow/build libs/dataflow/build/xcodeide/dataflow.xcodeproj libs/dataflow/test/generic libs/dataflow/test/managed
From: stipe_at_[hidden]
Date: 2008-11-26 19:14:06


Author: srajko
Date: 2008-11-26 19:14:05 EST (Wed, 26 Nov 2008)
New Revision: 49950
URL: http://svn.boost.org/trac/boost/changeset/49950

Log:
changed static_port to use entities
Added:
   sandbox/dataflow-rewrite/libs/dataflow/test/generic/test_entities.cpp (contents, props changed)
      - copied, changed from r49676, /sandbox/dataflow-rewrite/libs/dataflow/test/generic/test_get_port.cpp
Removed:
   sandbox/dataflow-rewrite/boost/dataflow/generic/fusion_static_vector.hpp
   sandbox/dataflow-rewrite/boost/dataflow/generic/static_vector/get_port.hpp
   sandbox/dataflow-rewrite/libs/dataflow/test/generic/test_get_port.cpp

Deleted: sandbox/dataflow-rewrite/boost/dataflow/generic/fusion_static_vector.hpp
==============================================================================
--- sandbox/dataflow-rewrite/boost/dataflow/generic/fusion_static_vector.hpp 2008-11-26 19:14:05 EST (Wed, 26 Nov 2008)
+++ (empty file)
@@ -1,79 +0,0 @@
-/*=================================---------------------------------------------
- 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__FUSION_STATIC_VECTOR_HPP
-#define BOOST__DATAFLOW__GENERIC__FUSION_STATIC_VECTOR_HPP
-
-#include <boost/dataflow/detail/transform_remove_reference.hpp>
-#include <boost/dataflow/generic/static_vector.hpp>
-
-#include <boost/fusion/container/vector.hpp>
-#include <boost/fusion/include/adapted.hpp>
-#include <boost/fusion/include/is_sequence.hpp>
-#include <boost/fusion/include/mpl.hpp>
-#include <boost/fusion/sequence/intrinsic/at.hpp>
-
-
-namespace boost { namespace dataflow {
-
-template<typename EntitySequence, typename Framework>
-struct fusion_static_vector_traits
- : public traits<Framework>
-{
- typedef EntitySequence entities;
-};
-
-template<typename T, typename Enable=void>
-struct is_fusion_static_vector_traits
- : public mpl::false_ {};
-
-template<typename T>
-struct is_fusion_static_vector_traits<
- T,
- typename enable_if<
- mpl::and_<
- is_traits<T>,
- fusion::traits::is_sequence<typename T::entities>
- > >::type >
- : public mpl::true_
-{};
-
-#ifndef DOXYGEN_DOCS_BUILD
-namespace extension {
-
- template<typename Traits>
- struct get_port_impl<
- Traits,
- typename enable_if<is_fusion_static_vector_traits<Traits> >::type >
- {
- template<typename FArgs>
- struct result;
-
- template<typename F, typename Entity, typename N>
- struct result<F(Entity, N)>
- {
- typedef typename fusion::result_of::value_at<
- typename Traits::entities,
- N>::type type;
- };
-
- template<typename Entity, typename N>
- typename result<get_port_impl(Entity &, N)>::type
- operator()(Entity &c, N)
- {
- return fusion::at<N>(Traits::get_ports(c));
- }
- };
-
-} // namespace extension
-#endif // DOXYGEN_DOCS_BUILD
-
-}}
-
-#endif // BOOST__DATAFLOW__GENERIC__FUSION_STATIC_VECTOR_HPP

Modified: sandbox/dataflow-rewrite/boost/dataflow/generic/static_vector.hpp
==============================================================================
--- sandbox/dataflow-rewrite/boost/dataflow/generic/static_vector.hpp (original)
+++ sandbox/dataflow-rewrite/boost/dataflow/generic/static_vector.hpp 2008-11-26 19:14:05 EST (Wed, 26 Nov 2008)
@@ -8,4 +8,4 @@
 
 
 #include <boost/dataflow/generic/static_vector/static_vector.hpp>
-#include <boost/dataflow/generic/static_vector/get_port.hpp>
+#include <boost/dataflow/generic/entities.hpp>

Deleted: sandbox/dataflow-rewrite/boost/dataflow/generic/static_vector/get_port.hpp
==============================================================================
--- sandbox/dataflow-rewrite/boost/dataflow/generic/static_vector/get_port.hpp 2008-11-26 19:14:05 EST (Wed, 26 Nov 2008)
+++ (empty file)
@@ -1,210 +0,0 @@
-/*=================================---------------------------------------------
- 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__GET_PORT_HPP
-#define BOOST__DATAFLOW__GENERIC__GET_PORT_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/detail/not_specialized.hpp>
-
-
-#include <boost/dataflow/generic/framework_entity.hpp>
-namespace boost { namespace dataflow {
-
-namespace extension
-{
- template<typename Traits1,typename Enable=void>
- struct get_port_impl
- {
- BOOST_MPL_ASSERT(( is_same<Enable, void> ));
-
- typedef detail::not_specialized result_type;
-
- template<typename T1,typename Index>
- result_type operator()(T1 &t1,const Index &index)
- {
- // Error: get_port_impl has not been
- // specialized appropriately.
- BOOST_MPL_ASSERT(( mpl::bool_<sizeof(T1)==0> ));
- return result_type();
- }
- };
-
- template<typename Traits1,typename Enable=void>
- struct get_port_will_succeed_impl
- {
- BOOST_MPL_ASSERT(( is_same<Enable, void> ));
-
- typedef bool result_type;
-
- template<typename T1,typename Index>
- result_type operator()(T1 &t1,const Index &index)
- {
- return
- !is_same<
- typename extension::get_port_impl<
- Traits1
- >::result_type,
- detail::not_specialized
- >::value;
- }
- };
-}
-
-namespace detail
-{
-
- template<typename T1,typename Index,typename Framework1=typename default_framework_of<T1>::type,typename Enable=void>
- struct has_ports_specialized
- : public mpl::true_
- {};
-
- template<typename T1,typename Index,typename Framework1>
- struct has_ports_specialized<
- T1,Index,Framework1
- ,
- typename enable_if<
- is_same<
- typename extension::get_port_impl<
- typename traits_of<T1, Framework1>::type
- >::result_type,
- detail::not_specialized>
- >::type>
- : public mpl::false_
- {};
-
-}
-
-template<typename T1,typename Framework1=typename default_framework_of<T1>::type,typename Enable=void>
-struct has_ports
- : public mpl::false_
-{
- BOOST_MPL_ASSERT((mpl::and_<is_framework_entity<T1,Framework1> >));
-};
-
-template<typename T1,typename Framework1>
-struct has_ports<
- T1,Framework1,
- typename enable_if<
- detail::has_ports_specialized<
- T1,Framework1>
- >::type>
- : public mpl::true_
-{
- BOOST_MPL_ASSERT((mpl::and_<is_framework_entity<T1,Framework1> >));
-};
-
-namespace result_of {
-
- template<typename T1,typename Index,typename Framework1=typename default_framework_of<T1>::type>
- struct get_port
- {
- typedef typename boost::result_of<
- extension::get_port_impl<
- typename traits_of<T1, Framework1>::type
- >
- (T1,Index)
- >::type type;
- };
-
-}
-
-
-template<typename Index,typename Framework1,typename T1>
-inline typename result_of::get_port<
- T1,Index,Framework1
- >::type
-get_port_framework(T1 &t1,const Index &index=Index())
-{
- return extension::get_port_impl<
- typename traits_of<T1, Framework1>::type
- >()(t1,index);
-}
-
-template<typename Index,typename T1>
-inline typename result_of::get_port<
- T1,Index,typename default_framework_of<T1>::type
- >::type
-get_port(T1 &t1,const Index &index=Index())
-{
- typedef typename default_framework_of<T1>::type Framework1;
- return extension::get_port_impl<
- typename traits_of<T1, Framework1>::type
- >()(t1,index);
-}
-
-template<typename Index,typename Framework1,typename T1>
-inline bool
-get_port_will_succeed_framework(T1 &t1,const Index &index=Index())
-{
- return extension::get_port_will_succeed_impl<
- typename traits_of<T1, Framework1>::type
- >()(t1,index);
-}
-
-template<typename Index,typename T1>
-inline bool
-get_port_will_succeed(T1 &t1,const Index &index=Index())
-{
- typedef typename default_framework_of<T1>::type Framework1;
- return extension::get_port_will_succeed_impl<
- typename traits_of<T1, Framework1>::type
- >()(t1,index);
-}
-
-template<typename Index,typename Framework1,typename T1>
-inline typename result_of::get_port<
- T1,Index,Framework1
- >::type
-get_port_framework(const T1 &t1,const Index &index=Index())
-{
- return extension::get_port_impl<
- typename traits_of<T1, Framework1>::type
- >()(t1,index);
-}
-
-template<typename Index,typename T1>
-inline typename result_of::get_port<
- T1,Index,typename default_framework_of<T1>::type
- >::type
-get_port(const T1 &t1,const Index &index=Index())
-{
- typedef typename default_framework_of<T1>::type Framework1;
- return extension::get_port_impl<
- typename traits_of<T1, Framework1>::type
- >()(t1,index);
-}
-
-template<typename Index,typename Framework1,typename T1>
-inline bool
-get_port_will_succeed_framework(const T1 &t1,const Index &index=Index())
-{
- return extension::get_port_will_succeed_impl<
- typename traits_of<T1, Framework1>::type
- >()(t1,index);
-}
-
-template<typename Index,typename T1>
-inline bool
-get_port_will_succeed(const T1 &t1,const Index &index=Index())
-{
- typedef typename default_framework_of<T1>::type Framework1;
- return extension::get_port_will_succeed_impl<
- typename traits_of<T1, Framework1>::type
- >()(t1,index);
-}
-
-}}
-
-
-#endif // BOOST__DATAFLOW__GENERIC__GET_PORT_HPP

Modified: 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/fusion_component.hpp 2008-11-26 19:14:05 EST (Wed, 26 Nov 2008)
@@ -7,7 +7,7 @@
 #define BOOST_DATAFLOW_MANAGED_FUSION_COMPONENT_HPP
 
 #include <boost/dataflow/detail/make_ref.hpp>
-#include <boost/dataflow/generic/fusion_static_vector.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>
@@ -56,21 +56,12 @@
 
 template<typename InTypes, typename OutTypes>
 struct component_traits
- : public dataflow::fusion_static_vector_traits<
- boost::fusion::transform_view<
+ : public dataflow::static_vector_traits
+ <
             typename detail::make_fusion_ports<InTypes, OutTypes>::type,
- boost::dataflow::detail::make_ref
- >,
- managed::framework>
-{
- typedef typename detail::make_fusion_ports<InTypes, OutTypes>::type fusion_ports;
-
- template<typename Component>
- static typename component_traits::fusion_ports &get_ports(Component &component)
- {
- return component.ports();
- };
-};
+ managed::framework
+ >
+{};
 
 namespace detail {
 
@@ -129,6 +120,20 @@
         }
     };*/
 
+
+ 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();
+ }
+
+ };
+
 }
 
 } }

Modified: sandbox/dataflow-rewrite/libs/dataflow/build/Jamfile
==============================================================================
--- sandbox/dataflow-rewrite/libs/dataflow/build/Jamfile (original)
+++ sandbox/dataflow-rewrite/libs/dataflow/build/Jamfile 2008-11-26 19:14:05 EST (Wed, 26 Nov 2008)
@@ -11,7 +11,6 @@
 project boost/dataflow/build ;
 
 make port_binary_operation.hpp : specializable_operation.hpp.py : @in2out ;
-make get_port.hpp : specializable_operation.hpp.py : @get_port ;
 make entities.hpp : specializable_operation.hpp.py : @entities ;
 
 actions in2out
@@ -19,11 +18,6 @@
     python $(TOP)/libs/dataflow/build/file_template.py template=$(>) erase="y" into=$(<) NAME="port_binary_operation" CHECK="are_port_binary_operable" TEMPLATES="Operation" EXTRA_ARGS="Operation" ARITY=2 HAS_TRAITS="is_port" INCLUDES="<boost/dataflow/generic/port/port.hpp>"
 }
 
-actions get_port
-{
- python $(TOP)/libs/dataflow/build/file_template.py template=$(>) erase="y" into=$(<) NAME="get_port" CHECK="has_ports" INNER_TEMPLATES="Index" EXTRA_ARGS="Index" ARITY=1 HAS_TRAITS="is_framework_entity" INCLUDES="<boost/dataflow/generic/framework_entity.hpp>"
-}
-
 actions entities
 {
     python $(TOP)/libs/dataflow/build/file_template.py template=$(>) erase="y" into=$(<) NAME="entities" CHECK="has_entities" ARITY=1 HAS_TRAITS="is_framework_entity" INCLUDES="<boost/dataflow/generic/framework_entity.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-11-26 19:14:05 EST (Wed, 26 Nov 2008)
@@ -144,7 +144,6 @@
                 08A2279D0EAE427700F70466 /* Jamfile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.jam; path = Jamfile; sourceTree = "<group>"; };
                 08A227A00EAE429600F70466 /* graph_framework.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = graph_framework.hpp; sourceTree = "<group>"; };
                 08A227A90EAE434300F70466 /* port.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = port.hpp; sourceTree = "<group>"; };
- 08A486B30EC11632007D73CC /* test_get_port.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = test_get_port.cpp; sourceTree = "<group>"; };
                 08A53F850EAC07E6000B9C17 /* blueprint_component.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = blueprint_component.hpp; sourceTree = "<group>"; };
                 08A53F8E0EAC0AC1000B9C17 /* factory.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = factory.hpp; sourceTree = "<group>"; };
                 08A53F920EAC14A4000B9C17 /* test_factory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = test_factory.cpp; sourceTree = "<group>"; };
@@ -163,7 +162,6 @@
                 08AA90690EAD46A000409A2E /* Jamfile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.jam; path = Jamfile; 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>"; };
- 08AB81B70EC7A45900A2B98A /* get_port.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = get_port.hpp; sourceTree = "<group>"; };
                 08AB81BB0EC7A50200A2B98A /* test_static_vector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = test_static_vector.cpp; sourceTree = "<group>"; };
                 08AB81BF0EC7A52F00A2B98A /* my_static_vector.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = my_static_vector.hpp; sourceTree = "<group>"; };
                 08AD7BB30EDD1332002E9432 /* entities.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = entities.hpp; sourceTree = "<group>"; };
@@ -197,8 +195,8 @@
                 08B8F1C00E512F45000545B8 /* test_framework_entity_traits.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = test_framework_entity_traits.cpp; sourceTree = "<group>"; };
                 08B8F1D00E513569000545B8 /* test_framework.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = test_framework.cpp; sourceTree = "<group>"; };
                 08BA454B0EDCF1A00053808D /* my_dynamic_vector.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = my_dynamic_vector.hpp; sourceTree = "<group>"; };
- 08D18D760EBE25E800B1A160 /* fusion_static_vector.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = fusion_static_vector.hpp; sourceTree = "<group>"; };
                 08D18D770EBE25E800B1A160 /* static_vector.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = static_vector.hpp; sourceTree = "<group>"; };
+ 08D6B0BA0EDE06A8005821A8 /* test_entities.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = test_entities.cpp; sourceTree = "<group>"; };
                 08D965820E83A2F900087C6F /* framework_entity.qbk */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = framework_entity.qbk; sourceTree = "<group>"; };
                 08D965C80E83A94E00087C6F /* category.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = category.hpp; sourceTree = "<group>"; };
                 08D965C90E83A94E00087C6F /* port.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = port.hpp; sourceTree = "<group>"; };
@@ -349,7 +347,6 @@
                                 08AD7BC10EDD1715002E9432 /* dynamic_vector */,
                                 08AD7BB30EDD1332002E9432 /* entities.hpp */,
                                 08AB81A90EC7A1E300A2B98A /* static_vector */,
- 08D18D760EBE25E800B1A160 /* fusion_static_vector.hpp */,
                                 08D18D770EBE25E800B1A160 /* static_vector.hpp */,
                                 08AD7BBA0EDD1435002E9432 /* dynamic_vector.hpp */,
                                 0898B4700E83E6E1004F3E91 /* port_binary_operation.hpp */,
@@ -379,6 +376,7 @@
                 08A77AFF0E4FC51C00B8793E /* generic */ = {
                         isa = PBXGroup;
                         children = (
+ 08D6B0BA0EDE06A8005821A8 /* test_entities.cpp */,
                                 08B3CC220EC8B7D3002D2124 /* my_framework_with_context.hpp */,
                                 08A77B060E4FC58D00B8793E /* Jamfile */,
                                 08DD9DFA0E7B22DD008DC46A /* test_default_framework_of.cpp */,
@@ -396,7 +394,6 @@
                                 0826E2DC0EA52A850090AB4E /* my_connect.hpp */,
                                 08AB81BF0EC7A52F00A2B98A /* my_static_vector.hpp */,
                                 08BA454B0EDCF1A00053808D /* my_dynamic_vector.hpp */,
- 08A486B30EC11632007D73CC /* test_get_port.cpp */,
                                 08AB81BB0EC7A50200A2B98A /* test_static_vector.cpp */,
                                 08AD7BB50EDD13F2002E9432 /* test_dynamic_vector.cpp */,
                         );
@@ -432,7 +429,6 @@
                 08AB81A90EC7A1E300A2B98A /* static_vector */ = {
                         isa = PBXGroup;
                         children = (
- 08AB81B70EC7A45900A2B98A /* get_port.hpp */,
                                 08AB81AA0EC7A1F700A2B98A /* traits.hpp */,
                                 08AB81AB0EC7A20200A2B98A /* static_vector.hpp */,
                         );

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-11-26 19:14:05 EST (Wed, 26 Nov 2008)
@@ -21,4 +21,4 @@
 
 run test_static_vector.cpp ;
 run test_dynamic_vector.cpp ;
-run test_get_port.cpp ;
+run test_entities.cpp ;

Modified: sandbox/dataflow-rewrite/libs/dataflow/test/generic/my_static_vector.hpp
==============================================================================
--- sandbox/dataflow-rewrite/libs/dataflow/test/generic/my_static_vector.hpp (original)
+++ sandbox/dataflow-rewrite/libs/dataflow/test/generic/my_static_vector.hpp 2008-11-26 19:14:05 EST (Wed, 26 Nov 2008)
@@ -33,25 +33,14 @@
 namespace boost { namespace dataflow { namespace extension {
 
 template<>
-struct get_port_impl<my_traits>
+struct entities_impl<my_traits>
 {
- template<typename FArgs>
- struct result
- {};
+ typedef boost::fusion::vector2<float, int> & result_type;
     
- template<typename F, typename Entity, typename N>
- struct result<F(Entity, N)>
+ template<typename Entity>
+ result_type operator()(Entity &e)
     {
- typedef typename fusion::result_of::value_at<
- fusion::vector2<float, int>,
- N>::type type;
- };
-
- template<typename Entity, typename N>
- typename result<get_port_impl(Entity &, N)>::type
- operator()(Entity &e, N)
- {
- return fusion::at<N>(e.ports);
+ return e.ports;
     }
 };
 

Copied: sandbox/dataflow-rewrite/libs/dataflow/test/generic/test_entities.cpp (from r49676, /sandbox/dataflow-rewrite/libs/dataflow/test/generic/test_get_port.cpp)
==============================================================================
--- /sandbox/dataflow-rewrite/libs/dataflow/test/generic/test_get_port.cpp (original)
+++ sandbox/dataflow-rewrite/libs/dataflow/test/generic/test_entities.cpp 2008-11-26 19:14:05 EST (Wed, 26 Nov 2008)
@@ -7,7 +7,7 @@
 -----------------------------------------------===============================*/
 
 
-#include <boost/dataflow/generic/static_vector/get_port.hpp>
+#include <boost/dataflow/generic/entities.hpp>
 #include "my_static_vector.hpp"
 
 #include <boost/type_traits/is_same.hpp>
@@ -21,15 +21,9 @@
 {
     tuple x(0.5, 2);
     
- typedef df::result_of::get_port<tuple, boost::mpl::int_<0> >::type result_of_0;
- typedef df::result_of::get_port<tuple, boost::mpl::int_<1> >::type result_of_1;
+ typedef df::result_of::entities<tuple>::type result_of_entities;
     
- BOOST_CHECK((boost::is_same<result_of_0, float>::value));
- BOOST_CHECK((boost::is_same<result_of_1, int>::value));
+ BOOST_CHECK((boost::is_same<result_of_entities, ::boost::fusion::vector2<float,int> & >::value));
     
- BOOST_CHECK_EQUAL((df::get_port(x, boost::mpl::int_<0>())), 0.5);
- BOOST_CHECK_EQUAL((df::get_port<boost::mpl::int_<0> >(x)), 0.5);
-
- BOOST_CHECK_EQUAL((df::get_port(x, boost::mpl::int_<1>())), 2);
- BOOST_CHECK_EQUAL((df::get_port<boost::mpl::int_<1> >(x)), 2);
+ BOOST_CHECK_EQUAL(&df::entities(x), &x.ports);
 }
\ No newline at end of file

Deleted: sandbox/dataflow-rewrite/libs/dataflow/test/generic/test_get_port.cpp
==============================================================================
--- sandbox/dataflow-rewrite/libs/dataflow/test/generic/test_get_port.cpp 2008-11-26 19:14:05 EST (Wed, 26 Nov 2008)
+++ (empty file)
@@ -1,35 +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/generic/static_vector/get_port.hpp>
-#include "my_static_vector.hpp"
-
-#include <boost/type_traits/is_same.hpp>
-
-
-#define BOOST_TEST_MAIN
-#include <boost/test/unit_test.hpp>
-
-
-BOOST_AUTO_TEST_CASE( test )
-{
- tuple x(0.5, 2);
-
- typedef df::result_of::get_port<tuple, boost::mpl::int_<0> >::type result_of_0;
- typedef df::result_of::get_port<tuple, boost::mpl::int_<1> >::type result_of_1;
-
- BOOST_CHECK((boost::is_same<result_of_0, float>::value));
- BOOST_CHECK((boost::is_same<result_of_1, int>::value));
-
- BOOST_CHECK_EQUAL((df::get_port(x, boost::mpl::int_<0>())), 0.5);
- BOOST_CHECK_EQUAL((df::get_port<boost::mpl::int_<0> >(x)), 0.5);
-
- BOOST_CHECK_EQUAL((df::get_port(x, boost::mpl::int_<1>())), 2);
- BOOST_CHECK_EQUAL((df::get_port<boost::mpl::int_<1> >(x)), 2);
-}
\ No newline at end of file

Modified: 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_fusion_component.cpp 2008-11-26 19:14:05 EST (Wed, 26 Nov 2008)
@@ -15,12 +15,13 @@
 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((&df::get_port<boost::mpl::int_<0> >(c)), &c.port<0>());
- BOOST_CHECK_EQUAL((&df::get_port<boost::mpl::int_<1> >(c)), &c.port<1>());
+ 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* [])


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