ICU 56.1: basictz.h Source File

ICU 56.1 56.1

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

- File List
- Globals

basictz.h
Go to the documentation of this file.
1 /*
2 *******************************************************************************
3 * Copyright (C) 2007-2013, International Business Machines Corporation and
4 * others. All Rights Reserved.
5 *******************************************************************************
6 */
7 #ifndef BASICTZ_H
8 #define BASICTZ_H
9
15 #include "unicode/utypes.h"
16
17 #if !UCONFIG_NO_FORMATTING
18
19 #include "unicode/timezone.h"
20 #include "unicode/tzrule.h"
21 #include "unicode/tztrans.h"
22
23 U_NAMESPACE_BEGIN
24
25 // forward declarations
26 class UVector;
27
34 class U_I18N_API BasicTimeZone: public TimeZone {
35 public:
40 virtual ~BasicTimeZone();
41
50 virtual UBool getNextTransition(UDate base, UBool inclusive, TimeZoneTransition& result) const = 0;
51
60 virtual UBool getPreviousTransition(UDate base, UBool inclusive, TimeZoneTransition& result) const = 0;
61
82 virtual UBool hasEquivalentTransitions(const BasicTimeZone& tz, UDate start, UDate end,
83 UBool ignoreDstAmount, UErrorCode& ec) const;
84
93 virtual int32_t countTransitionRules(UErrorCode& status) const = 0;
94
111 virtual void getTimeZoneRules(const InitialTimeZoneRule*& initial,
112 const TimeZoneRule* trsrules[], int32_t& trscount, UErrorCode& status) const = 0;
113
140 virtual void getSimpleRulesNear(UDate date, InitialTimeZoneRule*& initial,
141 AnnualTimeZoneRule*& std, AnnualTimeZoneRule*& dst, UErrorCode& status) const;
142
143
144 #ifndef U_HIDE_INTERNAL_API
145
149 enum {
150 kStandard = 0x01,
151 kDaylight = 0x03,
152 kFormer = 0x04,
153 kLatter = 0x0C
154 };
155 #endif /* U_HIDE_INTERNAL_API */
156
161 virtual void getOffsetFromLocal(UDate date, int32_t nonExistingTimeOpt, int32_t duplicatedTimeOpt,
162 int32_t& rawOffset, int32_t& dstOffset, UErrorCode& status) const;
163
164 protected:
165
166 #ifndef U_HIDE_INTERNAL_API
167
171 enum {
172 kStdDstMask = kDaylight,
173 kFormerLatterMask = kLatter
174 };
175 #endif /* U_HIDE_INTERNAL_API */
176
181 BasicTimeZone();
182
188 BasicTimeZone(const UnicodeString &id);
189
195 BasicTimeZone(const BasicTimeZone& source);
196
204 void getTimeZoneRulesAfter(UDate start, InitialTimeZoneRule*& initial, UVector*& transitionRules,
205 UErrorCode& status) const;
206 };
207
208 U_NAMESPACE_END
209
210 #endif /* #if !UCONFIG_NO_FORMATTING */
211
212 #endif // BASICTZ_H
213
214 //eof
timezone.h
C++ API: TimeZone object.
UDate
double UDate
Date and Time data type.
Definition: utypes.h:201
std
Definition: std_string.h:31
icu::TimeZone
TimeZone represents a time zone offset, and also figures out daylight savings.
Definition: timezone.h:129
tztrans.h
C++ API: Time zone transition.
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:358
icu::TimeZoneRule
TimeZoneRule is a class representing a rule for time zone.
Definition: tzrule.h:32
icu::InitialTimeZoneRule
InitialTimeZoneRule represents a time zone rule representing a time zone effective from the beginning...
Definition: tzrule.h:198
U_NAMESPACE_BEGIN
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
Definition: uversion.h:129
icu::TimeZoneTransition
TimeZoneTransition is a class representing a time zone transition.
Definition: tztrans.h:31
tzrule.h
C++ API: Time zone rule classes.
icu::BasicTimeZone
BasicTimeZone is an abstract class extending TimeZone.
Definition: basictz.h:34
icu::AnnualTimeZoneRule
AnnualTimeZoneRule is a class used for representing a time zone rule which takes effect annually...
Definition: tzrule.h:376
U_NAMESPACE_END
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
Definition: uversion.h:130
UErrorCode
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers...
Definition: utypes.h:476
utypes.h
Basic definitions for ICU, for both C and C++ APIs.
icu::UnicodeString
UnicodeString is a string class that stores Unicode characters directly and provides similar function...
Definition: unistr.h:293
UBool
int8_t UBool
The ICU boolean type.
Definition: umachine.h:234