tztrans.h
Go to the documentation of this file.
// © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/*
*******************************************************************************
* Copyright (C) 2007-2008, International Business Machines Corporation and *
* others. All Rights Reserved. *
*******************************************************************************
*/
#ifndef TZTRANS_H
#define TZTRANS_H
#include "unicode/utypes.h"
#if U_SHOW_CPLUSPLUS_API
#if !UCONFIG_NO_FORMATTING
#include "unicode/uobject.h"
U_NAMESPACE_BEGIN
// Forward declaration
class TimeZoneRule;
class U_I18N_API TimeZoneTransition : public UObject {
public:
TimeZoneTransition(UDate time, const TimeZoneRule& from, const TimeZoneRule& to);
TimeZoneTransition();
TimeZoneTransition(const TimeZoneTransition& source);
~TimeZoneTransition();
TimeZoneTransition* clone() const;
TimeZoneTransition& operator=(const TimeZoneTransition& right);
bool operator==(const TimeZoneTransition& that) const;
bool operator!=(const TimeZoneTransition& that) const;
UDate getTime() const;
void setTime(UDate time);
const TimeZoneRule* getFrom() const;
void setFrom(const TimeZoneRule& from);
void adoptFrom(TimeZoneRule* from);
void setTo(const TimeZoneRule& to);
void adoptTo(TimeZoneRule* to);
const TimeZoneRule* getTo() const;
private:
UDate fTime;
TimeZoneRule* fFrom;
TimeZoneRule* fTo;
public:
static UClassID U_EXPORT2 getStaticClassID();
virtual UClassID getDynamicClassID() const override;
};
U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_FORMATTING */
#endif /* U_SHOW_CPLUSPLUS_API */
#endif // TZTRANS_H
//eof
icu::TimeZoneRule
TimeZoneRule is a class representing a rule for time zone.
Definition: tzrule.h:36
icu::TimeZoneTransition
TimeZoneTransition is a class representing a time zone transition.
Definition: tztrans.h:35
icu::TimeZoneTransition::TimeZoneTransition
TimeZoneTransition(UDate time, const TimeZoneRule &from, const TimeZoneRule &to)
Constructs a TimeZoneTransition with the time and the rules before/after the transition.
icu::TimeZoneTransition::getDynamicClassID
virtual UClassID getDynamicClassID() const override
Returns a unique class ID POLYMORPHICALLY.
icu::TimeZoneTransition::TimeZoneTransition
TimeZoneTransition()
Constructs an empty TimeZoneTransition
icu::TimeZoneTransition::setTo
void setTo(const TimeZoneRule &to)
Sets the rule used after the transition.
icu::TimeZoneTransition::getFrom
const TimeZoneRule * getFrom() const
Returns the rule used before the transition.
icu::TimeZoneTransition::setFrom
void setFrom(const TimeZoneRule &from)
Sets the rule used before the transition.
icu::TimeZoneTransition::operator=
TimeZoneTransition & operator=(const TimeZoneTransition &right)
Assignment operator.
icu::TimeZoneTransition::TimeZoneTransition
TimeZoneTransition(const TimeZoneTransition &source)
Copy constructor.
icu::TimeZoneTransition::getTo
const TimeZoneRule * getTo() const
Returns the rule used after the transition.
icu::TimeZoneTransition::getStaticClassID
static UClassID getStaticClassID()
Return the class ID for this class.
icu::TimeZoneTransition::clone
TimeZoneTransition * clone() const
Clone this TimeZoneTransition object polymorphically.
icu::TimeZoneTransition::adoptTo
void adoptTo(TimeZoneRule *to)
Adopts the rule used after the transition.
icu::TimeZoneTransition::getTime
UDate getTime() const
Returns the time of transition in milliseconds.
icu::TimeZoneTransition::adoptFrom
void adoptFrom(TimeZoneRule *from)
Adopts the rule used before the transition.
icu::TimeZoneTransition::setTime
void setTime(UDate time)
Sets the time of transition in milliseconds.
icu::TimeZoneTransition::operator==
bool operator==(const TimeZoneTransition &that) const
Return true if the given TimeZoneTransition objects are semantically equal.
icu::TimeZoneTransition::~TimeZoneTransition
~TimeZoneTransition()
Destructor.
icu::TimeZoneTransition::operator!=
bool operator!=(const TimeZoneTransition &that) const
Return true if the given TimeZoneTransition objects are semantically unequal.
icu::UObject
UObject is the common ICU "boilerplate" class.
Definition: uobject.h:223
uobject.h
C++ API: Common ICU base class UObject.
UClassID
void * UClassID
UClassID is used to identify classes without using the compiler's RTTI.
Definition: uobject.h:96
utypes.h
Basic definitions for ICU, for both C and C++ APIs.
U_I18N_API
#define U_I18N_API
Set to export library symbols from inside the i18n library, and to import them from outside.
Definition: utypes.h:316
UDate
double UDate
Date and Time data type.
Definition: utypes.h:218