ICU 55.1 55.1

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

- File List
- Globals

All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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