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.
|
Concrete template instantiation of ZoneRegistrarTemplate for extended::ZoneInfo, which can be used with ExtendedZoneProcessor. More...
#include <ZoneRegistrar.h>
Public Member Functions | |
ZoneRegistrar (uint16_t zoneRegistrySize, const extended::ZoneInfo *const *zoneRegistry) | |
![]() | |
ZoneRegistrarTemplate (uint16_t zoneRegistrySize, const extended::ZoneInfo *const *zoneRegistry) | |
Constructor. | |
uint16_t | zoneRegistrySize () const |
Return the number of zones and (fat) links. | |
const extended::ZoneInfo * | getZoneInfoForIndex (uint16_t i) const |
Return the ZoneInfo at index i. More... | |
const extended::ZoneInfo * | getZoneInfoForName (const char *name) const |
Return the ZoneInfo corresponding to the given zone name. More... | |
const extended::ZoneInfo * | getZoneInfoForId (uint32_t zoneId) const |
Return the ZoneInfo using the zoneId. More... | |
uint16_t | findIndexForName (const char *name) const |
Find the index for zone name. More... | |
uint16_t | findIndexForId (uint32_t zoneId) const |
Find the index for zone id. More... | |
Additional Inherited Members | |
![]() | |
static const uint16_t | kInvalidIndex |
Invalid index to indicate error or not found. | |
![]() | |
friend | void ::runIndexForZoneIdBinary () |
friend | void ::runIndexForZoneIdLinear () |
uint16_t | findIndexForIdLinear (uint32_t zoneId) const |
Exposed only for benchmarking purposes. | |
uint16_t | findIndexForIdBinary (uint32_t zoneId) const |
Exposed only for benchmarking purposes. | |
![]() | |
static bool | isSorted (const extended::ZoneInfo *const *registry, uint16_t registrySize) |
Determine if the given zone registry is sorted by id. | |
static uint16_t | linearSearchById (const extended::ZoneInfo *const *registry, uint16_t registrySize, uint32_t zoneId) |
Find the registry index corresponding to zoneId using linear search. More... | |
static uint16_t | binarySearchById (const extended::ZoneInfo *const *registry, uint16_t registrySize, uint32_t zoneId) |
Find the registry index corresponding to zoneId using a binary search. More... | |
![]() | |
static const uint8_t | kBinarySearchThreshold |
Use binarySearchById() if zoneRegistrySize >= threshold. | |
Concrete template instantiation of ZoneRegistrarTemplate for extended::ZoneInfo, which can be used with ExtendedZoneProcessor.
Definition at line 260 of file ZoneRegistrar.h.