Updated license from GPL version 2 or later to GPL version 3 or later.
[debian/gnuradio] / gnuradio-core / src / lib / swig / gnuradio.i
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2003,2004 Free Software Foundation, Inc.
4  * 
5  * This file is part of GNU Radio
6  * 
7  * GNU Radio is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 3, or (at your option)
10  * any later version.
11  * 
12  * GNU Radio is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  * 
17  * You should have received a copy of the GNU General Public License
18  * along with GNU Radio; see the file COPYING.  If not, write to
19  * the Free Software Foundation, Inc., 51 Franklin Street,
20  * Boston, MA 02110-1301, USA.
21  */
22
23 ////////////////////////////////////////////////////////////////////////
24 // gnuradio.i
25 // SWIG interface definition
26 ////////////////////////////////////////////////////////////////////////
27
28
29 #ifndef SWIGIMPORTED
30 %module(directors="1") gnuradio_swig_py_runtime
31 #endif
32
33 ////////////////////////////////////////////////////////////////////////
34 // Headers
35
36
37 %{
38 #include <gr_types.h>
39 #include <stddef.h>             // size_t
40 %}
41
42 %feature("autodoc","1");
43
44 %include <shared_ptr.i>
45 %include <stl.i>
46 %include <std_complex.i>
47
48
49 typedef std::complex<float>             gr_complex;
50 typedef std::complex<double>            gr_complexd;
51
52
53 // instantiate the required template specializations
54
55 namespace std {
56   %template()     vector<unsigned char>;
57   %template()     vector<char>;
58   %template()     vector<short>;
59   %template()     vector<int>;
60   %template()     vector<float>;
61   %template()     vector<double>;
62
63   %template()     vector< std::complex<float> >;
64   %template()     vector< std::vector< unsigned char > >;
65   %template()     vector< std::vector< char > >;
66   %template()     vector< std::vector< short > >;
67   %template()     vector< std::vector< int > >;
68   %template()     vector< std::vector< float > >;
69   %template()     vector< std::vector< double > >;
70   %template()     vector< std::vector< std::complex<float> > >;
71 };
72
73 ////////////////////////////////////////////////////////////////////////
74
75 %constant int sizeof_char       = sizeof(char);
76 %constant int sizeof_short      = sizeof(short);
77 %constant int sizeof_int        = sizeof(int);
78 %constant int sizeof_float      = sizeof(float);
79 %constant int sizeof_double     = sizeof(double);
80 %constant int sizeof_gr_complex = sizeof(gr_complex);
81
82 ////////////////////////////////////////////////////////////////////////
83
84 %include <runtime.i>
85  // %include <general.i>
86  // %include <filter.i>
87  // %include <io.i>
88
89 // %include <atsc.i>
90
91 ////////////////////////////////////////////////////////////////////////