Setup.hh
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 
17 #ifndef HH_SENF_PPI_Setup_
18 #define HH_SENF_PPI_Setup_ 1
19 
20 // Custom includes
21 #include <boost/type_traits/is_base_of.hpp>
22 #include <boost/utility/enable_if.hpp>
23 #include "predecl.hh"
24 
25 //#include "Setup.mpp"
26 //-/////////////////////////////////////////////////////////////////////////////////////////////////
27 
28 namespace senf {
29 namespace ppi {
30 
31 namespace detail {
35 }
36 
37 #ifdef DOXYGEN
38 
62  void connect(connector::OutputConnector & source, connector::InputConnector & target, ...);
63 
64 #else
65 
68 
69 #endif
70 
71 #ifndef DOXYGEN
72 
73  template <class T, class C>
74  void connect(T & source, C & target,
75  typename boost::disable_if< boost::is_base_of<connector::Connector, T> >::type * = 0,
76  typename boost::enable_if< boost::is_base_of<connector::Connector, C> >::type * = 0,
77  typename boost::disable_if< boost::is_base_of<detail::DisableStandardOutput, T> >::type * = 0);
78 
79  template <class C, class T>
80  void connect(C & source, T & target,
81  typename boost::enable_if< boost::is_base_of<connector::Connector, C> >::type * = 0,
82  typename boost::disable_if< boost::is_base_of<connector::Connector,T> >::type * = 0,
83  typename boost::disable_if< boost::is_base_of<detail::DisableStandardInput, T> >::type * = 0);
84 
85  template <class T1, class T2>
86  void connect(T1 & source, T2 & target,
87  typename boost::disable_if< boost::is_base_of<connector::Connector, T1> >::type * = 0,
88  typename boost::disable_if< boost::is_base_of<connector::Connector, T2> >::type * = 0,
89  typename boost::disable_if< boost::is_base_of<detail::DisableStandardOutput, T1> >:: type * = 0,
90  typename boost::disable_if< boost::is_base_of<detail::DisableStandardInput, T2> >:: type * = 0);
91 
92 #endif
93 
107  void run();
108 
115  void init();
116 
117 }}
118 
119 //-/////////////////////////////////////////////////////////////////////////////////////////////////
120 #include "Setup.cci"
121 //#include "Setup.ct"
122 #include "Setup.cti"
123 #endif
124 
125 
126 // Local Variables:
127 // mode: c++
128 // fill-column: 100
129 // comment-column: 40
130 // c-file-style: "senf"
131 // indent-tabs-mode: nil
132 // ispell-local-dictionary: "american"
133 // compile-command: "scons -u test"
134 // End:
void init()
Manually initialize the network.
u8 type
Combination of PassiveConnector and OutputConnector.
Definition: Connectors.hh:513
Combination of ActiveConnector and InputConnector.
Definition: Connectors.hh:538
Input connector base-class.
Definition: Connectors.hh:397
Output connector base-class.
Definition: Connectors.hh:449
Combination of ActiveConnector and OutputConnector.
Definition: Connectors.hh:563
void connect(connector::FastActiveOutput< PacketType > &source, connector::FastPassiveInput< PacketType > &target)
predecl public header
void run()
Start the network.
Combination of PassiveConnector and InputConnector.
Definition: Connectors.hh:478