ICU 63.1  63.1
tztrans.h
Go to the documentation of this file.
1 // © 2016 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
3 /*
4 *******************************************************************************
5 * Copyright (C) 2007-2008, International Business Machines Corporation and *
6 * others. All Rights Reserved. *
7 *******************************************************************************
8 */
9 #ifndef TZTRANS_H
10 #define TZTRANS_H
11 
17 #include "unicode/utypes.h"
18 
19 #if !UCONFIG_NO_FORMATTING
20 
21 #include "unicode/uobject.h"
22 
24 
25 // Forward declaration
26 class TimeZoneRule;
27 
34 public:
44  TimeZoneTransition(UDate time, const TimeZoneRule& from, const TimeZoneRule& to);
45 
51 
58 
64 
71  TimeZoneTransition* clone(void) const;
72 
79 
87  UBool operator==(const TimeZoneTransition& that) const;
88 
96  UBool operator!=(const TimeZoneTransition& that) const;
97 
103  UDate getTime(void) const;
104 
110  void setTime(UDate time);
111 
117  const TimeZoneRule* getFrom(void) const;
118 
125  void setFrom(const TimeZoneRule& from);
126 
133  void adoptFrom(TimeZoneRule* from);
134 
141  void setTo(const TimeZoneRule& to);
142 
150 
156  const TimeZoneRule* getTo(void) const;
157 
158 private:
159  UDate fTime;
160  TimeZoneRule* fFrom;
161  TimeZoneRule* fTo;
162 
163 public:
175  static UClassID U_EXPORT2 getStaticClassID(void);
176 
188  virtual UClassID getDynamicClassID(void) const;
189 };
190 
192 
193 #endif /* #if !UCONFIG_NO_FORMATTING */
194 
195 #endif // TZTRANS_H
196 
197 //eof
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:301
icu::TimeZoneTransition::setTime
void setTime(UDate time)
Sets the time of transition in milliseconds.
UBool
int8_t UBool
The ICU boolean type.
Definition: umachine.h:225
icu::TimeZoneRule
TimeZoneRule is a class representing a rule for time zone.
Definition: tzrule.h:34
icu::TimeZoneTransition::TimeZoneTransition
TimeZoneTransition(const TimeZoneTransition &source)
Copy constructor.
icu::TimeZoneTransition::adoptFrom
void adoptFrom(TimeZoneRule *from)
Adopts the rule used before the transition.
icu::TimeZoneTransition::getFrom
const TimeZoneRule * getFrom(void) const
Returns the rule used before the transition.
icu::TimeZoneTransition::operator!=
UBool operator!=(const TimeZoneTransition &that) const
Return true if the given TimeZoneTransition objects are semantically unequal.
icu::TimeZoneTransition::setFrom
void setFrom(const TimeZoneRule &from)
Sets the rule used before the transition.
icu::UObject
UObject is the common ICU "boilerplate" class.
Definition: uobject.h:220
icu::TimeZoneTransition::operator=
TimeZoneTransition & operator=(const TimeZoneTransition &right)
Assignment operator.
UClassID
void * UClassID
UClassID is used to identify classes without using the compiler's RTTI.
Definition: uobject.h:90
icu::TimeZoneTransition::getTo
const TimeZoneRule * getTo(void) const
Returns the rule used after the transition.
icu::TimeZoneTransition::getTime
UDate getTime(void) const
Returns the time of transition in milliseconds.
icu::TimeZoneTransition::~TimeZoneTransition
~TimeZoneTransition()
Destructor.
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::clone
TimeZoneTransition * clone(void) const
Clone this TimeZoneTransition object polymorphically.
icu::TimeZoneTransition::operator==
UBool operator==(const TimeZoneTransition &that) const
Return true if the given TimeZoneTransition objects are semantically equal.
icu::TimeZoneTransition::TimeZoneTransition
TimeZoneTransition()
Constructs an empty TimeZoneTransition
icu::TimeZoneTransition::getDynamicClassID
virtual UClassID getDynamicClassID(void) const
Returns a unique class ID POLYMORPHICALLY.
icu::TimeZoneTransition
TimeZoneTransition is a class representing a time zone transition.
Definition: tztrans.h:33
icu::TimeZoneTransition::setTo
void setTo(const TimeZoneRule &to)
Sets the rule used after the transition.
icu::TimeZoneTransition::getStaticClassID
static UClassID getStaticClassID(void)
Return the class ID for this class.
UDate
double UDate
Date and Time data type.
Definition: utypes.h:203
icu::TimeZoneTransition::adoptTo
void adoptTo(TimeZoneRule *to)
Adopts the rule used after the transition.
uobject.h
C++ API: Common ICU base class UObject.
U_NAMESPACE_END
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
Definition: uversion.h:138
U_NAMESPACE_BEGIN
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
Definition: uversion.h:137