]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/i18n/windtfmt.h
ICU-62141.0.1.tar.gz
[apple/icu.git] / icuSources / i18n / windtfmt.h
index 364822d56b1b357b3a96e075f205e6f0fd630adb..33069058fb21f6b4c75abd98e9b6ec4a35c62909 100644 (file)
@@ -1,6 +1,8 @@
+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
 /*
 ********************************************************************************
-*   Copyright (C) 2005-2006, International Business Machines
+*   Copyright (C) 2005-2015, International Business Machines
 *   Corporation and others.  All Rights Reserved.
 ********************************************************************************
 *
@@ -14,7 +16,7 @@
 
 #include "unicode/utypes.h"
 
-#ifdef U_WINDOWS
+#if U_PLATFORM_USES_ONLY_WIN32_API
 
 #if !UCONFIG_NO_FORMATTING
 
@@ -52,7 +54,7 @@ public:
 
     UnicodeString &format(Calendar &cal, UnicodeString &appendTo, FieldPosition &pos) const;
 
-    UnicodeString& format(UDate date, UnicodeString& appendTo) const;
+    using DateFormat::format;
 
     void parse(const UnicodeString& text, Calendar& cal, ParsePosition& pos) const;
 
@@ -62,7 +64,6 @@ public:
      * not delete the Calendar object after it is adopted by this call.
      *
      * @param calendarToAdopt    Calendar object to be adopted.
-     * @draft ICU 3.6
      */
     virtual void adoptCalendar(Calendar* calendarToAdopt);
 
@@ -71,8 +72,6 @@ public:
      * calendar for the specified or default locale is used.
      *
      * @param newCalendar Calendar object to be set.
-     *
-     * @draft ICU 3.6
      */
     virtual void setCalendar(const Calendar& newCalendar);
 
@@ -81,16 +80,12 @@ public:
      * no longer owns the TimeZone object and should not delete it after this call.
      *
      * @param zoneToAdopt the TimeZone to be adopted.
-     *
-     * @draft ICU 3.6
      */
     virtual void adoptTimeZone(TimeZone* zoneToAdopt);
 
     /**
      * Sets the time zone for the calendar of this DateFormat object.
      * @param zone the new time zone.
-     *
-     * @draft ICU 3.6
      */
     virtual void setTimeZone(const TimeZone& zone);
 
@@ -100,12 +95,11 @@ public:
      * <pre>
      * .   Base* polymorphic_pointer = createPolymorphicObject();
      * .   if (polymorphic_pointer->getDynamicClassID() ==
-     * .       erived::getStaticClassID()) ...
+     * .       derived::getStaticClassID()) ...
      * </pre>
      * @return          The class ID for all objects of this class.
-     * @draft ICU 3.6
      */
-    static UClassID U_EXPORT2 getStaticClassID(void);
+    U_I18N_API static UClassID U_EXPORT2 getStaticClassID(void);
 
     /**
      * Returns a unique class ID POLYMORPHICALLY. Pure virtual override. This
@@ -116,7 +110,6 @@ public:
      * @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.
-     * @draft ICU 3.6
      */
     virtual UClassID getDynamicClassID(void) const;
 
@@ -125,24 +118,22 @@ private:
     void formatTime(const SYSTEMTIME *st, UnicodeString &appendTo) const;
 
     UnicodeString setTimeZoneInfo(TIME_ZONE_INFORMATION *tzi, const TimeZone &zone) const;
+    UnicodeString* getTimeDateFormat(const Calendar *cal, const Locale *locale, UErrorCode &status) const;
 
     UnicodeString *fDateTimeMsg;
     DateFormat::EStyle fTimeStyle;
     DateFormat::EStyle fDateStyle;
-    const Locale *fLocale;
-    int32_t fLCID;
+    Locale fLocale;
     UnicodeString fZoneID;
     TIME_ZONE_INFORMATION *fTZI;
-};
 
-inline UnicodeString &Win32DateFormat::format(UDate date, UnicodeString& appendTo) const {
-    return DateFormat::format(date, appendTo);
-}
+    UnicodeString* fWindowsLocaleName; // Stores the equivalent Windows locale name.
+};
 
 U_NAMESPACE_END
 
 #endif /* #if !UCONFIG_NO_FORMATTING */
 
-#endif // #ifdef U_WINDOWS
+#endif // U_PLATFORM_USES_ONLY_WIN32_API
 
 #endif // __WINDTFMT