NMEA: TODO resolved: target status in TLL is now an enumeration.
[marnav.git] / src / marnav / nmea / string.hpp
blob586455666336975a3b1a8e0f4a78e1ec956e8652
1 #ifndef __MARNAV__NMEA__STRING__HPP__
2 #define __MARNAV__NMEA__STRING__HPP__
4 #include <string>
5 #include <marnav/nmea/constants.hpp>
6 #include <marnav/utils/optional.hpp>
8 namespace marnav
10 namespace utils
12 class mmsi; // forward declaration
15 namespace nmea
17 /// @{
19 std::string to_string(char data);
20 std::string to_string(uint64_t data);
21 std::string to_string(uint32_t data);
22 std::string to_string(int32_t data);
23 std::string to_string(double data);
24 std::string to_string(const std::string & data);
25 std::string to_string(side t);
26 std::string to_string(route t);
27 std::string to_string(selection_mode t);
28 std::string to_string(ais_channel t);
29 std::string to_string(type_of_point t);
30 std::string to_string(direction t);
31 std::string to_string(reference t);
32 std::string to_string(positioning_system_mode_indicator t);
33 std::string to_string(status t);
34 std::string to_string(quality t);
35 std::string to_string(target_status t);
36 std::string to_string(unit::distance t);
37 std::string to_string(unit::velocity t);
38 std::string to_string(unit::temperature t);
39 std::string to_string(unit::pressure t);
40 std::string to_string(const utils::mmsi & t);
42 template <class T> inline std::string to_string(const utils::optional<T> & data)
44 if (!data)
45 return std::string{};
47 using namespace std;
48 return to_string(data.value());
51 /// @}
55 #endif