From 9ecb12014a646f67b428f9415a5f186c59537dba Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Fri, 22 Feb 2013 19:23:09 -0800 Subject: gras: continuation from the last commit Removed a bunch of GRAS_LIBRARIES, we do this in a common place to avoid extra changes. Added virtual destructors for many classes. --- gnuradio-core/src/lib/CMakeLists.txt | 1 - gnuradio-core/src/lib/runtime/gr_block.cc | 15 +++++---------- gnuradio-core/src/lib/runtime/gr_block.h | 6 ++---- gnuradio-core/src/lib/runtime/gr_sync_block.cc | 5 +++++ gnuradio-core/src/lib/runtime/gr_sync_block.h | 2 ++ gnuradio-core/src/lib/runtime/gr_sync_decimator.cc | 5 +++++ gnuradio-core/src/lib/runtime/gr_sync_decimator.h | 2 ++ gnuradio-core/src/lib/runtime/gr_sync_interpolator.cc | 5 +++++ gnuradio-core/src/lib/runtime/gr_sync_interpolator.h | 2 ++ gnuradio-core/src/lib/swig/CMakeLists.txt | 2 +- gr-fcd/examples/c++/CMakeLists.txt | 2 +- gr-uhd/examples/c++/CMakeLists.txt | 2 +- 12 files changed, 31 insertions(+), 18 deletions(-) diff --git a/gnuradio-core/src/lib/CMakeLists.txt b/gnuradio-core/src/lib/CMakeLists.txt index 32fe26945..c061a5723 100644 --- a/gnuradio-core/src/lib/CMakeLists.txt +++ b/gnuradio-core/src/lib/CMakeLists.txt @@ -58,7 +58,6 @@ link_directories( # Setup library ######################################################################## list(APPEND gnuradio_core_libs - ${GRAS_LIBRARIES} gruel ${Boost_LIBRARIES} ${FFTW3F_LIBRARIES} diff --git a/gnuradio-core/src/lib/runtime/gr_block.cc b/gnuradio-core/src/lib/runtime/gr_block.cc index dae266c87..ed390e71f 100644 --- a/gnuradio-core/src/lib/runtime/gr_block.cc +++ b/gnuradio-core/src/lib/runtime/gr_block.cc @@ -43,6 +43,11 @@ gr_block::gr_block( this->set_output_signature(output_signature); } +gr_block::~gr_block(void) +{ + //NOP +} + void gr_block::notify_active(void) { this->start(); @@ -77,16 +82,6 @@ bool gr_block::check_topology(int, int) return true; } -const gr_io_signature_sptr &gr_block::input_signature(void) const -{ - return gras::Block::input_signature(); -} - -const gr_io_signature_sptr &gr_block::output_signature(void) const -{ - return gras::Block::output_signature(); -} - void gr_block::work( const InputItems &input_items, const OutputItems &output_items diff --git a/gnuradio-core/src/lib/runtime/gr_block.h b/gnuradio-core/src/lib/runtime/gr_block.h index 2a57792a0..0004f887b 100644 --- a/gnuradio-core/src/lib/runtime/gr_block.h +++ b/gnuradio-core/src/lib/runtime/gr_block.h @@ -52,6 +52,8 @@ struct GR_CORE_API gr_block : gras::Block gr_io_signature_sptr output_signature ); + virtual ~gr_block(void); + virtual bool check_topology(int ninputs, int noutputs); //! Overload me! I am the forecast @@ -143,10 +145,6 @@ struct GR_CORE_API gr_block : gras::Block bool is_set_max_noutput_items(void) const; - const gr_io_signature_sptr &input_signature(void) const; - - const gr_io_signature_sptr &output_signature(void) const; - /******************************************************************* * Deal with input and output port configuration ******************************************************************/ diff --git a/gnuradio-core/src/lib/runtime/gr_sync_block.cc b/gnuradio-core/src/lib/runtime/gr_sync_block.cc index 492fe2c2a..96b5e6253 100644 --- a/gnuradio-core/src/lib/runtime/gr_sync_block.cc +++ b/gnuradio-core/src/lib/runtime/gr_sync_block.cc @@ -41,6 +41,11 @@ gr_sync_block::gr_sync_block( this->set_fixed_rate(true); } +gr_sync_block::~gr_sync_block(void) +{ + //NOP +} + int gr_sync_block::work( int noutput_items, gr_vector_const_void_star &input_items, diff --git a/gnuradio-core/src/lib/runtime/gr_sync_block.h b/gnuradio-core/src/lib/runtime/gr_sync_block.h index d0ce95bca..90370dd2b 100644 --- a/gnuradio-core/src/lib/runtime/gr_sync_block.h +++ b/gnuradio-core/src/lib/runtime/gr_sync_block.h @@ -29,6 +29,8 @@ struct GR_CORE_API gr_sync_block : public gr_block gr_io_signature_sptr output_signature ); + virtual ~gr_sync_block(void); + //! implements work -> calls work int general_work( int noutput_items, diff --git a/gnuradio-core/src/lib/runtime/gr_sync_decimator.cc b/gnuradio-core/src/lib/runtime/gr_sync_decimator.cc index 4574116bc..a39c53b09 100644 --- a/gnuradio-core/src/lib/runtime/gr_sync_decimator.cc +++ b/gnuradio-core/src/lib/runtime/gr_sync_decimator.cc @@ -41,3 +41,8 @@ gr_sync_decimator::gr_sync_decimator( { this->set_decimation(decim_rate); } + +gr_sync_decimator::~gr_sync_decimator(void) +{ + //NOP +} diff --git a/gnuradio-core/src/lib/runtime/gr_sync_decimator.h b/gnuradio-core/src/lib/runtime/gr_sync_decimator.h index 6f366037f..dd7de7d1f 100644 --- a/gnuradio-core/src/lib/runtime/gr_sync_decimator.h +++ b/gnuradio-core/src/lib/runtime/gr_sync_decimator.h @@ -31,6 +31,8 @@ struct GR_CORE_API gr_sync_decimator : gr_sync_block const size_t decim_rate ); + virtual ~gr_sync_decimator(void); + }; #endif /*INCLUDED_GNURADIO_GR_SYNC_DECIMATOR_H*/ diff --git a/gnuradio-core/src/lib/runtime/gr_sync_interpolator.cc b/gnuradio-core/src/lib/runtime/gr_sync_interpolator.cc index 28a878eb2..17f60e613 100644 --- a/gnuradio-core/src/lib/runtime/gr_sync_interpolator.cc +++ b/gnuradio-core/src/lib/runtime/gr_sync_interpolator.cc @@ -41,3 +41,8 @@ gr_sync_interpolator::gr_sync_interpolator( { this->set_interpolation(interp_rate); } + +gr_sync_interpolator::~gr_sync_interpolator(void) +{ + //NOP +} diff --git a/gnuradio-core/src/lib/runtime/gr_sync_interpolator.h b/gnuradio-core/src/lib/runtime/gr_sync_interpolator.h index 485e5c101..0ed8c6f56 100644 --- a/gnuradio-core/src/lib/runtime/gr_sync_interpolator.h +++ b/gnuradio-core/src/lib/runtime/gr_sync_interpolator.h @@ -31,6 +31,8 @@ struct GR_CORE_API gr_sync_interpolator : gr_sync_block const size_t interp_rate ); + virtual ~gr_sync_interpolator(void); + }; #endif /*INCLUDED_GNURADIO_GR_SYNC_INTERPOLATOR_H*/ diff --git a/gnuradio-core/src/lib/swig/CMakeLists.txt b/gnuradio-core/src/lib/swig/CMakeLists.txt index 4e803639e..d8a64cc0f 100644 --- a/gnuradio-core/src/lib/swig/CMakeLists.txt +++ b/gnuradio-core/src/lib/swig/CMakeLists.txt @@ -27,7 +27,7 @@ set(GR_SWIG_INCLUDE_DIRS ${GRUEL_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ) -set(GR_SWIG_LIBRARIES ${GRAS_LIBRARIES} gnuradio-core) +set(GR_SWIG_LIBRARIES gnuradio-core) link_directories(${Boost_LIBRARY_DIRS}) diff --git a/gr-fcd/examples/c++/CMakeLists.txt b/gr-fcd/examples/c++/CMakeLists.txt index 47e53cdc8..7ff69777d 100644 --- a/gr-fcd/examples/c++/CMakeLists.txt +++ b/gr-fcd/examples/c++/CMakeLists.txt @@ -26,7 +26,7 @@ include_directories( ) add_executable(fcd_nfm_rx fcd_nfm_rx.cc) -target_link_libraries(fcd_nfm_rx gnuradio-fcd ${GRAS_LIBRARIES}) +target_link_libraries(fcd_nfm_rx gnuradio-fcd) INSTALL(TARGETS fcd_nfm_rx diff --git a/gr-uhd/examples/c++/CMakeLists.txt b/gr-uhd/examples/c++/CMakeLists.txt index 941f54e79..a6c9891d7 100644 --- a/gr-uhd/examples/c++/CMakeLists.txt +++ b/gr-uhd/examples/c++/CMakeLists.txt @@ -36,7 +36,7 @@ link_directories(${Boost_LIBRARY_DIRS}) # Build executable ######################################################################## add_executable(tags_demo tags_demo.cc) -target_link_libraries(tags_demo gnuradio-uhd ${GRAS_LIBRARIES}) +target_link_libraries(tags_demo gnuradio-uhd) INSTALL(TARGETS tags_demo -- cgit