X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/729e4ab9bc6618bc3d8a898e575df7f4019e29ca..4388f060552cc537e71e957d32f35e9d75a61233:/icuSources/i18n/olsontz.h diff --git a/icuSources/i18n/olsontz.h b/icuSources/i18n/olsontz.h index d997e266..05e89b25 100644 --- a/icuSources/i18n/olsontz.h +++ b/icuSources/i18n/olsontz.h @@ -1,6 +1,6 @@ /* ********************************************************************** -* Copyright (c) 2003-2010, International Business Machines +* Copyright (c) 2003-2011, International Business Machines * Corporation and others. All Rights Reserved. ********************************************************************** * Author: Alan Liu @@ -117,10 +117,13 @@ class U_I18N_API OlsonTimeZone: public BasicTimeZone { * @param top the top-level zoneinfo resource bundle. This is used * to lookup the rule that `res' may refer to, if there is one. * @param res the resource bundle of the zone to be constructed + * @param tzid the time zone ID * @param ec input-output error code */ OlsonTimeZone(const UResourceBundle* top, - const UResourceBundle* res, UErrorCode& ec); + const UResourceBundle* res, + const UnicodeString& tzid, + UErrorCode& ec); /** * Copy constructor @@ -266,11 +269,16 @@ class U_I18N_API OlsonTimeZone: public BasicTimeZone { * the timezone transition rules. On output, actual number of * rules filled in the array will be set. * @param status Receives error status code. - * @draft ICU 3.8 */ virtual void getTimeZoneRules(const InitialTimeZoneRule*& initial, const TimeZoneRule* trsrules[], int32_t& trscount, UErrorCode& status) /*const*/; + /** + * Internal API returning the canonical ID of this zone. + * This ID won't be affected by setID(). + */ + const UChar *getCanonicalID() const; + private: /** * Default constructor. Creates a time zone with an empty ID and @@ -366,6 +374,11 @@ private: */ int32_t finalStartYear; + /* + * Canonical (CLDR) ID of this zone + */ + const UChar *canonicalID; + /* BasicTimeZone support */ void clearTransitionRules(void); void deleteTransitionRules(void); @@ -419,6 +432,12 @@ OlsonTimeZone::initialDstOffset() const { return typeOffsets[1]; } +inline const UChar* +OlsonTimeZone::getCanonicalID() const { + return canonicalID; +} + + U_NAMESPACE_END #endif // !UCONFIG_NO_FORMATTING