]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/i18n/unicode/decimfmt.h
ICU-59117.0.1.tar.gz
[apple/icu.git] / icuSources / i18n / unicode / decimfmt.h
index 728370657c238eec3dc1f12a4f6e6400fb6135e2..c24d50cf5b5fc514cb5b3524365f9545600744da 100644 (file)
@@ -1,3 +1,5 @@
+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
 /*
 ********************************************************************************
 *   Copyright (C) 1997-2016, International Business Machines
@@ -51,6 +53,7 @@
 #endif
 #endif  /* U_HIDE_INTERNAL_API */
 
+#if U_SHOW_CPLUSPLUS_API
 U_NAMESPACE_BEGIN
 
 class DigitList;
@@ -601,7 +604,7 @@ template class U_I18N_API    EnumSet<UNumberFormatAttribute,
  * including prefix and suffix, determines the format width.  For example, in
  * the pattern <code>"* #0 o''clock"</code>, the format width is 10.
  *
- * <li>The width is counted in 16-bit code units (UChars).
+ * <li>The width is counted in 16-bit code units (char16_ts).
  *
  * <li>Some parameters which usually do not matter have meaning when padding is
  * used, because the pattern width is significant with padding.  In the pattern
@@ -967,7 +970,7 @@ public:
      *                  Can be NULL.
      * @param status    Output param filled with success/failure status.
      * @return          Reference to 'appendTo' parameter.
-     * @stable 4.4
+     * @stable ICU 4.4
      */
     virtual UnicodeString& format(double number,
                                   UnicodeString& appendTo,
@@ -1016,7 +1019,7 @@ public:
      *                  Can be NULL.
      * @param status    Output param filled with success/failure status.
      * @return          Reference to 'appendTo' parameter.
-     * @stable 4.4
+     * @stable ICU 4.4
      */
     virtual UnicodeString& format(int32_t number,
                                   UnicodeString& appendTo,
@@ -1065,7 +1068,7 @@ public:
      *                  Can be NULL.
      * @param status    Output param filled with success/failure status.
      * @return          Reference to 'appendTo' parameter.
-     * @stable 4.4
+     * @stable ICU 4.4
      */
     virtual UnicodeString& format(int64_t number,
                                   UnicodeString& appendTo,
@@ -1086,9 +1089,9 @@ public:
      *                  Can be NULL.
      * @param status    Output param filled with success/failure status.
      * @return          Reference to 'appendTo' parameter.
-     * @stable 4.4
+     * @stable ICU 4.4
      */
-    virtual UnicodeString& format(const StringPiece &number,
+    virtual UnicodeString& format(StringPiece number,
                                   UnicodeString& appendTo,
                                   FieldPositionIterator* posIter,
                                   UErrorCode& status) const;
@@ -1958,14 +1961,14 @@ public:
      * @param ec input-output error code
      * @stable ICU 3.0
      */
-    virtual void setCurrency(const UChar* theCurrency, UErrorCode& ec);
+    virtual void setCurrency(const char16_t* theCurrency, UErrorCode& ec);
 
     /**
      * Sets the currency used to display currency amounts.  See
-     * setCurrency(const UChar*, UErrorCode&).
-     * @deprecated ICU 3.0. Use setCurrency(const UChar*, UErrorCode&).
+     * setCurrency(const char16_t*, UErrorCode&).
+     * @deprecated ICU 3.0. Use setCurrency(const char16_t*, UErrorCode&).
      */
-    virtual void setCurrency(const UChar* theCurrency);
+    virtual void setCurrency(const char16_t* theCurrency);
 
     /**
      * Sets the <tt>Currency Context</tt> object used to display currency.
@@ -2105,7 +2108,7 @@ private:
     void parse(const UnicodeString& text,
                Formattable& result,
                ParsePosition& pos,
-               UChar* currency) const;
+               char16_t* currency) const;
 
     enum {
         fgStatusInfinite,
@@ -2121,7 +2124,7 @@ private:
                    int8_t type,
                    ParsePosition& parsePosition,
                    DigitList& digits, UBool* status,
-                   UChar* currency) const;
+                   char16_t* currency) const;
 
     // Mixed style parsing for currency.
     // It parses against the current currency pattern
@@ -2132,7 +2135,7 @@ private:
                            ParsePosition& parsePosition,
                            DigitList& digits,
                            UBool* status,
-                           UChar* currency) const;
+                           char16_t* currency) const;
 
     int32_t skipPadding(const UnicodeString& text, int32_t position) const;
 
@@ -2143,7 +2146,7 @@ private:
                          const UnicodeString* affixPat,
                          UBool complexCurrencyParsing,
                          int8_t type,
-                         UChar* currency) const;
+                         char16_t* currency) const;
 
     static UnicodeString& trimMarksFromAffix(const UnicodeString& affix, UnicodeString& trimmedAffix);
 
@@ -2166,7 +2169,7 @@ private:
                                 const UnicodeString& input,
                                 int32_t pos,
                                 int8_t type,
-                                UChar* currency) const;
+                                char16_t* currency) const;
 
     static int32_t match(const UnicodeString& text, int32_t pos, UChar32 ch);
 
@@ -2192,11 +2195,11 @@ private:
     void setupCurrencyAffixPatterns(UErrorCode& status);
 
     // get the currency rounding with respect to currency usage
-    double getCurrencyRounding(const UChar* currency,
+    double getCurrencyRounding(const char16_t* currency,
                                UErrorCode* ec) const;
 
     // get the currency fraction with respect to currency usage
-    int getCurrencyFractionDigits(const UChar* currency,
+    int getCurrencyFractionDigits(const char16_t* currency,
                                   UErrorCode* ec) const;
 
     // hashtable operations
@@ -2268,7 +2271,7 @@ protected:
      * have a capacity of at least 4
      * @internal
      */
-    virtual void getEffectiveCurrency(UChar* result, UErrorCode& ec) const;
+    virtual void getEffectiveCurrency(char16_t* result, UErrorCode& ec) const;
 
   /** number of integer digits
    * @stable ICU 2.4
@@ -2294,6 +2297,7 @@ protected:
 };
 
 U_NAMESPACE_END
+#endif // U_SHOW_CPLUSPLUS_API
 
 #endif /* #if !UCONFIG_NO_FORMATTING */