4 // Fraunhofer Institute for Open Communication Systems (FOKUS)
5 // Competence Center NETwork research (NET), St. Augustin, GERMANY
6 // Stefan Bund <g0dil@berlios.de>
8 // This program is free software; you can redistribute it and/or modify
9 // it under the terms of the GNU General Public License as published by
10 // the Free Software Foundation; either version 2 of the License, or
11 // (at your option) any later version.
13 // This program is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 // GNU General Public License for more details.
18 // You should have received a copy of the GNU General Public License
19 // along with this program; if not, write to the
20 // Free Software Foundation, Inc.,
21 // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 \brief Jack public header */
26 #ifndef HH_SENF_PPI_Jack_
27 #define HH_SENF_PPI_Jack_ 1
30 #include <boost/utility.hpp>
31 #include <boost/type_traits.hpp>
32 #include "Connectors.hh"
35 ///////////////////////////////hh.p////////////////////////////////////////
42 : private boost::noncopyable
45 class GenericActiveInputJack
49 explicit GenericActiveInputJack(GenericActiveInput & input);
51 GenericActiveInput & connector();
54 GenericActiveInput & input_;
57 class GenericActiveOutputJack
61 explicit GenericActiveOutputJack(GenericActiveOutput & output);
63 GenericActiveOutput & connector();
66 GenericActiveOutput & output_;
69 class GenericPassiveInputJack
73 explicit GenericPassiveInputJack(GenericPassiveInput & input);
75 GenericPassiveInput & connector();
78 GenericPassiveInput & input_;
81 class GenericPassiveOutputJack
85 explicit GenericPassiveOutputJack(GenericPassiveOutput & output);
87 GenericPassiveOutput & connector();
90 GenericPassiveOutput & output_;
93 template <class PacketType=Packet>
95 : public GenericActiveInputJack
98 explicit ActiveInputJack(ActiveInput<PacketType> & input);
99 explicit ActiveInputJack(ActiveInput<> & input);
101 explicit ActiveInputJack(ActiveInputJack & input);
102 explicit ActiveInputJack(ActiveInputJack<> & input);
108 class ActiveInputJack<Packet>
109 : public GenericActiveInputJack
112 explicit ActiveInputJack(ActiveInput<> & input);
113 explicit ActiveInputJack(ActiveInputJack & input);
118 template <class PacketType=Packet>
119 class ActiveOutputJack
120 : public GenericActiveOutputJack
123 explicit ActiveOutputJack(ActiveOutput<PacketType> & output);
124 explicit ActiveOutputJack(ActiveOutput<> & output);
126 explicit ActiveOutputJack(ActiveOutputJack & output);
127 explicit ActiveOutputJack(ActiveOutputJack<> & output);
133 class ActiveOutputJack<Packet>
134 : public GenericActiveOutputJack
137 explicit ActiveOutputJack(ActiveOutput<> & output);
138 explicit ActiveOutputJack(ActiveOutputJack & output);
143 template <class PacketType=Packet>
144 class PassiveInputJack
145 : public GenericPassiveInputJack
148 explicit PassiveInputJack(PassiveInput<PacketType> & input);
149 explicit PassiveInputJack(PassiveInput<> & input);
151 explicit PassiveInputJack(PassiveInputJack & input);
152 explicit PassiveInputJack(PassiveInputJack<> & input);
158 class PassiveInputJack<Packet>
159 : public GenericPassiveInputJack
162 explicit PassiveInputJack(PassiveInput<> & input);
163 explicit PassiveInputJack(PassiveInputJack & input);
168 template <class PacketType=Packet>
169 class PassiveOutputJack
170 : public GenericPassiveOutputJack
173 explicit PassiveOutputJack(PassiveOutput<PacketType> & output);
174 explicit PassiveOutputJack(PassiveOutput<> & output);
176 explicit PassiveOutputJack(PassiveOutputJack & output);
177 explicit PassiveOutputJack(PassiveOutputJack<> & output);
183 class PassiveOutputJack<Packet>
184 : public GenericPassiveOutputJack
187 explicit PassiveOutputJack(PassiveOutput<> & output);
188 explicit PassiveOutputJack(PassiveOutputJack & output);
197 void connect(connector::GenericActiveOutputJack & source, T & target,
198 typename boost::disable_if< boost::is_base_of<connector::Jack, T> >::type * = 0);
200 void connect(connector::GenericPassiveOutputJack & source, T & target,
201 typename boost::disable_if< boost::is_base_of<connector::Jack, T> >::type * = 0);
204 void connect(T & source, connector::GenericActiveInputJack & target,
205 typename boost::disable_if< boost::is_base_of<connector::Jack, T> >::type * = 0);
207 void connect(T & source, connector::GenericPassiveInputJack & target,
208 typename boost::disable_if< boost::is_base_of<connector::Jack, T> >::type * = 0);
210 void connect(connector::GenericActiveOutputJack & source,
211 connector::GenericPassiveInputJack & target);
212 void connect(connector::GenericPassiveOutputJack & source,
213 connector::GenericActiveInputJack & target);
215 void connect(connector::GenericActiveOutputJack & source,
216 connector::GenericPassiveInput & target);
217 void connect(connector::GenericPassiveOutputJack & source,
218 connector::GenericActiveInput & target);
220 void connect(connector::GenericActiveOutput & source,
221 connector::GenericPassiveInputJack & target);
222 void connect(connector::GenericPassiveOutput & source,
223 connector::GenericActiveInputJack & target);
228 ///////////////////////////////hh.e////////////////////////////////////////
238 // comment-column: 40
239 // c-file-style: "senf"
240 // indent-tabs-mode: nil
241 // ispell-local-dictionary: "american"
242 // compile-command: "scons -u test"