AceTime
1.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.
|
A templatized implementation of ZoneManager that binds the (Basic|Extended)ZoneRegistrar with the corresponding (Basic|Extended)ZoneProcessorCache. More...
#include <ZoneManager.h>
Public Member Functions | |
TimeZone | createForZoneName (const char *name) override |
TimeZone | createForZoneId (uint32_t id) override |
TimeZone | createForZoneIndex (uint16_t index) override |
TimeZone | createForTimeZoneData (const TimeZoneData &d) override |
uint16_t | indexForZoneName (const char *name) const override |
uint16_t | indexForZoneId (uint32_t id) const override |
uint16_t | registrySize () const override |
TimeZone | createForZoneInfo (const ZI *zoneInfo) |
Create a TimeZone from an explicit ZoneInfo reference. More... | |
Protected Member Functions | |
ZoneManagerImpl (uint16_t registrySize, const ZI *const *zoneRegistry) | |
Constructor. More... | |
A templatized implementation of ZoneManager that binds the (Basic|Extended)ZoneRegistrar with the corresponding (Basic|Extended)ZoneProcessorCache.
Applications will normally use two specific instantiation of this class: BasicZoneManager<SIZE> and ExtendedZoneManager<SIZE>.
If an entry in the ZoneRegistrar is not found, then TimeZone::forError() will be returned.
If a ZoneProcessor exists in the ZoneProcessorCache that is already bound to the given TimeZone, then the ZoneProcessor is reused. If not, another ZoneProcessor is picked from the cache in a round-robin fashion (kicking off the previously bound TimeZone). The type of the TimeZone will be assigned to be the type of the ZoneProcessorCache, which will be either kTypeBasicManaged or kTypeExtendedManaged.
ZI | type of ZoneInfo (basic::ZoneInfo or extended::ZoneInfo) which make up the zone registry |
ZR | class of ZoneRegistrar which holds the registry of ZoneInfo |
ZSC | class of ZoneProcessorCache |
Definition at line 23 of file TimeZone.h.
|
inlineprotected |
Constructor.
registrySize | number of ZoneInfo entries in the registry |
zoneRegistry | an array of ZoneInfo entries |
Definition at line 202 of file ZoneManager.h.
|
inline |
Create a TimeZone from an explicit ZoneInfo reference.
The ZoneRegistrar will be bypassed because the ZoneInfo is already available, but the TimeZone will reuse the ZoneProcessorCache. This is expected to be used mostly in tests, but it could be useful for applications.
Definition at line 190 of file ZoneManager.h.