18#include <fmt/format.h>
20#include <nlohmann/json.hpp>
21using json = nlohmann::json;
55 if (typeString ==
"UTC")
59 if (typeString ==
"GPST" || typeString ==
"GPS")
63 if (typeString ==
"GLNT" || typeString ==
"GLO")
67 if (typeString ==
"GST" || typeString ==
"GAL")
71 if (typeString ==
"BDT")
75 if (typeString ==
"QZSST" || typeString ==
"QZS")
79 if (typeString ==
"IRNSST" || typeString ==
"IRN")
101 constexpr explicit operator bool() =
delete;
105 constexpr explicit operator int()
const {
return int(
value); }
109 explicit operator std::string()
const {
return toString(); }
112 [[nodiscard]]
constexpr const char*
toString()
const
396void to_json(
json& j,
const TimeSystem& timeSystem);
408struct hash<
NAV::TimeSystem>
419#ifndef DOXYGEN_IGNORE
423struct fmt::formatter<
NAV::TimeSystem> : fmt::formatter<std::string>
429 template<
typename FormatContext>
430 auto format(
const NAV::TimeSystem& timeSys, FormatContext& ctx)
const
432 return fmt::formatter<std::string>::format(std::string(timeSys), ctx);
nlohmann::json json
json namespace
std::ostream & operator<<(std::ostream &os, const NAV::TimeSystem &obj)
Stream insertion operator overload.
TimeSystemEnum
Continuous enum for the time systems.
@ IRNSST
Indian Regional Navigation Satellite System Time.
@ COUNT
Amount of items in the enum.
@ GST
Galileo System Time.
@ UTC
Coordinated Universal Time.
@ TimeSys_None
No Time system.
@ GLNT
GLONASS Time (GLONASST)
@ QZSST
Quasi-Zenith Satellite System Time.
friend constexpr bool operator==(const TimeSystem &lhs, const TimeSystem &rhs)
Equal compares values.
static TimeSystem fromString(const std::string &typeString)
Construct new object from std::string.
TimeSystem_ value
Internal value.
constexpr TimeSystem(TimeSystemEnum timeSystem)
TimeSystemEnum getEnumValue() const
Returns the enum value (only one must be set)
constexpr const char * toString() const
Converts the time system into a string.
constexpr TimeSystem()=default
Default Constructor.
constexpr TimeSystem(TimeSystem_ type)
Implicit Constructor from Value type.
static TimeSystemEnum GetTimeSystemEnumValue(TimeSystem timeSystem)
Returns the enum value (only one must be set)
constexpr TimeSystem & operator=(TimeSystem_ v)
Assignment operator from Value type.
TimeSystem_
List of all time systems.
@ IRNSST
Indian Regional Navigation Satellite System Time.
@ GST
Galileo System Time.
@ GLNT
GLONASS Time (GLONASST)
@ TimeSys_None
No Time system.
@ QZSST
Quasi-Zenith Satellite System Time.
@ UTC
Coordinated Universal Time.
void to_json(json &j, const Node &node)
Converts the provided node into a json object.
const char * to_string(gui::widgets::PositionWithFrame::ReferenceFrame refFrame)
Converts the enum to a string.
constexpr Frequency_ operator~(Frequency_ rhs)
Allows negating flags of the Frequency enum.
constexpr Frequency_ & operator&=(Frequency_ &lhs, const Frequency_ &rhs)
Allows combining flags of the Frequency enum.
Code operator&(const Code &lhs, const Code &rhs)
void from_json(const json &j, Node &node)
Converts the provided json object into a node object.
constexpr Frequency_ & operator|=(Frequency_ &lhs, const Frequency_ &rhs)
Allows combining flags of the Frequency enum.
constexpr bool operator!=(const Node::Kind &lhs, const Node::Kind &rhs)
Inequal compares Node::Kind values.
bool ComboTimeSystem(const char *label, TimeSystem &timeSystem)
Shows a ComboBox to select the time system.
constexpr bool operator==(const Node::Kind &lhs, const Node::Kind &rhs)
Equal compares Node::Kind values.
Code operator|(const Code &lhs, const Code &rhs)
std::size_t operator()(const NAV::TimeSystem &f) const
Hash function for TimeSystem.