Wed, 31 Dec 2014 07:22:50 +0100
Correct previous dual key logic pending first delivery installment.
michael@0 | 1 | /* |
michael@0 | 2 | ******************************************************************************* |
michael@0 | 3 | * Copyright (C) 2011-2012, International Business Machines Corporation and * |
michael@0 | 4 | * others. All Rights Reserved. * |
michael@0 | 5 | ******************************************************************************* |
michael@0 | 6 | */ |
michael@0 | 7 | #ifndef __TZGNAMES_H |
michael@0 | 8 | #define __TZGNAMES_H |
michael@0 | 9 | |
michael@0 | 10 | /** |
michael@0 | 11 | * \file |
michael@0 | 12 | * \brief C API: Time zone generic names classe |
michael@0 | 13 | */ |
michael@0 | 14 | |
michael@0 | 15 | #include "unicode/utypes.h" |
michael@0 | 16 | |
michael@0 | 17 | #if !UCONFIG_NO_FORMATTING |
michael@0 | 18 | |
michael@0 | 19 | #include "unicode/locid.h" |
michael@0 | 20 | #include "unicode/unistr.h" |
michael@0 | 21 | #include "unicode/tzfmt.h" |
michael@0 | 22 | #include "unicode/tznames.h" |
michael@0 | 23 | |
michael@0 | 24 | U_CDECL_BEGIN |
michael@0 | 25 | |
michael@0 | 26 | typedef enum UTimeZoneGenericNameType { |
michael@0 | 27 | UTZGNM_UNKNOWN = 0x00, |
michael@0 | 28 | UTZGNM_LOCATION = 0x01, |
michael@0 | 29 | UTZGNM_LONG = 0x02, |
michael@0 | 30 | UTZGNM_SHORT = 0x04 |
michael@0 | 31 | } UTimeZoneGenericNameType; |
michael@0 | 32 | |
michael@0 | 33 | U_CDECL_END |
michael@0 | 34 | |
michael@0 | 35 | U_NAMESPACE_BEGIN |
michael@0 | 36 | |
michael@0 | 37 | class TimeZone; |
michael@0 | 38 | struct TZGNCoreRef; |
michael@0 | 39 | |
michael@0 | 40 | class U_I18N_API TimeZoneGenericNames : public UMemory { |
michael@0 | 41 | public: |
michael@0 | 42 | virtual ~TimeZoneGenericNames(); |
michael@0 | 43 | |
michael@0 | 44 | static TimeZoneGenericNames* createInstance(const Locale& locale, UErrorCode& status); |
michael@0 | 45 | |
michael@0 | 46 | virtual UBool operator==(const TimeZoneGenericNames& other) const; |
michael@0 | 47 | virtual UBool operator!=(const TimeZoneGenericNames& other) const {return !operator==(other);}; |
michael@0 | 48 | virtual TimeZoneGenericNames* clone() const; |
michael@0 | 49 | |
michael@0 | 50 | UnicodeString& getDisplayName(const TimeZone& tz, UTimeZoneGenericNameType type, |
michael@0 | 51 | UDate date, UnicodeString& name) const; |
michael@0 | 52 | |
michael@0 | 53 | UnicodeString& getGenericLocationName(const UnicodeString& tzCanonicalID, UnicodeString& name) const; |
michael@0 | 54 | |
michael@0 | 55 | int32_t findBestMatch(const UnicodeString& text, int32_t start, uint32_t types, |
michael@0 | 56 | UnicodeString& tzID, UTimeZoneFormatTimeType& timeType, UErrorCode& status) const; |
michael@0 | 57 | |
michael@0 | 58 | private: |
michael@0 | 59 | TimeZoneGenericNames(); |
michael@0 | 60 | TZGNCoreRef* fRef; |
michael@0 | 61 | }; |
michael@0 | 62 | |
michael@0 | 63 | U_NAMESPACE_END |
michael@0 | 64 | #endif |
michael@0 | 65 | #endif |