|
Boost-Commit : |
From: srajko_at_[hidden]
Date: 2007-07-05 16:42:21
Author: srajko
Date: 2007-07-05 16:42:19 EDT (Thu, 05 Jul 2007)
New Revision: 7368
URL: http://svn.boost.org/trac/boost/changeset/7368
Log:
update tests to recent changes. test_disconnect now fails.
Text files modified:
sandbox/SOC/2007/signals/libs/signal_network/build/xcodeide/signal_network.xcodeproj/project.pbxproj | 112 +++++++++++++++++++++++++++++----------
sandbox/SOC/2007/signals/libs/signal_network/test/Jamfile.v2 | 11 ++-
sandbox/SOC/2007/signals/libs/signal_network/test/test_branching.cpp | 31 +++++-----
sandbox/SOC/2007/signals/libs/signal_network/test/test_chain.cpp | 31 +++++-----
sandbox/SOC/2007/signals/libs/signal_network/test/test_connections.cpp | 20 +++---
sandbox/SOC/2007/signals/libs/signal_network/test/test_counter.cpp | 12 +--
sandbox/SOC/2007/signals/libs/signal_network/test/test_disconnect.cpp | 19 +++---
sandbox/SOC/2007/signals/libs/signal_network/test/test_filter.cpp | 37 ++++++++-----
sandbox/SOC/2007/signals/libs/signal_network/test/test_function.cpp | 31 +++++-----
sandbox/SOC/2007/signals/libs/signal_network/test/test_junction.cpp | 41 +++++++-------
sandbox/SOC/2007/signals/libs/signal_network/test/test_multi_args.cpp | 19 +++--
sandbox/SOC/2007/signals/libs/signal_network/test/test_multi_out.cpp | 11 +--
sandbox/SOC/2007/signals/libs/signal_network/test/test_multi_type.cpp | 18 +++--
sandbox/SOC/2007/signals/libs/signal_network/test/test_mutex.cpp | 29 +++++-----
sandbox/SOC/2007/signals/libs/signal_network/test/test_pull.cpp | 9 +-
sandbox/SOC/2007/signals/libs/signal_network/test/test_same_type.cpp | 17 +++--
sandbox/SOC/2007/signals/libs/signal_network/test/test_socket.cpp | 25 ++++----
sandbox/SOC/2007/signals/libs/signal_network/test/test_storage.cpp | 40 +++++++------
18 files changed, 292 insertions(+), 221 deletions(-)
Modified: sandbox/SOC/2007/signals/libs/signal_network/build/xcodeide/signal_network.xcodeproj/project.pbxproj
==============================================================================
--- sandbox/SOC/2007/signals/libs/signal_network/build/xcodeide/signal_network.xcodeproj/project.pbxproj (original)
+++ sandbox/SOC/2007/signals/libs/signal_network/build/xcodeide/signal_network.xcodeproj/project.pbxproj 2007-07-05 16:42:19 EDT (Thu, 05 Jul 2007)
@@ -76,11 +76,8 @@
/* End PBXAggregateTarget section */
/* Begin PBXFileReference section */
- 080DD76C0C13912C00EEB53D /* base.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = base.hpp; sourceTree = "<group>"; };
080DD76D0C13912C00EEB53D /* chain.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = chain.hpp; sourceTree = "<group>"; };
080DD76E0C13912C00EEB53D /* counter.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = counter.hpp; sourceTree = "<group>"; };
- 080DD7700C13912C00EEB53D /* connect_slot_template.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = connect_slot_template.hpp; sourceTree = "<group>"; };
- 080DD7710C13912C00EEB53D /* connect_template.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = connect_template.hpp; sourceTree = "<group>"; };
080DD7750C13912C00EEB53D /* serialize_fusion_vector.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = serialize_fusion_vector.hpp; sourceTree = "<group>"; };
080DD7790C13912C00EEB53D /* unfused_inherited.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = unfused_inherited.hpp; sourceTree = "<group>"; };
080DD77A0C13912C00EEB53D /* unfused_typed_class.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = unfused_typed_class.hpp; sourceTree = "<group>"; };
@@ -104,25 +101,39 @@
08C6759C0C13A03E00D85379 /* test_mutex.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = test_mutex.cpp; sourceTree = "<group>"; };
08C6759D0C13A03E00D85379 /* test_socket.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = test_socket.cpp; sourceTree = "<group>"; };
08C6759E0C13A03E00D85379 /* test_storage.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = test_storage.cpp; sourceTree = "<group>"; };
+ 08C8F1470C3B22F200B3CE45 /* bind_object.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = bind_object.hpp; sourceTree = "<group>"; };
+ 08C8F14F0C3B269B00B3CE45 /* test_bind_object.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = test_bind_object.cpp; sourceTree = "<group>"; };
08EBB2CB0C210CC9004BE220 /* test_pull.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = test_pull.cpp; sourceTree = "<group>"; };
08EBB3020C21105B004BE220 /* test_disconnect.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = test_disconnect.cpp; sourceTree = "<group>"; };
08EBB3910C211C36004BE220 /* test_multi_type.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = test_multi_type.cpp; sourceTree = "<group>"; };
08EBB3BC0C211F23004BE220 /* test_same_type.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = test_same_type.cpp; sourceTree = "<group>"; };
08EBB3E00C21209B004BE220 /* test_multi_args.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = test_multi_args.cpp; sourceTree = "<group>"; };
+ 08EC0DFE0C3C130A00CC8AE0 /* connection.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = connection.hpp; sourceTree = "<group>"; };
+ 08EC0E640C3C215900CC8AE0 /* result_of_defined.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = result_of_defined.hpp; sourceTree = "<group>"; };
08EC84040C18DA8100820E53 /* connect.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = connect.hpp; sourceTree = "<group>"; };
- 08EC847E0C18EC9800820E53 /* connect_slot.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = connect_slot.hpp; sourceTree = "<group>"; };
+ 08EF63F20C33320D0099D00A /* generic_template.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = generic_template.hpp; sourceTree = "<group>"; };
+ 08EFC1EC0C30987700C730EC /* modifier.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = modifier.hpp; sourceTree = "<group>"; };
08EFEADE0C1C892A00097C80 /* instantiator.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = instantiator.hpp; sourceTree = "<group>"; };
08EFEB970C1C983500097C80 /* applicator.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = applicator.hpp; sourceTree = "<group>"; };
08EFEC040C1CAD0100097C80 /* conditional.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = conditional.hpp; sourceTree = "<group>"; };
- 08EFEC960C1CC6F200097C80 /* modifier.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = modifier.hpp; sourceTree = "<group>"; };
+ 08EFEC960C1CC6F200097C80 /* conditional_modifier.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = conditional_modifier.hpp; sourceTree = "<group>"; };
08EFECA40C1CCE8300097C80 /* storable.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = storable.hpp; sourceTree = "<group>"; };
08EFED440C1CD55100097C80 /* timing_example.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = timing_example.cpp; sourceTree = "<group>"; };
08F082020C1D591000687E1B /* introduction.qbk */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = introduction.qbk; sourceTree = "<group>"; };
08F082570C1DD53400687E1B /* components.qbk */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = components.qbk; sourceTree = "<group>"; };
08F0825A0C1DD58500687E1B /* connections.qbk */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = connections.qbk; sourceTree = "<group>"; };
08F082840C1DE02F00687E1B /* test_branching.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = test_branching.cpp; sourceTree = "<group>"; };
+ 08F74F790C3A9E8200FD50BE /* slot_type.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = slot_type.hpp; sourceTree = "<group>"; };
+ 08F74F7D0C3A9F6900FD50BE /* slot_selector.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = slot_selector.hpp; sourceTree = "<group>"; };
+ 08F74F820C3AA0FA00FD50BE /* operators.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = operators.hpp; sourceTree = "<group>"; };
+ 08F74FB00C3AB06200FD50BE /* filter_base.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = filter_base.hpp; sourceTree = "<group>"; };
+ 08F74FC10C3AB4E100FD50BE /* traits.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = traits.hpp; sourceTree = "<group>"; };
+ 08F79CD00C3B50B300B6450B /* signal.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = signal.hpp; sourceTree = "<group>"; };
+ 08F79CF00C3B58E700B6450B /* test_connect.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = test_connect.cpp; sourceTree = "<group>"; };
+ 08F79E140C3B779400B6450B /* slot_selector_map.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = slot_selector_map.hpp; sourceTree = "<group>"; };
08F803D30C21895700D8296D /* test_multi_out.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = test_multi_out.cpp; sourceTree = "<group>"; };
08F804AD0C219CC300D8296D /* test_filter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = test_filter.cpp; sourceTree = "<group>"; };
+ 08F8A00B0C3C879C007637A9 /* test_result_of_defined.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = test_result_of_defined.cpp; sourceTree = "<group>"; };
08FD5DE80C1BA60700F00877 /* html_footer.html */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.html; path = html_footer.html; sourceTree = "<group>"; };
08FD5DE90C1BA60700F00877 /* html_header.html */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.html; path = html_header.html; sourceTree = "<group>"; };
08FD5DEA0C1BA60700F00877 /* signal_network.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = signal_network.hpp; sourceTree = "<group>"; };
@@ -147,23 +158,10 @@
080DD76B0C13912C00EEB53D /* signal_network */ = {
isa = PBXGroup;
children = (
- 080DD76C0C13912C00EEB53D /* base.hpp */,
- 080DD76D0C13912C00EEB53D /* chain.hpp */,
- 080DD76E0C13912C00EEB53D /* counter.hpp */,
+ 08F74F750C3A9E0900FD50BE /* connection */,
+ 08F74F650C3A9C9700FD50BE /* component */,
080DD76F0C13912C00EEB53D /* detail */,
- 080DD77B0C13912C00EEB53D /* filter.hpp */,
- 080DD77C0C13912C00EEB53D /* function.hpp */,
- 080DD77D0C13912C00EEB53D /* junction.hpp */,
- 080DD77E0C13912C00EEB53D /* mutex.hpp */,
- 080DD77F0C13912C00EEB53D /* selector.hpp */,
- 080DD7800C13912C00EEB53D /* socket_receiver.hpp */,
- 080DD7810C13912C00EEB53D /* socket_sender.hpp */,
- 080DD7820C13912C00EEB53D /* storage.hpp */,
- 080DD7830C13912C00EEB53D /* timed_generator.hpp */,
- 08EFEADE0C1C892A00097C80 /* instantiator.hpp */,
- 08EFEB970C1C983500097C80 /* applicator.hpp */,
- 08EFEC040C1CAD0100097C80 /* conditional.hpp */,
- 08EFEC960C1CC6F200097C80 /* modifier.hpp */,
+ 08EC0DFE0C3C130A00CC8AE0 /* connection.hpp */,
);
name = signal_network;
path = ../../../../boost/signal_network;
@@ -172,14 +170,7 @@
080DD76F0C13912C00EEB53D /* detail */ = {
isa = PBXGroup;
children = (
- 080DD7700C13912C00EEB53D /* connect_slot_template.hpp */,
- 080DD7710C13912C00EEB53D /* connect_template.hpp */,
- 080DD7750C13912C00EEB53D /* serialize_fusion_vector.hpp */,
- 080DD7790C13912C00EEB53D /* unfused_inherited.hpp */,
080DD77A0C13912C00EEB53D /* unfused_typed_class.hpp */,
- 08EC84040C18DA8100820E53 /* connect.hpp */,
- 08EC847E0C18EC9800820E53 /* connect_slot.hpp */,
- 08EFECA40C1CCE8300097C80 /* storable.hpp */,
);
path = detail;
sourceTree = "<group>";
@@ -215,11 +206,74 @@
08EBB3E00C21209B004BE220 /* test_multi_args.cpp */,
08F803D30C21895700D8296D /* test_multi_out.cpp */,
08F804AD0C219CC300D8296D /* test_filter.cpp */,
+ 08C8F14F0C3B269B00B3CE45 /* test_bind_object.cpp */,
+ 08F79CF00C3B58E700B6450B /* test_connect.cpp */,
+ 08F8A00B0C3C879C007637A9 /* test_result_of_defined.cpp */,
);
name = test;
path = ../../test;
sourceTree = SOURCE_ROOT;
};
+ 08F74F650C3A9C9700FD50BE /* component */ = {
+ isa = PBXGroup;
+ children = (
+ 08F74F740C3A9DD300FD50BE /* detail */,
+ 08EFEC960C1CC6F200097C80 /* conditional_modifier.hpp */,
+ 08EFC1EC0C30987700C730EC /* modifier.hpp */,
+ 080DD77B0C13912C00EEB53D /* filter.hpp */,
+ 080DD77C0C13912C00EEB53D /* function.hpp */,
+ 080DD7820C13912C00EEB53D /* storage.hpp */,
+ 080DD76D0C13912C00EEB53D /* chain.hpp */,
+ 080DD76E0C13912C00EEB53D /* counter.hpp */,
+ 080DD77D0C13912C00EEB53D /* junction.hpp */,
+ 080DD77E0C13912C00EEB53D /* mutex.hpp */,
+ 080DD77F0C13912C00EEB53D /* selector.hpp */,
+ 080DD7800C13912C00EEB53D /* socket_receiver.hpp */,
+ 080DD7810C13912C00EEB53D /* socket_sender.hpp */,
+ 080DD7830C13912C00EEB53D /* timed_generator.hpp */,
+ 08EFEADE0C1C892A00097C80 /* instantiator.hpp */,
+ 08EFEB970C1C983500097C80 /* applicator.hpp */,
+ 08EFEC040C1CAD0100097C80 /* conditional.hpp */,
+ 08F74FB00C3AB06200FD50BE /* filter_base.hpp */,
+ 08F74FC10C3AB4E100FD50BE /* traits.hpp */,
+ );
+ path = component;
+ sourceTree = "<group>";
+ };
+ 08F74F740C3A9DD300FD50BE /* detail */ = {
+ isa = PBXGroup;
+ children = (
+ 08EF63F20C33320D0099D00A /* generic_template.hpp */,
+ 080DD7750C13912C00EEB53D /* serialize_fusion_vector.hpp */,
+ 080DD7790C13912C00EEB53D /* unfused_inherited.hpp */,
+ 08EFECA40C1CCE8300097C80 /* storable.hpp */,
+ );
+ path = detail;
+ sourceTree = "<group>";
+ };
+ 08F74F750C3A9E0900FD50BE /* connection */ = {
+ isa = PBXGroup;
+ children = (
+ 08F74F780C3A9E6800FD50BE /* detail */,
+ 08F74F7D0C3A9F6900FD50BE /* slot_selector.hpp */,
+ 08F74F820C3AA0FA00FD50BE /* operators.hpp */,
+ 08F79CD00C3B50B300B6450B /* signal.hpp */,
+ 08F79E140C3B779400B6450B /* slot_selector_map.hpp */,
+ 08EC84040C18DA8100820E53 /* connect.hpp */,
+ );
+ path = connection;
+ sourceTree = "<group>";
+ };
+ 08F74F780C3A9E6800FD50BE /* detail */ = {
+ isa = PBXGroup;
+ children = (
+ 08EC0E640C3C215900CC8AE0 /* result_of_defined.hpp */,
+ 08F74F790C3A9E8200FD50BE /* slot_type.hpp */,
+ 08C8F1470C3B22F200B3CE45 /* bind_object.hpp */,
+ );
+ path = detail;
+ sourceTree = "<group>";
+ };
08FD5DE40C1BA60700F00877 /* doc */ = {
isa = PBXGroup;
children = (
@@ -342,7 +396,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "# shell script goes here\nstyle=`echo $BUILD_STYLE | sed 'y/DR/dr/'` \nbjam --v2 --toolset=darwin ../../example $style";
+ shellScript = "# shell script goes here\nstyle=`echo $BUILD_STYLE | sed 'y/DR/dr/'` \nbjam --v2 --toolset=darwin ../../example clean $style";
};
08F0FB070C19826400D0865B /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
Modified: sandbox/SOC/2007/signals/libs/signal_network/test/Jamfile.v2
==============================================================================
--- sandbox/SOC/2007/signals/libs/signal_network/test/Jamfile.v2 (original)
+++ sandbox/SOC/2007/signals/libs/signal_network/test/Jamfile.v2 2007-07-05 16:42:19 EDT (Thu, 05 Jul 2007)
@@ -13,6 +13,11 @@
<define>BOOST_ALL_NO_LIB=1
;
+run test_result_of_defined.cpp ;
+
+run test_bind_object.cpp ;
+run test_connect.cpp ;
+
run test_filter.cpp ;
run test_storage.cpp ;
run test_counter.cpp ;
@@ -20,10 +25,10 @@
run test_function.cpp ;
run test_chain.cpp ;
run test_mutex.cpp
- /boost/thread//boost_thread/<link>static ;
+ /boost/thread//boost_thread/<link>static ;
run test_socket.cpp
- /boost/serialization//boost_serialization/<link>static
- /boost/thread//boost_thread/<link>static ;
+ /boost/serialization//boost_serialization/<link>static
+ /boost/thread//boost_thread/<link>static ;
run test_branching.cpp ;
run test_pull.cpp ;
run test_disconnect.cpp ;
Modified: sandbox/SOC/2007/signals/libs/signal_network/test/test_branching.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/signal_network/test/test_branching.cpp (original)
+++ sandbox/SOC/2007/signals/libs/signal_network/test/test_branching.cpp 2007-07-05 16:42:19 EDT (Thu, 05 Jul 2007)
@@ -3,27 +3,26 @@
// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
-#include <boost/signal_network/storage.hpp>
-#include <boost/signal_network/counter.hpp>
+#include <boost/signal_network/component/storage.hpp>
+#include <boost/signal_network/component/counter.hpp>
+#include <boost/signal_network/connection.hpp>
#include <boost/test/included/test_exec_monitor.hpp>
-// for access to connection operators >>= and |
-using namespace boost::signal_network;
using namespace boost;
int test_main(int, char* [])
{
{
//[ test_branching_unfused
- signet::storage<void ()>::unfused banger;
- signet::counter<void ()>::unfused counter;
- signet::storage<void (float)>::unfused floater(2.5f);
- signet::storage<void (float)>::unfused collector(0.0f);
+ signals::storage<void (), signals::unfused> banger;
+ signals::counter<void (), signals::unfused> counter;
+ signals::storage<void (float), signals::unfused> floater(2.5f);
+ signals::storage<void (float), signals::unfused> collector(0.0f);
banger
- // floater connects to collector, banger to floater
- | (floater >>= collector)
+ // floater connects to collector, banger to floater.send_slot()
+ | (floater >>= collector).send_slot()
| counter; // and banger to counter
banger();
@@ -33,14 +32,14 @@
}
{
//[ test_branching_fused
- signet::storage<void ()> banger;
- signet::counter<void ()> counter;
- signet::storage<void (float)> floater(2.5f);
- signet::storage<void (float)> collector(0.0f);
+ 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);
banger
- // floater connects to collector, banger to floater
- | (floater >>= collector)
+ // floater connects to collector, banger to floater.send_slot()
+ | (floater >>= collector).send_slot()
| counter; // and banger to counter
banger();
Modified: sandbox/SOC/2007/signals/libs/signal_network/test/test_chain.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/signal_network/test/test_chain.cpp (original)
+++ sandbox/SOC/2007/signals/libs/signal_network/test/test_chain.cpp 2007-07-05 16:42:19 EDT (Thu, 05 Jul 2007)
@@ -3,26 +3,27 @@
// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
-#include <boost/signal_network/chain.hpp>
-#include <boost/signal_network/storage.hpp>
+#include <boost/signal_network/component/chain.hpp>
+#include <boost/signal_network/component/storage.hpp>
+#include <boost/signal_network/connection.hpp>
+
#include <boost/fusion/algorithm/iteration/for_each.hpp>
#include <boost/fusion/algorithm/transformation/transform.hpp>
-#include <boost/test/included/test_exec_monitor.hpp>
#include <boost/fusion/sequence/generation/make_vector.hpp>
-// for access to connection operators >>= and |
-using namespace boost::signal_network;
+#include <boost/test/included/test_exec_monitor.hpp>
+
using namespace boost;
//[ test_chain_classes
-class UnfusedDoublerClass : public signet::filter<void (float), signet::unfused_out_signal>
+class UnfusedDoublerClass : public signals::filter<void (float), signals::unfused>
{
public:
typedef void result_type;
void operator()(float x) {out(2*x);}
};
-class FusedDoublerClass : public signet::filter<void (float), signet::fused_out_signal>
+class FusedDoublerClass : public signals::filter<void (float), signals::fused>
{
public:
typedef void result_type;
@@ -40,24 +41,24 @@
{
{
//[ test_chain_unfused
- signet::chain<UnfusedDoublerClass, void(float)>::unfused doubling_chain(4, NULL);
- signet::storage<void (float)>::unfused floater(1.0f);
- signet::storage<void (float)>::unfused collector(0.0f);
+ signals::chain<void(float), UnfusedDoublerClass> doubling_chain(4, NULL);
+ signals::storage<void (float)> floater(1.0f);
+ signals::storage<void (float)> collector(0.0f);
floater >>= doubling_chain >>= collector;
- floater();
+ floater.send();
BOOST_CHECK_EQUAL(collector.at<0>(), 16.0f);
//]
}
{
//[ test_chain_fused
- signet::chain<FusedDoublerClass, void(float)> doubling_chain(4, NULL);
- signet::storage<void (float)> floater(1.0f);
- signet::storage<void (float)> collector(0.0f);
+ signals::chain<void(float), FusedDoublerClass> doubling_chain(4, NULL);
+ signals::storage<void (float)> floater(1.0f);
+ signals::storage<void (float)> collector(0.0f);
floater >>= doubling_chain >>= collector;
- floater();
+ floater.send();
BOOST_CHECK_EQUAL(collector.at<0>(), 16.0f);
//]
Modified: sandbox/SOC/2007/signals/libs/signal_network/test/test_connections.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/signal_network/test/test_connections.cpp (original)
+++ sandbox/SOC/2007/signals/libs/signal_network/test/test_connections.cpp 2007-07-05 16:42:19 EDT (Thu, 05 Jul 2007)
@@ -34,7 +34,7 @@
using namespace boost::signal_network;
using namespace boost;
-class SignalFloatDoubler : public signet::filter<void (float, float)>
+class SignalFloatDoubler : public signals::filter<void (float, float)>
{
public:
void operator()(float val) {out(val, val*2);}
@@ -60,16 +60,16 @@
}
};
-class SignalMultiInheritedCollector : public signet::storage<void (float)>::unfused, public SignalVoidCounter, public SignalFloat2Collector
+class SignalMultiInheritedCollector : public signals::storage<void (float), signals::unfused>, public SignalVoidCounter, public SignalFloat2Collector
{
public:
- SignalMultiInheritedCollector() : signet::storage<void (float)>::unfused(0) {}
+ SignalMultiInheritedCollector() : signals::storage<void (float), signals::unfused>(0) {}
};
void multi_num_args_inherited_test()
{
- signet::storage<void ()>::unfused banger;
- signet::storage<void (float)>::unfused floater;
+ signals::storage<void (), signals::unfused> banger;
+ signals::storage<void (float), signals::unfused> floater;
floater(2.5f);
SignalFloatDuplicator duplicator;
SignalMultiInheritedCollector collector;
@@ -78,7 +78,7 @@
| (SignalVoidCounter &) collector
|
(floater
- | (signet::storage<void (float)>::unfused &) collector
+ | (signals::storage<void (float), signals::unfused> &) collector
| (duplicator >>= (SignalFloat2Collector &) collector));
banger();
@@ -93,12 +93,12 @@
void selector_test()
{
-/* signet::storage<void ()>::unfused banger;
- signet::storage<void (float)>::unfused floater1, floater2;
+/* signals::storage<void (), signals::unfused> banger;
+ signals::storage<void (float), signals::unfused> floater1, floater2;
floater1(1.0f);
floater2(2.0f);
- signet::storage<void (float)>::unfused collector(0.0f);
- signet::selector<2, void (float)> selector;
+ signals::storage<void (float), signals::unfused> collector(0.0f);
+ signals::selector<2, void (float)> selector;
banger >>= floater1 >>= selector.slot1();
banger >>= floater2 >>= selector.slot2();
Modified: sandbox/SOC/2007/signals/libs/signal_network/test/test_counter.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/signal_network/test/test_counter.cpp (original)
+++ sandbox/SOC/2007/signals/libs/signal_network/test/test_counter.cpp 2007-07-05 16:42:19 EDT (Thu, 05 Jul 2007)
@@ -3,19 +3,17 @@
// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
-#include <boost/signal_network/counter.hpp>
-
-// for access to connection operators >>= and |
-using namespace boost::signal_network;
-using namespace boost;
+#include <boost/signal_network/component/counter.hpp>
#include <boost/test/included/test_exec_monitor.hpp>
+using namespace boost;
+
int test_main(int, char* [])
{
{
//[ test_counter_unfused
- signet::counter<void ()>::unfused counter;
+ signals::counter<void (), signals::unfused> counter;
for (int i=0; i<33; i++)
counter();
@@ -24,7 +22,7 @@
}
{
//[ test_counter_fused
- signet::counter<void ()> counter;
+ signals::counter<void (), signals::fused> counter;
for (int i=0; i<33; i++)
counter(boost::fusion::vector<>());
Modified: sandbox/SOC/2007/signals/libs/signal_network/test/test_disconnect.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/signal_network/test/test_disconnect.cpp (original)
+++ sandbox/SOC/2007/signals/libs/signal_network/test/test_disconnect.cpp 2007-07-05 16:42:19 EDT (Thu, 05 Jul 2007)
@@ -3,29 +3,28 @@
// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
-#include <boost/signal_network/storage.hpp>
-#include <boost/signal_network/counter.hpp>
+#include <boost/signal_network/component/storage.hpp>
+#include <boost/signal_network/component/counter.hpp>
+#include <boost/signal_network/connection.hpp>
#include <boost/test/included/test_exec_monitor.hpp>
-// for access to connection operators >>= and |
-using namespace boost::signal_network;
using namespace boost;
int test_main(int, char* [])
{
{
//[ test_disconnect_unfused
- signet::storage<void ()>::unfused banger;
+ signals::storage<void (), signals::unfused> banger;
{
- signet::counter<void ()>::unfused counter;
- signet::storage<void (float)>::unfused floater;
+ signals::counter<void (), signals::unfused> counter;
+ signals::storage<void (float), signals::unfused> floater;
floater(2.5f);
- signet::storage<void (float)>::unfused collector(0.0f);
+ signals::storage<void (float), signals::unfused> collector(0.0f);
banger
| counter
- | (floater >>= collector);
+ | (floater >>= collector).send_slot();
banger();
BOOST_CHECK_EQUAL(counter.count(), 1);
@@ -39,7 +38,7 @@
#endif
BOOST_CHECK_EQUAL(banger.default_signal().num_slots(), 0u);
- signet::counter<void ()>::unfused counter;
+ signals::counter<void (), signals::unfused> counter;
banger >>= counter;
banger.disconnect_all_slots();
Modified: sandbox/SOC/2007/signals/libs/signal_network/test/test_filter.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/signal_network/test/test_filter.cpp (original)
+++ sandbox/SOC/2007/signals/libs/signal_network/test/test_filter.cpp 2007-07-05 16:42:19 EDT (Thu, 05 Jul 2007)
@@ -3,23 +3,32 @@
// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
-#include <boost/signal_network/storage.hpp>
+#include <boost/signal_network/component/filter.hpp>
+#include <boost/signal_network/component/storage.hpp>
+#include <boost/signal_network/connection.hpp>
+
+#include <boost/fusion/sequence/intrinsic/at.hpp>
+#include <boost/type_traits/is_object.hpp>
#include <boost/test/included/test_exec_monitor.hpp>
-// for access to connection operators >>= and |
-using namespace boost::signal_network;
using namespace boost;
//[ test_filter_classes
-class DoublerClass : public signet::filter<void (float), signet::unfused_out_signal>
+class DoublerClass : public signals::filter<void (float), signals::unfused>
{
public:
+ template<typename FArgs>
+ struct result
+ {
+ typedef void type;
+ };
+
void operator()(float x) {out(2*x);}
};
-class FusedDoublerClass : public signet::filter<void (float), signet::fused_out_signal>
+class FusedDoublerClass : public signals::filter<void (float), signals::fused>
{
public:
typedef void result_type;
@@ -27,7 +36,7 @@
{
// this could be more general but I'm having problems with the general approach...
fusion::vector<float> y;
- boost::fusion::at_c<0>(y) = 2 * boost::fusion::at_c<0>(x);
+ fusion::at_c<0>(y) = 2 * fusion::at_c<0>(x);
fused_out(y);
}
};
@@ -35,16 +44,16 @@
//]
int test_main(int, char* [])
-{
+{
{
//[ test_filter_unfused
DoublerClass doubler1, doubler2;
- signet::storage<void (float)>::unfused floater(1.0f);
- signet::storage<void (float)>::unfused collector(0.0f);
-
+ signals::storage<void (float)> floater(1.0f);
+ signals::storage<void (float)> collector(0.0f);
+
floater >>= doubler1 >>= doubler2 >>= collector;
- floater();
+ floater.send();
BOOST_CHECK_EQUAL(collector.at<0>(), 4.0f);
@@ -54,11 +63,11 @@
//[ test_filter_fused
FusedDoublerClass doubler1, doubler2;
- signet::storage<void (float)> floater(1.0f);
- signet::storage<void (float)> collector(0.0f);
+ signals::storage<void (float), signals::fused> floater(1.0f);
+ signals::storage<void (float), signals::fused> collector(0.0f);
floater >>= doubler1 >>= doubler2 >>= collector;
- floater();
+ floater.send();
BOOST_CHECK_EQUAL(collector.at<0>(), 4.0f);
Modified: sandbox/SOC/2007/signals/libs/signal_network/test/test_function.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/signal_network/test/test_function.cpp (original)
+++ sandbox/SOC/2007/signals/libs/signal_network/test/test_function.cpp 2007-07-05 16:42:19 EDT (Thu, 05 Jul 2007)
@@ -3,43 +3,42 @@
// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
-#include <boost/signal_network/function.hpp>
-#include <boost/signal_network/storage.hpp>
-
-// for access to connection operators >>= and |
-using namespace boost::signal_network;
-using namespace boost;
+#include <boost/signal_network/component/function.hpp>
+#include <boost/signal_network/component/storage.hpp>
+#include <boost/signal_network/connection.hpp>
#include <boost/test/included/test_exec_monitor.hpp>
+using namespace boost;
+
int test_main(int, char* [])
{
{
//[ test_function_unfused
- signet::function<void (float), float(float)>::unfused
+ signals::function<void (float), float(float), signals::unfused>
double_fun1(boost::bind(std::multiplies<float>(), _1, 2.0f));
- signet::function<void (float), float(float)>::unfused
+ signals::function<void (float), float(float), signals::unfused>
double_fun2(boost::bind(std::multiplies<float>(), _1, 2.0f));
- signet::storage<void (float)>::unfused floater(1.0f);
- signet::storage<void (float)>::unfused collector(0.0f);
+ signals::storage<void (float), signals::unfused> floater(1.0f);
+ signals::storage<void (float), signals::unfused> collector(0.0f);
floater >>= double_fun1 >>= double_fun2 >>= collector;
- floater();
+ floater.send();
BOOST_CHECK_EQUAL(collector.at<0>(), 4.0f);
//]
}
{
//[ test_function_fused
- signet::function<void (float), float(float)>
+ signals::function<void (float), float(float), signals::fused>
double_fun1(boost::bind(std::multiplies<float>(), _1, 2.0f));
- signet::function<void (float), float(float)>
+ signals::function<void (float), float(float), signals::fused>
double_fun2(boost::bind(std::multiplies<float>(), _1, 2.0f));
- signet::storage<void (float)> floater(1.0f);
- signet::storage<void (float)> collector(0.0f);
+ signals::storage<void (float), signals::fused> floater(1.0f);
+ signals::storage<void (float), signals::fused> collector(0.0f);
floater >>= double_fun1 >>= double_fun2 >>= collector;
- floater();
+ floater.send();
BOOST_CHECK_EQUAL(collector.at<0>(), 4.0f);
//]
Modified: sandbox/SOC/2007/signals/libs/signal_network/test/test_junction.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/signal_network/test/test_junction.cpp (original)
+++ sandbox/SOC/2007/signals/libs/signal_network/test/test_junction.cpp 2007-07-05 16:42:19 EDT (Thu, 05 Jul 2007)
@@ -3,53 +3,52 @@
// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
-#include <boost/signal_network/junction.hpp>
-#include <boost/signal_network/counter.hpp>
-#include <boost/signal_network/storage.hpp>
-
-// for access to connection operators >>= and |
-using namespace boost::signal_network;
-using namespace boost;
+#include <boost/signal_network/component/junction.hpp>
+#include <boost/signal_network/component/counter.hpp>
+#include <boost/signal_network/component/storage.hpp>
+#include <boost/signal_network/connection.hpp>
#include <boost/test/included/test_exec_monitor.hpp>
+using namespace boost;
+
int test_main(int, char* [])
{
{
//[ test_junction_unfused
- signet::storage<void ()>::unfused banger1, banger2;
- signet::counter<void ()>::unfused counter1, counter2;
- signet::junction<void ()>::unfused junction;
+ signals::storage<void (), signals::unfused> banger1, banger2;
+ signals::counter<void (), signals::unfused> counter1, counter2;
+ signals::junction<void (), signals::unfused> junction;
banger1 >>= junction >>= counter1;
banger2 >>= junction >>= counter2;
- banger1();
- banger2();
-
+ banger1.send();
+ banger2.send();
+
BOOST_CHECK_EQUAL(counter1.count(), 2);
BOOST_CHECK_EQUAL(counter2.count(), 2);
junction.disable();
- banger1();
- banger2();
+ banger1.send();
+ banger2.send();
BOOST_CHECK_EQUAL(counter1.count(), 2);
BOOST_CHECK_EQUAL(counter2.count(), 2);
junction.enable();
- banger1();
- banger2();
+ banger1.send();
+ banger2.send();
- BOOST_CHECK_EQUAL(counter1.count(), 4);
+ BOOST_CHECK_EQUAL(counter1.count(), 4);
BOOST_CHECK_EQUAL(counter2.count(), 4);
//]
}
{
//[ test_junction_fused
- signet::storage<void ()> banger1, banger2;
- signet::counter<void ()> counter1, counter2;
- signet::junction<void ()> junction;
+ signals::storage<void (), signals::fused> banger1, banger2;
+ signals::counter<void (), signals::fused> counter1, counter2;
+ signals::junction<void (), signals::fused> junction;
banger1 >>= junction >>= counter1;
banger2 >>= junction >>= counter2;
Modified: sandbox/SOC/2007/signals/libs/signal_network/test/test_multi_args.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/signal_network/test/test_multi_args.cpp (original)
+++ sandbox/SOC/2007/signals/libs/signal_network/test/test_multi_args.cpp 2007-07-05 16:42:19 EDT (Thu, 05 Jul 2007)
@@ -3,20 +3,21 @@
// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
-#include <boost/signal_network/storage.hpp>
+#include <boost/signal_network/component/storage.hpp>
+#include <boost/signal_network/connection.hpp>
+
#include <boost/optional.hpp>
#include <boost/test/included/test_exec_monitor.hpp>
-// for access to connection operators >>= and |
-using namespace boost::signal_network;
using namespace boost;
//[ test_multi_args_class1
-class SignalFloatDuplicator : public signet::filter<void (float, float)>
+class SignalFloatDuplicator : public signals::filter<void (float, float), signals::unfused>
{
public:
+ typedef void result_type;
void operator()(float val) {out(val, val);}
};
@@ -29,7 +30,9 @@
optional<float> last, last1, last2;
int cnt;
public:
- SignalMultiCollector() : cnt(0) {}
+ typedef void result_type;
+
+ SignalMultiCollector() : cnt(0) {}
void operator()()
{
cnt++;
@@ -67,8 +70,8 @@
{
{
//[ test_multi_args_unfused
- signet::storage<void ()>::unfused banger;
- signet::storage<void (float)>::unfused floater;
+ signals::storage<void (), signals::unfused> banger;
+ signals::storage<void (float), signals::unfused> floater;
floater(2.5f);
SignalFloatDuplicator duplicator;
SignalMultiCollector collector;
@@ -78,7 +81,7 @@
|
(floater
| collector
- | (duplicator >>= collector));
+ | (duplicator >>= collector)).send_slot();
banger();
BOOST_CHECK_EQUAL(collector.GetCount(), 1);
Modified: sandbox/SOC/2007/signals/libs/signal_network/test/test_multi_out.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/signal_network/test/test_multi_out.cpp (original)
+++ sandbox/SOC/2007/signals/libs/signal_network/test/test_multi_out.cpp 2007-07-05 16:42:19 EDT (Thu, 05 Jul 2007)
@@ -3,17 +3,16 @@
// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
-#include <boost/signal_network/storage.hpp>
+#include <boost/signal_network/component/storage.hpp>
+#include <boost/signal_network/connection.hpp>
#include <boost/test/included/test_exec_monitor.hpp>
-// for access to connection operators >>= and |
-using namespace boost::signal_network;
using namespace boost;
//[ test_multi_out_classes
-class SignalOutIntFloat : public signet::filter<void (float)>
+class SignalOutIntFloat : public signals::filter<void (float), signals::unfused>
{
public:
SignalOutIntFloat(float x) : x(x) {}
@@ -35,8 +34,8 @@
//[ test_multi_out_unfused
SignalOutIntFloat multi_out(2.5f);
- signet::storage<void (float)>::unfused float_collector(0);
- signet::storage<void (int)>::unfused int_collector(0);
+ signals::storage<void (float), signals::unfused> float_collector(0);
+ signals::storage<void (int), signals::unfused> int_collector(0);
multi_out >>= float_collector;
multi_out.out_int >>= int_collector;
Modified: sandbox/SOC/2007/signals/libs/signal_network/test/test_multi_type.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/signal_network/test/test_multi_type.cpp (original)
+++ sandbox/SOC/2007/signals/libs/signal_network/test/test_multi_type.cpp 2007-07-05 16:42:19 EDT (Thu, 05 Jul 2007)
@@ -3,13 +3,13 @@
// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
-#include <boost/signal_network/storage.hpp>
+#include <boost/signal_network/component/storage.hpp>
+#include <boost/signal_network/connection.hpp>
+
#include <boost/optional.hpp>
#include <boost/test/included/test_exec_monitor.hpp>
-// for access to connection operators >>= and |
-using namespace boost::signal_network;
using namespace boost;
//[ test_multi_type_classes
@@ -19,6 +19,8 @@
optional<int> last_int;
optional<float> last_float;
public:
+ typedef void result_type;
+
void operator()(int x)
{
last_int = x;
@@ -43,16 +45,16 @@
{
{
//[ test_multi_type_unfused
- signet::storage<void ()>::unfused banger;
- signet::storage<void (int)>::unfused inter;
+ signals::storage<void (), signals::unfused> banger;
+ signals::storage<void (int), signals::unfused> inter;
inter(2);
- signet::storage<void (float)>::unfused floater;
+ signals::storage<void (float), signals::unfused> floater;
floater(3.3f);
SignalIntFloatCollector collector;
banger
- | (inter >>= collector)
- | (floater >>= collector);
+ | (inter >>= collector).send_slot()
+ | (floater >>= collector).send_slot();
banger();
BOOST_CHECK_EQUAL(collector.GetLastInt(), optional<int>(2));
Modified: sandbox/SOC/2007/signals/libs/signal_network/test/test_mutex.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/signal_network/test/test_mutex.cpp (original)
+++ sandbox/SOC/2007/signals/libs/signal_network/test/test_mutex.cpp 2007-07-05 16:42:19 EDT (Thu, 05 Jul 2007)
@@ -3,24 +3,23 @@
// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
-#include <boost/signal_network/mutex.hpp>
-#include <boost/signal_network/timed_generator.hpp>
-#include <boost/signal_network/counter.hpp>
-
-// for access to connection operators >>= and |
-using namespace boost::signal_network;
-using namespace boost;
+#include <boost/signal_network/component/mutex.hpp>
+#include <boost/signal_network/component/timed_generator.hpp>
+#include <boost/signal_network/component/counter.hpp>
+#include <boost/signal_network/connection.hpp>
#include <boost/test/included/test_exec_monitor.hpp>
+using namespace boost;
+
int test_main(int, char* [])
{
{
//[ test_mutex_unfused
- signet::timed_generator<void ()>::unfused banger1;
- signet::timed_generator<void ()>::unfused banger2;
- signet::mutex<void ()>::unfused lock;
- signet::counter<void ()>::unfused counter;
+ signals::timed_generator<void (), signals::unfused> banger1;
+ signals::timed_generator<void (), signals::unfused> banger2;
+ signals::mutex<void (), signals::unfused> lock;
+ signals::counter<void (), signals::unfused> counter;
banger1 >>= lock >>= counter;
banger2 >>= lock;
@@ -36,10 +35,10 @@
}
{
//[ test_mutex_fused
- signet::timed_generator<void ()> banger1;
- signet::timed_generator<void ()> banger2;
- signet::mutex<void ()> lock;
- signet::counter<void ()> counter;
+ 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> counter;
banger1 >>= lock >>= counter;
banger2 >>= lock;
Modified: sandbox/SOC/2007/signals/libs/signal_network/test/test_pull.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/signal_network/test/test_pull.cpp (original)
+++ sandbox/SOC/2007/signals/libs/signal_network/test/test_pull.cpp 2007-07-05 16:42:19 EDT (Thu, 05 Jul 2007)
@@ -3,16 +3,15 @@
// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
-#include <boost/signal_network/storage.hpp>
+#include <boost/signal_network/component/storage.hpp>
+#include <boost/signal_network/connection.hpp>
#include <boost/test/included/test_exec_monitor.hpp>
-// for access to connection operators >>= and |
-using namespace boost::signal_network;
using namespace boost;
//[ test_pull_classes
-class PullDoubler : public signet::filter<float (), signet::unfused_out_signal>
+class PullDoubler : public signals::filter<float (), signals::unfused>
{
public:
float operator()()
@@ -27,7 +26,7 @@
{
//[ test_pull_unfused
- signet::storage<void(float)>::unfused generator(1.0f);
+ signals::storage<void(float), signals::unfused> generator(1.0f);
PullDoubler doubler;
doubler >>= generator.value_at_slot<0>();
Modified: sandbox/SOC/2007/signals/libs/signal_network/test/test_same_type.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/signal_network/test/test_same_type.cpp (original)
+++ sandbox/SOC/2007/signals/libs/signal_network/test/test_same_type.cpp 2007-07-05 16:42:19 EDT (Thu, 05 Jul 2007)
@@ -3,27 +3,28 @@
// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
-#include <boost/signal_network/storage.hpp>
-#include <boost/signal_network/counter.hpp>
+#include <boost/signal_network/component/storage.hpp>
+#include <boost/signal_network/component/counter.hpp>
+#include <boost/signal_network/connection.hpp>
#include <boost/test/included/test_exec_monitor.hpp>
-// for access to connection operators >>= and |
-using namespace boost::signal_network;
using namespace boost;
//[ test_same_type_classes
-class Signal2VoidCounter : public signet::counter<void ()>::unfused
+class Signal2VoidCounter : public signals::counter<void (), signals::unfused>
{
public:
- signet::counter<void ()>::unfused other;
+ signals::counter<void (), signals::unfused> other;
}; // end class Signal2VoidCounter
class Signal2VoidInputs
{
int result;
public:
+ typedef void result_type;
+
Signal2VoidInputs() : result(0) {};
void operator()()
{
@@ -45,7 +46,7 @@
{
{
//[ test_same_type_unfused
- signet::storage<void ()>::unfused banger;
+ signals::storage<void (), signals::unfused> banger;
Signal2VoidCounter counter;
banger
@@ -60,7 +61,7 @@
banger
| inputs
- | slot_selector<void ()> (inputs, &Signal2VoidInputs::AltInput);
+ | signals::make_slot_selector<void ()> (&Signal2VoidInputs::AltInput, inputs);
banger();
BOOST_CHECK_EQUAL(inputs.GetResult(), 11);
Modified: sandbox/SOC/2007/signals/libs/signal_network/test/test_socket.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/signal_network/test/test_socket.cpp (original)
+++ sandbox/SOC/2007/signals/libs/signal_network/test/test_socket.cpp 2007-07-05 16:42:19 EDT (Thu, 05 Jul 2007)
@@ -4,19 +4,20 @@
// http://www.boost.org/LICENSE_1_0.txt)
#include <boost/asio.hpp>
-#include <boost/test/included/test_exec_monitor.hpp>
-#include <boost/signal_network/socket_receiver.hpp>
-#include <boost/signal_network/socket_sender.hpp>
-#include <boost/signal_network/function.hpp>
+#include <boost/signal_network/component/socket_receiver.hpp>
+#include <boost/signal_network/component/socket_sender.hpp>
+#include <boost/signal_network/component/function.hpp>
+#include <boost/signal_network/connection.hpp>
+
#include <boost/thread/thread.hpp>
#include <boost/thread/mutex.hpp>
#include <boost/thread/condition.hpp>
+#include <boost/test/included/test_exec_monitor.hpp>
+
//[ test_socket
-// for access to connection operators >>= and |
-using namespace boost::signal_network;
using namespace boost;
mutex mutex_;
@@ -39,15 +40,15 @@
acceptor.accept(socket);
// instantiate the components - a float generator, a filter that adds 2, and a sender
- signet::storage<void (float)>::unfused generator(1.0f);
- signet::function<void (float), float(float)>::unfused add2(boost::bind(std::plus<float>(), _1, 2.0f));
- signet::socket_sender<void (float)>::unfused sender(socket);
+ signals::storage<void (float), signals::unfused> generator(1.0f);
+ signals::function<void (float), float(float), signals::unfused> add2(boost::bind(std::plus<float>(), _1, 2.0f));
+ signals::socket_sender<void (float)> sender(socket);
// create the network
generator >>= add2 >>= sender;
// cause the generator to send it's stored value
- generator();
+ generator.send();
}
int test_main(int, char* [])
@@ -63,8 +64,8 @@
socket.connect(endpoint_recv);
// instatiate the components
- signet::socket_receiver<void (float)> receiver(socket);
- signet::storage<void (float)>::unfused collector(0.0f);
+ signals::socket_receiver<void (float), signals::fused> receiver(socket);
+ signals::storage<void (float), signals::fused> collector(0.0f);
// set up the network
receiver >>= collector;
Modified: sandbox/SOC/2007/signals/libs/signal_network/test/test_storage.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/signal_network/test/test_storage.cpp (original)
+++ sandbox/SOC/2007/signals/libs/signal_network/test/test_storage.cpp 2007-07-05 16:42:19 EDT (Thu, 05 Jul 2007)
@@ -3,33 +3,37 @@
// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
-#include <boost/signal_network/storage.hpp>
+#include <boost/signal_network/component/storage.hpp>
+#include <boost/signal_network/connection.hpp>
-// for access to connection operators >>= and |
-using namespace boost::signal_network;
-using namespace boost;
+#include <boost/fusion/sequence/view/single_view.hpp>
#include <boost/test/included/test_exec_monitor.hpp>
-#include <boost/fusion/sequence/view/single_view.hpp>
+
+using namespace boost;
int test_main(int, char* [])
{
{
//[ test_storage_unfused
// instantiate all of the components we need
- signet::storage<void ()>::unfused banger;
- signet::storage<void (float)>::unfused floater(2.5f);
- signet::storage<void (float)>::unfused collector(0.0f);
+ signals::storage<void (), signals::unfused> banger;
+ signals::storage<void (float), signals::unfused> floater(2.5f);
+ signals::storage<void (float), signals::unfused> collector(0.0f);
+
+ signals::get_slot<void(float), signals::storage<void (float), signals::unfused> >()(collector);
// create the network
- banger >>= floater >>= collector;
+ banger >>= floater.send_slot();
+ floater >>= collector;
// signal from banger causes floater to output 2.5
- banger();
+ banger.send();
+ BOOST_CHECK_EQUAL(floater.at<0>(), 2.5f);
BOOST_CHECK_EQUAL(collector.at<0>(), 2.5f);
floater(1.5f); // change the value in floater
- floater(); // we can also signal floater directly
+ floater.send(); // we can also signal floater directly
BOOST_CHECK_EQUAL(collector.at<0>(), 1.5f);
//]
}
@@ -37,21 +41,21 @@
{
//[ test_storage_fused
// instantiate all of the components we need
- signet::storage<void ()> banger;
- signet::storage<void (float)> floater(2.5f);
- signet::storage<void (float)> collector(0.0f);
+ signals::storage<void (), signals::unfused> banger;
+ signals::storage<void (float), signals::fused> floater(2.5f);
+ signals::storage<void (float), signals::fused> collector(0.0f);
// create the network
- banger >>= floater >>= collector;
+ banger >>= floater.send_slot();
+ floater >>= collector;
// signal from banger causes floater to output 2.5
- banger();
+ banger.send();
BOOST_CHECK_EQUAL(collector.at<0>(), 2.5f);
-
// change the value in floater
floater(boost::fusion::single_view<float>(1.5f));
- floater(); // we can also signal floater directly
+ floater.send(); // we can also signal floater directly
BOOST_CHECK_EQUAL(collector.at<0>(), 1.5f);
//]
}
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