6 #ifndef ACE_TIME_TIME_ZONE_DATA_H
7 #define ACE_TIME_TIME_ZONE_DATA_H
10 #include "ZoneProcessor.h"
39 static const uint8_t kTypeError = 0;
40 static const uint8_t kTypeManual = 1;
41 static const uint8_t kTypeZoneId = 2;
55 stdOffsetMinutes(stdMinutes),
56 dstOffsetMinutes(dstMinutes)
77 int16_t stdOffsetMinutes;
78 int16_t dstOffsetMinutes;
89 inline bool operator==(
const TimeZoneData& a,
const TimeZoneData& b) {
90 if (a.type != b.type)
return false;
92 case TimeZoneData::kTypeManual:
93 return (a.stdOffsetMinutes == b.stdOffsetMinutes)
94 && (a.dstOffsetMinutes == b.dstOffsetMinutes);
95 case TimeZoneData::kTypeZoneId:
96 return (a.zoneId == b.zoneId);
97 case TimeZoneData::kTypeError:
104 inline bool operator!=(
const TimeZoneData& a,
const TimeZoneData& b) {
Data structure that captures the internal state of a TimeZone object with enough information so that ...
uint32_t zoneId
Both TimeZone::kTypeBasic and TimeZone::kTypeExtended are mapped to a TimeZoneData::kTypeZoneId.
TimeZoneData()
Default constructor gives kTypeError sentinel.
TimeZoneData(uint32_t zid)
Constructor for kTypeZoneId needed because C+11 does not have member initialization,...
TimeZoneData(int16_t stdMinutes, int16_t dstMinutes)
Constructor for kTypeManual.