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);
105 class ActiveInputJack<Packet>
106 : public GenericActiveInputJack
109 explicit ActiveInputJack(ActiveInput<> & input);
114 template <class PacketType=Packet>
115 class ActiveOutputJack
116 : public GenericActiveOutputJack
119 explicit ActiveOutputJack(ActiveOutput<PacketType> & output);
120 explicit ActiveOutputJack(ActiveOutput<> & output);
126 class ActiveOutputJack<Packet>
127 : public GenericActiveOutputJack
130 explicit ActiveOutputJack(ActiveOutput<> & output);
135 template <class PacketType=Packet>
136 class PassiveInputJack
137 : public GenericPassiveInputJack
140 explicit PassiveInputJack(PassiveInput<PacketType> & input);
141 explicit PassiveInputJack(PassiveInput<> & input);
147 class PassiveInputJack<Packet>
148 : public GenericPassiveInputJack
151 explicit PassiveInputJack(PassiveInput<> & input);
156 template <class PacketType=Packet>
157 class PassiveOutputJack
158 : public GenericPassiveOutputJack
161 explicit PassiveOutputJack(PassiveOutput<PacketType> & output);
162 explicit PassiveOutputJack(PassiveOutput<> & output);
168 class PassiveOutputJack<Packet>
169 : public GenericPassiveOutputJack
172 explicit PassiveOutputJack(PassiveOutput<> & output);
181 void connect(connector::GenericActiveOutputJack & source, T & target,
182 typename boost::disable_if< boost::is_base_of<connector::Jack, T> >::type * = 0);
184 void connect(connector::GenericPassiveOutputJack & source, T & target,
185 typename boost::disable_if< boost::is_base_of<connector::Jack, T> >::type * = 0);
188 void connect(T & source, connector::GenericActiveInputJack & target,
189 typename boost::disable_if< boost::is_base_of<connector::Jack, T> >::type * = 0);
191 void connect(T & source, connector::GenericPassiveInputJack & target,
192 typename boost::disable_if< boost::is_base_of<connector::Jack, T> >::type * = 0);
194 void connect(connector::GenericActiveOutputJack & source,
195 connector::GenericPassiveInputJack & target);
196 void connect(connector::GenericPassiveOutputJack & source,
197 connector::GenericActiveInputJack & target);
199 void connect(connector::GenericActiveOutputJack & source,
200 connector::GenericPassiveInput & target);
201 void connect(connector::GenericPassiveOutputJack & source,
202 connector::GenericActiveInput & target);
204 void connect(connector::GenericActiveOutput & source,
205 connector::GenericPassiveInputJack & target);
206 void connect(connector::GenericPassiveOutput & source,
207 connector::GenericActiveInputJack & target);
212 ///////////////////////////////hh.e////////////////////////////////////////
222 // comment-column: 40
223 // c-file-style: "senf"
224 // indent-tabs-mode: nil
225 // ispell-local-dictionary: "american"
226 // compile-command: "scons -u test"