X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=PPI%2FConnectors.cci;h=c61555cc3447520ee52d5dec8569e19aecb86afd;hb=d8c2d9d478b8808e5b76e4688aea4f840b6a1df7;hp=74270ecf72dbe09e8a1473582b583f65e02272d8;hpb=69255c0f1669fc80b0e4a2bf524715f336b127ad;p=senf.git diff --git a/PPI/Connectors.cci b/PPI/Connectors.cci index 74270ec..c61555c 100644 --- a/PPI/Connectors.cci +++ b/PPI/Connectors.cci @@ -1,8 +1,8 @@ // $Id$ // -// Copyright (C) 2007 -// Fraunhofer Institute for Open Communication Systems (FOKUS) -// Competence Center NETwork research (NET), St. Augustin, GERMANY +// Copyright (C) 2007 +// Fraunhofer Institute for Open Communication Systems (FOKUS) +// Competence Center NETwork research (NET), St. Augustin, GERMANY // Stefan Bund // // This program is free software; you can redistribute it and/or modify @@ -24,6 +24,8 @@ \brief Connectors inline non-template implementation */ // Custom includes +#include "../Utils/TypeInfo.hh" +#include "../Utils/senfassert.hh" #define prefix_ inline ///////////////////////////////cci.p/////////////////////////////////////// @@ -34,14 +36,14 @@ prefix_ senf::ppi::connector::Connector & senf::ppi::connector::Connector::peer() const { - BOOST_ASSERT(peer_); + SENF_ASSERT(peer_); return *peer_; } prefix_ senf::ppi::module::Module & senf::ppi::connector::Connector::module() const { - BOOST_ASSERT(module_); + SENF_ASSERT(module_); return *module_; } @@ -58,13 +60,6 @@ prefix_ senf::ppi::connector::Connector::~Connector() peer_->peer_ = 0; } -prefix_ void senf::ppi::connector::Connector::connect(Connector & target) -{ - BOOST_ASSERT( ! peer_ && ! target.peer_ ); - peer_ = & target; - target.peer_ = this; -} - //////////////////////////////////////// // private members @@ -121,7 +116,7 @@ prefix_ senf::ppi::connector::PassiveConnector::PassiveConnector() prefix_ void senf::ppi::connector::PassiveConnector::emit() { - BOOST_ASSERT(callback_); + SENF_ASSERT(callback_); if (!throttled()) callback_(); } @@ -134,8 +129,8 @@ prefix_ void senf::ppi::connector::PassiveConnector::notifyThrottle() if (!throttled()) { remoteThrottled_ = true; emitThrottle(); - } - else + } + else remoteThrottled_ = true; } @@ -221,7 +216,7 @@ senf::ppi::connector::InputConnector::end() prefix_ senf::Packet senf::ppi::connector::InputConnector::peek() const { - BOOST_ASSERT( ! queue_.empty() ); + SENF_ASSERT( ! queue_.empty() ); return queue_.back(); }