From e0ec11d51ea641001240e9349ab334eceb1431b1 Mon Sep 17 00:00:00 2001 From: Mario Konrad Date: Fri, 17 Jun 2016 10:25:13 +0200 Subject: [PATCH] AIS: smaller public interface for AIS messages regarding encoding. Piggyback: adding explicit destructors to all AIS messages and NMEA sentences. --- src/marnav/ais/ais.cpp | 15 +++++++++++++-- src/marnav/ais/message.cpp | 9 ++------- src/marnav/ais/message.hpp | 16 +++++++++------- src/marnav/ais/message_01.hpp | 5 +++-- src/marnav/ais/message_04.hpp | 5 +++-- src/marnav/ais/message_05.hpp | 5 +++-- src/marnav/ais/message_09.hpp | 5 +++-- src/marnav/ais/message_10.hpp | 5 +++-- src/marnav/ais/message_18.hpp | 5 +++-- src/marnav/ais/message_19.hpp | 5 +++-- src/marnav/ais/message_21.hpp | 5 +++-- src/marnav/ais/message_22.hpp | 5 +++-- src/marnav/ais/message_23.hpp | 5 +++-- src/marnav/ais/message_24.hpp | 5 +++-- src/marnav/nmea/aam.hpp | 2 ++ src/marnav/nmea/alm.hpp | 2 ++ src/marnav/nmea/apb.hpp | 2 ++ src/marnav/nmea/bod.hpp | 2 ++ src/marnav/nmea/bwc.hpp | 2 ++ src/marnav/nmea/bwr.hpp | 2 ++ src/marnav/nmea/bww.hpp | 2 ++ src/marnav/nmea/dbk.hpp | 2 ++ src/marnav/nmea/dbt.hpp | 2 ++ src/marnav/nmea/dpt.hpp | 2 ++ src/marnav/nmea/dsc.hpp | 2 ++ src/marnav/nmea/dse.hpp | 2 ++ src/marnav/nmea/dtm.hpp | 2 ++ src/marnav/nmea/fsi.hpp | 2 ++ src/marnav/nmea/gbs.hpp | 2 ++ src/marnav/nmea/gga.hpp | 2 ++ src/marnav/nmea/glc.hpp | 2 ++ src/marnav/nmea/gll.hpp | 2 ++ src/marnav/nmea/gns.hpp | 2 ++ src/marnav/nmea/grs.hpp | 2 ++ src/marnav/nmea/gsa.hpp | 2 ++ src/marnav/nmea/gst.hpp | 2 ++ src/marnav/nmea/gsv.hpp | 2 ++ src/marnav/nmea/gtd.hpp | 2 ++ src/marnav/nmea/hdg.hpp | 2 ++ src/marnav/nmea/hdm.hpp | 2 ++ src/marnav/nmea/hfb.hpp | 2 ++ src/marnav/nmea/hsc.hpp | 2 ++ src/marnav/nmea/its.hpp | 2 ++ src/marnav/nmea/lcd.hpp | 2 ++ src/marnav/nmea/manufacturer.cpp | 6 +++++- src/marnav/nmea/msk.hpp | 2 ++ src/marnav/nmea/mss.hpp | 2 ++ src/marnav/nmea/mtw.hpp | 2 ++ src/marnav/nmea/mwd.hpp | 2 ++ src/marnav/nmea/mwv.hpp | 2 ++ src/marnav/nmea/osd.hpp | 2 ++ src/marnav/nmea/pgrme.hpp | 2 ++ src/marnav/nmea/r00.hpp | 2 ++ src/marnav/nmea/rma.hpp | 2 ++ src/marnav/nmea/rmb.hpp | 2 ++ src/marnav/nmea/rmc.hpp | 2 ++ src/marnav/nmea/rot.hpp | 2 ++ src/marnav/nmea/rpm.hpp | 2 ++ src/marnav/nmea/rsa.hpp | 2 ++ src/marnav/nmea/rsd.hpp | 2 ++ src/marnav/nmea/rte.hpp | 2 ++ src/marnav/nmea/sfi.hpp | 2 ++ src/marnav/nmea/tds.hpp | 2 ++ src/marnav/nmea/tfi.hpp | 2 ++ src/marnav/nmea/tll.hpp | 2 ++ src/marnav/nmea/tpc.hpp | 2 ++ src/marnav/nmea/tpr.hpp | 2 ++ src/marnav/nmea/tpt.hpp | 2 ++ src/marnav/nmea/ttm.hpp | 2 ++ src/marnav/nmea/vbw.hpp | 2 ++ src/marnav/nmea/vdm.hpp | 4 ++-- src/marnav/nmea/vdo.hpp | 2 ++ src/marnav/nmea/vdr.hpp | 2 ++ src/marnav/nmea/vhw.hpp | 2 ++ src/marnav/nmea/vlw.hpp | 2 ++ src/marnav/nmea/vpw.hpp | 2 ++ src/marnav/nmea/vtg.hpp | 2 ++ src/marnav/nmea/vwr.hpp | 2 ++ src/marnav/nmea/wcv.hpp | 2 ++ src/marnav/nmea/wnc.hpp | 2 ++ src/marnav/nmea/wpl.hpp | 2 ++ src/marnav/nmea/xdr.hpp | 2 ++ src/marnav/nmea/xte.hpp | 2 ++ src/marnav/nmea/xtr.hpp | 2 ++ src/marnav/nmea/zda.hpp | 2 ++ src/marnav/nmea/zdl.hpp | 2 ++ src/marnav/nmea/zfo.hpp | 2 ++ src/marnav/nmea/ztg.hpp | 2 ++ 88 files changed, 208 insertions(+), 41 deletions(-) diff --git a/src/marnav/ais/ais.cpp b/src/marnav/ais/ais.cpp index c0bc217f..3e287180 100644 --- a/src/marnav/ais/ais.cpp +++ b/src/marnav/ais/ais.cpp @@ -47,6 +47,8 @@ char encode_armoring(uint8_t value) return value + '0'; } +/// @cond DEV + namespace { static raw collect(const std::vector> & v) @@ -75,7 +77,8 @@ static raw collect(const std::vector> & v) return result; } -static message::parse_function instantiate_message(message_id type, size_t size) +static std::function(const raw &)> instantiate_message( + message_id type, size_t size) { #define REGISTER_MESSAGE(m) \ { \ @@ -84,7 +87,7 @@ static message::parse_function instantiate_message(message_id type, size_t size) struct entry { const message_id id; - const message::parse_function parse; + const std::function(const raw &)> parse; }; static const std::vector known_messages = { @@ -112,6 +115,8 @@ static message::parse_function instantiate_message(message_id type, size_t size) } } +/// @endcond + /// Parses the specified data and creates corresponding AIS messages. /// /// @param[in] v All NMEA payloads, necessary to build the AIS message. @@ -127,6 +132,12 @@ std::unique_ptr make_message(const std::vector> encode_message(const message & msg) { auto bits = msg.get_data(); diff --git a/src/marnav/ais/message.cpp b/src/marnav/ais/message.cpp index b181bceb..ab5e4461 100644 --- a/src/marnav/ais/message.cpp +++ b/src/marnav/ais/message.cpp @@ -5,6 +5,7 @@ namespace marnav { namespace ais { +/// @cond DEV namespace { static const std::vector> SIXBIT_ASCII_TABLE = { @@ -18,13 +19,7 @@ static const std::vector> SIXBIT_ASCII_TABLE = { {57, '9'}, {58, ':'}, {59, ';'}, {60, '<'}, {61, '='}, {62, '>'}, {63, '?'}, }; } - -message::message(message_id type) - : message_type(type) -{ -} - -message_id message::type() const { return message_type; } +/// @endcond char decode_sixbit_ascii(uint8_t value) { diff --git a/src/marnav/ais/message.hpp b/src/marnav/ais/message.hpp index f1942260..948d27de 100644 --- a/src/marnav/ais/message.hpp +++ b/src/marnav/ais/message.hpp @@ -1,9 +1,7 @@ #ifndef __AIS__MESSAGE__HPP__ #define __AIS__MESSAGE__HPP__ -#include #include -#include #include namespace marnav @@ -197,14 +195,13 @@ uint8_t encode_sixbit_ascii(char c); /// @brief Base class for all AIS messages. class message { -public: - using parse_function = std::function(const raw &)>; + friend std::vector> encode_message(const message & msg); +public: message() = delete; virtual ~message() {} - message_id type() const; - virtual raw get_data() const = 0; + message_id type() const { return message_type; } protected: /// Represents data to be read from / written to a bitset. @@ -241,7 +238,12 @@ protected: T value; }; - explicit message(message_id type); + explicit message(message_id type) + : message_type(type) + { + } + + virtual raw get_data() const = 0; /// @{ diff --git a/src/marnav/ais/message_01.hpp b/src/marnav/ais/message_01.hpp index 24388e31..7337899d 100644 --- a/src/marnav/ais/message_01.hpp +++ b/src/marnav/ais/message_01.hpp @@ -20,16 +20,17 @@ public: constexpr static const message_id ID = message_id::position_report_class_a; constexpr static const int SIZE_BITS = 168; + virtual ~message_01() {} + message_01(); message_01(const message_01 &) = default; message_01 & operator=(const message_01 &) = default; - virtual raw get_data() const override; - protected: message_01(message_id id); message_01(const raw & bits); void read_data(const raw & bits); + virtual raw get_data() const override; private: // clang-format off diff --git a/src/marnav/ais/message_04.hpp b/src/marnav/ais/message_04.hpp index f7cd9a65..5e608895 100644 --- a/src/marnav/ais/message_04.hpp +++ b/src/marnav/ais/message_04.hpp @@ -25,16 +25,17 @@ public: constexpr static const uint32_t eta_hour_not_available = 24; constexpr static const uint32_t eta_minute_not_available = 60; + virtual ~message_04() {} + message_04(); message_04(const message_04 &) = default; message_04 & operator=(const message_04 &) = default; - virtual raw get_data() const override; - protected: message_04(message_id id); message_04(const raw & bits); void read_data(const raw & bits); + virtual raw get_data() const override; private: // clang-format off diff --git a/src/marnav/ais/message_05.hpp b/src/marnav/ais/message_05.hpp index 8b3a30aa..499912bc 100644 --- a/src/marnav/ais/message_05.hpp +++ b/src/marnav/ais/message_05.hpp @@ -24,15 +24,16 @@ public: constexpr static const uint32_t eta_hour_not_available = 24; constexpr static const uint32_t eta_minute_not_available = 60; + virtual ~message_05() {} + message_05(); message_05(const message_05 &) = default; message_05 & operator=(const message_05 &) = default; - virtual raw get_data() const override; - protected: message_05(const raw & bits); void read_data(const raw & bits); + virtual raw get_data() const override; private: // clang-format off diff --git a/src/marnav/ais/message_09.hpp b/src/marnav/ais/message_09.hpp index bb80de8c..0d12878c 100644 --- a/src/marnav/ais/message_09.hpp +++ b/src/marnav/ais/message_09.hpp @@ -22,15 +22,16 @@ public: constexpr static const uint32_t altitude_not_available = 4095; + virtual ~message_09() {} + message_09(); message_09(const message_09 &) = default; message_09 & operator=(const message_09 &) = default; - virtual raw get_data() const override; - protected: message_09(const raw & bits); void read_data(const raw & bits); + virtual raw get_data() const override; private: // clang-format off diff --git a/src/marnav/ais/message_10.hpp b/src/marnav/ais/message_10.hpp index 81ca3944..52df1dbd 100644 --- a/src/marnav/ais/message_10.hpp +++ b/src/marnav/ais/message_10.hpp @@ -20,15 +20,16 @@ public: constexpr static const message_id ID = message_id::utc_and_date_inquiry; constexpr static const int SIZE_BITS = 72; + virtual ~message_10() {} + message_10(); message_10(const message_10 &) = default; message_10 & operator=(const message_10 &) = default; - virtual raw get_data() const override; - protected: message_10(const raw & bits); void read_data(const raw & bits); + virtual raw get_data() const override; private: // clang-format off diff --git a/src/marnav/ais/message_18.hpp b/src/marnav/ais/message_18.hpp index 2437fdc8..ea9e38af 100644 --- a/src/marnav/ais/message_18.hpp +++ b/src/marnav/ais/message_18.hpp @@ -20,16 +20,17 @@ public: constexpr static const message_id ID = message_id::standard_class_b_cs_position_report; constexpr static const int SIZE_BITS = 168; + virtual ~message_18() {} + message_18(); message_18(const message_18 &) = default; message_18 & operator=(const message_18 &) = default; - virtual raw get_data() const override; - protected: message_18(message_id id); message_18(const raw & bits); void read_data(const raw & bits); + virtual raw get_data() const override; private: // clang-format off diff --git a/src/marnav/ais/message_19.hpp b/src/marnav/ais/message_19.hpp index 71385690..dce894e5 100644 --- a/src/marnav/ais/message_19.hpp +++ b/src/marnav/ais/message_19.hpp @@ -21,16 +21,17 @@ public: = message_id::extended_class_b_equipment_position_report; constexpr static const int SIZE_BITS = 312; + virtual ~message_19() {} + message_19(); message_19(const message_19 &) = default; message_19 & operator=(const message_19 &) = default; - virtual raw get_data() const override; - protected: message_19(message_id id); message_19(const raw & bits); void read_data(const raw & bits); + virtual raw get_data() const override; private: // clang-format off diff --git a/src/marnav/ais/message_21.hpp b/src/marnav/ais/message_21.hpp index 4cc30cc1..6e5d63d4 100644 --- a/src/marnav/ais/message_21.hpp +++ b/src/marnav/ais/message_21.hpp @@ -127,15 +127,16 @@ public: enum class off_position_indicator : uint32_t { on_position = 0, off_position = 1 }; + virtual ~message_21() {} + message_21(); message_21(const message_21 &) = default; message_21 & operator=(const message_21 &) = default; - virtual raw get_data() const override; - protected: message_21(const raw & bits); void read_data(const raw & bits); + virtual raw get_data() const override; private: // clang-format off diff --git a/src/marnav/ais/message_22.hpp b/src/marnav/ais/message_22.hpp index 2a4b198e..7a16651f 100644 --- a/src/marnav/ais/message_22.hpp +++ b/src/marnav/ais/message_22.hpp @@ -23,15 +23,16 @@ public: constexpr static const message_id ID = message_id::channel_management; constexpr static const int SIZE_BITS = 168; + virtual ~message_22() {} + message_22(); message_22(const message_22 &) = default; message_22 & operator=(const message_22 &) = default; - virtual raw get_data() const override; - protected: message_22(const raw & bits); void read_data(const raw & bits); + virtual raw get_data() const override; private: // clang-format off diff --git a/src/marnav/ais/message_23.hpp b/src/marnav/ais/message_23.hpp index 1dd9e2ba..9ba28cea 100644 --- a/src/marnav/ais/message_23.hpp +++ b/src/marnav/ais/message_23.hpp @@ -36,15 +36,16 @@ public: // reserved for future use: 11 - 15 }; + virtual ~message_23() {} + message_23(); message_23(const message_23 &) = default; message_23 & operator=(const message_23 &) = default; - virtual raw get_data() const override; - protected: message_23(const raw & bits); void read_data(const raw & bits); + virtual raw get_data() const override; private: // clang-format off diff --git a/src/marnav/ais/message_24.hpp b/src/marnav/ais/message_24.hpp index 9efeedee..694f9c1c 100644 --- a/src/marnav/ais/message_24.hpp +++ b/src/marnav/ais/message_24.hpp @@ -30,18 +30,19 @@ public: enum class part : uint32_t { A = 0, B = 1 }; + virtual ~message_24() {} + message_24(); message_24(const message_24 &) = default; message_24 & operator=(const message_24 &) = default; - virtual raw get_data() const override; - bool is_auxiliary_vessel() const; private: message_24(message_id id); message_24(const raw & bits); void read_data(const raw & bits); + virtual raw get_data() const override; private: // clang-format off diff --git a/src/marnav/nmea/aam.hpp b/src/marnav/nmea/aam.hpp index 60985d1d..de9aad06 100644 --- a/src/marnav/nmea/aam.hpp +++ b/src/marnav/nmea/aam.hpp @@ -47,6 +47,8 @@ public: constexpr static const sentence_id ID = sentence_id::AAM; constexpr static const char * TAG = "AAM"; + virtual ~aam() {} + aam(); aam(const aam &) = default; aam & operator=(const aam &) = default; diff --git a/src/marnav/nmea/alm.hpp b/src/marnav/nmea/alm.hpp index 5ea7876f..cce440ff 100644 --- a/src/marnav/nmea/alm.hpp +++ b/src/marnav/nmea/alm.hpp @@ -50,6 +50,8 @@ public: constexpr static const sentence_id ID = sentence_id::ALM; constexpr static const char * TAG = "ALM"; + virtual ~alm() {} + alm(); alm(const alm &) = default; alm & operator=(const alm &) = default; diff --git a/src/marnav/nmea/apb.hpp b/src/marnav/nmea/apb.hpp index 8cee187e..d432698d 100644 --- a/src/marnav/nmea/apb.hpp +++ b/src/marnav/nmea/apb.hpp @@ -67,6 +67,8 @@ public: constexpr static const sentence_id ID = sentence_id::APB; constexpr static const char * TAG = "APB"; + virtual ~apb() {} + apb(); apb(const apb &) = default; apb & operator=(const apb &) = default; diff --git a/src/marnav/nmea/bod.hpp b/src/marnav/nmea/bod.hpp index 03048226..1bb39665 100644 --- a/src/marnav/nmea/bod.hpp +++ b/src/marnav/nmea/bod.hpp @@ -39,6 +39,8 @@ public: constexpr static const sentence_id ID = sentence_id::BOD; constexpr static const char * TAG = "BOD"; + virtual ~bod() {} + bod(); bod(const bod &) = default; bod & operator=(const bod &) = default; diff --git a/src/marnav/nmea/bwc.hpp b/src/marnav/nmea/bwc.hpp index ace8829b..8409861b 100644 --- a/src/marnav/nmea/bwc.hpp +++ b/src/marnav/nmea/bwc.hpp @@ -62,6 +62,8 @@ public: constexpr static const sentence_id ID = sentence_id::BWC; constexpr static const char * TAG = "BWC"; + virtual ~bwc() {} + bwc(); bwc(const bwc &) = default; bwc & operator=(const bwc &) = default; diff --git a/src/marnav/nmea/bwr.hpp b/src/marnav/nmea/bwr.hpp index 363baeb2..a04951a2 100644 --- a/src/marnav/nmea/bwr.hpp +++ b/src/marnav/nmea/bwr.hpp @@ -58,6 +58,8 @@ public: constexpr static const sentence_id ID = sentence_id::BWR; constexpr static const char * TAG = "BWR"; + virtual ~bwr() {} + bwr(); bwr(const bwr &) = default; bwr & operator=(const bwr &) = default; diff --git a/src/marnav/nmea/bww.hpp b/src/marnav/nmea/bww.hpp index d81df373..5d61505f 100644 --- a/src/marnav/nmea/bww.hpp +++ b/src/marnav/nmea/bww.hpp @@ -37,6 +37,8 @@ public: constexpr static const sentence_id ID = sentence_id::BWW; constexpr static const char * TAG = "BWW"; + virtual ~bww() {} + bww(); bww(const bww &) = default; bww & operator=(const bww &) = default; diff --git a/src/marnav/nmea/dbk.hpp b/src/marnav/nmea/dbk.hpp index fca8aab9..1c47aa93 100644 --- a/src/marnav/nmea/dbk.hpp +++ b/src/marnav/nmea/dbk.hpp @@ -39,6 +39,8 @@ public: constexpr static const sentence_id ID = sentence_id::DBK; constexpr static const char * TAG = "DBK"; + virtual ~dbk() {} + dbk(); dbk(const dbk &) = default; dbk & operator=(const dbk &) = default; diff --git a/src/marnav/nmea/dbt.hpp b/src/marnav/nmea/dbt.hpp index 6239ab27..ca247ad5 100644 --- a/src/marnav/nmea/dbt.hpp +++ b/src/marnav/nmea/dbt.hpp @@ -40,6 +40,8 @@ public: constexpr static const sentence_id ID = sentence_id::DBT; constexpr static const char * TAG = "DBT"; + virtual ~dbt() {} + dbt(); dbt(const dbt &) = default; dbt & operator=(const dbt &) = default; diff --git a/src/marnav/nmea/dpt.hpp b/src/marnav/nmea/dpt.hpp index 64cb8479..c1192d81 100644 --- a/src/marnav/nmea/dpt.hpp +++ b/src/marnav/nmea/dpt.hpp @@ -35,6 +35,8 @@ public: constexpr static const sentence_id ID = sentence_id::DPT; constexpr static const char * TAG = "DPT"; + virtual ~dpt() {} + dpt(); dpt(const std::string & talker); dpt(const dpt &) = default; diff --git a/src/marnav/nmea/dsc.hpp b/src/marnav/nmea/dsc.hpp index 11af0226..ad04e754 100644 --- a/src/marnav/nmea/dsc.hpp +++ b/src/marnav/nmea/dsc.hpp @@ -110,6 +110,8 @@ public: extension_follows ///< NMEA representation: 'E' }; + virtual ~dsc() {} + dsc(); dsc(const dsc &) = default; dsc & operator=(const dsc &) = default; diff --git a/src/marnav/nmea/dse.hpp b/src/marnav/nmea/dse.hpp index cb232239..5c4d4f4e 100644 --- a/src/marnav/nmea/dse.hpp +++ b/src/marnav/nmea/dse.hpp @@ -61,6 +61,8 @@ public: std::string data; }; + virtual ~dse() {} + dse(); dse(const dse &) = default; dse & operator=(const dse &) = default; diff --git a/src/marnav/nmea/dtm.hpp b/src/marnav/nmea/dtm.hpp index f009b4e6..95994644 100644 --- a/src/marnav/nmea/dtm.hpp +++ b/src/marnav/nmea/dtm.hpp @@ -44,6 +44,8 @@ public: constexpr static const sentence_id ID = sentence_id::DTM; constexpr static const char * TAG = "DTM"; + virtual ~dtm() {} + dtm(); dtm(const dtm &) = default; dtm & operator=(const dtm &) = default; diff --git a/src/marnav/nmea/fsi.hpp b/src/marnav/nmea/fsi.hpp index fa464834..fad95316 100644 --- a/src/marnav/nmea/fsi.hpp +++ b/src/marnav/nmea/fsi.hpp @@ -37,6 +37,8 @@ public: constexpr static const sentence_id ID = sentence_id::FSI; constexpr static const char * TAG = "FSI"; + virtual ~fsi() {} + fsi(); fsi(const fsi &) = default; fsi & operator=(const fsi &) = default; diff --git a/src/marnav/nmea/gbs.hpp b/src/marnav/nmea/gbs.hpp index 36eadccd..e441eecb 100644 --- a/src/marnav/nmea/gbs.hpp +++ b/src/marnav/nmea/gbs.hpp @@ -39,6 +39,8 @@ public: constexpr static const sentence_id ID = sentence_id::GBS; constexpr static const char * TAG = "GBS"; + virtual ~gbs() {} + gbs(); gbs(const gbs &) = default; gbs & operator=(const gbs &) = default; diff --git a/src/marnav/nmea/gga.hpp b/src/marnav/nmea/gga.hpp index 388bd4df..04334474 100644 --- a/src/marnav/nmea/gga.hpp +++ b/src/marnav/nmea/gga.hpp @@ -67,6 +67,8 @@ public: constexpr static const sentence_id ID = sentence_id::GGA; constexpr static const char * TAG = "GGA"; + virtual ~gga() {} + gga(); gga(const gga &) = default; gga & operator=(const gga &) = default; diff --git a/src/marnav/nmea/glc.hpp b/src/marnav/nmea/glc.hpp index 8895646e..36f5a51e 100644 --- a/src/marnav/nmea/glc.hpp +++ b/src/marnav/nmea/glc.hpp @@ -47,6 +47,8 @@ public: nmea::status status; }; + virtual ~glc() {} + glc(); glc(const glc &) = default; glc & operator=(const glc &) = default; diff --git a/src/marnav/nmea/gll.hpp b/src/marnav/nmea/gll.hpp index ffaad3d4..b686f6ec 100644 --- a/src/marnav/nmea/gll.hpp +++ b/src/marnav/nmea/gll.hpp @@ -46,6 +46,8 @@ public: constexpr static const sentence_id ID = sentence_id::GLL; constexpr static const char * TAG = "GLL"; + virtual ~gll() {} + gll(); gll(const gll &) = default; gll & operator=(const gll &) = default; diff --git a/src/marnav/nmea/gns.hpp b/src/marnav/nmea/gns.hpp index b8849d58..df1bda3d 100644 --- a/src/marnav/nmea/gns.hpp +++ b/src/marnav/nmea/gns.hpp @@ -46,6 +46,8 @@ public: constexpr static const sentence_id ID = sentence_id::GNS; constexpr static const char * TAG = "GNS"; + virtual ~gns() {} + gns(); gns(const gns &) = default; gns & operator=(const gns &) = default; diff --git a/src/marnav/nmea/grs.hpp b/src/marnav/nmea/grs.hpp index 870e43a3..8d9d219e 100644 --- a/src/marnav/nmea/grs.hpp +++ b/src/marnav/nmea/grs.hpp @@ -51,6 +51,8 @@ public: calculated_after_gga, ///< NMEA representation: 1 }; + virtual ~grs() {} + grs(); grs(const grs &) = default; grs & operator=(const grs &) = default; diff --git a/src/marnav/nmea/gsa.hpp b/src/marnav/nmea/gsa.hpp index 0d858fca..51f95042 100644 --- a/src/marnav/nmea/gsa.hpp +++ b/src/marnav/nmea/gsa.hpp @@ -46,6 +46,8 @@ public: constexpr static const sentence_id ID = sentence_id::GSA; constexpr static const char * TAG = "GSA"; + virtual ~gsa() {} + gsa(); gsa(const gsa &) = default; gsa & operator=(const gsa &) = default; diff --git a/src/marnav/nmea/gst.hpp b/src/marnav/nmea/gst.hpp index 4e20ba54..05486282 100644 --- a/src/marnav/nmea/gst.hpp +++ b/src/marnav/nmea/gst.hpp @@ -37,6 +37,8 @@ public: constexpr static const sentence_id ID = sentence_id::GST; constexpr static const char * TAG = "GST"; + virtual ~gst() {} + gst(); gst(const gst &) = default; gst & operator=(const gst &) = default; diff --git a/src/marnav/nmea/gsv.hpp b/src/marnav/nmea/gsv.hpp index d306948e..ebae4be5 100644 --- a/src/marnav/nmea/gsv.hpp +++ b/src/marnav/nmea/gsv.hpp @@ -56,6 +56,8 @@ public: constexpr static const sentence_id ID = sentence_id::GSV; constexpr static const char * TAG = "GSV"; + virtual ~gsv() {} + gsv(); gsv(const gsv &) = default; gsv & operator=(const gsv &) = default; diff --git a/src/marnav/nmea/gtd.hpp b/src/marnav/nmea/gtd.hpp index 28369a7e..7ebf943b 100644 --- a/src/marnav/nmea/gtd.hpp +++ b/src/marnav/nmea/gtd.hpp @@ -34,6 +34,8 @@ public: constexpr static const sentence_id ID = sentence_id::GTD; constexpr static const char * TAG = "GTD"; + virtual ~gtd() {} + gtd(); gtd(const gtd &) = default; gtd & operator=(const gtd &) = default; diff --git a/src/marnav/nmea/hdg.hpp b/src/marnav/nmea/hdg.hpp index c488e673..a4e08c4c 100644 --- a/src/marnav/nmea/hdg.hpp +++ b/src/marnav/nmea/hdg.hpp @@ -37,6 +37,8 @@ public: constexpr static const sentence_id ID = sentence_id::HDG; constexpr static const char * TAG = "HDG"; + virtual ~hdg() {} + hdg(); hdg(const hdg &) = default; hdg(hdg &&) = default; diff --git a/src/marnav/nmea/hdm.hpp b/src/marnav/nmea/hdm.hpp index 4f76528e..1a054437 100644 --- a/src/marnav/nmea/hdm.hpp +++ b/src/marnav/nmea/hdm.hpp @@ -37,6 +37,8 @@ public: constexpr static const sentence_id ID = sentence_id::HDM; constexpr static const char * TAG = "HDM"; + virtual ~hdm() {} + hdm(); hdm(const hdm &) = default; hdm & operator=(const hdm &) = default; diff --git a/src/marnav/nmea/hfb.hpp b/src/marnav/nmea/hfb.hpp index 889f0ac1..e9beab2f 100644 --- a/src/marnav/nmea/hfb.hpp +++ b/src/marnav/nmea/hfb.hpp @@ -34,6 +34,8 @@ public: constexpr static const sentence_id ID = sentence_id::HFB; constexpr static const char * TAG = "HFB"; + virtual ~hfb() {} + hfb(); hfb(const hfb &) = default; hfb & operator=(const hfb &) = default; diff --git a/src/marnav/nmea/hsc.hpp b/src/marnav/nmea/hsc.hpp index 7f19abfc..00be1ec5 100644 --- a/src/marnav/nmea/hsc.hpp +++ b/src/marnav/nmea/hsc.hpp @@ -34,6 +34,8 @@ public: constexpr static const sentence_id ID = sentence_id::HSC; constexpr static const char * TAG = "HSC"; + virtual ~hsc() {} + hsc(); hsc(const hsc &) = default; hsc & operator=(const hsc &) = default; diff --git a/src/marnav/nmea/its.hpp b/src/marnav/nmea/its.hpp index 008293e1..2d5e73c7 100644 --- a/src/marnav/nmea/its.hpp +++ b/src/marnav/nmea/its.hpp @@ -31,6 +31,8 @@ public: constexpr static const sentence_id ID = sentence_id::ITS; constexpr static const char * TAG = "ITS"; + virtual ~its() {} + its(); its(const its &) = default; its & operator=(const its &) = default; diff --git a/src/marnav/nmea/lcd.hpp b/src/marnav/nmea/lcd.hpp index 8dd74524..253d446d 100644 --- a/src/marnav/nmea/lcd.hpp +++ b/src/marnav/nmea/lcd.hpp @@ -47,6 +47,8 @@ public: int32_t ecd; }; + virtual ~lcd() {} + lcd(); lcd(const lcd &) = default; lcd & operator=(const lcd &) = default; diff --git a/src/marnav/nmea/manufacturer.cpp b/src/marnav/nmea/manufacturer.cpp index fb4194f7..6b534881 100644 --- a/src/marnav/nmea/manufacturer.cpp +++ b/src/marnav/nmea/manufacturer.cpp @@ -10,12 +10,16 @@ namespace nmea /// @cond DEV namespace { -struct entry { +struct entry final { + ~entry() noexcept; + manufacturer_id id; std::string tag; std::string name; }; +entry::~entry() noexcept {} + using manufacturer_map = std::vector; #define MANUFACTURER(id, tag, text) \ diff --git a/src/marnav/nmea/msk.hpp b/src/marnav/nmea/msk.hpp index f2382c29..3c9a96ec 100644 --- a/src/marnav/nmea/msk.hpp +++ b/src/marnav/nmea/msk.hpp @@ -37,6 +37,8 @@ public: constexpr static const sentence_id ID = sentence_id::MSK; constexpr static const char * TAG = "MSK"; + virtual ~msk() {} + msk(); msk(const msk &) = default; msk & operator=(const msk &) = default; diff --git a/src/marnav/nmea/mss.hpp b/src/marnav/nmea/mss.hpp index 294b45c8..155a7b4d 100644 --- a/src/marnav/nmea/mss.hpp +++ b/src/marnav/nmea/mss.hpp @@ -33,6 +33,8 @@ public: constexpr static const sentence_id ID = sentence_id::MSS; constexpr static const char * TAG = "MSS"; + virtual ~mss() {} + mss(); mss(const mss &) = default; mss & operator=(const mss &) = default; diff --git a/src/marnav/nmea/mtw.hpp b/src/marnav/nmea/mtw.hpp index 6e3981dc..1e380377 100644 --- a/src/marnav/nmea/mtw.hpp +++ b/src/marnav/nmea/mtw.hpp @@ -31,6 +31,8 @@ public: constexpr static const sentence_id ID = sentence_id::MTW; constexpr static const char * TAG = "MTW"; + virtual ~mtw() {} + mtw(); mtw(const mtw &) = default; mtw & operator=(const mtw &) = default; diff --git a/src/marnav/nmea/mwd.hpp b/src/marnav/nmea/mwd.hpp index 296cce6c..5127339c 100644 --- a/src/marnav/nmea/mwd.hpp +++ b/src/marnav/nmea/mwd.hpp @@ -42,6 +42,8 @@ public: constexpr static const sentence_id ID = sentence_id::MWD; constexpr static const char * TAG = "MWD"; + virtual ~mwd() {} + mwd(); mwd(const mwd &) = default; mwd & operator=(const mwd &) = default; diff --git a/src/marnav/nmea/mwv.hpp b/src/marnav/nmea/mwv.hpp index 83ed1457..3a658a29 100644 --- a/src/marnav/nmea/mwv.hpp +++ b/src/marnav/nmea/mwv.hpp @@ -40,6 +40,8 @@ public: constexpr static const sentence_id ID = sentence_id::MWV; constexpr static const char * TAG = "MWV"; + virtual ~mwv() {} + mwv(); mwv(const mwv &) = default; mwv & operator=(const mwv &) = default; diff --git a/src/marnav/nmea/osd.hpp b/src/marnav/nmea/osd.hpp index c47e1120..183b2470 100644 --- a/src/marnav/nmea/osd.hpp +++ b/src/marnav/nmea/osd.hpp @@ -40,6 +40,8 @@ public: constexpr static const sentence_id ID = sentence_id::OSD; constexpr static const char * TAG = "OSD"; + virtual ~osd() {} + osd(); osd(const osd &) = default; osd & operator=(const osd &) = default; diff --git a/src/marnav/nmea/pgrme.hpp b/src/marnav/nmea/pgrme.hpp index 48fa3d32..9e987081 100644 --- a/src/marnav/nmea/pgrme.hpp +++ b/src/marnav/nmea/pgrme.hpp @@ -38,6 +38,8 @@ public: constexpr static const sentence_id ID = sentence_id::PGRME; constexpr static const char * TAG = "PGRME"; + virtual ~pgrme() {} + pgrme(); pgrme(const pgrme &) = default; pgrme & operator=(const pgrme &) = default; diff --git a/src/marnav/nmea/r00.hpp b/src/marnav/nmea/r00.hpp index b036afd5..046f6ed2 100644 --- a/src/marnav/nmea/r00.hpp +++ b/src/marnav/nmea/r00.hpp @@ -32,6 +32,8 @@ public: constexpr static const char * TAG = "R00"; constexpr static const int max_waypoint_ids = 14; + virtual ~r00() {} + r00(); r00(const r00 &) = default; r00 & operator=(const r00 &) = default; diff --git a/src/marnav/nmea/rma.hpp b/src/marnav/nmea/rma.hpp index c8a50a28..2942a23e 100644 --- a/src/marnav/nmea/rma.hpp +++ b/src/marnav/nmea/rma.hpp @@ -46,6 +46,8 @@ public: constexpr static const sentence_id ID = sentence_id::RMA; constexpr static const char * TAG = "RMA"; + virtual ~rma() {} + rma(); rma(const rma &) = default; rma & operator=(const rma &) = default; diff --git a/src/marnav/nmea/rmb.hpp b/src/marnav/nmea/rmb.hpp index 3391fb8e..b2818426 100644 --- a/src/marnav/nmea/rmb.hpp +++ b/src/marnav/nmea/rmb.hpp @@ -62,6 +62,8 @@ public: constexpr static const sentence_id ID = sentence_id::RMB; constexpr static const char * TAG = "RMB"; + virtual ~rmb() {} + rmb(); rmb(const rmb &) = default; rmb & operator=(const rmb &) = default; diff --git a/src/marnav/nmea/rmc.hpp b/src/marnav/nmea/rmc.hpp index 37064c7a..fbf1ca3d 100644 --- a/src/marnav/nmea/rmc.hpp +++ b/src/marnav/nmea/rmc.hpp @@ -54,6 +54,8 @@ public: constexpr static const sentence_id ID = sentence_id::RMC; constexpr static const char * TAG = "RMC"; + virtual ~rmc() {} + rmc(); rmc(const rmc &) = default; rmc & operator=(const rmc &) = default; diff --git a/src/marnav/nmea/rot.hpp b/src/marnav/nmea/rot.hpp index f4a6dd83..0c355052 100644 --- a/src/marnav/nmea/rot.hpp +++ b/src/marnav/nmea/rot.hpp @@ -32,6 +32,8 @@ public: constexpr static const sentence_id ID = sentence_id::ROT; constexpr static const char * TAG = "ROT"; + virtual ~rot() {} + rot(); rot(const rot &) = default; rot & operator=(const rot &) = default; diff --git a/src/marnav/nmea/rpm.hpp b/src/marnav/nmea/rpm.hpp index 5c933a53..bb3b9618 100644 --- a/src/marnav/nmea/rpm.hpp +++ b/src/marnav/nmea/rpm.hpp @@ -41,6 +41,8 @@ public: engine, ///< NMEA representation: 'E' }; + virtual ~rpm() {} + rpm(); rpm(const rpm &) = default; rpm & operator=(const rpm &) = default; diff --git a/src/marnav/nmea/rsa.hpp b/src/marnav/nmea/rsa.hpp index d20c6cf9..17629ac5 100644 --- a/src/marnav/nmea/rsa.hpp +++ b/src/marnav/nmea/rsa.hpp @@ -36,6 +36,8 @@ public: constexpr static const sentence_id ID = sentence_id::RSA; constexpr static const char * TAG = "RSA"; + virtual ~rsa() {} + rsa(); rsa(const rsa &) = default; rsa & operator=(const rsa &) = default; diff --git a/src/marnav/nmea/rsd.hpp b/src/marnav/nmea/rsd.hpp index 8e5e8f5a..ee00dc33 100644 --- a/src/marnav/nmea/rsd.hpp +++ b/src/marnav/nmea/rsd.hpp @@ -44,6 +44,8 @@ public: constexpr static const sentence_id ID = sentence_id::RSD; constexpr static const char * TAG = "RSD"; + virtual ~rsd() {} + rsd(); rsd(const rsd &) = default; rsd & operator=(const rsd &) = default; diff --git a/src/marnav/nmea/rte.hpp b/src/marnav/nmea/rte.hpp index b7a45cce..29ceb115 100644 --- a/src/marnav/nmea/rte.hpp +++ b/src/marnav/nmea/rte.hpp @@ -38,6 +38,8 @@ public: constexpr static const sentence_id ID = sentence_id::RTE; constexpr static const char * TAG = "RTE"; + virtual ~rte() {} + rte(); rte(const rte &) = default; rte & operator=(const rte &) = default; diff --git a/src/marnav/nmea/sfi.hpp b/src/marnav/nmea/sfi.hpp index d65c0c4e..4bfde3a6 100644 --- a/src/marnav/nmea/sfi.hpp +++ b/src/marnav/nmea/sfi.hpp @@ -38,6 +38,8 @@ public: constexpr static const char * TAG = "SFI"; constexpr static const unsigned int max_number_of_frequencies = 10; + virtual ~sfi() {} + sfi(); sfi(const sfi &) = default; sfi & operator=(const sfi &) = default; diff --git a/src/marnav/nmea/tds.hpp b/src/marnav/nmea/tds.hpp index 3dc74ee5..0a6665e9 100644 --- a/src/marnav/nmea/tds.hpp +++ b/src/marnav/nmea/tds.hpp @@ -31,6 +31,8 @@ public: constexpr static const sentence_id ID = sentence_id::TDS; constexpr static const char * TAG = "TDS"; + virtual ~tds() {} + tds(); tds(const tds &) = default; tds & operator=(const tds &) = default; diff --git a/src/marnav/nmea/tfi.hpp b/src/marnav/nmea/tfi.hpp index 209c0bc7..31c124b9 100644 --- a/src/marnav/nmea/tfi.hpp +++ b/src/marnav/nmea/tfi.hpp @@ -38,6 +38,8 @@ public: no_answer ///< NMEA representation: 2 }; + virtual ~tfi() {} + tfi(); tfi(const tfi &) = default; tfi & operator=(const tfi &) = default; diff --git a/src/marnav/nmea/tll.hpp b/src/marnav/nmea/tll.hpp index 968af477..43a78e0e 100644 --- a/src/marnav/nmea/tll.hpp +++ b/src/marnav/nmea/tll.hpp @@ -49,6 +49,8 @@ public: constexpr static const sentence_id ID = sentence_id::TLL; constexpr static const char * TAG = "TLL"; + virtual ~tll() {} + tll(); tll(const tll &) = default; tll & operator=(const tll &) = default; diff --git a/src/marnav/nmea/tpc.hpp b/src/marnav/nmea/tpc.hpp index 453fdbbe..ef8e3ea9 100644 --- a/src/marnav/nmea/tpc.hpp +++ b/src/marnav/nmea/tpc.hpp @@ -39,6 +39,8 @@ public: constexpr static const sentence_id ID = sentence_id::TPC; constexpr static const char * TAG = "TPC"; + virtual ~tpc() {} + tpc(); tpc(const tpc &) = default; tpc & operator=(const tpc &) = default; diff --git a/src/marnav/nmea/tpr.hpp b/src/marnav/nmea/tpr.hpp index d252471b..a96ad008 100644 --- a/src/marnav/nmea/tpr.hpp +++ b/src/marnav/nmea/tpr.hpp @@ -36,6 +36,8 @@ public: constexpr static const sentence_id ID = sentence_id::TPR; constexpr static const char * TAG = "TPR"; + virtual ~tpr() {} + tpr(); tpr(const tpr &) = default; tpr & operator=(const tpr &) = default; diff --git a/src/marnav/nmea/tpt.hpp b/src/marnav/nmea/tpt.hpp index a910999b..bccb37e0 100644 --- a/src/marnav/nmea/tpt.hpp +++ b/src/marnav/nmea/tpt.hpp @@ -36,6 +36,8 @@ public: constexpr static const sentence_id ID = sentence_id::TPT; constexpr static const char * TAG = "TPT"; + virtual ~tpt() {} + tpt(); tpt(const tpt &) = default; tpt & operator=(const tpt &) = default; diff --git a/src/marnav/nmea/ttm.hpp b/src/marnav/nmea/ttm.hpp index e83e04df..d334899a 100644 --- a/src/marnav/nmea/ttm.hpp +++ b/src/marnav/nmea/ttm.hpp @@ -48,6 +48,8 @@ public: constexpr static const sentence_id ID = sentence_id::TTM; constexpr static const char * TAG = "TTM"; + virtual ~ttm() {} + ttm(); ttm(const ttm &) = default; ttm & operator=(const ttm &) = default; diff --git a/src/marnav/nmea/vbw.hpp b/src/marnav/nmea/vbw.hpp index 2bba9876..ad126b06 100644 --- a/src/marnav/nmea/vbw.hpp +++ b/src/marnav/nmea/vbw.hpp @@ -38,6 +38,8 @@ public: constexpr static const sentence_id ID = sentence_id::VBW; constexpr static const char * TAG = "VBW"; + virtual ~vbw() {} + vbw(); vbw(const vbw &) = default; vbw & operator=(const vbw &) = default; diff --git a/src/marnav/nmea/vdm.hpp b/src/marnav/nmea/vdm.hpp index cc8227a7..5b100459 100644 --- a/src/marnav/nmea/vdm.hpp +++ b/src/marnav/nmea/vdm.hpp @@ -36,12 +36,12 @@ public: constexpr static const sentence_id ID = sentence_id::VDM; constexpr static const char * TAG = "VDM"; + virtual ~vdm() {} + vdm(); vdm(const vdm &) = default; vdm & operator=(const vdm &) = default; - virtual ~vdm() {} - protected: vdm(sentence_id id, const std::string & tag, const std::string & talker); vdm(const std::string & talker, fields::const_iterator first, fields::const_iterator last); diff --git a/src/marnav/nmea/vdo.hpp b/src/marnav/nmea/vdo.hpp index 469aa92b..6cf611a8 100644 --- a/src/marnav/nmea/vdo.hpp +++ b/src/marnav/nmea/vdo.hpp @@ -22,6 +22,8 @@ public: constexpr static const sentence_id ID = sentence_id::VDO; constexpr static const char * TAG = "VDO"; + virtual ~vdo() {} + vdo(); vdo(const vdo &) = default; vdo & operator=(const vdo &) = default; diff --git a/src/marnav/nmea/vdr.hpp b/src/marnav/nmea/vdr.hpp index dbb08ea6..b5ba3b8a 100644 --- a/src/marnav/nmea/vdr.hpp +++ b/src/marnav/nmea/vdr.hpp @@ -37,6 +37,8 @@ public: constexpr static const sentence_id ID = sentence_id::VDR; constexpr static const char * TAG = "VDR"; + virtual ~vdr() {} + vdr(); vdr(const vdr &) = default; vdr & operator=(const vdr &) = default; diff --git a/src/marnav/nmea/vhw.hpp b/src/marnav/nmea/vhw.hpp index 634d94d9..3e084c3f 100644 --- a/src/marnav/nmea/vhw.hpp +++ b/src/marnav/nmea/vhw.hpp @@ -38,6 +38,8 @@ public: constexpr static const sentence_id ID = sentence_id::VHW; constexpr static const char * TAG = "VHW"; + virtual ~vhw() {} + vhw(); vhw(const vhw &) = default; vhw & operator=(const vhw &) = default; diff --git a/src/marnav/nmea/vlw.hpp b/src/marnav/nmea/vlw.hpp index 3f1a1115..38e23a69 100644 --- a/src/marnav/nmea/vlw.hpp +++ b/src/marnav/nmea/vlw.hpp @@ -34,6 +34,8 @@ public: constexpr static const sentence_id ID = sentence_id::VLW; constexpr static const char * TAG = "VLW"; + virtual ~vlw() {} + vlw(); vlw(const vlw &) = default; vlw & operator=(const vlw &) = default; diff --git a/src/marnav/nmea/vpw.hpp b/src/marnav/nmea/vpw.hpp index 313efbeb..ec9884d8 100644 --- a/src/marnav/nmea/vpw.hpp +++ b/src/marnav/nmea/vpw.hpp @@ -35,6 +35,8 @@ public: constexpr static const sentence_id ID = sentence_id::VPW; constexpr static const char * TAG = "VPW"; + virtual ~vpw() {} + vpw(); vpw(const vpw &) = default; vpw & operator=(const vpw &) = default; diff --git a/src/marnav/nmea/vtg.hpp b/src/marnav/nmea/vtg.hpp index fd9468ce..8174258b 100644 --- a/src/marnav/nmea/vtg.hpp +++ b/src/marnav/nmea/vtg.hpp @@ -41,6 +41,8 @@ public: constexpr static const sentence_id ID = sentence_id::VTG; constexpr static const char * TAG = "VTG"; + virtual ~vtg() {} + vtg(); vtg(const vtg &) = default; vtg & operator=(const vtg &) = default; diff --git a/src/marnav/nmea/vwr.hpp b/src/marnav/nmea/vwr.hpp index d4c2fc0d..eaea0781 100644 --- a/src/marnav/nmea/vwr.hpp +++ b/src/marnav/nmea/vwr.hpp @@ -41,6 +41,8 @@ public: constexpr static const sentence_id ID = sentence_id::VWR; constexpr static const char * TAG = "VWR"; + virtual ~vwr() {} + vwr(); vwr(const vwr &) = default; vwr & operator=(const vwr &) = default; diff --git a/src/marnav/nmea/wcv.hpp b/src/marnav/nmea/wcv.hpp index 219a489b..d458baf1 100644 --- a/src/marnav/nmea/wcv.hpp +++ b/src/marnav/nmea/wcv.hpp @@ -33,6 +33,8 @@ public: constexpr static const sentence_id ID = sentence_id::WCV; constexpr static const char * TAG = "WCV"; + virtual ~wcv() {} + wcv(); wcv(const wcv &) = default; wcv & operator=(const wcv &) = default; diff --git a/src/marnav/nmea/wnc.hpp b/src/marnav/nmea/wnc.hpp index f49d1d5c..48f2348e 100644 --- a/src/marnav/nmea/wnc.hpp +++ b/src/marnav/nmea/wnc.hpp @@ -37,6 +37,8 @@ public: constexpr static const sentence_id ID = sentence_id::WNC; constexpr static const char * TAG = "WNC"; + virtual ~wnc() {} + wnc(); wnc(const wnc &) = default; wnc & operator=(const wnc &) = default; diff --git a/src/marnav/nmea/wpl.hpp b/src/marnav/nmea/wpl.hpp index b94af9b4..bf20f551 100644 --- a/src/marnav/nmea/wpl.hpp +++ b/src/marnav/nmea/wpl.hpp @@ -39,6 +39,8 @@ public: constexpr static const sentence_id ID = sentence_id::WPL; constexpr static const char * TAG = "WPL"; + virtual ~wpl() {} + wpl(); wpl(const wpl &) = default; wpl & operator=(const wpl &) = default; diff --git a/src/marnav/nmea/xdr.hpp b/src/marnav/nmea/xdr.hpp index ab8eddb1..616b7eba 100644 --- a/src/marnav/nmea/xdr.hpp +++ b/src/marnav/nmea/xdr.hpp @@ -42,6 +42,8 @@ public: constexpr static const sentence_id ID = sentence_id::XDR; constexpr static const char * TAG = "XDR"; + virtual ~xdr() {} + xdr(); xdr(const xdr &) = default; xdr & operator=(const xdr &) = default; diff --git a/src/marnav/nmea/xte.hpp b/src/marnav/nmea/xte.hpp index 9be384ab..260085e1 100644 --- a/src/marnav/nmea/xte.hpp +++ b/src/marnav/nmea/xte.hpp @@ -43,6 +43,8 @@ public: constexpr static const sentence_id ID = sentence_id::XTE; constexpr static const char * TAG = "XTE"; + virtual ~xte() {} + xte(); xte(const xte &) = default; xte & operator=(const xte &) = default; diff --git a/src/marnav/nmea/xtr.hpp b/src/marnav/nmea/xtr.hpp index f13d083d..c1302dfa 100644 --- a/src/marnav/nmea/xtr.hpp +++ b/src/marnav/nmea/xtr.hpp @@ -34,6 +34,8 @@ public: constexpr static const sentence_id ID = sentence_id::XTR; constexpr static const char * TAG = "XTR"; + virtual ~xtr() {} + xtr(); xtr(const xtr &) = default; xtr & operator=(const xtr &) = default; diff --git a/src/marnav/nmea/zda.hpp b/src/marnav/nmea/zda.hpp index f6501074..47087369 100644 --- a/src/marnav/nmea/zda.hpp +++ b/src/marnav/nmea/zda.hpp @@ -37,6 +37,8 @@ public: constexpr static const sentence_id ID = sentence_id::ZDA; constexpr static const char * TAG = "ZDA"; + virtual ~zda() {} + zda(); zda(const zda &) = default; zda & operator=(const zda &) = default; diff --git a/src/marnav/nmea/zdl.hpp b/src/marnav/nmea/zdl.hpp index 51e98157..fcd4148b 100644 --- a/src/marnav/nmea/zdl.hpp +++ b/src/marnav/nmea/zdl.hpp @@ -38,6 +38,8 @@ public: constexpr static const sentence_id ID = sentence_id::ZDL; constexpr static const char * TAG = "ZDL"; + virtual ~zdl() {} + zdl(); zdl(const zdl &) = default; zdl & operator=(const zdl &) = default; diff --git a/src/marnav/nmea/zfo.hpp b/src/marnav/nmea/zfo.hpp index a88d125a..095f9ca8 100644 --- a/src/marnav/nmea/zfo.hpp +++ b/src/marnav/nmea/zfo.hpp @@ -33,6 +33,8 @@ public: constexpr static const sentence_id ID = sentence_id::ZFO; constexpr static const char * TAG = "ZFO"; + virtual ~zfo() {} + zfo(); zfo(const zfo &) = default; zfo & operator=(const zfo &) = default; diff --git a/src/marnav/nmea/ztg.hpp b/src/marnav/nmea/ztg.hpp index ca6497da..0a1a98c0 100644 --- a/src/marnav/nmea/ztg.hpp +++ b/src/marnav/nmea/ztg.hpp @@ -33,6 +33,8 @@ public: constexpr static const sentence_id ID = sentence_id::ZTG; constexpr static const char * TAG = "ZTG"; + virtual ~ztg() {} + ztg(); ztg(const ztg &) = default; ztg & operator=(const ztg &) = default; -- 2.11.4.GIT