AceTime  1.11.6
Date and time classes for Arduino that support timezones from the TZ Database.
Public Member Functions | List of all members
ace_time::basic::ZoneRegistrar Class Reference

Concrete template instantiation of ZoneRegistrarTemplate for basic::ZoneInfo, which can be used with BasicZoneProcessor. More...

#include <ZoneRegistrar.h>

Inheritance diagram for ace_time::basic::ZoneRegistrar:
Inheritance graph
[legend]
Collaboration diagram for ace_time::basic::ZoneRegistrar:
Collaboration graph
[legend]

Public Member Functions

 ZoneRegistrar (uint16_t zoneRegistrySize, const basic::ZoneInfo *const *zoneRegistry)
 
- Public Member Functions inherited from ace_time::internal::ZoneRegistrarTemplate< basic::ZoneInfo, basic::ZoneInfoBroker, basic::ZoneRegistryBroker >
 ZoneRegistrarTemplate (uint16_t zoneRegistrySize, const basic::ZoneInfo *const *zoneRegistry)
 Constructor.
 
uint16_t zoneRegistrySize () const
 Return the number of zones and (fat) links.
 
const basic::ZoneInfo * getZoneInfoForIndex (uint16_t i) const
 Return the ZoneInfo at index i. More...
 
const basic::ZoneInfo * getZoneInfoForName (const char *name) const
 Return the ZoneInfo corresponding to the given zone name. More...
 
const basic::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 Public Attributes inherited from ace_time::internal::ZoneRegistrarTemplate< basic::ZoneInfo, basic::ZoneInfoBroker, basic::ZoneRegistryBroker >
static const uint16_t kInvalidIndex
 Invalid index to indicate error or not found.
 
- Protected Member Functions inherited from ace_time::internal::ZoneRegistrarTemplate< basic::ZoneInfo, basic::ZoneInfoBroker, basic::ZoneRegistryBroker >
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 Protected Member Functions inherited from ace_time::internal::ZoneRegistrarTemplate< basic::ZoneInfo, basic::ZoneInfoBroker, basic::ZoneRegistryBroker >
static bool isSorted (const basic::ZoneInfo *const *registry, uint16_t registrySize)
 Determine if the given zone registry is sorted by id.
 
static uint16_t linearSearchById (const basic::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 basic::ZoneInfo *const *registry, uint16_t registrySize, uint32_t zoneId)
 Find the registry index corresponding to zoneId using a binary search. More...
 
- Static Protected Attributes inherited from ace_time::internal::ZoneRegistrarTemplate< basic::ZoneInfo, basic::ZoneInfoBroker, basic::ZoneRegistryBroker >
static const uint8_t kBinarySearchThreshold
 Use binarySearchById() if zoneRegistrySize >= threshold.
 

Detailed Description

Concrete template instantiation of ZoneRegistrarTemplate for basic::ZoneInfo, which can be used with BasicZoneProcessor.

Definition at line 216 of file ZoneRegistrar.h.


The documentation for this class was generated from the following file: