1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-11-06 02:03:04 +00:00

Add a common shared pointer definition

Makes transition to GNU Radio 3.9 API less verbose
This commit is contained in:
Carles Fernandez
2020-11-03 20:51:57 +01:00
parent 165ae06d7a
commit f0e1ef6f9a
129 changed files with 315 additions and 1198 deletions

View File

@@ -48,6 +48,11 @@ target_link_libraries(obs_gr_blocks
Matio::matio
)
target_include_directories(obs_gr_blocks
PUBLIC
${CMAKE_SOURCE_DIR}/src/core/interfaces
)
if(GNURADIO_USES_STD_POINTERS)
target_compile_definitions(obs_gr_blocks
PUBLIC -DGNURADIO_USES_STD_POINTERS=1

View File

@@ -23,6 +23,7 @@
#ifndef GNSS_SDR_HYBRID_OBSERVABLES_GS_H
#define GNSS_SDR_HYBRID_OBSERVABLES_GS_H
#include "gnss_block_interface.h"
#include "obs_conf.h"
#include <boost/circular_buffer.hpp> // for boost::circular_buffer
#include <gnuradio/block.h> // for block
@@ -35,10 +36,6 @@
#include <string> // for std::string
#include <typeinfo> // for typeid
#include <vector> // for std::vector
#if GNURADIO_USES_STD_POINTERS
#else
#include <boost/shared_ptr.hpp>
#endif
/** \addtogroup Observables
* \{ */
@@ -46,17 +43,14 @@
* GNU Radio blocks for the computation of GNSS observables
* \{ */
class Gnss_Synchro;
class hybrid_observables_gs;
template <class T>
class Gnss_circular_deque;
#if GNURADIO_USES_STD_POINTERS
using hybrid_observables_gs_sptr = std::shared_ptr<hybrid_observables_gs>;
#else
using hybrid_observables_gs_sptr = boost::shared_ptr<hybrid_observables_gs>;
#endif
using hybrid_observables_gs_sptr = gnss_shared_ptr<hybrid_observables_gs>;
hybrid_observables_gs_sptr hybrid_observables_gs_make(const Obs_Conf& conf_);