KTimeZoneBackend

#include <ktimezone.h>

Inheritance diagram for KTimeZoneBackend:

Public Member Functions

 KTimeZoneBackend ()
 
 KTimeZoneBackend (const QString &name)
 
 KTimeZoneBackend (const KTimeZoneBackend &other)
 
virtual KTimeZoneBackendclone () const
 
virtual bool hasTransitions (const KTimeZone *caller) const
 
virtual bool isDst (const KTimeZone *caller, time_t t) const
 
virtual bool isDstAtUtc (const KTimeZone *caller, const QDateTime &utcDateTime) const
 
virtual int offset (const KTimeZone *caller, time_t t) const
 
virtual int offsetAtUtc (const KTimeZone *caller, const QDateTime &utcDateTime) const
 
virtual int offsetAtZoneTime (const KTimeZone *caller, const QDateTime &zoneDateTime, int *secondOffset) const
 
KTimeZoneBackendoperator= (const KTimeZoneBackend &other)
 
virtual QByteArray type () const
 

Protected Member Functions

 KTimeZoneBackend (KTimeZoneSource *source, const QString &name, const QString &countryCode=QString(), float latitude=KTimeZone::UNKNOWN, float longitude=KTimeZone::UNKNOWN, const QString &comment=QString())
 

Detailed Description

Base backend class for KTimeZone classes.

KTimeZone and each class inherited from it must have a corresponding backend class to implement its constructors and its virtual methods, and to provide a virtual clone() method. This allows KTimeZone virtual methods to work together with reference counting of private data.

Note
Classes derived from KTimeZoneBackend should not normally implement their own copy constructor or assignment operator, and must have a non-const d-pointer.

Base backend class for KTimeZone classes

See also
KTimeZone
Author
David Jarvie djarv[email protected][email protected][email protected]de.or[email protected]g.

Definition at line 1121 of file ktimezone.h.

Constructor & Destructor Documentation

KTimeZoneBackend::KTimeZoneBackend ( )

Implements KTimeZone::KTimeZone().

Definition at line 414 of file ktimezone.cpp.

KTimeZoneBackend::KTimeZoneBackend ( const QString name)
explicit

Implements KTimeZone::KTimeZone(const QString&).

Definition at line 420 of file ktimezone.cpp.

KTimeZoneBackend::KTimeZoneBackend ( KTimeZoneSource source,
const QString name,
const QString countryCode = QString(),
float  latitude = KTimeZone::UNKNOWN,
float  longitude = KTimeZone::UNKNOWN,
const QString comment = QString() 
)
protected

Constructs a time zone.

Parameters
sourcereader/parser for the database containing this time zone. This will be an instance of a class derived from KTimeZoneSource.
namein system-dependent format. The name must be unique within any KTimeZones instance which contains this KTimeZone.
countryCodeISO 3166 2-character country code, empty if unknown
latitudein degrees (between -90 and +90), UNKNOWN if not known
longitudein degrees (between -180 and +180), UNKNOWN if not known
commentdescription of the time zone, if any

Definition at line 424 of file ktimezone.cpp.

Member Function Documentation

KTimeZoneBackend * KTimeZoneBackend::clone ( ) const
virtual

Creates a copy of this instance.

Note
Every inherited class must reimplement clone().
Returns
new copy

Reimplemented in KSystemTimeZoneBackend, and KTzfileTimeZoneBackend.

Definition at line 460 of file ktimezone.cpp.

bool KTimeZoneBackend::hasTransitions ( const KTimeZone caller) const
virtual

Implements KTimeZone::hasTransitions().

Parameters
callercalling KTimeZone object

Reimplemented in KTzfileTimeZoneBackend.

Definition at line 579 of file ktimezone.cpp.

bool KTimeZoneBackend::isDst ( const KTimeZone caller,
time_t  t 
) const
virtual

Implements KTimeZone::isDst().

Parameters
callercalling KTimeZone object

Reimplemented in KSystemTimeZoneBackend.

Definition at line 574 of file ktimezone.cpp.

bool KTimeZoneBackend::isDstAtUtc ( const KTimeZone caller,
const QDateTime utcDateTime 
) const
virtual

Implements KTimeZone::isDstAtUtc().

Parameters
callercalling KTimeZone object

Reimplemented in KSystemTimeZoneBackend.

Definition at line 562 of file ktimezone.cpp.

int KTimeZoneBackend::offset ( const KTimeZone caller,
time_t  t 
) const
virtual

Implements KTimeZone::offset().

Parameters
callercalling KTimeZone object

Reimplemented in KSystemTimeZoneBackend.

Definition at line 557 of file ktimezone.cpp.

int KTimeZoneBackend::offsetAtUtc ( const KTimeZone caller,
const QDateTime utcDateTime 
) const
virtual

Implements KTimeZone::offsetAtUtc().

Parameters
callercalling KTimeZone object

Reimplemented in KSystemTimeZoneBackend.

Definition at line 526 of file ktimezone.cpp.

int KTimeZoneBackend::offsetAtZoneTime ( const KTimeZone caller,
const QDateTime zoneDateTime,
int *  secondOffset 
) const
virtual

Implements KTimeZone::offsetAtZoneTime().

Parameters
callercalling KTimeZone object

Reimplemented in KSystemTimeZoneBackend.

Definition at line 465 of file ktimezone.cpp.

QByteArray KTimeZoneBackend::type ( ) const
virtual

Returns the class name of the data represented by this instance.

Note
Every inherited class must reimplement type().

This base class returns "KTimeZone".

Returns
the class name

Reimplemented in KSystemTimeZoneBackend, and KTzfileTimeZoneBackend.

Definition at line 455 of file ktimezone.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sun Aug 2 2020 22:57:29 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.