PPI: Allow to change the IOEvent handle/event mask
[senf.git] / PPI / Jack.cti
1 // $Id$
2 //
3 // Copyright (C) 2009 
4 // Fraunhofer Institute for Open Communication Systems (FOKUS)
5 // Competence Center NETwork research (NET), St. Augustin, GERMANY
6 //     Stefan Bund <g0dil@berlios.de>
7 //
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.
12 //
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.
17 //
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.
22
23 /** \file
24     \brief Jack inline template implementation */
25
26 //#include "Jack.ih"
27
28 // Custom includes
29 #include "Setup.hh"
30
31 #define prefix_ inline
32 ///////////////////////////////cti.p///////////////////////////////////////
33
34 template <class PacketType>
35 prefix_ senf::ppi::connector::ActiveInputJack<PacketType>::
36 ActiveInputJack(ActiveInput<PacketType> & input)
37     : GenericActiveInputJack (input)
38 {}
39
40 template <class PacketType>
41 prefix_
42 senf::ppi::connector::ActiveInputJack<PacketType>::ActiveInputJack(ActiveInput<> & input)
43     : GenericActiveInputJack (input)
44 {}
45
46 template <class PacketType>
47 prefix_
48 senf::ppi::connector::ActiveInputJack<PacketType>::ActiveInputJack(ActiveInputJack & input)
49     : GenericActiveInputJack (input.connector())
50 {}
51
52 template <class PacketType>
53 prefix_
54 senf::ppi::connector::ActiveInputJack<PacketType>::ActiveInputJack(ActiveInputJack<> & input)
55     : GenericActiveInputJack (input.connector())
56 {}
57
58 prefix_
59 senf::ppi::connector::ActiveInputJack<senf::Packet>::ActiveInputJack(ActiveInput<> & input)
60     : GenericActiveInputJack (input) 
61 {}
62
63 prefix_
64 senf::ppi::connector::ActiveInputJack<senf::Packet>::ActiveInputJack(ActiveInputJack & input)
65     : GenericActiveInputJack (input.connector()) 
66 {}
67
68 template <class PacketType>
69 prefix_ senf::ppi::connector::ActiveOutputJack<PacketType>::
70 ActiveOutputJack(ActiveOutput<PacketType> & output)
71     : GenericActiveOutputJack (output)
72 {}
73
74 template <class PacketType>
75 prefix_
76 senf::ppi::connector::ActiveOutputJack<PacketType>::ActiveOutputJack(ActiveOutput<> & output)
77     : GenericActiveOutputJack (output)
78 {}
79
80 template <class PacketType>
81 prefix_ senf::ppi::connector::ActiveOutputJack<PacketType>::
82 ActiveOutputJack(ActiveOutputJack & output)
83     : GenericActiveOutputJack (output.connector())
84 {}
85
86 template <class PacketType>
87 prefix_ senf::ppi::connector::ActiveOutputJack<PacketType>::
88 ActiveOutputJack(ActiveOutputJack<> & output)
89     : GenericActiveOutputJack (output.connector())
90 {}
91
92 prefix_ senf::ppi::connector::ActiveOutputJack<senf::Packet>::
93 ActiveOutputJack(ActiveOutput<> & output)
94     : GenericActiveOutputJack (output) 
95 {}
96
97 prefix_ senf::ppi::connector::ActiveOutputJack<senf::Packet>::
98 ActiveOutputJack(ActiveOutputJack & output)
99     : GenericActiveOutputJack (output.connector()) 
100 {}
101
102 template <class PacketType>
103 prefix_ senf::ppi::connector::PassiveInputJack<PacketType>::
104 PassiveInputJack(PassiveInput<PacketType> & input)
105     : GenericPassiveInputJack (input)
106 {}
107
108 template <class PacketType>
109 prefix_
110 senf::ppi::connector::PassiveInputJack<PacketType>::PassiveInputJack(PassiveInput<> & input)
111     : GenericPassiveInputJack (input)
112 {}
113
114 template <class PacketType>
115 prefix_
116 senf::ppi::connector::PassiveInputJack<PacketType>::PassiveInputJack(PassiveInputJack & input)
117     : GenericPassiveInputJack (input.connector())
118 {}
119
120 template <class PacketType>
121 prefix_ senf::ppi::connector::PassiveInputJack<PacketType>::
122 PassiveInputJack(PassiveInputJack<> & input)
123     : GenericPassiveInputJack (input.connector())
124 {}
125
126 prefix_
127 senf::ppi::connector::PassiveInputJack<senf::Packet>::PassiveInputJack(PassiveInput<> & input)
128     : GenericPassiveInputJack (input) 
129 {}
130
131 prefix_ senf::ppi::connector::PassiveInputJack<senf::Packet>::
132 PassiveInputJack(PassiveInputJack & input)
133     : GenericPassiveInputJack (input.connector()) 
134 {}
135
136 template <class PacketType>
137 prefix_ senf::ppi::connector::PassiveOutputJack<PacketType>::
138 PassiveOutputJack(PassiveOutput<PacketType> & output)
139     : GenericPassiveOutputJack (output)
140 {}
141
142 template <class PacketType>
143 prefix_ senf::ppi::connector::PassiveOutputJack<PacketType>::
144 PassiveOutputJack(PassiveOutput<> & output)
145     : GenericPassiveOutputJack (output)
146 {}
147
148 template <class PacketType>
149 prefix_ senf::ppi::connector::PassiveOutputJack<PacketType>::
150 PassiveOutputJack(PassiveOutputJack & output)
151     : GenericPassiveOutputJack (output.connector())
152 {}
153
154 template <class PacketType>
155 prefix_ senf::ppi::connector::PassiveOutputJack<PacketType>::
156 PassiveOutputJack(PassiveOutputJack<> & output)
157     : GenericPassiveOutputJack (output.connector())
158 {}
159
160 prefix_ senf::ppi::connector::PassiveOutputJack<senf::Packet>::
161 PassiveOutputJack(PassiveOutput<> & output)
162     : GenericPassiveOutputJack (output) 
163 {}
164
165 prefix_ senf::ppi::connector::PassiveOutputJack<senf::Packet>::
166 PassiveOutputJack(PassiveOutputJack & output)
167     : GenericPassiveOutputJack (output.connector()) 
168 {}
169
170 template <class T>
171 prefix_ void
172 senf::ppi::connect(connector::GenericActiveOutputJack & source, T & target,
173                    typename boost::disable_if< boost::is_base_of<connector::Jack, T> >::type *)
174 {
175     connect(source.connector(), target);
176 }
177
178 template <class T>
179 prefix_ void
180 senf::ppi::connect(connector::GenericPassiveOutputJack & source, T & target,
181                    typename boost::disable_if< boost::is_base_of<connector::Jack, T> >::type *)
182 {
183     connect(source.connector(), target);
184 }
185
186 template <class T>
187 prefix_ void
188 senf::ppi::connect(T & source, connector::GenericActiveInputJack & target,
189                    typename boost::disable_if< boost::is_base_of<connector::Jack, T> >::type *)
190 {
191     connect(source, target.connector());
192 }
193
194 template <class T>
195 prefix_ void
196 senf::ppi::connect(T & source, connector::GenericPassiveInputJack & target,
197                    typename boost::disable_if< boost::is_base_of<connector::Jack, T> >::type *)
198 {
199     connect(source, target.connector());
200 }
201
202 ///////////////////////////////cti.e///////////////////////////////////////
203 #undef prefix_
204
205 \f
206 // Local Variables:
207 // mode: c++
208 // fill-column: 100
209 // comment-column: 40
210 // c-file-style: "senf"
211 // indent-tabs-mode: nil
212 // ispell-local-dictionary: "american"
213 // compile-command: "scons -u test"
214 // End: