+// © 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 *
+* Copyright (C) 2007-2013, International Business Machines Corporation and *
* others. All Rights Reserved. *
*******************************************************************************
*/
#include "unicode/basictz.h"
#include "unicode/unistr.h"
+#if U_SHOW_CPLUSPLUS_API
U_NAMESPACE_BEGIN
// forward declaration
* delete it.
* @param id The time zone ID.
* @param initialRule The initial time zone rule.
- * @stable ICU 4.0
+ * @stable ICU 3.8
*/
RuleBasedTimeZone(const UnicodeString& id, InitialTimeZoneRule* initialRule);
/**
* Copy constructor.
* @param source The RuleBasedTimeZone object to be copied.
- * @stable ICU 4.0
+ * @stable ICU 3.8
*/
RuleBasedTimeZone(const RuleBasedTimeZone& source);
/**
* Destructor.
- * @stable ICU 4.0
+ * @stable ICU 3.8
*/
virtual ~RuleBasedTimeZone();
/**
* Assignment operator.
* @param right The object to be copied.
- * @stable ICU 4.0
+ * @stable ICU 3.8
*/
RuleBasedTimeZone& operator=(const RuleBasedTimeZone& right);
* @param that The object to be compared with.
* @return true if the given <code>TimeZone</code> objects are
*semantically equal.
- * @stable ICU 4.0
+ * @stable ICU 3.8
*/
virtual UBool operator==(const TimeZone& that) const;
* @param that The object to be compared with.
* @return true if the given <code>TimeZone</code> objects are
* semantically unequal.
- * @stable ICU 4.0
+ * @stable ICU 3.8
*/
virtual UBool operator!=(const TimeZone& that) const;
* zone functions.
* @param rule The <code>TimeZoneRule</code>.
* @param status Output param to filled in with a success or an error.
- * @stable ICU 4.0
+ * @stable ICU 3.8
*/
void addTransitionRule(TimeZoneRule* rule, UErrorCode& status);
* builds internal structure for making the object ready to support
* time zone APIs such as getOffset(), getNextTransition() and others.
* @param status Output param to filled in with a success or an error.
- * @stable ICU 4.0
+ * @stable ICU 3.8
*/
void complete(UErrorCode& status);
* the TimeZone object cloned.
*
* @return A new copy of this TimeZone object.
- * @stable ICU 4.0
+ * @stable ICU 3.8
*/
virtual TimeZone* clone(void) const;
* @param millis The reference date's milliseconds in day, local standard time
* @param status Output param to filled in with a success or an error.
* @return The offset in milliseconds to add to GMT to get local time.
- * @stable ICU 4.0
+ * @stable ICU 3.8
*/
virtual int32_t getOffset(uint8_t era, int32_t year, int32_t month, int32_t day,
uint8_t dayOfWeek, int32_t millis, UErrorCode& status) const;
* @param monthLength The length of the given month in days.
* @param status Output param to filled in with a success or an error.
* @return The offset in milliseconds to add to GMT to get local time.
- * @stable ICU 4.0
+ * @stable ICU 3.8
*/
virtual int32_t getOffset(uint8_t era, int32_t year, int32_t month, int32_t day,
uint8_t dayOfWeek, int32_t millis,
* effect, this value is zero; otherwise it is a positive value,
* typically one hour.
* @param ec input-output error code
- * @stable ICU 4.0
+ * @stable ICU 3.8
*/
virtual void getOffset(UDate date, UBool local, int32_t& rawOffset,
int32_t& dstOffset, UErrorCode& ec) const;
* to GMT to get local time, before taking daylight savings time into account).
*
* @param offsetMillis The new raw GMT offset for this time zone.
- * @stable ICU 4.0
+ * @stable ICU 3.8
*/
virtual void setRawOffset(int32_t offsetMillis);
* to GMT to get local time, before taking daylight savings time into account).
*
* @return The TimeZone's raw GMT offset.
- * @stable ICU 4.0
+ * @stable ICU 3.8
*/
virtual int32_t getRawOffset(void) const;
* Queries if this time zone uses daylight savings time.
* @return true if this time zone uses daylight savings time,
* false, otherwise.
- * @stable ICU 4.0
+ * @stable ICU 3.8
*/
virtual UBool useDaylightTime(void) const;
* @param other the <code>TimeZone</code> object to be compared with
* @return true if the given zone is the same as this one,
* with the possible exception of the ID
- * @stable ICU 4.0
+ * @stable ICU 3.8
*/
virtual UBool hasSameRules(const TimeZone& other) const;
* @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*/;
+ virtual UBool getNextTransition(UDate base, UBool inclusive, TimeZoneTransition& result) const;
/**
* 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*/;
+ virtual UBool getPreviousTransition(UDate base, UBool inclusive, TimeZoneTransition& result) 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*/;
+ virtual int32_t countTransitionRules(UErrorCode& status) const;
/**
* 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*/;
+ const TimeZoneRule* trsrules[], int32_t& trscount, UErrorCode& status) const;
/**
* 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;
private:
void deleteRules(void);
int32_t NonExistingTimeOpt, int32_t DuplicatedTimeOpt) const;
void getOffsetInternal(UDate date, UBool local, int32_t NonExistingTimeOpt, int32_t DuplicatedTimeOpt,
int32_t& rawOffset, int32_t& dstOffset, UErrorCode& ec) const;
+ void completeConst(UErrorCode &status) const;
InitialTimeZoneRule *fInitialRule;
UVector *fHistoricRules;
* . erived::getStaticClassID()) ...
* </pre>
* @return The class ID for all objects of this class.
- * @stable ICU 4.0
+ * @stable ICU 3.8
*/
static UClassID U_EXPORT2 getStaticClassID(void);
* @return The class ID for this object. All objects of a
* given class have the same class ID. Objects of
* other classes have different class IDs.
- * @stable ICU 4.0
+ * @stable ICU 3.8
*/
virtual UClassID getDynamicClassID(void) const;
};
U_NAMESPACE_END
+#endif // U_SHOW_CPLUSPLUS_API
#endif /* #if !UCONFIG_NO_FORMATTING */