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 Route public header */
28 #include <boost/type_traits.hpp>
31 //#include "Route.mpp"
32 ///////////////////////////////hh.p////////////////////////////////////////
43 RouteBase(module::Module & module);
46 module::Module * module_;
53 bool autoThrottling() const;
54 void autoThrottling(bool state); ///< Change automatic throttle notification forwarding
55 /**< By default, throttle notifications are automatically
56 forwarded from active to passive connectors. This may
57 be disabled by setting the authoThrottling state to \c
60 Routing from/to an event to/from a passive connector
61 will automatically create throttling notifications on
62 the connector whenever the event is disabled. Routing
63 form/to an event to/from an active connector will
64 disable the event whenever a throttling notification
65 comes in. Respective for unthrottle notifications.
67 \param[in] state New throttle forwarding state */
69 bool throttled() const;
72 ForwardingRoute(module::Module & module);
74 // Called to register this route with the connectors forwarding information base
75 template <class T> void registerRoute(T & ob);
77 template <class T> void notifyThrottle(T & ob);
78 template <class T> void notifyUnthrottle(T & ob);
81 // called to forward a throttling notification along the route
82 void notifyThrottle();
83 void notifyUnthrottle();
85 // Implemented in the derived classes to forward throttling notifications
86 virtual void v_notifyThrottle() = 0;
87 virtual void v_notifyUnthrottle() = 0;
88 virtual bool v_throttled() const = 0;
92 friend class connector::ActiveConnector;
97 // We need detail::RouteImplementation here ...
103 /** \brief Route descriptor
105 Route instances are created by Module::route statements. The Route class provides an
106 interface to manipulate the flow processing.
108 template <class Source, class Target>
110 : public detail::RouteImplementation<Source,Target>
112 typedef detail::RouteImplementation<Source,Target> Base;
114 typedef detail::RouteImplementation<Source,Target> Implementation;
116 Route(module::Module & module, Source & source, Target & target);
118 friend class module::Module;
123 ///////////////////////////////hh.e////////////////////////////////////////
133 // c-file-style: "senf"
134 // indent-tabs-mode: nil
135 // ispell-local-dictionary: "american"
136 // compile-command: "scons -u test"
137 // comment-column: 40