/*
*******************************************************************************
-* 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
* <code>BasicTimeZone</code> is an abstract class extending <code>TimeZone</code>.
* This class provides some additional methods to access time zone transitions and rules.
* All ICU <code>TimeZone</code> 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();
* @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.
* @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.
* @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 <code>TimeZoneRule</code>s which represents time transitions,
* <code>InitialTimeZoneRule</code>. The return value range is 0 or any positive value.
* @param status Receives error status code.
* @return The number of <code>TimeZoneRule</code>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 <code>InitialTimeZoneRule</code> and the set of <code>TimeZoneRule</code>
* 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
* 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
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
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);
* @param status Receives error status code
*/
void getTimeZoneRulesAfter(UDate start, InitialTimeZoneRule*& initial, UVector*& transitionRules,
- UErrorCode& status) /*const*/;
+ UErrorCode& status) const;
};
U_NAMESPACE_END