0.2.0
Loading...
Searching...
No Matches
TimeSystem.hpp File Reference

Time System defintions. More...

Go to the source code of this file.

Classes

struct  std::hash< NAV::TimeSystem >
 Hash function for TimeSystem (needed for unordered_map) More...
 
class  NAV::TimeSystem
 Time System defintions. More...
 

Typedefs

using json
 json namespace
 

Enumerations

enum  NAV::TimeSystem_ {
  NAV::TimeSys_None ,
  NAV::UTC ,
  NAV::GPST ,
  NAV::GLNT ,
  NAV::GST ,
  NAV::BDT ,
  NAV::QZSST ,
  NAV::IRNSST
}
 List of all time systems. More...
 

Functions

bool NAV::ComboTimeSystem (const char *label, TimeSystem &timeSystem)
 Shows a ComboBox to select the time system.
 
void NAV::from_json (const json &j, TimeSystem &timeSystem)
 Converts the provided json object into a TimeSystem.
 
constexpr bool NAV::operator!= (const TimeSystem &lhs, const TimeSystem &rhs)
 Inequal compares values.
 
constexpr bool NAV::operator!= (const TimeSystem &lhs, const TimeSystem_ &rhs)
 Inequal compares values.
 
constexpr bool NAV::operator!= (const TimeSystem_ &lhs, const TimeSystem &rhs)
 Inequal compares values.
 
constexpr TimeSystem NAV::operator& (TimeSystem lhs, TimeSystem rhs)
 Allows combining flags of the TimeSystem enum.
 
constexpr TimeSystem NAV::operator& (TimeSystem lhs, TimeSystem_ rhs)
 Allows combining flags of the TimeSystem enum.
 
constexpr TimeSystem NAV::operator& (TimeSystem_ lhs, TimeSystem rhs)
 Allows combining flags of the TimeSystem enum.
 
constexpr TimeSystem_ NAV::operator& (TimeSystem_ lhs, TimeSystem_ rhs)
 Allows combining flags of the TimeSystem enum.
 
constexpr TimeSystemNAV::operator&= (TimeSystem &lhs, const TimeSystem &rhs)
 Allows combining flags of the TimeSystem enum.
 
constexpr TimeSystemNAV::operator&= (TimeSystem &lhs, const TimeSystem_ &rhs)
 Allows combining flags of the TimeSystem enum.
 
constexpr TimeSystem_NAV::operator&= (TimeSystem_ &lhs, const TimeSystem &rhs)
 Allows combining flags of the TimeSystem enum.
 
constexpr TimeSystem_NAV::operator&= (TimeSystem_ &lhs, const TimeSystem_ &rhs)
 Allows combining flags of the TimeSystem enum.
 
std::ostream & operator<< (std::ostream &os, const NAV::TimeSystem &obj)
 Stream insertion operator overload.
 
constexpr bool NAV::operator== (const TimeSystem &lhs, const TimeSystem &rhs)
 Equal compares values.
 
constexpr bool NAV::operator== (const TimeSystem &lhs, const TimeSystem_ &rhs)
 Equal compares values.
 
constexpr bool NAV::operator== (const TimeSystem_ &lhs, const TimeSystem &rhs)
 Equal compares values.
 
constexpr TimeSystem NAV::operator| (TimeSystem lhs, TimeSystem rhs)
 Allows combining flags of the TimeSystem enum.
 
constexpr TimeSystem NAV::operator| (TimeSystem lhs, TimeSystem_ rhs)
 Allows combining flags of the TimeSystem enum.
 
constexpr TimeSystem NAV::operator| (TimeSystem_ lhs, TimeSystem rhs)
 Allows combining flags of the TimeSystem enum.
 
constexpr TimeSystem_ NAV::operator| (TimeSystem_ lhs, TimeSystem_ rhs)
 Allows combining flags of the TimeSystem enum.
 
constexpr TimeSystemNAV::operator|= (TimeSystem &lhs, const TimeSystem &rhs)
 Allows combining flags of the TimeSystem enum.
 
constexpr TimeSystemNAV::operator|= (TimeSystem &lhs, const TimeSystem_ &rhs)
 Allows combining flags of the TimeSystem enum.
 
constexpr TimeSystem_NAV::operator|= (TimeSystem_ &lhs, const TimeSystem &rhs)
 Allows combining flags of the TimeSystem enum.
 
constexpr TimeSystem_NAV::operator|= (TimeSystem_ &lhs, const TimeSystem_ &rhs)
 Allows combining flags of the TimeSystem enum.
 
constexpr TimeSystem NAV::operator~ (TimeSystem rhs)
 Allows negating flags of the TimeSystem enum.
 
constexpr TimeSystem NAV::operator~ (TimeSystem_ rhs)
 Allows negating flags of the TimeSystem enum.
 
void NAV::to_json (json &j, const TimeSystem &timeSystem)
 Converts the provided TimeSystem into a json object.
 
const char * NAV::to_string (TimeSystem::TimeSystemEnum timeSystem)
 Converts the enum to a string.
 

Detailed Description

Time System defintions.

Author
T. Topp (topp@.nosp@m.ins..nosp@m.uni-s.nosp@m.tutt.nosp@m.gart..nosp@m.de)
Date
2022-04-26

Enumeration Type Documentation

◆ TimeSystem_

List of all time systems.

Enumerator
TimeSys_None 

No Time system.

UTC 

Coordinated Universal Time.

GPST 

GPS Time.

GLNT 

GLONASS Time (GLONASST)

GST 

Galileo System Time.

BDT 

BeiDou Time.

QZSST 

Quasi-Zenith Satellite System Time.

IRNSST 

Indian Regional Navigation Satellite System Time.

Function Documentation

◆ ComboTimeSystem()

bool NAV::ComboTimeSystem ( const char * label,
TimeSystem & timeSystem )

Shows a ComboBox to select the time system.

Parameters
[in]labelLabel to show beside the combo box. This has to be a unique id for ImGui.
[in]timeSystemReference to the time system to select

◆ from_json()

void NAV::from_json ( const json & j,
TimeSystem & timeSystem )

Converts the provided json object into a TimeSystem.

Parameters
[in]jJson object with the time system
[out]timeSystemTimeSystem to return

◆ operator!=() [1/3]

constexpr bool NAV::operator!= ( const TimeSystem & lhs,
const TimeSystem & rhs )
constexpr

Inequal compares values.

Parameters
[in]lhsLeft-hand side of the operator
[in]rhsRight-hand side of the operator
Returns
Whether the comparison was successful

◆ operator!=() [2/3]

constexpr bool NAV::operator!= ( const TimeSystem & lhs,
const TimeSystem_ & rhs )
constexpr

Inequal compares values.

Parameters
[in]lhsLeft-hand side of the operator
[in]rhsRight-hand side of the operator
Returns
Whether the comparison was successful

◆ operator!=() [3/3]

constexpr bool NAV::operator!= ( const TimeSystem_ & lhs,
const TimeSystem & rhs )
constexpr

Inequal compares values.

Parameters
[in]lhsLeft-hand side of the operator
[in]rhsRight-hand side of the operator
Returns
Whether the comparison was successful

◆ operator&() [1/4]

constexpr TimeSystem NAV::operator& ( TimeSystem lhs,
TimeSystem rhs )
constexpr

Allows combining flags of the TimeSystem enum.

Parameters
[in]lhsLeft-hand side enum value.
[in]rhsRight-hand side enum value.
Returns
The binary ANDed value.

◆ operator&() [2/4]

constexpr TimeSystem NAV::operator& ( TimeSystem lhs,
TimeSystem_ rhs )
constexpr

Allows combining flags of the TimeSystem enum.

Parameters
[in]lhsLeft-hand side enum value.
[in]rhsRight-hand side enum value.
Returns
The binary ANDed value.

◆ operator&() [3/4]

constexpr TimeSystem NAV::operator& ( TimeSystem_ lhs,
TimeSystem rhs )
constexpr

Allows combining flags of the TimeSystem enum.

Parameters
[in]lhsLeft-hand side enum value.
[in]rhsRight-hand side enum value.
Returns
The binary ANDed value.

◆ operator&() [4/4]

constexpr TimeSystem_ NAV::operator& ( TimeSystem_ lhs,
TimeSystem_ rhs )
constexpr

Allows combining flags of the TimeSystem enum.

Parameters
[in]lhsLeft-hand side enum value.
[in]rhsRight-hand side enum value.
Returns
The binary ANDed value.

◆ operator&=() [1/4]

constexpr TimeSystem & NAV::operator&= ( TimeSystem & lhs,
const TimeSystem & rhs )
constexpr

Allows combining flags of the TimeSystem enum.

Parameters
[in]lhsLeft-hand side enum value.
[in]rhsRight-hand side enum value.
Returns
The binary ANDed value.

◆ operator&=() [2/4]

constexpr TimeSystem & NAV::operator&= ( TimeSystem & lhs,
const TimeSystem_ & rhs )
constexpr

Allows combining flags of the TimeSystem enum.

Parameters
[in]lhsLeft-hand side enum value.
[in]rhsRight-hand side enum value.
Returns
The binary ANDed value.

◆ operator&=() [3/4]

constexpr TimeSystem_ & NAV::operator&= ( TimeSystem_ & lhs,
const TimeSystem & rhs )
constexpr

Allows combining flags of the TimeSystem enum.

Parameters
[in]lhsLeft-hand side enum value.
[in]rhsRight-hand side enum value.
Returns
The binary ANDed value.

◆ operator&=() [4/4]

constexpr TimeSystem_ & NAV::operator&= ( TimeSystem_ & lhs,
const TimeSystem_ & rhs )
constexpr

Allows combining flags of the TimeSystem enum.

Parameters
[in]lhsLeft-hand side enum value.
[in]rhsRight-hand side enum value.
Returns
The binary ANDed value.

◆ operator<<()

std::ostream & operator<< ( std::ostream & os,
const NAV::TimeSystem & obj )

Stream insertion operator overload.

Parameters
[in,out]osOutput stream object to stream the time into
[in]objObject to print
Returns
Returns the output stream object in order to chain stream insertions

◆ operator==() [1/3]

constexpr bool NAV::operator== ( const TimeSystem & lhs,
const TimeSystem & rhs )
constexpr

Equal compares values.

Parameters
[in]lhsLeft-hand side of the operator
[in]rhsRight-hand side of the operator
Returns
Whether the comparison was successful

◆ operator==() [2/3]

constexpr bool NAV::operator== ( const TimeSystem & lhs,
const TimeSystem_ & rhs )
constexpr

Equal compares values.

Parameters
[in]lhsLeft-hand side of the operator
[in]rhsRight-hand side of the operator
Returns
Whether the comparison was successful

◆ operator==() [3/3]

constexpr bool NAV::operator== ( const TimeSystem_ & lhs,
const TimeSystem & rhs )
constexpr

Equal compares values.

Parameters
[in]lhsLeft-hand side of the operator
[in]rhsRight-hand side of the operator
Returns
Whether the comparison was successful

◆ operator|() [1/4]

constexpr TimeSystem NAV::operator| ( TimeSystem lhs,
TimeSystem rhs )
constexpr

Allows combining flags of the TimeSystem enum.

Parameters
[in]lhsLeft-hand side enum value.
[in]rhsRight-hand side enum value.
Returns
The binary ORed value.

◆ operator|() [2/4]

constexpr TimeSystem NAV::operator| ( TimeSystem lhs,
TimeSystem_ rhs )
constexpr

Allows combining flags of the TimeSystem enum.

Parameters
[in]lhsLeft-hand side enum value.
[in]rhsRight-hand side enum value.
Returns
The binary ORed value.

◆ operator|() [3/4]

constexpr TimeSystem NAV::operator| ( TimeSystem_ lhs,
TimeSystem rhs )
constexpr

Allows combining flags of the TimeSystem enum.

Parameters
[in]lhsLeft-hand side enum value.
[in]rhsRight-hand side enum value.
Returns
The binary ORed value.

◆ operator|() [4/4]

constexpr TimeSystem_ NAV::operator| ( TimeSystem_ lhs,
TimeSystem_ rhs )
constexpr

Allows combining flags of the TimeSystem enum.

Parameters
[in]lhsLeft-hand side enum value.
[in]rhsRight-hand side enum value.
Returns
The binary ORed value.

◆ operator|=() [1/4]

constexpr TimeSystem & NAV::operator|= ( TimeSystem & lhs,
const TimeSystem & rhs )
constexpr

Allows combining flags of the TimeSystem enum.

Parameters
[in]lhsLeft-hand side enum value.
[in]rhsRight-hand side enum value.
Returns
The binary ORed value.

◆ operator|=() [2/4]

constexpr TimeSystem & NAV::operator|= ( TimeSystem & lhs,
const TimeSystem_ & rhs )
constexpr

Allows combining flags of the TimeSystem enum.

Parameters
[in]lhsLeft-hand side enum value.
[in]rhsRight-hand side enum value.
Returns
The binary ORed value.

◆ operator|=() [3/4]

constexpr TimeSystem_ & NAV::operator|= ( TimeSystem_ & lhs,
const TimeSystem & rhs )
constexpr

Allows combining flags of the TimeSystem enum.

Parameters
[in]lhsLeft-hand side enum value.
[in]rhsRight-hand side enum value.
Returns
The binary ORed value.

◆ operator|=() [4/4]

constexpr TimeSystem_ & NAV::operator|= ( TimeSystem_ & lhs,
const TimeSystem_ & rhs )
constexpr

Allows combining flags of the TimeSystem enum.

Parameters
[in]lhsLeft-hand side enum value.
[in]rhsRight-hand side enum value.
Returns
The binary ORed value.

◆ operator~() [1/2]

constexpr TimeSystem NAV::operator~ ( TimeSystem rhs)
constexpr

Allows negating flags of the TimeSystem enum.

Parameters
[in]rhsRight-hand side enum value.
Returns
The binary NEGed value.

◆ operator~() [2/2]

constexpr TimeSystem NAV::operator~ ( TimeSystem_ rhs)
constexpr

Allows negating flags of the TimeSystem enum.

Parameters
[in]rhsRight-hand side enum value.
Returns
The binary NEGed value.

◆ to_json()

void NAV::to_json ( json & j,
const TimeSystem & timeSystem )

Converts the provided TimeSystem into a json object.

Parameters
[out]jReturn Json object
[in]timeSystemTimeSystem to convert

◆ to_string()

const char * NAV::to_string ( TimeSystem::TimeSystemEnum timeSystem)

Converts the enum to a string.

Parameters
[in]timeSystemEnum value to convert into text
Returns
String representation of the enum