X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/729e4ab9bc6618bc3d8a898e575df7f4019e29ca..340931cb2e044a2141d11567dd0f782524e32994:/icuSources/i18n/unicode/basictz.h diff --git a/icuSources/i18n/unicode/basictz.h b/icuSources/i18n/unicode/basictz.h index f3d34a66..c4d08768 100644 --- a/icuSources/i18n/unicode/basictz.h +++ b/icuSources/i18n/unicode/basictz.h @@ -1,7 +1,9 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html /* ******************************************************************************* -* Copyright (C) 2007-2008, International Business Machines Corporation and * -* others. All Rights Reserved. * +* Copyright (C) 2007-2013, International Business Machines Corporation and +* others. All Rights Reserved. ******************************************************************************* */ #ifndef BASICTZ_H @@ -14,6 +16,8 @@ #include "unicode/utypes.h" +#if U_SHOW_CPLUSPLUS_API + #if !UCONFIG_NO_FORMATTING #include "unicode/timezone.h" @@ -39,6 +43,14 @@ public: */ virtual ~BasicTimeZone(); + /** + * Clones this object polymorphically. + * The caller owns the result and should delete it when done. + * @return clone, or nullptr if an error occurred + * @stable ICU 3.8 + */ + virtual BasicTimeZone* clone() const = 0; + /** * Gets the first time zone transition after the base time. * @param base The base time. @@ -47,7 +59,7 @@ public: * @return TRUE if the transition is found. * @stable ICU 3.8 */ - virtual UBool getNextTransition(UDate base, UBool inclusive, TimeZoneTransition& result) /*const*/ = 0; + virtual UBool getNextTransition(UDate base, UBool inclusive, TimeZoneTransition& result) const = 0; /** * Gets the most recent time zone transition before the base time. @@ -57,7 +69,7 @@ public: * @return TRUE if the transition is found. * @stable ICU 3.8 */ - virtual UBool getPreviousTransition(UDate base, UBool inclusive, TimeZoneTransition& result) /*const*/ = 0; + virtual UBool getPreviousTransition(UDate base, UBool inclusive, TimeZoneTransition& result) const = 0; /** * Checks if the time zone has equivalent transitions in the time range. @@ -79,8 +91,8 @@ public: * time range. * @stable ICU 3.8 */ - virtual UBool hasEquivalentTransitions(/*const*/ BasicTimeZone& tz, UDate start, UDate end, - UBool ignoreDstAmount, UErrorCode& ec) /*const*/; + virtual UBool hasEquivalentTransitions(const BasicTimeZone& tz, UDate start, UDate end, + UBool ignoreDstAmount, UErrorCode& ec) const; /** * Returns the number of TimeZoneRules which represents time transitions, @@ -90,7 +102,7 @@ public: * @return The number of TimeZoneRules representing time transitions. * @stable ICU 3.8 */ - virtual int32_t countTransitionRules(UErrorCode& status) /*const*/ = 0; + virtual int32_t countTransitionRules(UErrorCode& status) const = 0; /** * Gets the InitialTimeZoneRule and the set of TimeZoneRule @@ -109,7 +121,7 @@ public: * @stable ICU 3.8 */ virtual void getTimeZoneRules(const InitialTimeZoneRule*& initial, - const TimeZoneRule* trsrules[], int32_t& trscount, UErrorCode& status) /*const*/ = 0; + const TimeZoneRule* trsrules[], int32_t& trscount, UErrorCode& status) const = 0; /** * Gets the set of time zone rules valid at the specified time. Some known external time zone @@ -138,9 +150,10 @@ public: * @stable ICU 3.8 */ virtual void getSimpleRulesNear(UDate date, InitialTimeZoneRule*& initial, - AnnualTimeZoneRule*& std, AnnualTimeZoneRule*& dst, UErrorCode& status) /*const*/; + AnnualTimeZoneRule*& std, AnnualTimeZoneRule*& dst, UErrorCode& status) const; +#ifndef U_HIDE_INTERNAL_API /** * The time type option bit flags used by getOffsetFromLocal * @internal @@ -151,16 +164,18 @@ public: kFormer = 0x04, kLatter = 0x0C }; +#endif /* U_HIDE_INTERNAL_API */ /** * Get time zone offsets from local wall time. * @internal */ virtual void getOffsetFromLocal(UDate date, int32_t nonExistingTimeOpt, int32_t duplicatedTimeOpt, - int32_t& rawOffset, int32_t& dstOffset, UErrorCode& status) /*const*/; + int32_t& rawOffset, int32_t& dstOffset, UErrorCode& status) const; protected: +#ifndef U_HIDE_INTERNAL_API /** * The time type option bit masks used by getOffsetFromLocal * @internal @@ -169,6 +184,7 @@ protected: kStdDstMask = kDaylight, kFormerLatterMask = kLatter }; +#endif /* U_HIDE_INTERNAL_API */ /** * Default constructor. @@ -198,13 +214,15 @@ protected: * @param status Receives error status code */ void getTimeZoneRulesAfter(UDate start, InitialTimeZoneRule*& initial, UVector*& transitionRules, - UErrorCode& status) /*const*/; + UErrorCode& status) const; }; U_NAMESPACE_END #endif /* #if !UCONFIG_NO_FORMATTING */ +#endif /* U_SHOW_CPLUSPLUS_API */ + #endif // BASICTZ_H //eof