220df862adeb8882eacc0882f5f94aec2354d1bf
[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 prefix_ senf::ppi::connector::ActiveInputJack<senf::Packet>::ActiveInputJack(ActiveInput<> & input)
47     : GenericActiveInputJack (input)
48 {}
49
50 template <class PacketType>
51 prefix_ senf::ppi::connector::ActiveOutputJack<PacketType>::
52 ActiveOutputJack(ActiveOutput<PacketType> & output)
53     : GenericActiveOutputJack (output)
54 {}
55
56 template <class PacketType>
57 prefix_
58 senf::ppi::connector::ActiveOutputJack<PacketType>::ActiveOutputJack(ActiveOutput<> & output)
59     : GenericActiveOutputJack (output)
60 {}
61
62 prefix_
63 senf::ppi::connector::ActiveOutputJack<senf::Packet>::ActiveOutputJack(ActiveOutput<> & output)
64     : GenericActiveOutputJack (output)
65 {}
66
67 template <class PacketType>
68 prefix_ senf::ppi::connector::PassiveInputJack<PacketType>::
69 PassiveInputJack(PassiveInput<PacketType> & input)
70     : GenericPassiveInputJack (input)
71 {}
72
73 template <class PacketType>
74 prefix_
75 senf::ppi::connector::PassiveInputJack<PacketType>::PassiveInputJack(PassiveInput<> & input)
76     : GenericPassiveInputJack (input)
77 {}
78
79 prefix_
80 senf::ppi::connector::PassiveInputJack<senf::Packet>::PassiveInputJack(PassiveInput<> & input)
81     : GenericPassiveInputJack (input) 
82 {}
83
84 template <class PacketType>
85 prefix_ senf::ppi::connector::PassiveOutputJack<PacketType>::
86 PassiveOutputJack(PassiveOutput<PacketType> & output)
87     : GenericPassiveOutputJack (output)
88 {}
89
90 template <class PacketType>
91 prefix_ senf::ppi::connector::PassiveOutputJack<PacketType>::
92 PassiveOutputJack(PassiveOutput<> & output)
93     : GenericPassiveOutputJack (output)
94 {}
95
96 prefix_
97 senf::ppi::connector::PassiveOutputJack<senf::Packet>::PassiveOutputJack(PassiveOutput<> & output)
98     : GenericPassiveOutputJack (output)
99 {}
100
101 template <class T>
102 prefix_ void
103 senf::ppi::connect(connector::GenericActiveOutputJack & source, T & target,
104                    typename boost::disable_if< boost::is_base_of<connector::Jack, T> >::type *)
105 {
106     connect(source.connector(), target);
107 }
108
109 template <class T>
110 prefix_ void
111 senf::ppi::connect(connector::GenericPassiveOutputJack & source, T & target,
112                    typename boost::disable_if< boost::is_base_of<connector::Jack, T> >::type *)
113 {
114     connect(source.connector(), target);
115 }
116
117 template <class T>
118 prefix_ void
119 senf::ppi::connect(T & source, connector::GenericActiveInputJack & target,
120                    typename boost::disable_if< boost::is_base_of<connector::Jack, T> >::type *)
121 {
122     connect(source, target.connector());
123 }
124
125 template <class T>
126 prefix_ void
127 senf::ppi::connect(T & source, connector::GenericPassiveInputJack & target,
128                    typename boost::disable_if< boost::is_base_of<connector::Jack, T> >::type *)
129 {
130     connect(source, target.connector());
131 }
132
133 ///////////////////////////////cti.e///////////////////////////////////////
134 #undef prefix_
135
136 \f
137 // Local Variables:
138 // mode: c++
139 // fill-column: 100
140 // comment-column: 40
141 // c-file-style: "senf"
142 // indent-tabs-mode: nil
143 // ispell-local-dictionary: "american"
144 // compile-command: "scons -u test"
145 // End: