From 8ac42c24b71c2f7fc7e635b202fa4ea84183fafb Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 6 Mar 2019 18:45:27 +0100 Subject: [PATCH] Improve includes (IWYU) --- src/algorithms/PVT/libs/geojson_printer.cc | 11 ++++++++--- src/algorithms/PVT/libs/geojson_printer.h | 3 ++- src/algorithms/PVT/libs/gpx_printer.cc | 10 ++++++++-- src/algorithms/PVT/libs/gpx_printer.h | 3 ++- src/algorithms/PVT/libs/kml_printer.cc | 8 +++++++- src/algorithms/PVT/libs/kml_printer.h | 8 ++++---- src/algorithms/PVT/libs/nmea_printer.cc | 4 +++- src/algorithms/PVT/libs/nmea_printer.h | 9 +++++---- src/algorithms/PVT/libs/rtcm_printer.cc | 19 ++++++++++++++----- src/algorithms/PVT/libs/rtcm_printer.h | 16 ++++++++++++---- 10 files changed, 65 insertions(+), 26 deletions(-) diff --git a/src/algorithms/PVT/libs/geojson_printer.cc b/src/algorithms/PVT/libs/geojson_printer.cc index 504393422..e38984a88 100644 --- a/src/algorithms/PVT/libs/geojson_printer.cc +++ b/src/algorithms/PVT/libs/geojson_printer.cc @@ -31,14 +31,19 @@ #include "geojson_printer.h" +#include "pvt_solution.h" #include #include // for create_directories, exists #include // for path, operator<< #include // for filesystem +#include // for error_code #include -#include -#include -#include +#include // for remove +#include // for tm +#include // for exception +#include // for operator<< +#include // for cout, cerr +#include // for stringstream GeoJSON_Printer::GeoJSON_Printer(const std::string& base_path) diff --git a/src/algorithms/PVT/libs/geojson_printer.h b/src/algorithms/PVT/libs/geojson_printer.h index b9bdcdb28..a74a9599d 100644 --- a/src/algorithms/PVT/libs/geojson_printer.h +++ b/src/algorithms/PVT/libs/geojson_printer.h @@ -33,11 +33,12 @@ #ifndef GNSS_SDR_GEOJSON_PRINTER_H_ #define GNSS_SDR_GEOJSON_PRINTER_H_ -#include "pvt_solution.h" + #include #include #include +class Pvt_Solution; /*! * \brief Prints PVT solutions in GeoJSON format file diff --git a/src/algorithms/PVT/libs/gpx_printer.cc b/src/algorithms/PVT/libs/gpx_printer.cc index 42c32ba5c..3066ae824 100644 --- a/src/algorithms/PVT/libs/gpx_printer.cc +++ b/src/algorithms/PVT/libs/gpx_printer.cc @@ -31,13 +31,19 @@ #include "gpx_printer.h" +#include "rtklib_solver.h" #include #include // for create_directories, exists #include // for path, operator<< #include // for filesystem +#include // for error_code #include -#include -#include +#include // for remove +#include // for tm +#include // for exception +#include // for operator<< +#include // for cout, cerr +#include // for stringstream Gpx_Printer::Gpx_Printer(const std::string& base_path) diff --git a/src/algorithms/PVT/libs/gpx_printer.h b/src/algorithms/PVT/libs/gpx_printer.h index 740be545c..e78269f8c 100644 --- a/src/algorithms/PVT/libs/gpx_printer.h +++ b/src/algorithms/PVT/libs/gpx_printer.h @@ -33,11 +33,12 @@ #ifndef GNSS_SDR_GPX_PRINTER_H_ #define GNSS_SDR_GPX_PRINTER_H_ -#include "rtklib_solver.h" + #include #include #include +class Rtklib_Solver; /*! * \brief Prints PVT information to GPX format file diff --git a/src/algorithms/PVT/libs/kml_printer.cc b/src/algorithms/PVT/libs/kml_printer.cc index 6157f5bc9..e1335490c 100644 --- a/src/algorithms/PVT/libs/kml_printer.cc +++ b/src/algorithms/PVT/libs/kml_printer.cc @@ -31,13 +31,19 @@ */ #include "kml_printer.h" +#include "rtklib_solver.h" #include #include // for create_directories, exists #include // for path, operator<< #include // for filesystem +#include // for error_code #include -#include +#include // for remove +#include // for tm +#include // for exception +#include // for cout, cerr #include +#include Kml_Printer::Kml_Printer(const std::string& base_path) diff --git a/src/algorithms/PVT/libs/kml_printer.h b/src/algorithms/PVT/libs/kml_printer.h index bc2db1198..6295242f6 100644 --- a/src/algorithms/PVT/libs/kml_printer.h +++ b/src/algorithms/PVT/libs/kml_printer.h @@ -33,12 +33,12 @@ #ifndef GNSS_SDR_KML_PRINTER_H_ #define GNSS_SDR_KML_PRINTER_H_ -#include "rtklib_solver.h" -#include -#include -#include +#include // for ofstream +#include // for shared_ptr +class Rtklib_Solver; + /*! * \brief Prints PVT information to OGC KML format file (can be viewed with Google Earth) * diff --git a/src/algorithms/PVT/libs/nmea_printer.cc b/src/algorithms/PVT/libs/nmea_printer.cc index f01d12272..9186d48e0 100644 --- a/src/algorithms/PVT/libs/nmea_printer.cc +++ b/src/algorithms/PVT/libs/nmea_printer.cc @@ -35,14 +35,16 @@ #include "nmea_printer.h" #include "rtklib_solution.h" -#include +#include "rtklib_solver.h" #include // for create_directories, exists #include // for path, operator<< #include // for filesystem +#include // for error_code #include #include #include #include +#include // for cout, cerr #include diff --git a/src/algorithms/PVT/libs/nmea_printer.h b/src/algorithms/PVT/libs/nmea_printer.h index 6ceab023c..f821ad94b 100644 --- a/src/algorithms/PVT/libs/nmea_printer.h +++ b/src/algorithms/PVT/libs/nmea_printer.h @@ -36,11 +36,12 @@ #ifndef GNSS_SDR_NMEA_PRINTER_H_ #define GNSS_SDR_NMEA_PRINTER_H_ -#include "rtklib_solver.h" -#include -#include -#include +#include // for ptime +#include // for ofstream +#include // for shared_ptr +#include // for string +class Rtklib_Solver; /*! * \brief This class provides a implementation of a subset of the NMEA-0183 standard for interfacing diff --git a/src/algorithms/PVT/libs/rtcm_printer.cc b/src/algorithms/PVT/libs/rtcm_printer.cc index e999efc42..fce92af08 100644 --- a/src/algorithms/PVT/libs/rtcm_printer.cc +++ b/src/algorithms/PVT/libs/rtcm_printer.cc @@ -32,17 +32,26 @@ */ #include "rtcm_printer.h" +#include "galileo_ephemeris.h" +#include "glonass_gnav_ephemeris.h" +#include "glonass_gnav_utc_model.h" +#include "gnss_synchro.h" +#include "gps_cnav_ephemeris.h" +#include "gps_ephemeris.h" +#include "rtcm.h" #include #include // for create_directories, exists #include // for path, operator<< #include // for filesystem +#include // for error_codes #include -#include -#include -#include // for O_RDWR -#include +#include // for remove +#include // for tm +#include // for exception +#include // for O_RDWR +#include // for cout, cerr #include // for tcgetattr -#include +#include // for close, write Rtcm_Printer::Rtcm_Printer(const std::string& filename, bool flag_rtcm_file_dump, bool flag_rtcm_server, bool flag_rtcm_tty_port, uint16_t rtcm_tcp_port, uint16_t rtcm_station_id, const std::string& rtcm_dump_devname, bool time_tag_name, const std::string& base_path) diff --git a/src/algorithms/PVT/libs/rtcm_printer.h b/src/algorithms/PVT/libs/rtcm_printer.h index 9db248eb9..4d42c1189 100644 --- a/src/algorithms/PVT/libs/rtcm_printer.h +++ b/src/algorithms/PVT/libs/rtcm_printer.h @@ -34,10 +34,18 @@ #ifndef GNSS_SDR_RTCM_PRINTER_H_ #define GNSS_SDR_RTCM_PRINTER_H_ -#include "rtcm.h" -#include // std::ofstream -#include -#include // std::shared_ptr +#include // for int32_t +#include // for std::ofstream +#include // for std::map +#include // std::shared_ptr + +class Galileo_Ephemeris; +class Glonass_Gnav_Ephemeris; +class Glonass_Gnav_Utc_Model; +class Gnss_Synchro; +class Gps_CNAV_Ephemeris; +class Gps_Ephemeris; +class Rtcm; /*! * \brief This class provides a implementation of a subset of the RTCM Standard 10403.2 messages