X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=PPI%2FRoute.cti;h=c72ad31e9e274413f8a89206f81f17681e6044aa;hb=b89e3166f7680755683dccee5e48cb3a820185c0;hp=a136aff278b3cae012686012db683e0a7956ddb6;hpb=7465ea4f6d3d54622bd783106cf8b60d5f133343;p=senf.git diff --git a/PPI/Route.cti b/PPI/Route.cti index a136aff..c72ad31 100644 --- a/PPI/Route.cti +++ b/PPI/Route.cti @@ -1,8 +1,8 @@ // $Id$ // -// Copyright (C) 2007 -// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS) -// Kompetenzzentrum fuer Satelitenkommunikation (SatCom) +// 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 @@ -46,6 +46,12 @@ prefix_ senf::ppi::Route::Route(module::Module & module, Source & // protected members template +prefix_ void senf::ppi::ForwardingRoute::registerRoute(T & ob) +{ + ob.registerRoute(*this); +} + +template prefix_ void senf::ppi::ForwardingRoute::notifyThrottle(T & ob) { ob.notifyThrottle(); @@ -62,12 +68,14 @@ prefix_ void senf::ppi::ForwardingRoute::notifyUnthrottle(T & ob) template prefix_ Source & senf::ppi::detail::BaseRouteImplementation::source() + const { return *source_; } template prefix_ Target & senf::ppi::detail::BaseRouteImplementation::target() + const { return *target_; } @@ -93,8 +101,8 @@ senf::ppi::detail::ForwardingRouteImplementation:: ForwardingRouteImplementation(module::Module & module, Source & source, Target & target) : Base(module,source,target) { - registerRoute(source, boost::mpl::bool_::notifySource>()); - registerRoute(target, boost::mpl::bool_::notifySource>()); + registerRoute(source); + registerRoute(target); } //////////////////////////////////////// @@ -103,44 +111,48 @@ ForwardingRouteImplementation(module::Module & module, Source & source, Target & template template prefix_ void senf::ppi::detail::ForwardingRouteImplementation:: -registerRoute(T & ob, boost::mpl::bool_ const &) +notifyThrottle(T & ob, boost::mpl::bool_ const &) { - ForwardingRoute::registerRoute(ob); + ForwardingRoute::notifyThrottle(ob); } template template prefix_ void senf::ppi::detail::ForwardingRouteImplementation:: -registerRoute(T & ob, boost::mpl::bool_ const &) +notifyThrottle(T & ob, boost::mpl::bool_ const &) {} template template prefix_ void senf::ppi::detail::ForwardingRouteImplementation:: -notifyThrottle(T & ob, boost::mpl::bool_ const &) +notifyUnthrottle(T & ob, boost::mpl::bool_ const &) { - ForwardingRoute::notifyThrottle(ob); + ForwardingRoute::notifyUnthrottle(ob); } template template prefix_ void senf::ppi::detail::ForwardingRouteImplementation:: -notifyThrottle(T & ob, boost::mpl::bool_ const &) +notifyUnthrottle(T & ob, boost::mpl::bool_ const &) {} template template -prefix_ void senf::ppi::detail::ForwardingRouteImplementation:: -notifyUnthrottle(T & ob, boost::mpl::bool_ const &) +prefix_ bool senf::ppi::detail::ForwardingRouteImplementation:: +throttled(T & ob, boost::mpl::bool_ const &) + const { - ForwardingRoute::notifyUnthrottle(ob); + return ob.throttled(); } template template -prefix_ void senf::ppi::detail::ForwardingRouteImplementation:: -notifyUnthrottle(T & ob, boost::mpl::bool_ const &) -{} +prefix_ bool senf::ppi::detail::ForwardingRouteImplementation:: +throttled(T & ob, boost::mpl::bool_ const &) + const +{ + return false; +} /////////////////////////////////////////////////////////////////////////// // senf::ppi::detail::RouteImplementation2