From: g0dil Date: Wed, 22 Aug 2007 11:24:58 +0000 (+0000) Subject: PPI: Remove 'Packet' from debug module names X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=69535909437d04c0df8f95bfb242db4f36fda12d;p=senf.git PPI: Remove 'Packet' from debug module names PPI: Implement ActiveFeederSource and ActiveFeederSink debug composites git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@406 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/PPI/ActiveFeeder.test.cc b/PPI/ActiveFeeder.test.cc index e5c66d2..ac413c0 100644 --- a/PPI/ActiveFeeder.test.cc +++ b/PPI/ActiveFeeder.test.cc @@ -43,8 +43,8 @@ namespace module = senf::ppi::module; BOOST_AUTO_UNIT_TEST(activeFeeder) { - debug::PassivePacketSource source; - debug::PassivePacketSink sink; + debug::PassiveSource source; + debug::PassiveSink sink; module::ActiveFeeder feeder; ppi::connect(source,feeder); diff --git a/PPI/Connectors.test.cc b/PPI/Connectors.test.cc index 3a4b621..9277a34 100644 --- a/PPI/Connectors.test.cc +++ b/PPI/Connectors.test.cc @@ -49,8 +49,8 @@ BOOST_AUTO_UNIT_TEST(connector) // It doesn't matter, which type of connectors we use here since they are all based on // Connector. - debug::ActivePacketSource source; - debug::PassivePacketSink target; + debug::ActiveSource source; + debug::PassiveSink target; ppi::connect(source.output,target.input); ppi::init(); @@ -63,13 +63,13 @@ BOOST_AUTO_UNIT_TEST(connector) BOOST_AUTO_UNIT_TEST(passiveConnector) { - debug::ActivePacketSource source; - debug::PassivePacketSink target; + debug::ActiveSource source; + debug::PassiveSink target; ppi::connect(source.output,target.input); ppi::init(); - // onRequest is implicitly tested within the PassivePacketSink implementation which is tested + // onRequest is implicitly tested within the PassiveSink implementation which is tested // in DebugModules.test.cc target.input.throttle(); @@ -92,8 +92,8 @@ namespace { BOOST_AUTO_UNIT_TEST(activeConnector) { - debug::ActivePacketSource source; - debug::PassivePacketSink target; + debug::ActiveSource source; + debug::PassiveSink target; ppi::connect(source.output,target.input); ppi::init(); @@ -124,16 +124,16 @@ BOOST_AUTO_UNIT_TEST(activeConnector) BOOST_AUTO_UNIT_TEST(inputConnector) { - debug::ActivePacketSource source; - debug::PassivePacketSink target; + debug::ActiveSource source; + debug::PassiveSink target; ppi::connect(source.output,target.input); ppi::init(); - // operator() is implicitly tested within the Active/PassivePacketSink implementation which is + // operator() is implicitly tested within the Active/PassiveSink implementation which is // tested in DebugModules.test.cc - // peek() is implicitly tested within the Active/PassivePacketSink implementation + // peek() is implicitly tested within the Active/PassiveSink implementation BOOST_CHECK_EQUAL ( & target.input.peer(), & source.output ); @@ -144,13 +144,13 @@ BOOST_AUTO_UNIT_TEST(inputConnector) BOOST_AUTO_UNIT_TEST(outputConnector) { - debug::ActivePacketSource source; - debug::PassivePacketSink target; + debug::ActiveSource source; + debug::PassiveSink target; ppi::connect(source.output,target.input); ppi::init(); - // operator() is implicitly tested within the Active/PassivePacketSource implementation which is + // operator() is implicitly tested within the Active/PassiveSource implementation which is // tested in DebugModules.test.cc BOOST_CHECK_EQUAL( & source.output.peer(), & target.input ); @@ -181,7 +181,7 @@ namespace { BOOST_AUTO_UNIT_TEST(passiveInput) { - debug::ActivePacketSource source; + debug::ActiveSource source; PassiveInputTest target; ppi::connect(source,target); @@ -224,8 +224,8 @@ BOOST_AUTO_UNIT_TEST(passiveInput) BOOST_AUTO_UNIT_TEST(passiveOutput) { - debug::PassivePacketSource source; - debug::ActivePacketSink target; + debug::PassiveSource source; + debug::ActiveSink target; ppi::connect(source,target); ppi::init(); @@ -245,8 +245,8 @@ BOOST_AUTO_UNIT_TEST(passiveOutput) BOOST_AUTO_UNIT_TEST(activeInput) { - debug::PassivePacketSource source; - debug::ActivePacketSink target; + debug::PassiveSource source; + debug::ActiveSink target; ppi::connect(source,target); ppi::init(); @@ -270,8 +270,8 @@ BOOST_AUTO_UNIT_TEST(activeInput) BOOST_AUTO_UNIT_TEST(activeOutput) { - debug::ActivePacketSource source; - debug::PassivePacketSink target; + debug::ActiveSource source; + debug::PassiveSink target; ppi::connect(source,target); ppi::init(); diff --git a/PPI/DebugModules.cci b/PPI/DebugModules.cci index bbc3e9d..6aa026f 100644 --- a/PPI/DebugModules.cci +++ b/PPI/DebugModules.cci @@ -24,51 +24,52 @@ \brief DebugModules inline non-template implementation */ // Custom includes +#include "Setup.hh" #define prefix_ inline ///////////////////////////////cci.p/////////////////////////////////////// /////////////////////////////////////////////////////////////////////////// -// senf::ppi::module::debug::ActivePacketSource +// senf::ppi::module::debug::ActiveSource -prefix_ senf::ppi::module::debug::ActivePacketSource::ActivePacketSource() +prefix_ senf::ppi::module::debug::ActiveSource::ActiveSource() { noroute(output); } -prefix_ void senf::ppi::module::debug::ActivePacketSource::submit(Packet packet) +prefix_ void senf::ppi::module::debug::ActiveSource::submit(Packet packet) { output(packet); } -prefix_ bool senf::ppi::module::debug::ActivePacketSource::boolean_test() +prefix_ bool senf::ppi::module::debug::ActiveSource::boolean_test() const { return output; } /////////////////////////////////////////////////////////////////////////// -// senf::ppi::module::debug::PassivePacketSource +// senf::ppi::module::debug::PassiveSource -prefix_ senf::ppi::module::debug::PassivePacketSource::PassivePacketSource() +prefix_ senf::ppi::module::debug::PassiveSource::PassiveSource() { noroute(output); - output.onRequest(&PassivePacketSource::request); + output.onRequest(&PassiveSource::request); } -prefix_ void senf::ppi::module::debug::PassivePacketSource::submit(Packet packet) +prefix_ void senf::ppi::module::debug::PassiveSource::submit(Packet packet) { packets_.push_back(packet); output.unthrottle(); } -prefix_ bool senf::ppi::module::debug::PassivePacketSource::empty() +prefix_ bool senf::ppi::module::debug::PassiveSource::empty() { return packets_.empty(); } -prefix_ senf::ppi::module::debug::PassivePacketSource::size_type -senf::ppi::module::debug::PassivePacketSource::size() +prefix_ senf::ppi::module::debug::PassiveSource::size_type +senf::ppi::module::debug::PassiveSource::size() { return packets_.size(); } @@ -76,7 +77,7 @@ senf::ppi::module::debug::PassivePacketSource::size() //////////////////////////////////////// // private members -prefix_ void senf::ppi::module::debug::PassivePacketSource::request() +prefix_ void senf::ppi::module::debug::PassiveSource::request() { BOOST_ASSERT( ! packets_.empty() ); output(packets_.front()); @@ -85,64 +86,64 @@ prefix_ void senf::ppi::module::debug::PassivePacketSource::request() output.throttle(); } -prefix_ void senf::ppi::module::debug::PassivePacketSource::init() +prefix_ void senf::ppi::module::debug::PassiveSource::init() { if (empty()) output.throttle(); } /////////////////////////////////////////////////////////////////////////// -// senf::ppi::module::debug::ActivePacketSink +// senf::ppi::module::debug::ActiveSink -prefix_ senf::ppi::module::debug::ActivePacketSink::ActivePacketSink() +prefix_ senf::ppi::module::debug::ActiveSink::ActiveSink() { noroute(input); } -prefix_ senf::Packet senf::ppi::module::debug::ActivePacketSink::request() +prefix_ senf::Packet senf::ppi::module::debug::ActiveSink::request() { return input(); } -prefix_ bool senf::ppi::module::debug::ActivePacketSink::boolean_test() +prefix_ bool senf::ppi::module::debug::ActiveSink::boolean_test() const { return input; } /////////////////////////////////////////////////////////////////////////// -// senf::ppi::module::debug::PassivePacketSink +// senf::ppi::module::debug::PassiveSink -prefix_ senf::ppi::module::debug::PassivePacketSink::PassivePacketSink() +prefix_ senf::ppi::module::debug::PassiveSink::PassiveSink() { noroute(input); - input.onRequest(&PassivePacketSink::request); + input.onRequest(&PassiveSink::request); } -prefix_ bool senf::ppi::module::debug::PassivePacketSink::empty() +prefix_ bool senf::ppi::module::debug::PassiveSink::empty() { return packets_.empty(); } -prefix_ senf::ppi::module::debug::PassivePacketSink::size_type -senf::ppi::module::debug::PassivePacketSink::size() +prefix_ senf::ppi::module::debug::PassiveSink::size_type +senf::ppi::module::debug::PassiveSink::size() { return packets_.size(); } -prefix_ senf::ppi::module::debug::PassivePacketSink::iterator -senf::ppi::module::debug::PassivePacketSink::begin() +prefix_ senf::ppi::module::debug::PassiveSink::iterator +senf::ppi::module::debug::PassiveSink::begin() { return packets_.begin(); } -prefix_ senf::ppi::module::debug::PassivePacketSink::iterator -senf::ppi::module::debug::PassivePacketSink::end() +prefix_ senf::ppi::module::debug::PassiveSink::iterator +senf::ppi::module::debug::PassiveSink::end() { return packets_.end(); } -prefix_ senf::Packet senf::ppi::module::debug::PassivePacketSink::front() +prefix_ senf::Packet senf::ppi::module::debug::PassiveSink::front() { if (empty()) return Packet(); @@ -150,7 +151,7 @@ prefix_ senf::Packet senf::ppi::module::debug::PassivePacketSink::front() return packets_.front(); } -prefix_ senf::Packet senf::ppi::module::debug::PassivePacketSink::pop_front() +prefix_ senf::Packet senf::ppi::module::debug::PassiveSink::pop_front() { Packet p (front()); if (p) @@ -158,7 +159,7 @@ prefix_ senf::Packet senf::ppi::module::debug::PassivePacketSink::pop_front() return p; } -prefix_ void senf::ppi::module::debug::PassivePacketSink::clear() +prefix_ void senf::ppi::module::debug::PassiveSink::clear() { packets_.erase(packets_.begin(), packets_.end()); } @@ -166,11 +167,83 @@ prefix_ void senf::ppi::module::debug::PassivePacketSink::clear() //////////////////////////////////////// // private members -prefix_ void senf::ppi::module::debug::PassivePacketSink::request() +prefix_ void senf::ppi::module::debug::PassiveSink::request() { packets_.push_back(input()); } +/////////////////////////////////////////////////////////////////////////// +// senf::ppi::module::debug::ActiveFeederSource + +prefix_ senf::ppi::module::debug::ActiveFeederSource::ActiveFeederSource() + : output(feeder.output) +{ + ppi::connect(source,feeder); +} + +prefix_ void senf::ppi::module::debug::ActiveFeederSource::submit(Packet packet) +{ + source.submit(packet); +} + +prefix_ bool senf::ppi::module::debug::ActiveFeederSource::empty() +{ + return source.empty(); +} + +prefix_ senf::ppi::module::debug::ActiveFeederSource::size_type +senf::ppi::module::debug::ActiveFeederSource::size() +{ + return source.size(); +} + +/////////////////////////////////////////////////////////////////////////// +// senf::ppi::module::debug::ActiveFeederSink + +prefix_ senf::ppi::module::debug::ActiveFeederSink::ActiveFeederSink() + : input(feeder.input) +{ + ppi::connect(feeder, sink); +} + +prefix_ bool senf::ppi::module::debug::ActiveFeederSink::empty() +{ + return sink.empty(); +} + +prefix_ senf::ppi::module::debug::ActiveFeederSink::size_type +senf::ppi::module::debug::ActiveFeederSink::size() +{ + return sink.size(); +} + +prefix_ senf::ppi::module::debug::ActiveFeederSink::iterator +senf::ppi::module::debug::ActiveFeederSink::begin() +{ + return sink.begin(); +} + +prefix_ senf::ppi::module::debug::ActiveFeederSink::iterator +senf::ppi::module::debug::ActiveFeederSink::end() +{ + return sink.end(); +} + +prefix_ senf::Packet senf::ppi::module::debug::ActiveFeederSink::front() +{ + return sink.front(); +} + +prefix_ senf::Packet senf::ppi::module::debug::ActiveFeederSink::pop_front() +{ + return sink.pop_front(); +} + +prefix_ void senf::ppi::module::debug::ActiveFeederSink::clear() +{ + sink.clear(); +} + ///////////////////////////////cci.e/////////////////////////////////////// #undef prefix_ diff --git a/PPI/DebugModules.hh b/PPI/DebugModules.hh index 2c70982..ad76884 100644 --- a/PPI/DebugModules.hh +++ b/PPI/DebugModules.hh @@ -31,6 +31,7 @@ #include "Utils/SafeBool.hh" #include "Packets/Packets.hh" #include "Module.hh" +#include "ActiveFeeder.hh" //#include "DebugModules.mpp" ///////////////////////////////hh.p//////////////////////////////////////// @@ -51,33 +52,33 @@ namespace debug { /** \brief */ - class ActivePacketSource + class ActiveSource : public Module, - public SafeBool + public SafeBool { - SENF_PPI_MODULE(ActivePacketSource); + SENF_PPI_MODULE(ActiveSource); public: connector::ActiveOutput output; - ActivePacketSource(); + ActiveSource(); void submit(Packet packet); bool boolean_test() const; }; - class PassivePacketSource + class PassiveSource : public Module { - SENF_PPI_MODULE(PassivePacketSource); + SENF_PPI_MODULE(PassiveSource); typedef std::deque Queue; public: typedef Queue::size_type size_type; - PassivePacketSource(); + PassiveSource(); connector::PassiveOutput output; @@ -93,26 +94,26 @@ namespace debug { Queue packets_; }; - class ActivePacketSink + class ActiveSink : public Module, - public SafeBool + public SafeBool { - SENF_PPI_MODULE(ActivePacketSink); + SENF_PPI_MODULE(ActiveSink); public: connector::ActiveInput input; - ActivePacketSink(); + ActiveSink(); Packet request(); bool boolean_test() const; }; - class PassivePacketSink + class PassiveSink : public Module { - SENF_PPI_MODULE(PassivePacketSink); + SENF_PPI_MODULE(PassiveSink); typedef std::deque Queue; @@ -122,7 +123,7 @@ namespace debug { connector::PassiveInput input; - PassivePacketSink(); + PassiveSink(); bool empty(); size_type size(); @@ -140,6 +141,49 @@ namespace debug { Queue packets_; }; + class ActiveFeederSource + { + private: + PassiveSource source; + ActiveFeeder feeder; + + public: + typedef PassiveSource::size_type size_type; + + connector::ActiveOutput & output; + + ActiveFeederSource(); + + void submit(Packet packet); + bool empty(); + size_type size(); + }; + + class ActiveFeederSink + { + private: + PassiveSink sink; + ActiveFeeder feeder; + + public: + typedef PassiveSink::size_type size_type; + typedef PassiveSink::iterator iterator; + + connector::ActiveInput & input; + + ActiveFeederSink(); + + bool empty(); + size_type size(); + iterator begin(); + iterator end(); + + Packet front(); + Packet pop_front(); + + void clear(); + }; + }}}} ///////////////////////////////hh.e//////////////////////////////////////// diff --git a/PPI/DebugModules.test.cc b/PPI/DebugModules.test.cc index 4df0c2a..1f6f668 100644 --- a/PPI/DebugModules.test.cc +++ b/PPI/DebugModules.test.cc @@ -44,8 +44,8 @@ namespace ppi = senf::ppi; BOOST_AUTO_UNIT_TEST(debugModules) { { - debug::ActivePacketSource source; - debug::PassivePacketSink sink; + debug::ActiveSource source; + debug::PassiveSink sink; ppi::connect(source, sink); ppi::init(); @@ -61,7 +61,7 @@ BOOST_AUTO_UNIT_TEST(debugModules) BOOST_CHECK_EQUAL( sink.size(), 1u ); BOOST_CHECK( ! sink.empty() ); BOOST_CHECK_EQUAL( - debug::PassivePacketSink::size_type(std::distance(sink.begin(),sink.end())), + debug::PassiveSink::size_type(std::distance(sink.begin(),sink.end())), sink.size() ); BOOST_CHECK( *sink.begin() == p ); BOOST_CHECK( sink.front() == p ); @@ -73,8 +73,8 @@ BOOST_AUTO_UNIT_TEST(debugModules) } { - debug::PassivePacketSource source; - debug::ActivePacketSink sink; + debug::PassiveSource source; + debug::ActiveSink sink; ppi::connect(source, sink); ppi::init(); @@ -91,6 +91,43 @@ BOOST_AUTO_UNIT_TEST(debugModules) } } +BOOST_AUTO_UNIT_TEST(activeFeederSource) +{ + debug::ActiveFeederSource source; + debug::PassiveSink sink; + + ppi::connect(source,sink); + + source.submit(senf::DataPacket::create()); + + ppi::run(); + + BOOST_CHECK( source.empty() ); + BOOST_CHECK_EQUAL( source.size(), 0u ); + BOOST_CHECK_EQUAL( sink.size(), 1u ); +} + +BOOST_AUTO_UNIT_TEST(activeFeederSink) +{ + debug::PassiveSource source; + debug::ActiveFeederSink sink; + + ppi::connect(source,sink); + + source.submit(senf::DataPacket::create()); + + ppi::run(); + + BOOST_CHECK( ! sink.empty() ); + BOOST_CHECK_EQUAL( sink.size(), 1u ); + BOOST_CHECK_EQUAL( debug::ActiveFeederSink::size_type(std::distance(sink.begin(), sink.end())), + sink.size() ); + BOOST_CHECK( sink.front().data().empty() ); + BOOST_CHECK( sink.pop_front().data().empty() ); + BOOST_CHECK( sink.empty() ); + BOOST_CHECK( source.empty() ); +} + ///////////////////////////////cc.e//////////////////////////////////////// #undef prefix_ diff --git a/PPI/Joins.test.cc b/PPI/Joins.test.cc index 8e336bb..7f07983 100644 --- a/PPI/Joins.test.cc +++ b/PPI/Joins.test.cc @@ -45,10 +45,10 @@ namespace debug = module::debug; BOOST_AUTO_UNIT_TEST(passiveJoin) { - debug::ActivePacketSource source1; - debug::ActivePacketSource source2; + debug::ActiveSource source1; + debug::ActiveSource source2; module::PassiveJoin join; - debug::PassivePacketSink sink; + debug::PassiveSink sink; ppi::connect(source1, join); ppi::connect(source2, join); @@ -75,10 +75,10 @@ BOOST_AUTO_UNIT_TEST(passiveJoin) BOOST_AUTO_UNIT_TEST(priorityJoin) { - debug::PassivePacketSource source1; - debug::PassivePacketSource source2; + debug::PassiveSource source1; + debug::PassiveSource source2; module::PriorityJoin join; - debug::ActivePacketSink sink; + debug::ActiveSink sink; ppi::connect(source1, join); ppi::connect(source2, join); diff --git a/PPI/Module.test.cc b/PPI/Module.test.cc index 96d65da..a844abb 100644 --- a/PPI/Module.test.cc +++ b/PPI/Module.test.cc @@ -69,7 +69,7 @@ BOOST_AUTO_UNIT_TEST(module) // route and registerEvent are tested in Route.test.cc TestModule tester; - debug::PassivePacketSink sink; + debug::PassiveSink sink; ppi::connect(tester, sink); ppi::init(); diff --git a/PPI/PassiveQueue.test.cc b/PPI/PassiveQueue.test.cc index 3c5c66f..c77465e 100644 --- a/PPI/PassiveQueue.test.cc +++ b/PPI/PassiveQueue.test.cc @@ -45,9 +45,9 @@ namespace debug = module::debug; BOOST_AUTO_UNIT_TEST(passiveQueue) { - debug::ActivePacketSource source; + debug::ActiveSource source; module::PassiveQueue queue; - debug::ActivePacketSink sink; + debug::ActiveSink sink; ppi::connect(source,queue); ppi::connect(queue,sink); diff --git a/PPI/Queueing.test.cc b/PPI/Queueing.test.cc index cd256b6..c9ae4ea 100644 --- a/PPI/Queueing.test.cc +++ b/PPI/Queueing.test.cc @@ -71,9 +71,9 @@ namespace { BOOST_AUTO_UNIT_TEST(thresholdQueueing) { - debug::ActivePacketSource source; + debug::ActiveSource source; QueueTester tester; - debug::PassivePacketSink sink; + debug::PassiveSink sink; ppi::connect(source, tester); ppi::connect(tester, sink); diff --git a/PPI/Route.test.cc b/PPI/Route.test.cc index be33ee6..9184960 100644 --- a/PPI/Route.test.cc +++ b/PPI/Route.test.cc @@ -105,10 +105,10 @@ namespace { BOOST_AUTO_UNIT_TEST(route) { - debug::PassivePacketSource passiveSource; - debug::ActivePacketSource activeSource; - debug::PassivePacketSink passiveSink; - debug::ActivePacketSink activeSink; + debug::PassiveSource passiveSource; + debug::ActiveSource activeSource; + debug::PassiveSink passiveSink; + debug::ActiveSink activeSink; RouteTester tester; ppi::connect(passiveSource, tester.activeIn); diff --git a/PPI/Setup.cti b/PPI/Setup.cti index caf151f..b32b906 100644 --- a/PPI/Setup.cti +++ b/PPI/Setup.cti @@ -32,29 +32,29 @@ #ifndef DOXYGEN -template -prefix_ void -senf::ppi::connect(M & source, C & target, - typename boost::enable_if< boost::is_base_of >::type *, - typename boost::enable_if< boost::is_base_of >::type *) +template +prefix_ void senf::ppi:: +connect(T & source, C & target, + typename boost::disable_if< boost::is_base_of >::type *, + typename boost::enable_if< boost::is_base_of >::type *) { connect(source.output, target); } -template -prefix_ void -senf::ppi::connect(C & source, M & target, - typename boost::enable_if< boost::is_base_of >::type *, - typename boost::enable_if< boost::is_base_of >::type *) +template +prefix_ void senf::ppi:: +connect(C & source, T & target, + typename boost::enable_if< boost::is_base_of >::type *, + typename boost::disable_if< boost::is_base_of >::type *) { connect(source, target.input); } -template -prefix_ void -senf::ppi::connect(M1 & source, M2 & target, - typename boost::enable_if< boost::is_base_of >::type *, - typename boost::enable_if< boost::is_base_of >::type *) +template +prefix_ void senf::ppi:: +connect(T1 & source, T2 & target, + typename boost::disable_if< boost::is_base_of >::type *, + typename boost::disable_if< boost::is_base_of >::type *) { connect(source.output, target.input); } diff --git a/PPI/Setup.hh b/PPI/Setup.hh index 57215b1..cadee67 100644 --- a/PPI/Setup.hh +++ b/PPI/Setup.hh @@ -27,6 +27,8 @@ #define HH_Setup_ 1 // Custom includes +#include +#include #include "predecl.hh" //#include "Setup.mpp" @@ -40,20 +42,20 @@ namespace ppi { void connect(connector::ActiveOutput & source, connector::PassiveInput & target); void connect(connector::PassiveOutput & source, connector::ActiveInput & target); - template - void connect(M & source, C & target, - typename boost::enable_if< boost::is_base_of >::type * = 0, + template + void connect(T & source, C & target, + typename boost::disable_if< boost::is_base_of >::type * = 0, typename boost::enable_if< boost::is_base_of >::type * = 0); - template - void connect(C & source, M & target, + template + void connect(C & source, T & target, typename boost::enable_if< boost::is_base_of >::type * = 0, - typename boost::enable_if< boost::is_base_of >::type * = 0); + typename boost::disable_if< boost::is_base_of >::type * = 0); - template - void connect(M1 & source, M2 & target, - typename boost::enable_if< boost::is_base_of >::type * = 0, - typename boost::enable_if< boost::is_base_of >::type * = 0); + template + void connect(T1 & source, T2 & target, + typename boost::disable_if< boost::is_base_of >::type * = 0, + typename boost::disable_if< boost::is_base_of >::type * = 0); #else diff --git a/PPI/SocketReader.test.cc b/PPI/SocketReader.test.cc index ca0631c..6c6f3b4 100644 --- a/PPI/SocketReader.test.cc +++ b/PPI/SocketReader.test.cc @@ -57,7 +57,7 @@ BOOST_AUTO_UNIT_TEST(socketReader) inputSocket.bind(senf::INet4SocketAddress("localhost:44344")); inputSocket.blocking(false); module::ActiveSocketReader<> udpReader(inputSocket); - debug::PassivePacketSink sink; + debug::PassiveSink sink; ppi::connect(udpReader, sink); std::string data ("TEST"); diff --git a/PPI/SocketWriter.test.cc b/PPI/SocketWriter.test.cc index 63dd2a8..83985ca 100644 --- a/PPI/SocketWriter.test.cc +++ b/PPI/SocketWriter.test.cc @@ -56,7 +56,7 @@ BOOST_AUTO_UNIT_TEST(passiveSocketWriter) senf::ConnectedUDPv4ClientSocketHandle outputSocket ( senf::INet4SocketAddress("localhost:44344")); module::PassiveSocketWriter<> udpWriter(outputSocket); - debug::ActivePacketSource source; + debug::ActiveSource source; ppi::connect(source, udpWriter); std::string data ("TEST"); @@ -76,7 +76,7 @@ BOOST_AUTO_UNIT_TEST(activeSocketWriter) senf::ConnectedUDPv4ClientSocketHandle outputSocket ( senf::INet4SocketAddress("localhost:44344")); module::ActiveSocketWriter<> udpWriter(outputSocket); - debug::PassivePacketSource source; + debug::PassiveSource source; ppi::connect(source, udpWriter); std::string data ("TEST"); diff --git a/PPI/predecl.hh b/PPI/predecl.hh index 49eae2b..8fb57dd 100644 --- a/PPI/predecl.hh +++ b/PPI/predecl.hh @@ -27,7 +27,6 @@ #define HH_predecl_ 1 // Custom includes -#include //#include "predecl.mpp" ///////////////////////////////hh.p////////////////////////////////////////