General: reorganization of header files
[marnav.git] / include / marnav / nmea / pgrmm.hpp
blob6de47aa57ed3952598de736e13c2d25d49995fca
1 #ifndef MARNAV__NMEA__PGRMM__HPP
2 #define MARNAV__NMEA__PGRMM__HPP
4 #include <marnav/nmea/sentence.hpp>
5 #include <marnav/utils/optional.hpp>
7 namespace marnav
9 namespace nmea
11 /// @brief PGRMM - Garmin Map Datum
12 ///
13 /// @code
14 /// 1
15 /// |
16 /// $PGRMM,c--c*hh<CR><LF>
17 /// @endcode
18 ///
19 /// Field Number:
20 ///
21 /// 1. Map datum, variable length
22 ///
23 /// Example: <tt>$PGRMM,WGS 84*06</tt>
24 ///
25 class pgrmm : public sentence
27 friend class detail::factory;
29 public:
30 constexpr static sentence_id ID = sentence_id::PGRMM;
31 constexpr static const char * TAG = "PGRMM";
33 pgrmm();
34 pgrmm(const pgrmm &) = default;
35 pgrmm & operator=(const pgrmm &) = default;
36 pgrmm(pgrmm &&) = default;
37 pgrmm & operator=(pgrmm &&) = default;
39 protected:
40 pgrmm(talker talk, fields::const_iterator first, fields::const_iterator last);
41 virtual void append_data_to(std::string &) const override;
43 private:
44 std::string map_datum_;
46 public:
47 decltype(map_datum_) get_map_datum() const { return map_datum_; }
49 void set_map_datum(const std::string & t) noexcept;
54 #endif