Software and Services, Portable Libraries  2019.Mar.01
A library for managing digital certificates
SoftwareAndServices::Library::iCalendar::tzidData Class Reference

Manages a cache of time zone information. More...

#include </home/doug/src/SoftwareAndServices/libSaSiCalendar/icaldata.hpp>

+ Collaboration diagram for SoftwareAndServices::Library::iCalendar::tzidData:

Classes

class  tzidKey
 Manage time zone id's. More...
 
class  tzidUpdate
 A list of instance times and switch to value to be used when expanding instance date and date-time values. More...
 

Public Member Functions

 tzidData (CalendarId_t calId)
 tzidData - Constructor More...
 
virtual ~tzidData ()
 tzidData - Destructor. More...
 
bool addTzid (const char *tzid, iCalendar *ical)
 Add a TZID to an icalendar object. More...
 
date_timedtToUtc (iCalendar *ical, date_time *dt, const char *tzid)
 Convert the date_time to UTC from TZID. More...
 

Static Public Member Functions

static tzidDatafindTzidData (const char *tzid, CalendarId_t calid)
 Find tzidData for calid by tzid. More...
 
static tzidDatafindTzidData (const char *tzid, iCalendar *ical)
 
static long getUtcOffset (iCalendar *ical, const char *tzid, date *aDate)
 Get the UTC Offset for the provided date. More...
 
static long getUtcOffset (iCalendar *ical, const char *tzid, date_time *dt)
 Get the UTC Offset for the provided time. More...
 
static vtimezonegetvTimezone (iCalendar *ical, const char *tzid)
 Get a VTIMEZONE object that matches tzid. More...
 

Public Attributes

CalendarId_t calId
 The calendar ID this data belongs to. More...
 
std::vector< tzidEntry * > * entries
 Array of tzidEntry object. More...
 
std::vector< tzidUpdate * > * instances
 Array of instances if tzidUpdate when expanded. More...
 

Static Public Attributes

static std::map< tzidKey *, tzidData * > * tzidCache
 A cache of tzidData objects ordered by tzidKey. More...
 

Detailed Description

Manages a cache of time zone information.

Definition at line 811 of file icaldata.hpp.

Constructor & Destructor Documentation

◆ tzidData()

SoftwareAndServices::Library::iCalendar::tzidData::tzidData ( CalendarId_t  calId)

tzidData - Constructor

Parameters
calIdThe ID of the icalendar object.

◆ ~tzidData()

virtual SoftwareAndServices::Library::iCalendar::tzidData::~tzidData ( )
virtual

tzidData - Destructor.

Member Function Documentation

◆ addTzid()

bool SoftwareAndServices::Library::iCalendar::tzidData::addTzid ( const char *  tzid,
iCalendar ical 
)

Add a TZID to an icalendar object.

Returns TRUE if added or if already exists. If added, it expands the instances and remembers them.

Parameters
tzidThe TZID to add.
icalAdd to this calendar.
Returns
TRUE if added or if already existed.

◆ dtToUtc()

date_time* SoftwareAndServices::Library::iCalendar::tzidData::dtToUtc ( iCalendar ical,
date_time dt,
const char *  tzid 
)

Convert the date_time to UTC from TZID.

Parameters
icalFrom this icalendar object.
dtFrom this date time.

tzid From this time zone ID.

Returns
The dt converted to UTC date-time.

◆ findTzidData()

static tzidData* SoftwareAndServices::Library::iCalendar::tzidData::findTzidData ( const char *  tzid,
CalendarId_t  calid 
)
static

Find tzidData for calid by tzid.

Parameters
tzidThe tzid to look for.
calidIn this calendar.
Returns
Matching tzidData, or NULL if none.

◆ getUtcOffset() [1/2]

static long SoftwareAndServices::Library::iCalendar::tzidData::getUtcOffset ( iCalendar ical,
const char *  tzid,
date aDate 
)
static

Get the UTC Offset for the provided date.

Parameters
icalFor this icalendar object.
tzidFor this time zone id.
Onthis date.
Returns
The UTC offset in seconds.

◆ getUtcOffset() [2/2]

static long SoftwareAndServices::Library::iCalendar::tzidData::getUtcOffset ( iCalendar ical,
const char *  tzid,
date_time dt 
)
static

Get the UTC Offset for the provided time.

Parameters
icalFor this icalendar object.
tzidFor this time zone id.
Onthis date time.
Returns
The UTC offset in seconds.

◆ getvTimezone()

static vtimezone* SoftwareAndServices::Library::iCalendar::tzidData::getvTimezone ( iCalendar ical,
const char *  tzid 
)
static

Get a VTIMEZONE object that matches tzid.

Parameters
icalThe iCalendar object.
tzidThe tzid to look up.
Returns
A VTIMEZONE object that matches tzid.

Member Data Documentation

◆ calId

CalendarId_t SoftwareAndServices::Library::iCalendar::tzidData::calId

The calendar ID this data belongs to.

Definition at line 994 of file icaldata.hpp.

◆ entries

std::vector<tzidEntry*>* SoftwareAndServices::Library::iCalendar::tzidData::entries

Array of tzidEntry object.

Definition at line 984 of file icaldata.hpp.

◆ instances

std::vector<tzidUpdate*>* SoftwareAndServices::Library::iCalendar::tzidData::instances

Array of instances if tzidUpdate when expanded.

Definition at line 989 of file icaldata.hpp.

◆ tzidCache

std::map<tzidKey*, tzidData*>* SoftwareAndServices::Library::iCalendar::tzidData::tzidCache
static

A cache of tzidData objects ordered by tzidKey.

Definition at line 999 of file icaldata.hpp.


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