// $Id$ // // Copyright (C) 2007 // Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS) // Kompetenzzentrum fuer Satelitenkommunikation (SatCom) // Stefan Bund // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the // Free Software Foundation, Inc., // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. /** \file \brief Route internal header */ #ifndef IH_Route_ #define IH_Route_ 1 // Custom includes ///////////////////////////////ih.p//////////////////////////////////////// namespace senf { namespace ppi { namespace detail { // Valid Forwarding routes: // Forward throttling // ActiveInput -> PassiveOutput // tempalte<> RouteImplementation // ActiveInput -> Event // template class RouteImplementation // Backward throttling // PassiveInput -> ActiveOutput // template<> RouteImplementation // Event -> ActiveOutput // template class RouteImplementation class NonForwardingRouteImplementation : public RouteBase { protected: NonForwardingRouteImplementation(module::Module & module, connector::InputConnector & source, connector::OutputConnector & target); private: connector::InputConnector * source_; connector::OutputConnector * target_; }; class NonForwardingRouteToEventImplementation : public RouteBase { protected: NonForwardingRouteToEventImplementation(module::Module & module, connector::InputConnector & source, EventDescriptor & target); private: connector::InputConnector * source_; EventDescriptor * target_; }; class NonForwardingRouteFromEventImplementation : public RouteBase { protected: NonForwardingRouteFromEventImplementation(module::Module & module, EventDescriptor & source, connector::OutputConnector & target); private: EventDescriptor * source_; connector::OutputConnector * target_; }; class ForwardForwardingRouteImplementation : public ForwardingRoute { protected: ForwardForwardingRouteImplementation(module::Module & module, connector::ActiveInput & source, connector::PassiveOutput & target); private: virtual void v_notifyThrottle(); virtual void v_notifyUnthrottle(); connector::ActiveInput * source_; connector::PassiveOutput * target_; }; class BackwardForwardingRouteImplementation : public ForwardingRoute { protected: BackwardForwardingRouteImplementation(module::Module & module, connector::PassiveInput & source, connector::ActiveOutput & target); private: virtual void v_notifyThrottle(); virtual void v_notifyUnthrottle(); connector::PassiveInput * source_; connector::ActiveOutput * target_; }; class ForwardForwardingRouteToEventImplementation : public ForwardingRoute { protected: ForwardForwardingRouteToEventImplementation(module::Module & module, connector::ActiveInput & source, EventDescriptor & target); private: virtual void v_notifyThrottle(); virtual void v_notifyUnthrottle(); connector::ActiveInput * source_; EventDescriptor * target_; }; class BackwardForwardingRouteFromEventImplementation : public ForwardingRoute { protected: BackwardForwardingRouteFromEventImplementation(module::Module & module, EventDescriptor & source, connector::ActiveOutput & target); private: virtual void v_notifyThrottle(); virtual void v_notifyUnthrottle(); EventDescriptor * source_; connector::ActiveOutput * target_; }; template class RouteImplementation : public NonForwardingRouteImplementation { protected: RouteImplementation(module::Module & module, Source & source, Target & target); }; # ifndef DOXYGEN template class RouteImplementation : public NonForwardingRouteFromEventImplementation { protected: RouteImplementation(module::Module & module, Source & source, Target & target); }; template class RouteImplementation : public NonForwardingRouteToEventImplementation { protected: RouteImplementation(module::Module & module, Source & source, Target & target); }; template<> class RouteImplementation : public ForwardForwardingRouteImplementation { protected: RouteImplementation(module::Module & module, connector::ActiveInput & source, connector::PassiveOutput & target); }; template class RouteImplementation : public ForwardForwardingRouteToEventImplementation { protected: RouteImplementation(module::Module & module, connector::ActiveInput & source, Event & target); }; template <> class RouteImplementation : public BackwardForwardingRouteImplementation { protected: RouteImplementation(module::Module & module, connector::PassiveInput & source, connector::ActiveOutput & target); }; template class RouteImplementation : public BackwardForwardingRouteFromEventImplementation { protected: RouteImplementation(module::Module & module, Event & source, connector::ActiveOutput & target); }; # endif }}} ///////////////////////////////ih.e//////////////////////////////////////// #endif // Local Variables: // mode: c++ // fill-column: 100 // comment-column: 40 // c-file-style: "senf" // indent-tabs-mode: nil // ispell-local-dictionary: "american" // compile-command: "scons -u test" // End: