2 // Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
3 // Kompetenzzentrum fuer Satelitenkommunikation (SatCom)
4 // Stefan Bund <g0dil@berlios.de>
6 // This program is free software; you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation; either version 2 of the License, or
9 // (at your option) any later version.
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
16 // You should have received a copy of the GNU General Public License
17 // along with this program; if not, write to the
18 // Free Software Foundation, Inc.,
19 // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 \brief Module non-inline template implementation */
29 ///////////////////////////////ct.p////////////////////////////////////////
31 ///////////////////////////////////////////////////////////////////////////
32 // senf::ppi::module::Module
34 template <class Source, class Target>
35 prefix_ senf::ppi::Route<Source, Target> &
36 senf::ppi::module::Module::route(Source & source, Target & target)
38 detail::RouteHelper<Source,Target>::route(*this, source, target, source, target);
39 return static_cast< Route<Source,Target> & >(
40 addRoute(std::auto_ptr< RouteBase >(
41 new Route<Source,Target>(*this, source, target))));
44 template <class Target, class Descriptor>
45 prefix_ void senf::ppi::module::Module::registerEvent(Target target, Descriptor & descriptor)
47 eventManager().registerEvent(
49 EventManager::Callback<Descriptor>::make(target,*this),
51 descriptor.enabled(true);
54 ///////////////////////////////////////////////////////////////////////////
55 // senf::ppi::module::detail namespace members
57 template <class Source, class Target>
58 prefix_ void senf::ppi::module::detail::RouteHelper<Source,Target>::
59 route(Module & module, Source & source, Target & target,
60 connector::InputConnector &, connector::OutputConnector &)
62 module.registerConnector(source);
63 module.registerConnector(target);
66 template <class Source, class Target>
67 prefix_ void senf::ppi::module::detail::RouteHelper<Source,Target>::
68 route(Module & module, Source & source, Target & target,
69 connector::InputConnector &, EventDescriptor &)
71 module.registerConnector(source);
74 template <class Source, class Target>
75 prefix_ void senf::ppi::module::detail::RouteHelper<Source,Target>::
76 route(Module & module, Source & source, Target & target,
77 EventDescriptor &, connector::OutputConnector &)
79 module.registerConnector(target);
82 ///////////////////////////////ct.e////////////////////////////////////////
90 // c-file-style: "senf"
91 // indent-tabs-mode: nil
92 // ispell-local-dictionary: "american"
93 // compile-command: "scons -u test"