| OLD | NEW |
| 1 /* | 1 /* |
| 2 ******************************************************************************* | 2 ******************************************************************************* |
| 3 * Copyright (C) 2011-2013, International Business Machines Corporation and * | 3 * Copyright (C) 2011-2014, International Business Machines Corporation and |
| 4 * others. All Rights Reserved. * | 4 * others. All Rights Reserved. |
| 5 ******************************************************************************* | 5 ******************************************************************************* |
| 6 */ | 6 */ |
| 7 #ifndef __TZNAMES_H | 7 #ifndef __TZNAMES_H |
| 8 #define __TZNAMES_H | 8 #define __TZNAMES_H |
| 9 | 9 |
| 10 /** | 10 /** |
| 11 * \file | 11 * \file |
| 12 * \brief C++ API: TimeZoneNames | 12 * \brief C++ API: TimeZoneNames |
| 13 */ | 13 */ |
| 14 #include "unicode/utypes.h" | 14 #include "unicode/utypes.h" |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 /** | 53 /** |
| 54 * Short display name for standard time, such as "EST". | 54 * Short display name for standard time, such as "EST". |
| 55 * @stable ICU 50 | 55 * @stable ICU 50 |
| 56 */ | 56 */ |
| 57 UTZNM_SHORT_STANDARD = 0x10, | 57 UTZNM_SHORT_STANDARD = 0x10, |
| 58 /** | 58 /** |
| 59 * Short display name for daylight saving time, such as "EDT". | 59 * Short display name for daylight saving time, such as "EDT". |
| 60 * @stable ICU 50 | 60 * @stable ICU 50 |
| 61 */ | 61 */ |
| 62 UTZNM_SHORT_DAYLIGHT = 0x20, | 62 UTZNM_SHORT_DAYLIGHT = 0x20, |
| 63 #ifndef U_HIDE_DRAFT_API | |
| 64 /** | 63 /** |
| 65 * Exemplar location name, such as "Los Angeles". | 64 * Exemplar location name, such as "Los Angeles". |
| 66 * @draft ICU 51 | 65 * @stable ICU 51 |
| 67 */ | 66 */ |
| 68 UTZNM_EXEMPLAR_LOCATION = 0x40 | 67 UTZNM_EXEMPLAR_LOCATION = 0x40 |
| 69 #endif /* U_HIDE_DRAFT_API */ | |
| 70 } UTimeZoneNameType; | 68 } UTimeZoneNameType; |
| 71 | 69 |
| 72 U_CDECL_END | 70 U_CDECL_END |
| 73 | 71 |
| 74 U_NAMESPACE_BEGIN | 72 U_NAMESPACE_BEGIN |
| 75 | 73 |
| 76 class UVector; | 74 class UVector; |
| 77 struct MatchInfo; | 75 struct MatchInfo; |
| 78 | 76 |
| 79 /** | 77 /** |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 | 151 |
| 154 /** | 152 /** |
| 155 * Clone this object polymorphically. The caller is responsible | 153 * Clone this object polymorphically. The caller is responsible |
| 156 * for deleting the result when done. | 154 * for deleting the result when done. |
| 157 * @return A copy of the object | 155 * @return A copy of the object |
| 158 * @stable ICU 50 | 156 * @stable ICU 50 |
| 159 */ | 157 */ |
| 160 virtual TimeZoneNames* clone() const = 0; | 158 virtual TimeZoneNames* clone() const = 0; |
| 161 | 159 |
| 162 /** | 160 /** |
| 163 * Returns an instance of <code>TimeZoneDisplayNames</code> for the specifie
d locale. | 161 * Returns an instance of <code>TimeZoneNames</code> for the specified local
e. |
| 164 * | 162 * |
| 165 * @param locale The locale. | 163 * @param locale The locale. |
| 166 * @param status Recevies the status. | 164 * @param status Receives the status. |
| 167 * @return An instance of <code>TimeZoneDisplayNames</code> | 165 * @return An instance of <code>TimeZoneNames</code> |
| 168 * @stable ICU 50 | 166 * @stable ICU 50 |
| 169 */ | 167 */ |
| 170 static TimeZoneNames* U_EXPORT2 createInstance(const Locale& locale, UErrorC
ode& status); | 168 static TimeZoneNames* U_EXPORT2 createInstance(const Locale& locale, UErrorC
ode& status); |
| 171 | 169 |
| 170 #ifndef U_HIDE_DRAFT_API |
| 171 /** |
| 172 * Returns an instance of <code>TimeZoneNames</code> containing only short s
pecific |
| 173 * zone names (SHORT_STANDARD and SHORT_DAYLIGHT), |
| 174 * compatible with the IANA tz database's zone abbreviations (not localized)
. |
| 175 * <br> |
| 176 * Note: The input locale is used for resolving ambiguous names (e.g. "IST"
is parsed |
| 177 * as Israel Standard Time for Israel, while it is parsed as India Standard
Time for |
| 178 * all other regions). The zone names returned by this instance are not loca
lized. |
| 179 * @draft ICU 54 |
| 180 */ |
| 181 static TimeZoneNames* U_EXPORT2 createTZDBInstance(const Locale& locale, UE
rrorCode& status); |
| 182 #endif /* U_HIDE_DRAFT_API */ |
| 183 |
| 172 /** | 184 /** |
| 173 * Returns an enumeration of all available meta zone IDs. | 185 * Returns an enumeration of all available meta zone IDs. |
| 174 * @param status Recevies the status. | 186 * @param status Receives the status. |
| 175 * @return an enumeration object, owned by the caller. | 187 * @return an enumeration object, owned by the caller. |
| 176 * @stable ICU 50 | 188 * @stable ICU 50 |
| 177 */ | 189 */ |
| 178 virtual StringEnumeration* getAvailableMetaZoneIDs(UErrorCode& status) const
= 0; | 190 virtual StringEnumeration* getAvailableMetaZoneIDs(UErrorCode& status) const
= 0; |
| 179 | 191 |
| 180 /** | 192 /** |
| 181 * Returns an enumeration of all available meta zone IDs used by the given t
ime zone. | 193 * Returns an enumeration of all available meta zone IDs used by the given t
ime zone. |
| 182 * @param tzID The canoical tiem zone ID. | 194 * @param tzID The canoical tiem zone ID. |
| 183 * @param status Recevies the status. | 195 * @param status Receives the status. |
| 184 * @return an enumeration object, owned by the caller. | 196 * @return an enumeration object, owned by the caller. |
| 185 * @stable ICU 50 | 197 * @stable ICU 50 |
| 186 */ | 198 */ |
| 187 virtual StringEnumeration* getAvailableMetaZoneIDs(const UnicodeString& tzID
, UErrorCode& status) const = 0; | 199 virtual StringEnumeration* getAvailableMetaZoneIDs(const UnicodeString& tzID
, UErrorCode& status) const = 0; |
| 188 | 200 |
| 189 /** | 201 /** |
| 190 * Returns the meta zone ID for the given canonical time zone ID at the give
n date. | 202 * Returns the meta zone ID for the given canonical time zone ID at the give
n date. |
| 191 * @param tzID The canonical time zone ID. | 203 * @param tzID The canonical time zone ID. |
| 192 * @param date The date. | 204 * @param date The date. |
| 193 * @param mzID Receives the meta zone ID for the given time zone ID at the g
iven date. If the time zone does not have a | 205 * @param mzID Receives the meta zone ID for the given time zone ID at the g
iven date. If the time zone does not have a |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 * @see MatchInfoCollection | 395 * @see MatchInfoCollection |
| 384 * @internal | 396 * @internal |
| 385 */ | 397 */ |
| 386 virtual MatchInfoCollection* find(const UnicodeString& text, int32_t start,
uint32_t types, UErrorCode& status) const = 0; | 398 virtual MatchInfoCollection* find(const UnicodeString& text, int32_t start,
uint32_t types, UErrorCode& status) const = 0; |
| 387 }; | 399 }; |
| 388 | 400 |
| 389 U_NAMESPACE_END | 401 U_NAMESPACE_END |
| 390 | 402 |
| 391 #endif | 403 #endif |
| 392 #endif | 404 #endif |
| OLD | NEW |