X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=senf%2FPPI%2FModule.hh;h=8b60a5eda8af5f74947cc8c36dff961d7b94e889;hb=HEAD;hp=1b4881d9d26437df38d7234075237dbf11c5f9f2;hpb=ab7ff164ab5ae711ec09ce2b24228510f1ffdcff;p=senf.git diff --git a/senf/PPI/Module.hh b/senf/PPI/Module.hh index 1b4881d..8b60a5e 100644 --- a/senf/PPI/Module.hh +++ b/senf/PPI/Module.hh @@ -189,10 +189,7 @@ namespace module { protected: Module(); -#ifndef DOXYGEN - template - Route & route(Source & source, Target & target); -#else +#ifdef DOXYGEN Route & route(connector::InputConnector & input, connector::OutputConnector & output); ///< Define flow information @@ -219,9 +216,7 @@ namespace module { \param[in] output Data target, object which controls outgoing data (connector or event) \returns Route instance describing this route - \see \ref ppi_throttling - \note The real implementation is not provided by three - overloads but by a single template member */ + \see \ref ppi_throttling */ Route & route(connector::InputConnector & input, EventDescriptor & output); @@ -253,6 +248,21 @@ namespace module { enable/disable the event on throttling notifications. \see \ref route() */ +#else +# define route_decl(Source, Target) \ + Route & \ + route(Source & source, Target & target); + + route_decl( connector::GenericPassiveInput, connector::GenericActiveOutput); + route_decl( connector::GenericPassiveInput, connector::GenericPassiveOutput); + route_decl( connector::GenericActiveInput, connector::GenericPassiveOutput); + route_decl( connector::GenericActiveInput, connector::GenericActiveOutput); + route_decl( connector::GenericPassiveInput, EventDescriptor); + route_decl( connector::GenericActiveInput, EventDescriptor); + route_decl( EventDescriptor, connector::GenericPassiveOutput); + route_decl( EventDescriptor, connector::GenericActiveOutput); + +#undef Route_decl #endif void noroute(connector::Connector & connector); ///< Define terminal connectors @@ -333,7 +343,7 @@ namespace module { RouteInfoBase routes_; template - friend class detail::RouteHelper; + friend struct detail::RouteHelper; friend class senf::ppi::ModuleManager; friend class connector::Connector; friend class senf::ppi::detail::EventBindingBase;