4 # Copyright 2003 Free Software Foundation, Inc.
6 # This file is part of GNU Radio
8 # GNU Radio 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, or (at your option)
13 # GNU Radio 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 GNU Radio; see the file COPYING. If not, write to
20 # the Free Software Foundation, Inc., 51 Franklin Street,
21 # Boston, MA 02110-1301, USA.
24 from generate_utils import *
27 # ----------------------------------------------------------------
29 def make_gr_fir_sysconfig_h ():
30 out = open_and_log_name ('gr_fir_sysconfig.h', 'w')
36 * WARNING: This file is automatically generated by generate_gr_fir_sysconfig.py
37 * Any changes made to this file will be overwritten.
40 #ifndef INCLUDED_GR_FIR_SYSCONFIG_H
41 #define INCLUDED_GR_FIR_SYSCONFIG_H
47 # for sig in fir_signatures:
48 # out.write ('class gr_fir_' + sig + ';\n')
50 out.write ('#include <gr_fir_util.h>\n')
55 * \\brief abstract base class for configuring the automatic selection of the
56 * fastest gr_fir for your platform.
58 * This is used internally by gr_fir_util.
61 class gr_fir_sysconfig {
63 virtual ~gr_fir_sysconfig ();
67 for sig in fir_signatures:
68 out.write ((' virtual gr_fir_%s *create_gr_fir_%s (const std::vector<%s> &taps) = 0;\n' %
69 (sig, sig, tap_type (sig))))
73 for sig in fir_signatures:
74 out.write ((' virtual void get_gr_fir_%s_info (std::vector<gr_fir_%s_info> *info) = 0;\n' %
82 * This returns the single instance of the appropriate derived class.
83 * This function must be defined only once in the system, and should be defined
84 * in the platform specific code.
87 gr_fir_sysconfig *gr_fir_sysconfig_singleton ();
90 #endif /* INCLUDED_GR_FIR_SYSCONFIG_H */
95 # ----------------------------------------------------------------
97 def make_gr_fir_sysconfig_cc ():
98 out = open_and_log_name ('gr_fir_sysconfig.cc', 'w')
104 * WARNING: This file is automatically generated by generate_gr_fir_sysconfig.py
105 * Any changes made to this file will be overwritten.
111 #include <gr_fir_sysconfig.h>
113 gr_fir_sysconfig::~gr_fir_sysconfig ()
120 # ----------------------------------------------------------------
123 make_gr_fir_sysconfig_h ()
124 make_gr_fir_sysconfig_cc ()
126 if __name__ == '__main__':