Boost logo

Boost-Commit :

From: stipe_at_[hidden]
Date: 2008-06-16 22:41:51


Author: srajko
Date: 2008-06-16 22:41:49 EDT (Mon, 16 Jun 2008)
New Revision: 46441
URL: http://svn.boost.org/trac/boost/changeset/46441

Log:
filter changed to fusion_filter
Removed:
   sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_bind_object.cpp
Text files modified:
   sandbox/SOC/2007/signals/boost/dataflow/signals/component/detail/generic_template.hpp | 6
   sandbox/SOC/2007/signals/boost/dataflow/signals/component/filter.hpp | 152 ++++-----------------------------------
   sandbox/SOC/2007/signals/boost/dataflow/signals/component/filter_base.hpp | 53 +++++++++++++
   sandbox/SOC/2007/signals/boost/dataflow/support/port_vector.hpp | 1
   sandbox/SOC/2007/signals/libs/dataflow/build/xcodeide/dataflow.xcodeproj/project.pbxproj | 10 +-
   sandbox/SOC/2007/signals/libs/dataflow/doc/Jamfile.v2 | 2
   sandbox/SOC/2007/signals/libs/dataflow/doc/signals/introduction.qbk | 2
   sandbox/SOC/2007/signals/libs/dataflow/doc/signals/tutorial.qbk | 2
   sandbox/SOC/2007/signals/libs/dataflow/example/signals/intro_example.cpp | 2
   sandbox/SOC/2007/signals/libs/dataflow/example/signals/quick_start_examples.cpp | 7 -
   sandbox/SOC/2007/signals/libs/dataflow/test/signals/Jamfile.v2 | 2
   sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_branching.cpp | 8 +-
   sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_chain.cpp | 6
   sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_counter.cpp | 2
   sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_filter.cpp | 4
   sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_function.cpp | 8 +-
   sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_junction.cpp | 6
   sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_multiplexer.cpp | 4
   sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_mutex.cpp | 10 +-
   sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_socket.cpp | 6
   sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_storage.cpp | 6
   21 files changed, 116 insertions(+), 183 deletions(-)

Modified: sandbox/SOC/2007/signals/boost/dataflow/signals/component/detail/generic_template.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/signals/component/detail/generic_template.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/signals/component/detail/generic_template.hpp 2008-06-16 22:41:49 EDT (Mon, 16 Jun 2008)
@@ -5,7 +5,7 @@
 
 #ifdef SIGNAL_NETWORK_GENERIC_CLASS
 
-#include <boost/dataflow/signals/component/filter.hpp>
+#include <boost/dataflow/signals/component/fusion_filter.hpp>
 
 #ifndef SIGNAL_NETWORK_GENERIC_USE_TEMPLATED
 #include <boost/dataflow/signals/component/detail/unfused_inherited.hpp>
@@ -36,14 +36,14 @@
     typename SignalArgs
>
 class BOOST_PP_CAT(SIGNAL_NETWORK_GENERIC_CLASS,_impl)
- : public filter<
+ : public fusion_filter<
         Derived,
         Signature,
         mpl::vector<
             Signature,
             typename fused_signal_type<Signature>::signature_type
>,
- typename OutSignal::filter_type,
+ OutSignal,
         SignalArgs>
 {
 public:

Modified: sandbox/SOC/2007/signals/boost/dataflow/signals/component/filter.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/signals/component/filter.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/signals/component/filter.hpp 2008-06-16 22:41:49 EDT (Mon, 16 Jun 2008)
@@ -11,39 +11,12 @@
 #include <boost/dataflow/signals/component/filter_base.hpp>
 #include <boost/dataflow/utility/forced_sequence.hpp>
 
-#include <boost/fusion/functional/adapter/fused.hpp>
+#include <boost/function_types/result_type.hpp>
 #include <boost/fusion/include/as_vector.hpp>
 #include <boost/fusion/adapted/mpl.hpp>
 
-
-#define SIGNAL_NETWORK_DEFAULT_OUT unfused
-
 namespace boost { namespace signals {
 
-// the unfused, combined, and fused structs are used for specification of the filter class.
-// unfused and fused are also used for specification of provided components based on the filter class.
-// in the latter case, the filter_type member specifies the type of the underlying filter.
-
-/** \brief Used for specification of the filter class using an internal fused adaptor for an unfused output signal.
-*/
-struct combined {};
-
-/** \brief Used to specify unfused versions of provided components.
- For the filter class, this means the filter will use an unfused output signal only,
-*/
-struct unfused
-{
- typedef combined filter_type;
-};
-
-/** \brief Used to specify unfused versions of provided components.
- For the filter class, this means the filter will use a fused output signal only.
-*/
-struct fused
-{
- typedef fused filter_type;
-};
-
 template<
     typename Combiner,
     typename Group=int,
@@ -53,26 +26,19 @@
     typedef Combiner combiner_type;
     typedef Group group_type;
     typedef GroupCompare group_compare_type;
+
+ template<typename OutSignature>
+ struct apply
+ {
+ typedef boost::signal<
+ OutSignature,
+ combiner_type,
+ group_type,
+ group_compare_type
+ > type;
+ };
 };
 
-
-template<typename T, typename Enable=void>
-struct is_signal_args : public mpl::false_
-{};
-
-template<typename T>
-struct is_signal_args<
- T,
- typename dataflow::utility::enable_if_type<
- dataflow::utility::all_of<
- typename T::combiner_type,
- typename T::group_type,
- typename T::group_compare_type
- >
- >::type>
- : public mpl::true_
-{};
-
 template<typename OutSignature>
 struct default_signal_args
 {
@@ -89,17 +55,6 @@
     typedef void type;
 };
 
-template<typename OutSignature, typename SignalArgs>
-struct signal_from_args
-{
- typedef boost::signal<
- OutSignature,
- typename SignalArgs::combiner_type,
- typename SignalArgs::group_type,
- typename SignalArgs::group_compare_type
- > type;
-};
-
 
 /// Provides a basis for filters (components that receive and send a signal).
 /** \param OutSignature The signature of the signal being sent out.
@@ -111,26 +66,20 @@
     typename Derived,
     typename OutSignature,
     typename InSignatures=mpl::vector<>,
- typename OutSignal=SIGNAL_NETWORK_DEFAULT_OUT,
     typename SignalArgs=typename default_signal_args<OutSignature>::type
>
-class filter;
-
-/** \brief Unfused version of the filter class
-*/
-template<typename Derived, typename OutSignature, typename InSignatures, typename SignalArgs>
-class filter<Derived, OutSignature, InSignatures, unfused, SignalArgs>
+class filter
     : public filter_base<
         Derived,
- typename signal_from_args<OutSignature, SignalArgs>::type,
+ typename SignalArgs::template apply<OutSignature>::type,
         typename dataflow::utility::forced_sequence<InSignatures>::type >
 {
 // BOOST_MPL_ASSERT(( mpl::is_sequence<InSignatures> ));
- BOOST_MPL_ASSERT(( is_signal_args<SignalArgs> ));
+// BOOST_MPL_ASSERT(( is_signal_args<SignalArgs> ));
     
 public:
     // the type of the signal
- typedef typename signal_from_args<OutSignature, SignalArgs>::type signal_type;
+ typedef typename SignalArgs::template apply<OutSignature>::type signal_type;
     // the signature of the output signal
         typedef OutSignature signature_type;
 
@@ -159,75 +108,6 @@
 {
 }; // class filter
 
-/** \brief Combined version of the filter class
-*/
-template<typename Derived, typename OutSignature, typename InSignatures, typename SignalArgs>
-class filter<Derived, OutSignature, InSignatures, combined, SignalArgs>
-: public filter<Derived, OutSignature, InSignatures, unfused, SignalArgs>
-{
-// BOOST_MPL_ASSERT(( mpl::is_sequence<InSignatures> ));
- BOOST_MPL_ASSERT(( is_signal_args<SignalArgs> ));
-
-public:
- filter() : fused_out(filter::out) {}
- filter(const filter &) : fused_out(filter::out){}
- const filter &operator = (const filter &) {return *this;}
-
- typedef typename boost::function_types::parameter_types<OutSignature>::type parameter_types;
- typedef typename boost::fusion::result_of::as_vector<parameter_types>::type parameter_vector;
- typedef typename filter<Derived, OutSignature, InSignatures, unfused, SignalArgs>::signal_type::result_type fused_signature_type (const parameter_vector &);
-
-protected:
- typename signal_from_args<fused_signature_type, SignalArgs>::type fusion_out;
- boost::fusion::fused<typename filter::signal_type const &> fused_out;
-}; // class filter
-
-namespace detail
-{
- template<typename OutSignature, typename SignalArgs=typename default_signal_args<OutSignature>::type>
- struct fused_signal_type
- {
- typedef typename boost::function_types::parameter_types<OutSignature>::type parameter_types;
- typedef typename boost::fusion::result_of::as_vector<parameter_types>::type parameter_vector;
- typedef typename SignalArgs::combiner_type::result_type signature_type (const parameter_vector &);
- typedef typename SignalArgs::combiner_type::result_type fused_signature_type (const parameter_vector &);
- typedef typename signal_from_args<fused_signature_type, SignalArgs>::type signal_type;
- };
-}
-
-/** \brief Fused version of the filter class
-*/
-template<typename Derived, typename OutSignature, typename InSignatures, typename SignalArgs>
-class filter<Derived, OutSignature, InSignatures, fused, SignalArgs>
-: public filter_base<
- Derived,
- typename detail::fused_signal_type<OutSignature, SignalArgs>::signal_type,
- typename dataflow::utility::forced_sequence<InSignatures>::type >
-{
-// BOOST_MPL_ASSERT(( mpl::is_sequence<InSignatures> ));
- BOOST_MPL_ASSERT(( is_signal_args<SignalArgs> ));
-
-public:
- filter(const filter &) {}
- filter(){}
- const filter &operator = (const filter &) {return *this;}
-
- typedef typename detail::fused_signal_type<OutSignature, SignalArgs>::parameter_types parameter_types;
- typedef typename detail::fused_signal_type<OutSignature, SignalArgs>::parameter_vector parameter_vector;
- typedef typename detail::fused_signal_type<OutSignature, SignalArgs>::signature_type signature_type;
- typedef typename detail::fused_signal_type<OutSignature, SignalArgs>::fused_signature_type fused_signature_type;
- typedef typename detail::fused_signal_type<OutSignature, SignalArgs>::signal_type signal_type;
-
- /// Returns the default out signal.
- signal_type &default_signal() const
- { return fused_out; }
- /// Disconnects all slots connected to the signals::filter.
- void disconnect_all_slots() {fused_out.disconnect_all_slots();}
-
-protected:
- mutable signal_type fused_out;
-}; // class filter
-
 } } // namespace boost::signals
 
 #endif // SIGNAL_NETWORK_FILTER_HPP

Modified: sandbox/SOC/2007/signals/boost/dataflow/signals/component/filter_base.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/signals/component/filter_base.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/signals/component/filter_base.hpp 2008-06-16 22:41:49 EDT (Mon, 16 Jun 2008)
@@ -44,6 +44,55 @@
 
 }
 
+template<typename T>
+struct is_boost_signal
+ : public mpl::false_
+{};
+
+template<
+ typename Signature,
+ typename Combiner,
+ typename Group,
+ typename GroupCompare>
+struct is_boost_signal<boost::signal<Signature, Combiner, Group, GroupCompare> >
+ : public mpl::true_
+{};
+
+template<typename T>
+struct underlying_signal
+{
+ typedef typename underlying_signal<typename T::signal_type>::type type;
+};
+
+template<
+ typename Signature,
+ typename Combiner,
+ typename Group,
+ typename GroupCompare>
+struct underlying_signal<boost::signal<Signature, Combiner, Group, GroupCompare> >
+{
+ typedef boost::signal<Signature, Combiner, Group, GroupCompare> type;
+};
+
+template<typename T, typename Enable=void>
+struct get_underlying_signal
+{
+ T &operator()(T &t) const
+ {
+ return t;
+ }
+};
+
+template<typename T>
+struct get_underlying_signal<T, typename disable_if<is_boost_signal<T> >::type>
+{
+ typename underlying_signal<T>::type & operator()(T &t) const
+ {
+ return get_underlying_signal<typename T::signal_type>()(t.default_signal());
+ }
+};
+
+
 /// ComponentTraits for a Dataflow.Signals filter.
 /// \param[in] Filter Filter type (the class deriving filter)
 /// \param[in] Signals A boost::signal type or void (will be: a fusion sequence of signals)
@@ -52,7 +101,7 @@
 struct filter_component_traits
     : public dataflow::fusion_component_traits<
         fusion::vector<
- Signals &,
+ typename underlying_signal<Signals>::type &,
             dataflow::port_adapter<
                 Filter,
                 dataflow::signals::call_consumer<InSignatures>,
@@ -64,7 +113,7 @@
     static typename filter_component_traits::fusion_ports get_ports(Component &component)
     {
         return typename filter_component_traits::fusion_ports(
- component.default_signal(),
+ get_underlying_signal<Filter>()(component),
             component);
     };
 };

Modified: sandbox/SOC/2007/signals/boost/dataflow/support/port_vector.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/support/port_vector.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/support/port_vector.hpp 2008-06-16 22:41:49 EDT (Mon, 16 Jun 2008)
@@ -8,6 +8,7 @@
 
 #include <boost/dataflow/support/traits.hpp>
 #include <boost/mpl/is_sequence.hpp>
+#include <boost/static_assert.hpp>
 
 namespace boost { namespace dataflow {
 

Modified: sandbox/SOC/2007/signals/libs/dataflow/build/xcodeide/dataflow.xcodeproj/project.pbxproj
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/build/xcodeide/dataflow.xcodeproj/project.pbxproj (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/build/xcodeide/dataflow.xcodeproj/project.pbxproj 2008-06-16 22:41:49 EDT (Mon, 16 Jun 2008)
@@ -143,6 +143,7 @@
                 08A0E54C0D7A7674009B11DD /* quick_start_examples.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = quick_start_examples.cpp; sourceTree = "<group>"; };
                 08AD8AB50D84DF31008A9764 /* test_has_call_operator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = test_has_call_operator.cpp; sourceTree = "<group>"; };
                 08AD8AC40D84E3A9008A9764 /* has_call_operator.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = has_call_operator.hpp; sourceTree = "<group>"; };
+ 08B234E40DC92C3A002A7FFE /* fusion_filter.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = fusion_filter.hpp; sourceTree = "<group>"; };
                 08B9D4190CC3D0790050F10B /* test_binary_op.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = test_binary_op.cpp; sourceTree = "<group>"; };
                 08B9D41E0CC3D0A80050F10B /* my_producer_consumer.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = my_producer_consumer.hpp; sourceTree = "<group>"; };
                 08BD9AFB0CEB9D330069AFE2 /* get_port.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = get_port.hpp; sourceTree = "<group>"; };
@@ -261,7 +262,6 @@
                 08F5FF070D07082200FDBAEE /* Jamfile.v2 */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Jamfile.v2; sourceTree = "<group>"; };
                 08F5FF130D070A1400FDBAEE /* test_port.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = test_port.cpp; sourceTree = "<group>"; };
                 08F71D3E0CA3547C0010099E /* Jamfile.v2 */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Jamfile.v2; sourceTree = "<group>"; };
- 08F71D3F0CA3547C0010099E /* test_bind_object.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = test_bind_object.cpp; sourceTree = "<group>"; };
                 08F71D400CA3547C0010099E /* test_branching.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = test_branching.cpp; sourceTree = "<group>"; };
                 08F71D410CA3547C0010099E /* test_chain.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = test_chain.cpp; sourceTree = "<group>"; };
                 08F71D420CA3547C0010099E /* test_connect.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = test_connect.cpp; sourceTree = "<group>"; };
@@ -299,6 +299,7 @@
                 08FCEFCE0CB9CEB000BBB599 /* future.qbk */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = future.qbk; sourceTree = "<group>"; };
                 08FD5E4D0C1BA60800F00877 /* Jamfile.v2 */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Jamfile.v2; sourceTree = "<group>"; };
                 08FD5E4E0C1BA60800F00877 /* dataflow.qbk */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = dataflow.qbk; sourceTree = "<group>"; };
+ 08FDEF940DC8E91800422676 /* test_composition.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = test_composition.cpp; sourceTree = "<group>"; };
                 08FFDD6F0CEB70AD009318A8 /* blueprint_example.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = blueprint_example.cpp; sourceTree = "<group>"; };
                 08FFDD740CEB71A2009318A8 /* Jamfile.v2 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Jamfile.v2; sourceTree = "<group>"; };
 /* End PBXFileReference section */
@@ -475,6 +476,7 @@
                                 08EF9B260C5D506A00D4D206 /* counter.hpp */,
                                 08EF9B2C0C5D506A00D4D206 /* filter.hpp */,
                                 08EF9B2D0C5D506A00D4D206 /* filter_base.hpp */,
+ 08B234E40DC92C3A002A7FFE /* fusion_filter.hpp */,
                                 08EF9B2E0C5D506A00D4D206 /* function.hpp */,
                                 08EF9B2F0C5D506A00D4D206 /* instantiator.hpp */,
                                 08EF9B300C5D506A00D4D206 /* junction.hpp */,
@@ -743,7 +745,6 @@
                         children = (
                                 08F71D3E0CA3547C0010099E /* Jamfile.v2 */,
                                 08F216430CC95C3800DD25D3 /* test_result_of_defined.cpp */,
- 08F71D3F0CA3547C0010099E /* test_bind_object.cpp */,
                                 08F71D420CA3547C0010099E /* test_connect.cpp */,
                                 08F71D460CA3547C0010099E /* test_filter.cpp */,
                                 08F71D440CA3547C0010099E /* test_counter.cpp */,
@@ -764,6 +765,7 @@
                                 08FBDA3A0CD272ED00CC3891 /* test_multiplexer.cpp */,
                                 089B93720D5AA99700F6EEAA /* test_filter_base.cpp */,
                                 083F14A50D8A250700D0F8B7 /* test_connect_result.cpp */,
+ 08FDEF940DC8E91800422676 /* test_composition.cpp */,
                         );
                         path = signals;
                         sourceTree = "<group>";
@@ -909,7 +911,7 @@
                         );
                         runOnlyForDeploymentPostprocessing = 0;
                         shellPath = /bin/sh;
- shellScript = "# shell script goes here\nstyle=`echo $BUILD_STYLE | sed 'y/DR/dr/'` \nbjam --v2 --toolset=darwin ../../test $style";
+ shellScript = "# shell script goes here\nstyle=`echo $BUILD_STYLE | sed 'y/DR/dr/'` \nbjam ../../test $style";
                 };
                 08668C510C19A16F00ACB19A /* ShellScript */ = {
                         isa = PBXShellScriptBuildPhase;
@@ -935,7 +937,7 @@
                         );
                         runOnlyForDeploymentPostprocessing = 0;
                         shellPath = /bin/sh;
- shellScript = "# shell script goes here\nstyle=`echo $BUILD_STYLE | sed 'y/DR/dr/'` \nbjam --v2 --toolset=darwin --clean ../../test $style";
+ shellScript = "# shell script goes here\nstyle=`echo $BUILD_STYLE | sed 'y/DR/dr/'` \nbjam --v2 --clean ../../test $style";
                 };
                 08F0836D0C1DF6DE00687E1B /* ShellScript */ = {
                         isa = PBXShellScriptBuildPhase;

Modified: sandbox/SOC/2007/signals/libs/dataflow/doc/Jamfile.v2
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/doc/Jamfile.v2 (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/doc/Jamfile.v2 2008-06-16 22:41:49 EDT (Mon, 16 Jun 2008)
@@ -97,7 +97,7 @@
       dataflow_blueprint_doxygen
     :
         # pull in the online .css and images
- <xsl:param>project.root=http://beta.boost.org/development
+ <xsl:param>project.root=http://dancinghacker.com
         # without the next line, build complains
         <xsl:param>annotation.support=1
         # pulled this from the doc_test Jamfile

Modified: sandbox/SOC/2007/signals/libs/dataflow/doc/signals/introduction.qbk
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/doc/signals/introduction.qbk (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/doc/signals/introduction.qbk 2008-06-16 22:41:49 EDT (Mon, 16 Jun 2008)
@@ -195,7 +195,7 @@
 
     signals::storage<int (int, int &, const std::string &>), signals::unfused> unfused_storage;
     signals::storage<int (int, int &, const std::string &>)> unfused_storage_by_default;
- signals::storage<int (int, int &, const std::string &>), signals::fused> fused_storage;
+ signals::storage<int (int, int &, const std::string &>), signals::output::fused> fused_storage;
 
 In the above case, `unfused_storage` is similar to `f` above, and can be used as a slot
 for signals which carry regular, unfused arguments.

Modified: sandbox/SOC/2007/signals/libs/dataflow/doc/signals/tutorial.qbk
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/doc/signals/tutorial.qbk (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/doc/signals/tutorial.qbk 2008-06-16 22:41:49 EDT (Mon, 16 Jun 2008)
@@ -115,7 +115,7 @@
 There are three options:
 
 * `signals::unfused` provides an unfused output signal named `out`.
-* `signals::fused` provides a fused output signal named `fused_out`.
+* `signals::output::fused` provides a fused output signal named `fused_out`.
 * `signals::combined` provides an unfused output signal named `out`,
   and a fused adapter for the signal named `fused_out`.
   This is useful for components which wish to use fusion internally but output

Modified: sandbox/SOC/2007/signals/libs/dataflow/example/signals/intro_example.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/example/signals/intro_example.cpp (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/example/signals/intro_example.cpp 2008-06-16 22:41:49 EDT (Mon, 16 Jun 2008)
@@ -59,7 +59,7 @@
 {
 //[ fused_signal_void_counter_main
     FusedSignalVoidCounter counter;
- signals::storage<void(), signals::fused> storage;
+ signals::storage<void(), signals::output::fused> storage;
 
     storage >>= counter;
     for (int i=0; i<33; i++)

Modified: sandbox/SOC/2007/signals/libs/dataflow/example/signals/quick_start_examples.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/example/signals/quick_start_examples.cpp (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/example/signals/quick_start_examples.cpp 2008-06-16 22:41:49 EDT (Mon, 16 Jun 2008)
@@ -71,10 +71,9 @@
     }
 };
 
-// If we use void instead of a signature, there will be no output signal.
-// But another benefit of inheriting from filter is that we can implement
+// Inheriting from signals::filter or signals::consumer allows us to implement
 // signal consumer ports as overloads of operator() - later you will see that
-// that we we can access them more easily.
+// that allows us to access them more easily.
 class consumer_component
     : public signals::consumer<consumer_component>
 {
@@ -91,7 +90,7 @@
     producer_component producer;
     consumer_component consumer;
     
- // Because we inherited from filter, connecting is easy.
+ // Because we inherited from filter/consumer, connecting is easy.
     connect(producer, consumer);
     producer.invoke(); // producer sends "Hello World" to consumer.
 };

Modified: sandbox/SOC/2007/signals/libs/dataflow/test/signals/Jamfile.v2
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/test/signals/Jamfile.v2 (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/test/signals/Jamfile.v2 2008-06-16 22:41:49 EDT (Mon, 16 Jun 2008)
@@ -38,3 +38,5 @@
 run test_same_type.cpp ;
 run test_multi_out.cpp ;
 
+run test_composition.cpp ;
+

Deleted: sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_bind_object.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_bind_object.cpp 2008-06-16 22:41:49 EDT (Mon, 16 Jun 2008)
+++ (empty file)
@@ -1,35 +0,0 @@
-// Copyright Stjepan Rajko 2007. Use, modification and
-// distribution is subject to the Boost Software License, Version
-// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-#include <boost/dataflow/signals/connection/detail/bind_object.hpp>
-
-#include <boost/test/included/test_exec_monitor.hpp>
-
-struct adder
-{
- adder(int z) : z(z) {}
- adder() : z(0) {}
-
- int add(int x, float y)
- {
- return int(x + y + z);
- }
-
- int z;
-};
-
-int test_main(int, char* [])
-{
- adder a(10);
-
- boost::function<int(int, float)> f;
-
- f = boost::signals::detail::bind_object<int(int, float), adder>()(&adder::add, a);
-
- BOOST_CHECK_EQUAL(f(4, 2.1f), 16);
-
- return 0;
-}
-

Modified: sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_branching.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_branching.cpp (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_branching.cpp 2008-06-16 22:41:49 EDT (Mon, 16 Jun 2008)
@@ -46,10 +46,10 @@
     }
     {
         //[ test_branching_fused
- signals::storage<void (), signals::fused> banger;
- signals::counter<void (), signals::fused> counter;
- signals::storage<void (float), signals::fused> floater(2.5f);
- signals::storage<void (float), signals::fused> collector(0.0f);
+ signals::storage<void (), signals::output::fused> banger;
+ signals::counter<void (), signals::output::fused> counter;
+ signals::storage<void (float), signals::output::fused> floater(2.5f);
+ signals::storage<void (float), signals::output::fused> collector(0.0f);
         
         banger
             | counter

Modified: sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_chain.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_chain.cpp (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_chain.cpp 2008-06-16 22:41:49 EDT (Mon, 16 Jun 2008)
@@ -23,7 +23,7 @@
         void operator()(float x) {out(2*x);}
 };
 
-class FusedDoublerClass : public signals::filter<FusedDoublerClass, void (float), mpl::vector<>, signals::fused>
+class FusedDoublerClass : public signals::fusion_filter<FusedDoublerClass, void (float), mpl::vector<>, signals::output::fused>
 {
 public:
     typedef void result_type;
@@ -54,8 +54,8 @@
     {
         //[ test_chain_fused
         signals::chain<void(float), FusedDoublerClass> doubling_chain(4, NULL);
- signals::storage<void (float), signals::fused> floater(1.0f);
- signals::storage<void (float), signals::fused> collector(0.0f);
+ signals::storage<void (float), signals::output::fused> floater(1.0f);
+ signals::storage<void (float), signals::output::fused> collector(0.0f);
         
         floater >>= doubling_chain >>= collector;
         floater.send();

Modified: sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_counter.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_counter.cpp (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_counter.cpp 2008-06-16 22:41:49 EDT (Mon, 16 Jun 2008)
@@ -22,7 +22,7 @@
     }
     {
         //[ test_counter_fused
- signals::counter<void (), signals::fused> counter;
+ signals::counter<void (), signals::output::fused> counter;
         
         for (int i=0; i<33; i++)
             counter(boost::fusion::vector<>());

Modified: sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_filter.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_filter.cpp (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_filter.cpp 2008-06-16 22:41:49 EDT (Mon, 16 Jun 2008)
@@ -3,7 +3,7 @@
 // 1.0. (See accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 
-#include <boost/dataflow/signals/component/filter.hpp>
+#include <boost/dataflow/signals/component/fusion_filter.hpp>
 #include <boost/dataflow/signals/connection/operators.hpp>
 
 #include <boost/fusion/sequence/intrinsic/at.hpp>
@@ -46,7 +46,7 @@
     int stored;
 };
 
-class FusedDoublerClass : public signals::filter<FusedDoublerClass, void (int), void(const fusion::vector<int> &), signals::fused>
+class FusedDoublerClass : public signals::fusion_filter<FusedDoublerClass, void (int), void(const fusion::vector<int> &), signals::output::fused>
 {
 public:
     void operator()(const fusion::vector<int> &x)

Modified: sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_function.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_function.cpp (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_function.cpp 2008-06-16 22:41:49 EDT (Mon, 16 Jun 2008)
@@ -30,12 +30,12 @@
     }
     {
         //[ test_function_fused
- signals::function<void (float), float(float), signals::fused>
+ signals::function<void (float), float(float), signals::output::fused>
             double_fun1(boost::bind(std::multiplies<float>(), _1, 2.0f));
- signals::function<void (float), float(float), signals::fused>
+ signals::function<void (float), float(float), signals::output::fused>
             double_fun2(boost::bind(std::multiplies<float>(), _1, 2.0f));
- signals::storage<void (float), signals::fused> floater(1.0f);
- signals::storage<void (float), signals::fused> collector(0.0f);
+ signals::storage<void (float), signals::output::fused> floater(1.0f);
+ signals::storage<void (float), signals::output::fused> collector(0.0f);
         
         floater >>= double_fun1 >>= double_fun2 >>= collector;
         floater.send();

Modified: sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_junction.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_junction.cpp (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_junction.cpp 2008-06-16 22:41:49 EDT (Mon, 16 Jun 2008)
@@ -46,9 +46,9 @@
     }
     {
         //[ test_junction_fused
- signals::storage<void (), signals::fused> banger1, banger2;
- signals::counter<void (), signals::fused> counter1, counter2;
- signals::junction<void (), signals::fused> junction;
+ signals::storage<void (), signals::output::fused> banger1, banger2;
+ signals::counter<void (), signals::output::fused> counter1, counter2;
+ signals::junction<void (), signals::output::fused> junction;
         
         banger1 >>= junction >>= counter1;
         banger2 >>= junction >>= counter2;

Modified: sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_multiplexer.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_multiplexer.cpp (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_multiplexer.cpp 2008-06-16 22:41:49 EDT (Mon, 16 Jun 2008)
@@ -43,8 +43,8 @@
     }
     {
         //[ test_multiplexer_fused
- signals::storage<void (float), signals::fused> one(1.0f), two(2.0f), collector(-1.0f);
- signals::multiplexer<void (float), signals::fused> multiplexer;
+ signals::storage<void (float), signals::output::fused> one(1.0f), two(2.0f), collector(-1.0f);
+ signals::multiplexer<void (float), signals::output::fused> multiplexer;
         
         one >>= multiplexer.slot<1>();
         two >>= multiplexer.slot<2>();

Modified: sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_mutex.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_mutex.cpp (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_mutex.cpp 2008-06-16 22:41:49 EDT (Mon, 16 Jun 2008)
@@ -19,7 +19,7 @@
         signals::timed_generator<void ()> banger1;
         signals::timed_generator<void ()> banger2;
         signals::mutex<void ()> lock;
- signals::counter<void (), signals::unfused, volatile int> counter;
+ signals::counter<void (), signals::output::unfused, volatile int> counter;
         
         banger1 >>= lock >>= counter;
         banger2 >>= lock;
@@ -35,10 +35,10 @@
     }
     {
         //[ test_mutex_fused
- signals::timed_generator<void (), signals::fused> banger1;
- signals::timed_generator<void (), signals::fused> banger2;
- signals::mutex<void (), signals::fused> lock;
- signals::counter<void (), signals::fused, volatile int> counter;
+ signals::timed_generator<void (), signals::output::fused> banger1;
+ signals::timed_generator<void (), signals::output::fused> banger2;
+ signals::mutex<void (), signals::output::fused> lock;
+ signals::counter<void (), signals::output::fused, volatile int> counter;
 
         banger1 >>= lock >>= counter;
         banger2 >>= lock;

Modified: sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_socket.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_socket.cpp (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_socket.cpp 2008-06-16 22:41:49 EDT (Mon, 16 Jun 2008)
@@ -67,9 +67,9 @@
         socket.connect(endpoint_recv);
 
         // instatiate the components
- signals::socket_receiver<void (float), signals::fused> receiver(socket);
- signals::storage<void (float), signals::fused> collector(0.0f);
- signals::condition<void (float), signals::fused> receive_condition(cond, mutex_);
+ signals::socket_receiver<void (float), signals::output::fused> receiver(socket);
+ signals::storage<void (float), signals::output::fused> collector(0.0f);
+ signals::condition<void (float), signals::output::fused> receive_condition(cond, mutex_);
 
         // set up the network
         receiver >>= collector;

Modified: sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_storage.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_storage.cpp (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_storage.cpp 2008-06-16 22:41:49 EDT (Mon, 16 Jun 2008)
@@ -51,9 +51,9 @@
     {
         //[ test_storage_fused
         // instantiate all of the components we need
- signals::storage<void (), signals::fused> banger;
- signals::storage<void (float), signals::fused> floater(2.5f);
- signals::storage<void (float), signals::fused> collector(0.0f);
+ signals::storage<void (), signals::output::fused> banger;
+ signals::storage<void (float), signals::output::fused> floater(2.5f);
+ signals::storage<void (float), signals::output::fused> collector(0.0f);
 
         // create the network (banger to floater.send, floater to collector)
         banger >>= floater.send_slot();


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