AceTime  1.6
Date and time classes for Arduino that support timezones from the TZ Database, and a system clock that can synchronize from an NTP server or an RTC chip.
ExtendedZone.h
1 /*
2  * MIT License
3  * Copyright (c) 2019 Brian T. Park
4  */
5 
6 #ifndef ACE_TIME_EXTENDED_ZONE_H
7 #define ACE_TIME_EXTENDED_ZONE_H
8 
9 #include "internal/ZoneInfo.h"
11 
12 class Print;
13 
14 namespace ace_time {
15 
22 class ExtendedZone {
23  public:
28  ExtendedZone(const extended::ZoneInfo* zoneInfo):
29  mZoneInfoBroker(zoneInfo) {}
30 
37  mZoneInfoBroker(zoneInfo) {}
38 
40  void printNameTo(Print& printer) const;
41 
43  void printShortNameTo(Print& printer) const;
44 
46  uint32_t zoneId() const {
47  return mZoneInfoBroker.zoneId();
48  }
49 
50  private:
51  // disable copy constructor and assignment operator
52  ExtendedZone(const ExtendedZone&) = delete;
53  ExtendedZone& operator=(const ExtendedZone&) = delete;
54 
55  const extended::ZoneInfoBroker mZoneInfoBroker;
56 };
57 
58 }
59 
60 #endif
ace_time::ExtendedZone::zoneId
uint32_t zoneId() const
Return the zoneId of the current zoneInfo.
Definition: ExtendedZone.h:46
ace_time::ExtendedZone::printShortNameTo
void printShortNameTo(Print &printer) const
Print the short zone to the printer.
Definition: ExtendedZone.cpp:26
ace_time::ExtendedZone
A thin wrapper around an extended::ZoneInfo data structure to provide a stable API access to some use...
Definition: ExtendedZone.h:22
ace_time::ExtendedZone::ExtendedZone
ExtendedZone(const extended::ZoneInfoBroker &zoneInfo)
Constructor from an extended::ZoneInfoBroker, used by ExtendedZoneProcessor.
Definition: ExtendedZone.h:36
ace_time::extended::ZoneInfoBroker
Data broker for accessing ZoneInfo.
Definition: ExtendedBrokers.h:318
ace_time::ExtendedZone::printNameTo
void printNameTo(Print &printer) const
Print the full zone name to printer.
Definition: ExtendedZone.cpp:19
ExtendedBrokers.h
ace_time::ExtendedZone::ExtendedZone
ExtendedZone(const extended::ZoneInfo *zoneInfo)
Constructor from a raw extended::ZoneInfo* pointer, intended for manual inspection of a ZoneInfo reco...
Definition: ExtendedZone.h:28