AceTime  1.7.3
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 
47  void printShortNameTo(Print& printer) const;
48 
50  uint32_t zoneId() const {
51  return mZoneInfoBroker.zoneId();
52  }
53 
54  private:
55  // disable copy constructor and assignment operator
56  ExtendedZone(const ExtendedZone&) = delete;
57  ExtendedZone& operator=(const ExtendedZone&) = delete;
58 
59  const extended::ZoneInfoBroker mZoneInfoBroker;
60 };
61 
62 }
63 
64 #endif
ace_time::ExtendedZone::zoneId
uint32_t zoneId() const
Return the zoneId of the current zoneInfo.
Definition: ExtendedZone.h:50
ace_time::ExtendedZone::printShortNameTo
void printShortNameTo(Print &printer) const
Print the short pretty zone name to the printer.
Definition: ExtendedZone.cpp:27
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:20
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