From 8613b52b42585f1f0f1ca73b778cd47ec2548292 Mon Sep 17 00:00:00 2001 From: Johnathan Corgan Date: Sun, 29 Apr 2012 10:28:01 -0700 Subject: fft: make interface functions pure virtual --- gr-fft/include/fft/fft_vcc.h | 9 +++------ gr-fft/include/fft/fft_vfc.h | 9 +++------ gr-fft/include/fft/goertzel_fc.h | 16 +++++----------- 3 files changed, 11 insertions(+), 23 deletions(-) diff --git a/gr-fft/include/fft/fft_vcc.h b/gr-fft/include/fft/fft_vcc.h index 932fa6f50..561ae858d 100644 --- a/gr-fft/include/fft/fft_vcc.h +++ b/gr-fft/include/fft/fft_vcc.h @@ -44,14 +44,11 @@ namespace gr { const std::vector &window, bool shift=false, int nthreads=1); - virtual void set_nthreads(int n) - { throw std::runtime_error("fft_vcc::set_nthreads not implemented.\n"); } + virtual void set_nthreads(int n) = 0; - virtual int nthreads() const - { throw std::runtime_error("fft_vcc::nthreads not implemented.\n"); } + virtual int nthreads() const = 0; - virtual bool set_window(const std::vector &window) - { throw std::runtime_error("fft_vcc::set_window not implemented.\n"); } + virtual bool set_window(const std::vector &window) = 0; }; } /* namespace fft */ diff --git a/gr-fft/include/fft/fft_vfc.h b/gr-fft/include/fft/fft_vfc.h index 01a5decdf..fc48ceefe 100644 --- a/gr-fft/include/fft/fft_vfc.h +++ b/gr-fft/include/fft/fft_vfc.h @@ -44,14 +44,11 @@ namespace gr { const std::vector &window, int nthreads=1); - virtual void set_nthreads(int n) - { throw std::runtime_error("fft_vfc::set_nthreads not implemented.\n"); } + virtual void set_nthreads(int n) = 0; - virtual int nthreads() const - { throw std::runtime_error("fft_vfc::nthreads not implemented.\n"); } + virtual int nthreads() const = 0; - virtual bool set_window(const std::vector &window) - { throw std::runtime_error("fft_vfc::set_window not implemented.\n"); } + virtual bool set_window(const std::vector &window) = 0; }; } /* namespace fft */ diff --git a/gr-fft/include/fft/goertzel_fc.h b/gr-fft/include/fft/goertzel_fc.h index 0bc5384b9..4d3fa8dcf 100644 --- a/gr-fft/include/fft/goertzel_fc.h +++ b/gr-fft/include/fft/goertzel_fc.h @@ -42,22 +42,16 @@ namespace gr { */ static FFT_API sptr make(int rate, int len, float freq); - virtual void set_freq (float freq) - { throw std::runtime_error("goertzel_fc::set_freq not implemented.\n"); } - - virtual void set_rate (int rate) - { throw std::runtime_error("goertzel_fc::set_rate not implemented.\n"); } + virtual void set_freq (float freq) = 0; - float freq() - { throw std::runtime_error("goertzel_fc::freq not implemented.\n"); } - - int rate() - { throw std::runtime_error("goertzel_fc::rate not implemented.\n"); } + virtual void set_rate (int rate) = 0; + + virtual float freq() = 0; + virtual int rate() = 0; }; } /* namespace fft */ } /* namespace gr */ #endif /* INCLUDED_FFT_GOERTZEL_FC_H */ - -- cgit