ICU 57.1 57.1
tztrans.h
Go to the documentation of this file.
1/*
2*******************************************************************************
3* Copyright (C) 2007-2008, International Business Machines Corporation and *
4* others. All Rights Reserved. *
5*******************************************************************************
6*/
7#ifndef TZTRANS_H
8#define TZTRANS_H
9
15#include "unicode/utypes.h"
16
17#if !UCONFIG_NO_FORMATTING
18
19#include "unicode/uobject.h"
20
22
23// Forward declaration
24class TimeZoneRule;
25
32public:
43
49
56
62
70
77
86
95
101 UDate getTime(void) const;
102
109
115 const TimeZoneRule* getFrom(void) const;
116
124
132
139 void setTo(const TimeZoneRule& to);
140
148
154 const TimeZoneRule* getTo(void) const;
155
156private:
157 UDate fTime;
158 TimeZoneRule* fFrom;
159 TimeZoneRule* fTo;
160
161public:
174
186 virtual UClassID getDynamicClassID(void) const;
187};
188
190
191#endif /* #if !UCONFIG_NO_FORMATTING */
192
193#endif // TZTRANS_H
194
195//eof
"Smart pointer" base class; do not use directly: use LocalPointer etc.
TimeZoneRule is a class representing a rule for time zone.
Definition tzrule.h:32
TimeZoneTransition is a class representing a time zone transition.
Definition tztrans.h:31
static UClassID getStaticClassID(void)
Return the class ID for this class.
const TimeZoneRule * getFrom(void) const
Returns the rule used before the transition.
TimeZoneTransition & operator=(const TimeZoneTransition &right)
Assignment operator.
void adoptFrom(TimeZoneRule *from)
Adopts the rule used before the transition.
void setFrom(const TimeZoneRule &from)
Sets the rule used before the transition.
TimeZoneTransition * clone(void) const
Clone this TimeZoneTransition object polymorphically.
virtual UClassID getDynamicClassID(void) const
Returns a unique class ID POLYMORPHICALLY.
void adoptTo(TimeZoneRule *to)
Adopts the rule used after the transition.
const TimeZoneRule * getTo(void) const
Returns the rule used after the transition.
UBool operator==(const TimeZoneTransition &that) const
Return true if the given TimeZoneTransition objects are semantically equal.
UBool operator!=(const TimeZoneTransition &that) const
Return true if the given TimeZoneTransition objects are semantically unequal.
void setTo(const TimeZoneRule &to)
Sets the rule used after the transition.
void setTime(UDate time)
Sets the time of transition in milliseconds.
TimeZoneTransition(const TimeZoneTransition &source)
Copy constructor.
TimeZoneTransition(UDate time, const TimeZoneRule &from, const TimeZoneRule &to)
Constructs a TimeZoneTransition with the time and the rules before/after the transition.
UDate getTime(void) const
Returns the time of transition in milliseconds.
TimeZoneTransition()
Constructs an empty TimeZoneTransition
~TimeZoneTransition()
Destructor.
UObject is the common ICU "boilerplate" class.
Definition uobject.h:221
C++ API: Common ICU base class UObject.
Basic definitions for ICU, for both C and C++ APIs.
#define U_I18N_API
Set to export library symbols from inside the i18n library, and to import them from outside.
Definition utypes.h:358
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
Definition uversion.h:130
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
Definition uversion.h:129