Do C++ source files have file extension of "*.cc.t" and "*.h.t" ?

Dear gurus,

I came across GNU Radio source files (which are written in C++), it consists of a many files with extension .cc.t, .h.t or even .i.t.
Some other files have extension of .i

Examples of files with file extension "*.i":
./gr-digital/swig/digital_binary_slicer_fb.i
./gr-digital/swig/digital_ofdm_frame_acquisition.i
./gr-digital/swig/digital_ofdm_equalizer_static.i
./gr-digital/swig/digital_ofdm_cyclic_prefixer.i
./gr-digital/swig/digital_correlate_access_code_bb.i
./gr-digital/swig/digital_probe_mpsk_snr_est_c.i
./gr-digital/swig/digital_crc32_bb.i
./gr-digital/swig/digital_clock_recovery_mm_cc.i
./gr-digital/swig/digital_fll_band_edge_cc.i
./gr-digital/swig/digital_mpsk_snr_est_cc.i
./gr-digital/swig/digital_simple_correlator.i


Examples of files with file extension "*.t":
./gr-filter/lib/rational_resampler_base_XXX_impl.h.t
./gr-filter/lib/interp_fir_filter_XXX_impl.h.t
./gr-filter/lib/fir_filter_XXX_impl.h.t
./gr-filter/lib/fir_filter_XXX_impl.cc.t
./gr-filter/lib/freq_xlating_fir_filter_XXX_impl.cc.t
./gr-filter/lib/rational_resampler_base_XXX_impl.cc.t
./gr-filter/lib/interp_fir_filter_XXX_impl.cc.t
./gr-filter/include/filter/interp_fir_filter_XXX.h.t
./gr-filter/include/filter/freq_xlating_fir_filter_XXX.h.t
./gr-filter/include/filter/rational_resampler_base_XXX.h.t
./gr-filter/include/filter/fir_filter_XXX.h.t
./gruel/src/lib/pmt/unv_template.h.t
./gruel/src/lib/pmt/unv_template.cc.t
./gruel/src/lib/pmt/unv_qa_template.cc.t
./gr-digital/lib/digital_chunks_to_symbols_XX.cc.t


Question:
Are these considered C++ standard header files and C++ standard implementation files?
Why do they come with file extension .t or .i ?
Will these files eventually being converted to standard .h and .cc files before compilation?


Example of source file with file extension of "*.h.t"
Filename: gnuradio-3.6.5.1/gr-analog/include/analog/sig_source_X.h.t


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/* -*- c++ -*- */
/*
 * Copyright 2004,2012 Free Software Foundation, Inc.
 *
 * This file is part of GNU Radio
 *
 * GNU Radio is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 3, or (at your option)
 * any later version.
 *
 * GNU Radio is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with GNU Radio; see the file COPYING.  If not, write to
 * the Free Software Foundation, Inc., 51 Franklin Street,
 * Boston, MA 02110-1301, USA.
 */

/* @WARNING@ */

#ifndef @GUARD_NAME@
#define @GUARD_NAME@

#include <analog/api.h>
#include <analog/sig_source_waveform.h>
#include <gr_sync_block.h>

namespace gr {
  namespace analog {

    /*!
     * \brief signal generator with @TYPE@ output.
     * \ingroup waveform_generators_blk
     */
    class ANALOG_API @BASE_NAME@ : virtual public gr_sync_block
    {
    public:
      // gr::analog::@BASE_NAME@::sptr
      typedef boost::shared_ptr<@BASE_NAME@> sptr;
      
      /*!
       * Build a signal source block.
       *
       * \param sampling_freq Sampling rate of signal.
       * \param waveform wavetform type.
       * \param wave_freq Frequency of waveform (relative to sampling_freq).
       * \param ampl Signal amplitude.
       * \param offset offset of signal.
       */
      static sptr make(double sampling_freq,
		       gr::analog::gr_waveform_t waveform,
		       double wave_freq,
		       double ampl, @TYPE@ offset = 0);

      virtual double sampling_freq() const = 0;
      virtual gr::analog::gr_waveform_t waveform() const = 0;
      virtual double frequency() const = 0;
      virtual double amplitude() const = 0;
      virtual @TYPE@ offset() const = 0;

      virtual void set_sampling_freq(double sampling_freq) = 0;
      virtual void set_waveform(gr::analog::gr_waveform_t waveform) = 0;
      virtual void set_frequency(double frequency) = 0;
      virtual void set_amplitude(double ampl) = 0;
      virtual void set_offset(@TYPE@ offset) = 0;
    };

  } /* namespace analog */
} /* namespace gr */

#endif /* @GUARD_NAME@ */ 


Please give me some hints so that I could start googling the right keywords .. :)
Last edited on
It seems that "*.i" files tell SWIG how to generate the glue that binds the class into Python.
But how about those "*.t" files ..?
If I had to guess, I'd say t = template

It looks like some preprocess is used to replace the @ delimited string tokens with real value to create a whatever file. i.e. preprocess a .h.t -> .h

The XXXs in most of the file names suggests the same thing.

Andy
Last edited on
Topic archived. No new replies allowed.