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

- File List
- Globals

# basictz.h

Go to the documentation of this file.

    00001 /*
    00002 *******************************************************************************
    00003 * Copyright (C) 2007-2008, International Business Machines Corporation and         *
    00004 * others. All Rights Reserved.                                                *
    00005 *******************************************************************************
    00006 */
    00007 #ifndef BASICTZ_H
    00008 #define BASICTZ_H
    00009
    00015 #include "unicode/utypes.h"
    00016
    00017 #if !UCONFIG_NO_FORMATTING
    00018
    00019 #include "unicode/timezone.h"
    00020 #include "unicode/tzrule.h"
    00021 #include "unicode/tztrans.h"
    00022
    00023 U_NAMESPACE_BEGIN
    00024
    00025 // forward declarations
    00026 class UVector;
    00027
    00034 class U_I18N_API BasicTimeZone: public TimeZone {
    00035 public:
    00040     virtual ~BasicTimeZone();
    00041
    00050     virtual UBool getNextTransition(UDate base, UBool inclusive, TimeZoneTransition& result) /*const*/ = 0;
    00051
    00060     virtual UBool getPreviousTransition(UDate base, UBool inclusive, TimeZoneTransition& result) /*const*/ = 0;
    00061
    00082     virtual UBool hasEquivalentTransitions(/*const*/ BasicTimeZone& tz, UDate start, UDate end,
    00083         UBool ignoreDstAmount, UErrorCode& ec) /*const*/;
    00084
    00093     virtual int32_t countTransitionRules(UErrorCode& status) /*const*/ = 0;
    00094
    00111     virtual void getTimeZoneRules(const InitialTimeZoneRule*& initial,
    00112         const TimeZoneRule* trsrules[], int32_t& trscount, UErrorCode& status) /*const*/ = 0;
    00113
    00140     virtual void getSimpleRulesNear(UDate date, InitialTimeZoneRule*& initial,
    00141         AnnualTimeZoneRule*& std, AnnualTimeZoneRule*& dst, UErrorCode& status) /*const*/;
    00142
    00143
    00148     enum {
    00149         kStandard = 0x01,
    00150         kDaylight = 0x03,
    00151         kFormer = 0x04,
    00152         kLatter = 0x0C
    00153     };
    00154
    00159     virtual void getOffsetFromLocal(UDate date, int32_t nonExistingTimeOpt, int32_t duplicatedTimeOpt,
    00160         int32_t& rawOffset, int32_t& dstOffset, UErrorCode& status) /*const*/;
    00161
    00162 protected:
    00163
    00168     enum {
    00169         kStdDstMask = kDaylight,
    00170         kFormerLatterMask = kLatter
    00171     };
    00172
    00177     BasicTimeZone();
    00178
    00184     BasicTimeZone(const UnicodeString &id);
    00185
    00191     BasicTimeZone(const BasicTimeZone& source);
    00192
    00200     void getTimeZoneRulesAfter(UDate start, InitialTimeZoneRule*& initial, UVector*& transitionRules,
    00201         UErrorCode& status) /*const*/;
    00202 };
    00203
    00204 U_NAMESPACE_END
    00205
    00206 #endif /* #if !UCONFIG_NO_FORMATTING */
    00207
    00208 #endif // BASICTZ_H
    00209
    00210 //eof

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines