X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/46f4442e9a5a4f3b98b7c1083586332f6a8a99a4..340931cb2e044a2141d11567dd0f782524e32994:/icuSources/i18n/unicode/basictz.h
diff --git a/icuSources/i18n/unicode/basictz.h b/icuSources/i18n/unicode/basictz.h
index c616a3e9..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"
@@ -29,25 +33,33 @@ class UVector;
* BasicTimeZone
is an abstract class extending TimeZone
.
* This class provides some additional methods to access time zone transitions and rules.
* All ICU TimeZone
concrete subclasses extend this class.
- * @stable ICU 4.0
+ * @stable ICU 3.8
*/
class U_I18N_API BasicTimeZone: public TimeZone {
public:
/**
* Destructor.
- * @stable ICU 4.0
+ * @stable ICU 3.8
*/
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.
* @param inclusive Whether the base time is inclusive or not.
* @param result Receives the first transition after the base time.
* @return TRUE if the transition is found.
- * @stable ICU 4.0
+ * @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.
@@ -55,9 +67,9 @@ public:
* @param inclusive Whether the base time is inclusive or not.
* @param result Receives the most recent transition before the base time.
* @return TRUE if the transition is found.
- * @stable ICU 4.0
+ * @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.
@@ -77,10 +89,10 @@ public:
* @param ec Output param to filled in with a success or an error.
* @return true if the other time zone has the equivalent transitions in the
* time range.
- * @stable ICU 4.0
+ * @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 TimeZoneRule
s which represents time transitions,
@@ -88,9 +100,9 @@ public:
* InitialTimeZoneRule
. The return value range is 0 or any positive value.
* @param status Receives error status code.
* @return The number of TimeZoneRule
s representing time transitions.
- * @stable ICU 4.0
+ * @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
@@ -106,10 +118,10 @@ public:
* the timezone transition rules. On output, actual number of
* rules filled in the array will be set.
* @param status Receives error status code.
- * @stable ICU 4.0
+ * @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
@@ -135,12 +147,13 @@ public:
* transitions. When this time zone does not observer daylight saving times
* around the specified date, NULL is set.
* @param status Receives error status code.
- * @stable ICU 4.0
+ * @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,24 +184,25 @@ protected:
kStdDstMask = kDaylight,
kFormerLatterMask = kLatter
};
+#endif /* U_HIDE_INTERNAL_API */
/**
* Default constructor.
- * @stable ICU 4.0
+ * @stable ICU 3.8
*/
BasicTimeZone();
/**
* Construct a timezone with a given ID.
* @param id a system time zone ID
- * @stable ICU 4.0
+ * @stable ICU 3.8
*/
BasicTimeZone(const UnicodeString &id);
/**
* Copy constructor.
* @param source the object to be copied.
- * @stable ICU 4.0
+ * @stable ICU 3.8
*/
BasicTimeZone(const BasicTimeZone& source);
@@ -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