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.
Public Member Functions | Static Public Attributes | List of all members
ace_time::ZoneManager Class Referenceabstract

Common interface to the BasicZoneManager and ExtendedZoneManager so that a single interface can be passed around to various helper objects. More...

#include <ZoneManager.h>

Inheritance diagram for ace_time::ZoneManager:
Inheritance graph
[legend]

Public Member Functions

virtual TimeZone createForZoneName (const char *name)=0
 Create a TimeZone for the given zone name (e.g. More...
 
virtual TimeZone createForZoneId (uint32_t id)=0
 Create a TimeZone for the given 32-bit zoneId.
 
virtual TimeZone createForZoneIndex (uint16_t index)=0
 Create a TimeZone for the given index in the ZoneInfo registry that was used to create this ZoneManager.
 
virtual TimeZone createForTimeZoneData (const TimeZoneData &d)=0
 Create a TimeZone from the TimeZoneData created by TimeZone::toTimeZoneData(). More...
 
virtual uint16_t indexForZoneName (const char *name) const =0
 Find the registry index for the given time zone name. More...
 
virtual uint16_t indexForZoneId (uint32_t id) const =0
 Find the registry index for the given time zone id. More...
 
virtual uint16_t registrySize () const =0
 Return the number of elements in the registry.
 

Static Public Attributes

static const uint16_t kInvalidIndex = 0xffff
 Registry index which is not valid. More...
 

Detailed Description

Common interface to the BasicZoneManager and ExtendedZoneManager so that a single interface can be passed around to various helper objects.

Various methods return a TimeZone object from one of its identifiers. The identifer can be a string (e.g. "America/Los_Angeles"), or a unique hashed zoneId, an index into the ZoneRegistry, or the TimeZoneData object created by TimeZone::toTimeZoneData().

Definition at line 24 of file ZoneManager.h.

Member Function Documentation

◆ createForTimeZoneData()

virtual TimeZone ace_time::ZoneManager::createForTimeZoneData ( const TimeZoneData d)
pure virtual

Create a TimeZone from the TimeZoneData created by TimeZone::toTimeZoneData().

kTypeBasic is interpreted as a kTypeBasicManaged, and kTypeExtended is interpreted as a kTypeExtendedManaged.

Implemented in ace_time::ManualZoneManager.

◆ createForZoneName()

virtual TimeZone ace_time::ZoneManager::createForZoneName ( const char *  name)
pure virtual

Create a TimeZone for the given zone name (e.g.

"America/Los_Angeles").

Implemented in ace_time::ManualZoneManager.

◆ indexForZoneId()

virtual uint16_t ace_time::ZoneManager::indexForZoneId ( uint32_t  id) const
pure virtual

Find the registry index for the given time zone id.

Returns kInvalidIndex if not found.

Implemented in ace_time::ManualZoneManager.

◆ indexForZoneName()

virtual uint16_t ace_time::ZoneManager::indexForZoneName ( const char *  name) const
pure virtual

Find the registry index for the given time zone name.

Returns kInvalidIndex if not found.

Implemented in ace_time::ManualZoneManager.

Member Data Documentation

◆ kInvalidIndex

const uint16_t ace_time::ZoneManager::kInvalidIndex = 0xffff
static

Registry index which is not valid.

Indicates an error or not found.

Definition at line 27 of file ZoneManager.h.


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