|
Boost-Commit : |
From: stipe_at_[hidden]
Date: 2007-10-28 17:23:43
Author: srajko
Date: 2007-10-28 17:23:41 EDT (Sun, 28 Oct 2007)
New Revision: 40538
URL: http://svn.boost.org/trac/boost/changeset/40538
Log:
make work with current boost trunk
Added:
sandbox/SOC/2007/signals/libs/dataflow/example/signals/simple_distributed_example.cpp
- copied unchanged from r40519, /sandbox/SOC/2007/signals/libs/dataflow/example/simple_distributed_example.cpp
sandbox/SOC/2007/signals/libs/dataflow/example/signals/simple_example.cpp
- copied unchanged from r40519, /sandbox/SOC/2007/signals/libs/dataflow/example/simple_example.cpp
Removed:
sandbox/SOC/2007/signals/libs/dataflow/example/simple_distributed_example.cpp
sandbox/SOC/2007/signals/libs/dataflow/example/simple_example.cpp
Text files modified:
sandbox/SOC/2007/signals/boost/dataflow/connection/group.hpp | 4 ++--
sandbox/SOC/2007/signals/boost/dataflow/phoenix/component/consumer.hpp | 2 +-
sandbox/SOC/2007/signals/boost/dataflow/phoenix/producer_container.hpp | 4 ++--
sandbox/SOC/2007/signals/boost/dataflow/phoenix/sequence_environment.hpp | 2 +-
sandbox/SOC/2007/signals/boost/dataflow/signal/component/chain.hpp | 2 +-
sandbox/SOC/2007/signals/boost/dataflow/signal/component/detail/generic_template.hpp | 2 +-
sandbox/SOC/2007/signals/boost/dataflow/signal/component/detail/serialize_fusion_vector.hpp | 2 +-
sandbox/SOC/2007/signals/boost/dataflow/signal/component/detail/unfused_inherited.hpp | 4 ++--
sandbox/SOC/2007/signals/boost/dataflow/signal/component/detail/unfused_inherited_templated.hpp | 4 ++--
sandbox/SOC/2007/signals/boost/dataflow/signal/component/filter.hpp | 4 ++--
sandbox/SOC/2007/signals/boost/dataflow/signal/component/multiplexer.hpp | 2 +-
sandbox/SOC/2007/signals/boost/dataflow/signal/component/storage.hpp | 6 +++---
sandbox/SOC/2007/signals/boost/dataflow/signal/detail/unfused_typed_class.hpp | 4 ++--
sandbox/SOC/2007/signals/libs/dataflow/build/xcodeide/signal_network.xcodeproj/project.pbxproj | 4 ++--
sandbox/SOC/2007/signals/libs/dataflow/example/Jamfile.v2 | 7 +------
sandbox/SOC/2007/signals/libs/dataflow/example/VTK/Jamfile.v2 | 1 +
sandbox/SOC/2007/signals/libs/dataflow/example/VTK/support.hpp | 2 +-
sandbox/SOC/2007/signals/libs/dataflow/example/signals/Jamfile.v2 | 7 ++++++-
sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_result_of_defined.cpp | 2 +-
sandbox/SOC/2007/signals/libs/dataflow/test/test_keyed_port.cpp | 2 +-
20 files changed, 34 insertions(+), 33 deletions(-)
Modified: sandbox/SOC/2007/signals/boost/dataflow/connection/group.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/connection/group.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/connection/group.hpp 2007-10-28 17:23:41 EDT (Sun, 28 Oct 2007)
@@ -9,11 +9,11 @@
#include <boost/dataflow/support.hpp>
#include <boost/fusion/algorithm/iteration/for_each.hpp>
-#include <boost/fusion/sequence/container/vector.hpp>
+#include <boost/fusion/container/vector.hpp>
#include <boost/fusion/sequence/intrinsic/at_key.hpp>
#include <boost/fusion/sequence/intrinsic/front.hpp>
#include <boost/fusion/sequence/generation/vector_tie.hpp>
-#include <boost/fusion/sequence/view/zip_view.hpp>
+#include <boost/fusion/view/zip_view.hpp>
#include <boost/fusion/support/is_sequence.hpp>
#include <boost/utility/result_of.hpp>
#include <boost/mpl/not.hpp>
Modified: sandbox/SOC/2007/signals/boost/dataflow/phoenix/component/consumer.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/phoenix/component/consumer.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/phoenix/component/consumer.hpp 2007-10-28 17:23:41 EDT (Sun, 28 Oct 2007)
@@ -7,7 +7,7 @@
#define BOOST_DATAFLOW_PHOENIX_COMPONENT_CONSUMER_HPP
#include <boost/utility/result_of.hpp>
-#include <boost/fusion/sequence/container/vector.hpp>
+#include <boost/fusion/container/vector.hpp>
#include <boost/fusion/sequence/intrinsic/at.hpp>
#include <boost/spirit/phoenix/core/actor.hpp>
Modified: sandbox/SOC/2007/signals/boost/dataflow/phoenix/producer_container.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/phoenix/producer_container.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/phoenix/producer_container.hpp 2007-10-28 17:23:41 EDT (Sun, 28 Oct 2007)
@@ -12,8 +12,8 @@
#include <boost/iterator/zip_iterator.hpp>
#include <boost/mpl/for_each.hpp>
#include <boost/mpl/vector.hpp>
-#include <boost/fusion/sequence/adapted/boost_tuple.hpp>
-#include <boost/fusion/sequence/view/joint_view.hpp>
+#include <boost/fusion/adapted/boost_tuple.hpp>
+#include <boost/fusion/view/joint_view.hpp>
namespace boost { namespace phoenix {
Modified: sandbox/SOC/2007/signals/boost/dataflow/phoenix/sequence_environment.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/phoenix/sequence_environment.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/phoenix/sequence_environment.hpp 2007-10-28 17:23:41 EDT (Sun, 28 Oct 2007)
@@ -8,7 +8,7 @@
#include <boost/dataflow/detail/make_ref.hpp>
-#include <boost/fusion/sequence/view/transform_view.hpp>
+#include <boost/fusion/view/transform_view.hpp>
namespace boost { namespace phoenix {
Modified: sandbox/SOC/2007/signals/boost/dataflow/signal/component/chain.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/signal/component/chain.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/signal/component/chain.hpp 2007-10-28 17:23:41 EDT (Sun, 28 Oct 2007)
@@ -11,7 +11,7 @@
#include <boost/mpl/vector.hpp>
#include <boost/fusion/functional/adapter/fused.hpp>
-#include <boost/fusion/sequence/adapted/mpl.hpp>
+#include <boost/fusion/adapted/mpl.hpp>
#include <boost/function_types/parameter_types.hpp>
namespace boost { namespace signals {
Modified: sandbox/SOC/2007/signals/boost/dataflow/signal/component/detail/generic_template.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/signal/component/detail/generic_template.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/signal/component/detail/generic_template.hpp 2007-10-28 17:23:41 EDT (Sun, 28 Oct 2007)
@@ -16,7 +16,7 @@
#endif
#include <boost/mpl/vector.hpp>
-#include <boost/fusion/sequence/adapted/mpl.hpp>
+#include <boost/fusion/adapted/mpl.hpp>
#include <boost/fusion/support/is_sequence.hpp>
#define SIGNAL_NETWORK_GENERIC_CLASS_IMPL BOOST_PP_CAT(SIGNAL_NETWORK_GENERIC_CLASS,_impl)
Modified: sandbox/SOC/2007/signals/boost/dataflow/signal/component/detail/serialize_fusion_vector.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/signal/component/detail/serialize_fusion_vector.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/signal/component/detail/serialize_fusion_vector.hpp 2007-10-28 17:23:41 EDT (Sun, 28 Oct 2007)
@@ -17,7 +17,7 @@
// See http://www.boost.org for updates, documentation, and revision history.
//
-#include <boost/fusion/sequence/container/vector/vector.hpp>
+#include <boost/fusion/container/vector/vector.hpp>
namespace boost {
namespace serialization {
Modified: sandbox/SOC/2007/signals/boost/dataflow/signal/component/detail/unfused_inherited.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/signal/component/detail/unfused_inherited.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/signal/component/detail/unfused_inherited.hpp 2007-10-28 17:23:41 EDT (Sun, 28 Oct 2007)
@@ -27,8 +27,8 @@
#include <boost/fusion/support/detail/access.hpp>
#include <boost/fusion/sequence/intrinsic/value_at.hpp>
#include <boost/fusion/sequence/intrinsic/size.hpp>
-#include <boost/fusion/sequence/container/vector/vector.hpp>
-#include <boost/fusion/sequence/conversion/as_vector.hpp>
+#include <boost/fusion/container/vector/vector.hpp>
+#include <boost/fusion/include/as_vector.hpp>
#include <boost/fusion/functional/adapter/limits.hpp>
Modified: sandbox/SOC/2007/signals/boost/dataflow/signal/component/detail/unfused_inherited_templated.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/signal/component/detail/unfused_inherited_templated.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/signal/component/detail/unfused_inherited_templated.hpp 2007-10-28 17:23:41 EDT (Sun, 28 Oct 2007)
@@ -27,8 +27,8 @@
#include <boost/fusion/support/detail/access.hpp>
#include <boost/fusion/sequence/intrinsic/value_at.hpp>
#include <boost/fusion/sequence/intrinsic/size.hpp>
-#include <boost/fusion/sequence/container/vector/vector.hpp>
-#include <boost/fusion/sequence/conversion/as_vector.hpp>
+#include <boost/fusion/container/vector/vector.hpp>
+#include <boost/fusion/include/as_vector.hpp>
#include <boost/fusion/functional/adapter/limits.hpp>
Modified: sandbox/SOC/2007/signals/boost/dataflow/signal/component/filter.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/signal/component/filter.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/signal/component/filter.hpp 2007-10-28 17:23:41 EDT (Sun, 28 Oct 2007)
@@ -11,8 +11,8 @@
#include <boost/dataflow/signal/component/filter_base.hpp>
#include <boost/fusion/functional/adapter/fused.hpp>
-#include <boost/fusion/sequence/conversion/as_vector.hpp>
-#include <boost/fusion/sequence/adapted/mpl.hpp>
+#include <boost/fusion/include/as_vector.hpp>
+#include <boost/fusion/adapted/mpl.hpp>
#ifndef SIGNAL_NETWORK_DEFAULT_OUT
#define SIGNAL_NETWORK_DEFAULT_OUT unfused
Modified: sandbox/SOC/2007/signals/boost/dataflow/signal/component/multiplexer.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/signal/component/multiplexer.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/signal/component/multiplexer.hpp 2007-10-28 17:23:41 EDT (Sun, 28 Oct 2007)
@@ -10,7 +10,7 @@
#include <boost/dataflow/signal/component/conditional_templated.hpp>
#include <boost/dataflow/signal/connection/slot_selector.hpp>
-#include <boost/fusion/sequence/container/map.hpp>
+#include <boost/fusion/container/map.hpp>
#include <functional>
Modified: sandbox/SOC/2007/signals/boost/dataflow/signal/component/storage.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/signal/component/storage.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/signal/component/storage.hpp 2007-10-28 17:23:41 EDT (Sun, 28 Oct 2007)
@@ -11,9 +11,9 @@
#include <boost/dataflow/signal/connection/slot_selector.hpp>
#include <boost/dataflow/connection/port_map.hpp>
-#include <boost/fusion/sequence/container/vector.hpp>
-#include <boost/fusion/sequence/view/transform_view.hpp>
-#include <boost/fusion/sequence/container/map.hpp>
+#include <boost/fusion/container/vector.hpp>
+#include <boost/fusion/view/transform_view.hpp>
+#include <boost/fusion/container/map.hpp>
#include <boost/dataflow/detail/make_ref.hpp>
namespace boost { namespace signals {
Modified: sandbox/SOC/2007/signals/boost/dataflow/signal/detail/unfused_typed_class.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/signal/detail/unfused_typed_class.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/signal/detail/unfused_typed_class.hpp 2007-10-28 17:23:41 EDT (Sun, 28 Oct 2007)
@@ -26,8 +26,8 @@
#include <boost/fusion/support/detail/access.hpp>
#include <boost/fusion/sequence/intrinsic/value_at.hpp>
#include <boost/fusion/sequence/intrinsic/size.hpp>
-#include <boost/fusion/sequence/container/vector/vector.hpp>
-#include <boost/fusion/sequence/conversion/as_vector.hpp>
+#include <boost/fusion/container/vector/vector.hpp>
+#include <boost/fusion/include/as_vector.hpp>
#include <boost/fusion/algorithm/transformation/pop_back.hpp>
#include <boost/fusion/functional/adapter/limits.hpp>
Modified: sandbox/SOC/2007/signals/libs/dataflow/build/xcodeide/signal_network.xcodeproj/project.pbxproj
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/build/xcodeide/signal_network.xcodeproj/project.pbxproj (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/build/xcodeide/signal_network.xcodeproj/project.pbxproj 2007-10-28 17:23:41 EDT (Sun, 28 Oct 2007)
@@ -256,12 +256,10 @@
children = (
08F98B3F0CD018E7009D642B /* signals */,
0800AC2F0C8CA99700994538 /* VTK */,
- 08668C4E0C19A16300ACB19A /* simple_distributed_example.cpp */,
08668C4F0C19A16300ACB19A /* Jamfile.v2 */,
08EFED440C1CD55100097C80 /* timing_example.cpp */,
08FC26060C46049400F59CDD /* edit_distance.cpp */,
08F9462E0C46C2F000E224E4 /* fibonacci.cpp */,
- 08C3EEA20C625AE30074AB9E /* simple_example.cpp */,
);
name = example;
path = ../../example;
@@ -500,6 +498,8 @@
08F98B3F0CD018E7009D642B /* signals */ = {
isa = PBXGroup;
children = (
+ 08C3EEA20C625AE30074AB9E /* simple_example.cpp */,
+ 08668C4E0C19A16300ACB19A /* simple_distributed_example.cpp */,
08F98B400CD0190A009D642B /* Jamfile.v2 */,
08F98B470CD01963009D642B /* intro_example.cpp */,
);
Modified: sandbox/SOC/2007/signals/libs/dataflow/example/Jamfile.v2
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/example/Jamfile.v2 (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/example/Jamfile.v2 2007-10-28 17:23:41 EDT (Sun, 28 Oct 2007)
@@ -9,16 +9,11 @@
project dataflow/example
: requirements
<include>../../..
- <library>/boost/signals//boost_signals/<link>static
+ <include>$(BOOST_ROOT)/boost
<define>BOOST_ALL_NO_LIB=1
;
# exe timing_example : timing_example.cpp ;
#exe edit_distance : edit_distance.cpp ;
#exe fibonacci : fibonacci.cpp ;
-exe simple_example : simple_example.cpp /boost/thread//boost_thread/<link>static ;
-exe simple_distributed_example : simple_distributed_example.cpp
- /boost/serialization//boost_serialization/<link>static
- /boost/thread//boost_thread/<link>static
- /boost/system//boost_system/<link>static ;
Modified: sandbox/SOC/2007/signals/libs/dataflow/example/VTK/Jamfile.v2
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/example/VTK/Jamfile.v2 (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/example/VTK/Jamfile.v2 2007-10-28 17:23:41 EDT (Sun, 28 Oct 2007)
@@ -24,6 +24,7 @@
project dataflow/test/VTK
: requirements
<include>../../../..
+ <include>$(BOOST_ROOT)
<include>/usr/local/include/vtk-5.0/
<define>BOOST_ALL_NO_LIB=1
<toolset>darwin:<linkflags>"-framework CoreServices"
Modified: sandbox/SOC/2007/signals/libs/dataflow/example/VTK/support.hpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/example/VTK/support.hpp (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/example/VTK/support.hpp 2007-10-28 17:23:41 EDT (Sun, 28 Oct 2007)
@@ -17,7 +17,7 @@
#include <boost/assert.hpp>
#include <boost/mpl/and.hpp>
#include <boost/mpl/not.hpp>
-#include <boost/fusion/sequence/container/map.hpp>
+#include <boost/fusion/container/map.hpp>
#include <boost/type_traits/is_base_of.hpp>
//[ vtk_mechanism
Modified: sandbox/SOC/2007/signals/libs/dataflow/example/signals/Jamfile.v2
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/example/signals/Jamfile.v2 (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/example/signals/Jamfile.v2 2007-10-28 17:23:41 EDT (Sun, 28 Oct 2007)
@@ -5,10 +5,15 @@
project dataflow/example/signals
: requirements
- <include>../../..
+ <include>../../../..
<library>/boost/signals//boost_signals/<link>static
<define>BOOST_ALL_NO_LIB=1
;
exe intro_example : intro_example.cpp ;
+exe simple_example : simple_example.cpp /boost/thread//boost_thread/<link>static/<thrd-api>pthread ;
+exe simple_distributed_example : simple_distributed_example.cpp
+ /boost/serialization//boost_serialization/<link>static
+ /boost/thread//boost_thread/<link>static/<thrd-api>pthread
+ /boost/system//boost_system/<link>static ;
Deleted: sandbox/SOC/2007/signals/libs/dataflow/example/simple_distributed_example.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/example/simple_distributed_example.cpp 2007-10-28 17:23:41 EDT (Sun, 28 Oct 2007)
+++ (empty file)
@@ -1,136 +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)
-
-//[ simple_distributed_example
-
-#include <boost/asio.hpp>
-
-#include <boost/dataflow/signal/component/socket_receiver.hpp>
-#include <boost/dataflow/signal/component/socket_sender.hpp>
-#include <boost/dataflow/signal/component/storage.hpp>
-#include <boost/dataflow/signal/component/timed_generator.hpp>
-#include <boost/dataflow/signal/connection.hpp>
-
-#include <boost/random/mersenne_twister.hpp>
-#include <boost/random/normal_distribution.hpp>
-#include <boost/random/variate_generator.hpp>
-#include <boost/thread/thread.hpp>
-#include <boost/thread/mutex.hpp>
-#include <boost/thread/condition.hpp>
-#include <iostream>
-
-using namespace boost;
-
-// This will be our data processor. The signature void(double) designates
-// the output signal (we will be sending out an double). The signals
-// we can receive depend on how we overload operator().
-class processor : public signals::filter<void (double)>
-{
-public:
- // Initialize the Gaussian noise generator.
- processor() : generator(mt, dist) {}
-
- // Receive void(double) signals, add some Gaussian noise, and send
- // out the modified value.
- void operator()(double x)
- {
- out(x + generator());
- }
-private:
- mt19937 mt;
- normal_distribution<> dist;
- boost::variate_generator<mt19937&, boost::normal_distribution<> > generator;
-};
-
-// This will be our data output. We just need to make a function object,
-// and specify that it is a signals::call_consumer.
-class output
-{
-public:
- typedef dataflow::signals::call_consumer port_traits;
-
- void operator()(double x)
- {
- std::cout << x << std::endl;
- }
-};
-
-mutex mutex_;
-condition cond;
-asio::io_service io_service;
-
-// This function will set up an asio acceptor, and wait for a connection.
-// Once established, it will set up a signal network which will send
-// its final signal through the socket.
-void asio_server()
-{
- // set up the socket
- asio::ip::tcp::acceptor acceptor(io_service, asio::ip::tcp::endpoint(asio::ip::tcp::v4(), 1097));
- asio::ip::tcp::socket socket(io_service);
- {
- boost::mutex::scoped_lock lock(mutex_);
- acceptor.listen();
- cond.notify_all();
- }
- acceptor.accept(socket);
-
- // For our data source, we will use timed_generator,
- // which creates its own thread and outputs it's stored value
- // at a specified time interval. We'll store a value of 0 to be sent out.
- // The signature void(double) specifies that the signal carries a double,
- // and that there is no return value.
- signals::timed_generator<void (double), signals::unfused> input(0);
- // To have our dataflow network straddle a network connection,
- // we need a socket_sender
- signals::socket_sender<void (double)> sender(socket);
-
- // create the network
- input >>= sender;
-
- // Tell the source to start producing data, every 0.5s:
- input.enable(0.5);
-
- // take a little nap :-)
- boost::xtime xt;
- boost::xtime_get(&xt, boost::TIME_UTC);
- xt.sec += 10;
- boost::thread::sleep(xt);
-
- input.join();
-}
-
-int main(int, char* [])
-{
- // start the server in a separate thread, and wait until it is listening
- boost::mutex::scoped_lock lock(mutex_);
- boost::thread t(asio_server);
- cond.wait(lock);
-
- // set up the socket
- asio::ip::tcp::endpoint endpoint_recv(asio::ip::address::from_string("127.0.0.1"), 1097);
- asio::ip::tcp::socket socket(io_service);
- socket.connect(endpoint_recv);
-
- // Setup data processor and output:
- processor proc;
- output out;
- signals::socket_receiver<void (double), signals::unfused> receiver(socket);
-
- // set up the network
- receiver >>= proc >>= out;
-
- // start asynchronous receiving
- receiver.async_read();
- boost::thread receive_thread(boost::bind(&asio::io_service::run, boost::ref(io_service)));
-
- // and wait until the server is done sending
- t.join();
-
- io_service.stop();
- receive_thread.join();
-
- return 0;
-} // int test_main(int, char* [])
-//]
Deleted: sandbox/SOC/2007/signals/libs/dataflow/example/simple_example.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/example/simple_example.cpp 2007-10-28 17:23:41 EDT (Sun, 28 Oct 2007)
+++ (empty file)
@@ -1,85 +0,0 @@
-// Copyright 2007 Stjepan Rajko.
-// Distributed under the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-//[ simple_example
-
-#include <boost/dataflow/signal/component/storage.hpp>
-#include <boost/dataflow/signal/component/timed_generator.hpp>
-#include <boost/dataflow/signal/connection.hpp>
-
-#include <boost/random/mersenne_twister.hpp>
-#include <boost/random/normal_distribution.hpp>
-#include <boost/random/variate_generator.hpp>
-#include <iostream>
-
-using namespace boost;
-
-// This will be our data processor. The signature void(double) designates
-// the output signal (we will be sending out an double). The signals
-// we can receive depend on how we overload operator().
-class processor : public signals::filter<void (double)>
-{
-public:
- // Initialize the Gaussian noise generator.
- processor() : generator(mt, dist) {}
-
- // Receive void(double) signals, add some Gaussian noise, and send
- // out the modified value.
- void operator()(double x)
- {
- out(x + generator());
- }
-private:
- mt19937 mt;
- normal_distribution<> dist;
- boost::variate_generator<mt19937&, boost::normal_distribution<> > generator;
-};
-
-// This will be our data output. We just need to make a function object,
-// and specify that it is a signals::call_consumer.
-class output
-{
-public:
- typedef dataflow::signals::call_consumer port_traits;
-
- void operator()(double x)
- {
- std::cout << x << std::endl;
- }
-};
-
-int main(int, char* [])
-{
- // For our data source, we will use timed_generator,
- // which creates its own thread and outputs it's stored value
- // at a specified time interval. We'll store a value of 0 to be sent out.
- // The signature void(double) specifies that the signal carries a double,
- // and that there is no return value.
- signals::timed_generator<void (double), signals::unfused> input(0);
-
- // Data processor and output:
- processor proc;
- output out;
-
- // Now connect the network:
- input >>= proc >>= out;
- // If you prefer, you can also do:
- // connect(input, proc);
- // connect(proc, out);
-
- // Tell the source to start producing data, every 0.5s:
- input.enable(0.5);
-
- // take a little nap :-)
- boost::xtime xt;
- boost::xtime_get(&xt, boost::TIME_UTC);
- xt.sec += 10;
- boost::thread::sleep(xt);
-
- input.join();
- return 0;
-}
-
-//]
\ No newline at end of file
Modified: sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_result_of_defined.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_result_of_defined.cpp (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/test/signals/test_result_of_defined.cpp 2007-10-28 17:23:41 EDT (Sun, 28 Oct 2007)
@@ -4,7 +4,7 @@
// http://www.boost.org/LICENSE_1_0.txt)
#include <boost/dataflow/signal/connection/detail/result_of_defined.hpp>
-#include <boost/fusion/sequence/container/map.hpp>
+#include <boost/fusion/container/map.hpp>
#include <boost/dataflow/signal/component/junction.hpp>
#include <boost/dataflow/signal/component/storage.hpp>
Modified: sandbox/SOC/2007/signals/libs/dataflow/test/test_keyed_port.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/dataflow/test/test_keyed_port.cpp (original)
+++ sandbox/SOC/2007/signals/libs/dataflow/test/test_keyed_port.cpp 2007-10-28 17:23:41 EDT (Sun, 28 Oct 2007)
@@ -7,7 +7,7 @@
#include <boost/dataflow/support/keyed_port.hpp>
#include <boost/dataflow/connection/port_map.hpp>
-#include <boost/fusion/sequence/container/map.hpp>
+#include <boost/fusion/container/map.hpp>
#include <boost/test/included/test_exec_monitor.hpp>
namespace df = boost::dataflow;
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