]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/i18n/winnmfmt.h
ICU-62107.0.1.tar.gz
[apple/icu.git] / icuSources / i18n / winnmfmt.h
index 9b737f8ab79c147d97c56df435a44d3f376cc4e6..6139c1ff68a9d23a6230e4cf26bf21fc6764386c 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-2007, 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
 
 #include "unicode/format.h"
 #include "unicode/datefmt.h"
@@ -56,7 +58,6 @@ public:
      * @param pos       On input: an alignment field, if desired.
      *                  On output: the offsets of the alignment field.
      * @return          Reference to 'appendTo' parameter.
-     * @draft ICU 3.6
      */
     virtual UnicodeString& format(double number,
                                   UnicodeString& appendTo,
@@ -71,7 +72,6 @@ public:
      * @param pos       On input: an alignment field, if desired.
      *                  On output: the offsets of the alignment field.
      * @return          Reference to 'appendTo' parameter.
-     * @draft ICU 3.6
     */
     virtual UnicodeString& format(int32_t number,
                                   UnicodeString& appendTo,
@@ -86,12 +86,13 @@ public:
      * @param pos       On input: an alignment field, if desired.
      *                  On output: the offsets of the alignment field.
      * @return          Reference to 'appendTo' parameter.
-     * @draft ICU 3.6
     */
     virtual UnicodeString& format(int64_t number,
                                   UnicodeString& appendTo,
                                   FieldPosition& pos) const;
 
+    using NumberFormat::format;
+
 // Use the default behavior for the following.
 //    virtual UnicodeString &format(double number, UnicodeString &appendTo) const;
 //    virtual UnicodeString &format(int32_t number, UnicodeString &appendTo) const;
@@ -107,7 +108,6 @@ public:
      * the new value.
      * @param newValue    the new value to be set.
      * @see getMaximumFractionDigits
-     * @draft ICU 3.6
      */
     virtual void setMaximumFractionDigits(int32_t newValue);
 
@@ -119,7 +119,6 @@ public:
      * the new value
      * @param newValue    the new value to be set.
      * @see getMinimumFractionDigits
-     * @draft ICU 3.6
      */
     virtual void setMinimumFractionDigits(int32_t newValue);
 
@@ -129,10 +128,9 @@ 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.
-     * @stable ICU 2.0
      */
     U_I18N_API static UClassID U_EXPORT2 getStaticClassID(void);
 
@@ -145,24 +143,25 @@ 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.
-     * @stable ICU 2.0
      */
     virtual UClassID getDynamicClassID(void) const;
 
 private:
-    UnicodeString &format(int32_t numDigits, UnicodeString &appendTo, wchar_t *format, ...) const;
+    UnicodeString &format(int32_t numDigits, UnicodeString &appendTo, const wchar_t *format, ...) const;
 
     UBool fCurrency;
+    Locale fLocale;
     int32_t fLCID;
     FormatInfo *fFormatInfo;
     UBool fFractionDigitsSet;
 
+    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 // __WINNMFMT