*/
void parse(const UnicodeString& text, Formattable& result, UErrorCode& status) const U_OVERRIDE;
+#ifndef U_HIDE_INTERNAL_API
/**
* Parses text from the given string as a currency amount. Unlike
* the parse() method, this method will attempt to parse a generic
* @internal
*/
CurrencyAmount* parseCurrency(const UnicodeString& text, ParsePosition& pos) const U_OVERRIDE;
+#endif /* U_HIDE_INTERNAL_API */
/**
* Return the class ID for this class. This is useful only for
/**
* This API is for ICU use only.
* Default internal constructor for DecimalFormat.
+ * @internal
*/
DecimalFormat(const DecimalFormatSymbols* symbolsToAdopt, UErrorCode& status);
*/
UnicodeString& format(double number, UnicodeString& appendTo, FieldPosition& pos) const U_OVERRIDE;
-
+#ifndef U_HIDE_INTERNAL_API
/**
* Format a double or long number using base-10 representation.
*
*/
UnicodeString& format(double number, UnicodeString& appendTo, FieldPosition& pos,
UErrorCode& status) const U_OVERRIDE;
+#endif /* U_HIDE_INTERNAL_API */
/**
* Format a double or long number using base-10 representation.
*/
UnicodeString& format(int32_t number, UnicodeString& appendTo, FieldPosition& pos) const U_OVERRIDE;
+#ifndef U_HIDE_INTERNAL_API
/**
* Format a long number using base-10 representation.
*
*/
UnicodeString& format(int32_t number, UnicodeString& appendTo, FieldPosition& pos,
UErrorCode& status) const U_OVERRIDE;
+#endif /* U_HIDE_INTERNAL_API */
/**
* Format a long number using base-10 representation.
*/
UnicodeString& format(int64_t number, UnicodeString& appendTo, FieldPosition& pos) const U_OVERRIDE;
+#ifndef U_HIDE_INTERNAL_API
/**
* Format an int64 number using base-10 representation.
*
*/
UnicodeString& format(int64_t number, UnicodeString& appendTo, FieldPosition& pos,
UErrorCode& status) const U_OVERRIDE;
+#endif /* U_HIDE_INTERNAL_API */
/**
* Format an int64 number using base-10 representation.
*/
virtual void setNegativeSuffix(const UnicodeString& newValue);
+#ifndef U_HIDE_INTERNAL_API
/**
* Whether to show the plus sign on positive (non-negative) numbers; for example, "+12"
* @internal Technical Preview
*/
UBool isSignAlwaysShown() const;
+#endif /* U_HIDE_INTERNAL_API */
/**
* Set whether to show the plus sign on positive (non-negative) numbers; for example, "+12"
*/
virtual void setMultiplier(int32_t newValue);
+#ifndef U_HIDE_DRAFT_API
/**
* Gets the power of ten by which number should be multiplied before formatting, which
* can be combined with setMultiplier() to multiply by any arbitrary decimal value.
* @draft ICU 62
*/
int32_t getMultiplierScale(void) const;
+#endif /* U_HIDE_DRAFT_API */
/**
* Sets a power of ten by which number should be multiplied before formatting, which
#endif
+#ifndef U_HIDE_DRAFT_API
/**
* Converts this DecimalFormat to a NumberFormatter. Starting in ICU 60,
* NumberFormatter is the recommended way to format numbers.
* @draft ICU 62
*/
const number::LocalizedNumberFormatter& toNumberFormatter() const;
+#endif /* U_HIDE_DRAFT_API */
/**
* Return the class ID for this class. This is useful only for
static SignificantDigitsPrecision minMaxSignificantDigits(int32_t minSignificantDigits,
int32_t maxSignificantDigits);
+#ifndef U_HIDE_DEPRECATED_API
// Compatiblity methods that will be removed in ICU 64.
// See http://bugs.icu-project.org/trac/ticket/13746
static inline SignificantDigitsPrecision minMaxDigits(int32_t a, int32_t b) {
return minMaxSignificantDigits(a, b);
}
+#endif /* U_HIDE_DEPRECATED_API */
/**
* Show numbers rounded if necessary to the closest multiple of a certain rounding increment. For example, if the
*/
static CurrencyPrecision currency(UCurrencyUsage currencyUsage);
+#ifndef U_HIDE_DEPRECATED_API
/**
* Sets the rounding mode to use when picking the direction to round (up or down). Common values
* include HALF_EVEN, HALF_UP, and FLOOR. The default is HALF_EVEN.
* See http://bugs.icu-project.org/trac/ticket/13746
*/
Precision withMode(UNumberFormatRoundingMode roundingMode) const;
+#endif /* U_HIDE_DEPRECATED_API */
private:
enum PrecisionType {
/** @draft ICU 62 */
~Scale();
+#ifndef U_HIDE_INTERNAL_API
/** @internal */
Scale(int32_t magnitude, impl::DecNum* arbitraryToAdopt);
+#endif /* U_HIDE_INTERNAL_API */
private:
int32_t fMagnitude;
*/
Derived precision(const Precision& precision) &&;
+#ifndef U_HIDE_DEPRECATED_API
// Compatibility method that will be removed in ICU 64.
// Use precision() instead.
// See http://bugs.icu-project.org/trac/ticket/13746
Derived rounding(const Rounder& rounder) const & {
return precision(rounder);
}
+#endif /* U_HIDE_DEPRECATED_API */
/**
* Specifies how to determine the direction to round a number when it has more digits than fit in the
*/
class U_I18N_API FormattedNumber : public UMemory {
public:
+#ifndef U_HIDE_DEPRECATED_API
/**
* Returns a UnicodeString representation of the formatted number.
*
* @return a UnicodeString containing the localized number.
* @deprecated ICU 62 Use the version of this method with an error code instead.
- * This method was never @stable and will be removed in a future release.
+ * This method was never @stable and will be removed in a future release.
* See http://bugs.icu-project.org/trac/ticket/13746
*/
UnicodeString toString() const;
+#endif /* U_HIDE_DEPRECATED_API */
/**
* Returns a UnicodeString representation of the formatted number.
*/
UnicodeString toString(UErrorCode& status) const;
+#ifndef U_HIDE_DEPRECATED_API
/**
* Appends the formatted number to an Appendable.
*
* The Appendable to which to append the formatted number string.
* @return The same Appendable, for chaining.
* @deprecated ICU 62 Use the version of this method with an error code instead.
- * This method was never @stable and will be removed in a future release.
+ * This method was never @stable and will be removed in a future release.
* See http://bugs.icu-project.org/trac/ticket/13746
* @see Appendable
*/
Appendable &appendTo(Appendable &appendable);
+#endif /* U_HIDE_DEPRECATED_API */
/**
* Appends the formatted number to an Appendable.
*/
Appendable &appendTo(Appendable &appendable, UErrorCode& status);
+#ifndef U_HIDE_DEPRECATED_API
/**
* Determine the start and end indices of the first occurrence of the given <em>field</em> in the output string.
* This allows you to determine the locations of the integer part, fraction part, and sign.
* @see UNumberFormatFields
*/
void populateFieldPosition(FieldPosition &fieldPosition, UErrorCode &status);
+#endif /* U_HIDE_DEPRECATED_API */
/**
* Determines the start and end indices of the next occurrence of the given <em>field</em> in the
*/
UBool nextFieldPosition(FieldPosition& fieldPosition, UErrorCode& status) const;
+#ifndef U_HIDE_DEPRECATED_API
/**
* Export the formatted number to a FieldPositionIterator. This allows you to determine which characters in
* the output string correspond to which <em>fields</em>, such as the integer part, fraction part, and sign.
* @see UNumberFormatFields
*/
void populateFieldPositionIterator(FieldPositionIterator &iterator, UErrorCode &status);
+#endif /* U_HIDE_DEPRECATED_API */
/**
* Export the formatted number to a FieldPositionIterator. This allows you to determine which characters in
*/
+#ifndef U_HIDE_DRAFT_API
/**
* An enum declaring how to render units, including currencies. Example outputs when formatting 123 USD and 123
* meters in <em>en-CA</em>:
*/
UNUM_UNIT_WIDTH_COUNT
} UNumberUnitWidth;
+#endif /* U_HIDE_DRAFT_API */
+#ifndef U_HIDE_DRAFT_API
/**
* An enum declaring the strategy for when and how to display grouping separators (i.e., the
* separator, often a comma or period, after every 2-3 powers of ten). The choices are several
UNUM_GROUPING_THOUSANDS,
/**
- * One more than the highest UNumberSignDisplay value.
+ * One more than the highest UGroupingStrategy value.
*
* @internal ICU 62: The numeric value may change over time; see ICU ticket #12420.
*/
UNUM_GROUPING_COUNT
} UGroupingStrategy;
+#endif /* U_HIDE_DRAFT_API */
+#ifndef U_HIDE_DRAFT_API
/**
* An enum declaring how to denote positive and negative numbers. Example outputs when formatting
* 123, 0, and -123 in <em>en-US</em>:
*/
UNUM_SIGN_COUNT
} UNumberSignDisplay;
+#endif /* U_HIDE_DRAFT_API */
+#ifndef U_HIDE_DRAFT_API
/**
* An enum declaring how to render the decimal separator.
*
*/
UNUM_DECIMAL_SEPARATOR_COUNT
} UNumberDecimalSeparatorDisplay;
+#endif /* U_HIDE_DRAFT_API */
-
+#ifndef U_HIDE_DRAFT_API
/**
* C-compatible version of icu::number::LocalizedNumberFormatter.
*
U_NAMESPACE_END
#endif // U_SHOW_CPLUSPLUS_API
+#endif /* U_HIDE_DRAFT_API */
#endif //__UNUMBERFORMATTER_H__
#endif /* #if !UCONFIG_NO_FORMATTING */
*/
USPOOF_MIXED_NUMBERS = 128,
+#ifndef U_HIDE_DRAFT_API
/**
* Check that an identifier does not have a combining character following a character in which that
* combining character would be hidden; for example 'i' followed by a U+0307 combining dot.
* @draft ICU 62
*/
USPOOF_HIDDEN_OVERLAY = 256,
+#endif /* U_HIDE_DRAFT_API */
/**
* Enable all spoof checks.