Route.ct
Go to the documentation of this file.
1 //
2 // Copyright (c) 2020 Fraunhofer Institute for Applied Information Technology (FIT)
3 // Network Research Group (NET)
4 // Schloss Birlinghoven, 53754 Sankt Augustin, GERMANY
5 // Contact: support@wiback.org
6 //
7 // This file is part of the SENF code tree.
8 // It is licensed under the 3-clause BSD License (aka New BSD License).
9 // See LICENSE.txt in the top level directory for details or visit
10 // https://opensource.org/licenses/BSD-3-Clause
11 //
12 
13 
14 /** \file
15  \brief Route non-inline template implementation */
16 
17 #include "Route.ih"
18 
19 // Custom includes
20 
21 #define prefix_
22 //-/////////////////////////////////////////////////////////////////////////////////////////////////
23 
24 //-/////////////////////////////////////////////////////////////////////////////////////////////////
25 // senf::ppi::detail::ForwardingRouteImplementation<Source,Target>
26 
27 //-/////////////////////////////////////////////////////////////////////////////////////////////////
28 // private members
29 
30 template <class Source, class Target>
31 prefix_ void senf::ppi::detail::ForwardingRouteImplementation<Source,Target>::v_notifyThrottle()
32 {
33  if (this->autoThrottling()) {
34  notifyThrottle(this->source(),boost::mpl::bool_<RoutingTraits<Source>::notifyTarget>());
35  notifyThrottle(this->target(),boost::mpl::bool_<RoutingTraits<Target>::notifyTarget>());
36  }
37 }
38 
39 template <class Source, class Target>
40 prefix_ void
41 senf::ppi::detail::ForwardingRouteImplementation<Source,Target>::v_notifyUnthrottle()
42 {
43  if (this->autoThrottling()) {
44  notifyUnthrottle(this->source(),boost::mpl::bool_<RoutingTraits<Source>::notifyTarget>());
45  notifyUnthrottle(this->target(),boost::mpl::bool_<RoutingTraits<Target>::notifyTarget>());
46  }
47 }
48 
49 template <class Source, class Target>
50 prefix_ bool senf::ppi::detail::ForwardingRouteImplementation<Source,Target>::v_throttled()
51  const
52 {
53  return this->autoThrottling() && (
54  throttled(this->source(),boost::mpl::bool_<RoutingTraits<Source>::notifySource>()) ||
55  throttled(this->target(),boost::mpl::bool_<RoutingTraits<Target>::notifySource>()) );
56 }
57 
58 //-/////////////////////////////////////////////////////////////////////////////////////////////////
59 #undef prefix_
60 
61 
62 // Local Variables:
63 // mode: c++
64 // fill-column: 100
65 // comment-column: 40
66 // c-file-style: "senf"
67 // indent-tabs-mode: nil
68 // ispell-local-dictionary: "american"
69 // compile-command: "scons -u test"
70 // End: