ICU 57.1 57.1
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
24
25// forward declarations
26class UVector;
27
35public:
40 virtual ~BasicTimeZone();
41
51
61
84
93 virtual int32_t countTransitionRules(UErrorCode& status) const = 0;
94
112 const TimeZoneRule* trsrules[], int32_t& trscount, UErrorCode& status) const = 0;
113
142
143
144#ifndef U_HIDE_INTERNAL_API
149 enum {
150 kStandard = 0x01,
151 kDaylight = 0x03,
152 kFormer = 0x04,
153 kLatter = 0x0C
154 };
155#endif /* U_HIDE_INTERNAL_API */
156
162 int32_t& rawOffset, int32_t& dstOffset, UErrorCode& status) const;
163
164protected:
165
166#ifndef U_HIDE_INTERNAL_API
171 enum {
172 kStdDstMask = kDaylight,
173 kFormerLatterMask = kLatter
174 };
175#endif /* U_HIDE_INTERNAL_API */
176
182
189
196
205 UErrorCode& status) const;
206};
207
209
210#endif /* #if !UCONFIG_NO_FORMATTING */
211
212#endif // BASICTZ_H
213
214//eof
AnnualTimeZoneRule is a class used for representing a time zone rule which takes effect annually.
Definition tzrule.h:376
BasicTimeZone is an abstract class extending TimeZone.
Definition basictz.h:34
virtual ~BasicTimeZone()
Destructor.
BasicTimeZone(const BasicTimeZone &source)
Copy constructor.
virtual UBool getNextTransition(UDate base, UBool inclusive, TimeZoneTransition &result) const =0
Gets the first time zone transition after the base time.
BasicTimeZone()
Default constructor.
virtual void getOffsetFromLocal(UDate date, int32_t nonExistingTimeOpt, int32_t duplicatedTimeOpt, int32_t &rawOffset, int32_t &dstOffset, UErrorCode &status) const
Get time zone offsets from local wall time.
void getTimeZoneRulesAfter(UDate start, InitialTimeZoneRule *&initial, UVector *&transitionRules, UErrorCode &status) const
Gets the set of TimeZoneRule instances applicable to the specified time and after.
virtual int32_t countTransitionRules(UErrorCode &status) const =0
Returns the number of TimeZoneRules which represents time transitions, for this time zone,...
BasicTimeZone(const UnicodeString &id)
Construct a timezone with a given ID.
virtual void getSimpleRulesNear(UDate date, InitialTimeZoneRule *&initial, AnnualTimeZoneRule *&std, AnnualTimeZoneRule *&dst, UErrorCode &status) const
Gets the set of time zone rules valid at the specified time.
virtual UBool hasEquivalentTransitions(const BasicTimeZone &tz, UDate start, UDate end, UBool ignoreDstAmount, UErrorCode &ec) const
Checks if the time zone has equivalent transitions in the time range.
virtual UBool getPreviousTransition(UDate base, UBool inclusive, TimeZoneTransition &result) const =0
Gets the most recent time zone transition before the base time.
virtual void getTimeZoneRules(const InitialTimeZoneRule *&initial, const TimeZoneRule *trsrules[], int32_t &trscount, UErrorCode &status) const =0
Gets the InitialTimeZoneRule and the set of TimeZoneRule which represent time transitions for this ti...
InitialTimeZoneRule represents a time zone rule representing a time zone effective from the beginning...
Definition tzrule.h:198
"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
TimeZone represents a time zone offset, and also figures out daylight savings.
Definition timezone.h:129
UnicodeString is a string class that stores Unicode characters directly and provides similar function...
Definition unistr.h:294
C++ API: TimeZone object.
C++ API: Time zone rule classes.
C++ API: Time zone transition.
int8_t UBool
The ICU boolean type.
Definition umachine.h:234
Basic definitions for ICU, for both C and C++ APIs.
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers,...
Definition utypes.h:476
#define U_I18N_API
Set to export library symbols from inside the i18n library, and to import them from outside.
Definition utypes.h:358
double UDate
Date and Time data type.
Definition utypes.h:201
#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