Qt Virtual Chart Table (QVCT)
|
Time data. More...
#include <data/CDataTime.hpp>
Public Member Functions | |
CDataTime (double _fdTime=UNDEFINED_TIME) | |
CDataTime (const CDataTime &_roDataTime) | |
virtual | ~CDataTime () |
void | setTime (double _fdTime) |
Sets the time, in seconds from Unix epoch. More... | |
void | setTime (time_t _tSeconds, long _lNanoSeconds) |
Sets the time, in seconds from Unix epoch, using timespec stanza. More... | |
void | setTime (const CDataTime &_roDataTime) |
Copy time from another time object. More... | |
void | resetTime () |
Resets the time (to an undefined Time) More... | |
double | getTime () const |
Returns this time's time, in seconds from Unix epoch. More... | |
void | serialize (QDataStream &_rqDataStream) const |
Serializes (store) this object's data to binary format. More... | |
void | unserialize (QDataStream &_rqDataStream) |
Unserializes (restore) this object's data from binary format. More... | |
bool | operator== (const CDataTime &_roTime) const |
Equality operator. More... | |
bool | operator!= (const CDataTime &_roTime) const |
Inequality operator. More... | |
Static Public Member Functions | |
static bool | compareTimeAscending (const CDataTime &_roTime1, const CDataTime &_roTime2) |
Time (ascending sort) comparison operator. More... | |
static bool | compareTimeDescending (const CDataTime &_roTime1, const CDataTime &_roTime2) |
Time (descending sort) comparison operator. More... | |
Static Public Attributes | |
static constexpr double | UNDEFINED_TIME = -9999999 |
Specific value for an undefined time. More... | |
static const CDataTime | UNDEFINED |
Specific value for an undefined time object. More... | |
Private Attributes | |
double | fdTime |
Time, in seconds from Unix epoch. More... | |
Time data.
This class encapsulates time data, using Universal Time Coordinates (UTC) and milliseconds precision.
Definition at line 35 of file CDataTime.hpp.
CDataTime::CDataTime | ( | double | _fdTime = UNDEFINED_TIME | ) |
[in] | _fdTime | Time, in seconds from Unix epoch |
Definition at line 41 of file CDataTime.cpp.
CDataTime::CDataTime | ( | const CDataTime & | _roDataTime | ) |
Definition at line 46 of file CDataTime.cpp.
|
inlinevirtual |
Definition at line 67 of file CDataTime.hpp.
void CDataTime::setTime | ( | double | _fdTime | ) |
Sets the time, in seconds from Unix epoch.
Definition at line 60 of file CDataTime.cpp.
void CDataTime::setTime | ( | time_t | _tSeconds, |
long | _lNanoSeconds | ||
) |
Sets the time, in seconds from Unix epoch, using timespec stanza.
Definition at line 66 of file CDataTime.cpp.
void CDataTime::setTime | ( | const CDataTime & | _roDataTime | ) |
Copy time from another time object.
Definition at line 76 of file CDataTime.cpp.
|
inline |
Resets the time (to an undefined Time)
Definition at line 84 of file CDataTime.hpp.
|
inline |
Returns this time's time, in seconds from Unix epoch.
Definition at line 89 of file CDataTime.hpp.
void CDataTime::serialize | ( | QDataStream & | _rqDataStream | ) | const |
Serializes (store) this object's data to binary format.
Definition at line 85 of file CDataTime.cpp.
void CDataTime::unserialize | ( | QDataStream & | _rqDataStream | ) |
Unserializes (restore) this object's data from binary format.
Definition at line 90 of file CDataTime.cpp.
bool CDataTime::operator== | ( | const CDataTime & | _roTime | ) | const |
Equality operator.
This operator returns true if all components - longitude, latitude and elevation - match.
Definition at line 98 of file CDataTime.cpp.
bool CDataTime::operator!= | ( | const CDataTime & | _roTime | ) | const |
Inequality operator.
This operator returns true if any components - longitude, latitude and elevation - mismatch.
Definition at line 103 of file CDataTime.cpp.
|
static |
Time (ascending sort) comparison operator.
Definition at line 112 of file CDataTime.cpp.
|
static |
Time (descending sort) comparison operator.
Definition at line 117 of file CDataTime.cpp.
|
staticconstexpr |
Specific value for an undefined time.
Definition at line 44 of file CDataTime.hpp.
|
static |
Specific value for an undefined time object.
Definition at line 46 of file CDataTime.hpp.
|
private |
Time, in seconds from Unix epoch.
Definition at line 56 of file CDataTime.hpp.