]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/i18n/unicode/vtzone.h
ICU-66108.tar.gz
[apple/icu.git] / icuSources / i18n / unicode / vtzone.h
index 724da7e289bca21069124bded0d33c7c2ed36f7d..2743b6c474f78547917f13208b2f7fb66b7415de 100644 (file)
@@ -1,7 +1,9 @@
+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
 /*
 *******************************************************************************
-* Copyright (C) 2007-2010, International Business Machines Corporation and         *
-* others. All Rights Reserved.                                                *
+* Copyright (C) 2007-2013, International Business Machines Corporation and
+* others. All Rights Reserved.
 *******************************************************************************
 */
 #ifndef VTZONE_H
@@ -9,6 +11,8 @@
 
 #include "unicode/utypes.h"
 
+#if U_SHOW_CPLUSPLUS_API
+
 /**
  * \file 
  * \brief C++ API: RFC2445 VTIMEZONE support
@@ -94,7 +98,7 @@ public:
      * @param basicTZ The basic time zone instance
      * @param status Output param to filled in with a success or an error.
      * @return A <code>VTimeZone</code> object initialized by the basic time zone.
-     * @draft ICU 4.6
+     * @stable ICU 4.6
      */
     static VTimeZone* createVTimeZoneFromBasicTimeZone(const BasicTimeZone& basicTZ,
                                                        UErrorCode &status);
@@ -160,7 +164,7 @@ public:
      * @param status Output param to filled in with a success or an error.
      * @stable ICU 3.8
      */
-    void write(UDate start, UnicodeString& result, UErrorCode& status) /*const*/;
+    void write(UDate start, UnicodeString& result, UErrorCode& status) const;
 
     /**
      * Writes RFC2445 VTIMEZONE data applicalbe for the specified date.
@@ -175,7 +179,7 @@ public:
      * @param status Output param to filled in with a success or an error.
      * @stable ICU 3.8
      */
-    void writeSimple(UDate time, UnicodeString& result, UErrorCode& status) /*const*/;
+    void writeSimple(UDate time, UnicodeString& result, UErrorCode& status) const;
 
     /**
      * Clones TimeZone objects polymorphically. Clients are responsible for deleting
@@ -183,7 +187,7 @@ public:
      * @return   A new copy of this TimeZone object.
      * @stable ICU 3.8
      */
-    virtual TimeZone* clone(void) const;
+    virtual VTimeZone* clone() const;
 
     /**
      * Returns the TimeZone's adjusted GMT offset (i.e., the number of milliseconds to add
@@ -286,6 +290,7 @@ public:
      */
     virtual UBool useDaylightTime(void) const;
 
+#ifndef U_FORCE_HIDE_DEPRECATED_API
     /**
      * Queries if the given date is in daylight savings time in
      * this time zone.
@@ -300,6 +305,7 @@ public:
      * @deprecated ICU 2.4. Use Calendar::inDaylightTime() instead.
      */
     virtual UBool inDaylightTime(UDate date, UErrorCode& status) const;
+#endif  // U_FORCE_HIDE_DEPRECATED_API
 
     /**
      * Returns true if this zone has the same rule and offset as another zone.
@@ -319,7 +325,7 @@ public:
      * @return  TRUE if the transition is found.
      * @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.
@@ -329,7 +335,7 @@ public:
      * @return  TRUE if the transition is found.
      * @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,
@@ -339,7 +345,7 @@ public:
      * @return The number of <code>TimeZoneRule</code>s representing time transitions.
      * @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>
@@ -358,7 +364,7 @@ public:
      * @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;
 
 private:
     enum { DEFAULT_VTIMEZONE_LINES = 100 };
@@ -369,8 +375,8 @@ private:
     VTimeZone();
     static VTimeZone* createVTimeZone(VTZReader* reader);
     void write(VTZWriter& writer, UErrorCode& status) const;
-    void write(UDate start, VTZWriter& writer, UErrorCode& status) /*const*/;
-    void writeSimple(UDate time, VTZWriter& writer, UErrorCode& status) /*const*/;
+    void write(UDate start, VTZWriter& writer, UErrorCode& status) const;
+    void writeSimple(UDate time, VTZWriter& writer, UErrorCode& status) const;
     void load(VTZReader& reader, UErrorCode& status);
     void parse(UErrorCode& status);
 
@@ -451,5 +457,7 @@ U_NAMESPACE_END
 
 #endif /* #if !UCONFIG_NO_FORMATTING */
 
+#endif /* U_SHOW_CPLUSPLUS_API */
+
 #endif // VTZONE_H
 //eof