32 #if U_SHOW_CPLUSPLUS_API 39 #if !UCONFIG_NO_FORMATTING 51 class CurrencyPluralInfo;
52 class CompactDecimalFormat;
55 class LocalizedNumberFormatter;
56 class FormattedNumber;
58 class DecimalQuantity;
59 struct DecimalFormatFields;
65 class NumberParserImpl;
675 kPadBeforePrefix, kPadAfterPrefix, kPadBeforeSuffix, kPadAfterSuffix
738 #ifndef U_HIDE_INTERNAL_API 755 #if UCONFIG_HAVE_PARSEALLINPUT 760 void setParseAllInput(UNumberFormatAttributeValue value);
915 using NumberFormat::format;
930 #ifndef U_HIDE_INTERNAL_API 976 #ifndef U_HIDE_INTERNAL_API 1022 #ifndef U_HIDE_INTERNAL_API 1074 #ifndef U_HIDE_INTERNAL_API 1112 #endif // U_HIDE_INTERNAL_API 1114 using NumberFormat::parse;
1227 virtual void setPositivePrefix(
const UnicodeString& newValue);
1246 virtual void setNegativePrefix(
const UnicodeString& newValue);
1265 virtual void setPositiveSuffix(
const UnicodeString& newValue);
1284 virtual void setNegativeSuffix(
const UnicodeString& newValue);
1286 #ifndef U_HIDE_DRAFT_API 1295 UBool isSignAlwaysShown()
const;
1305 void setSignAlwaysShown(
UBool value);
1320 int32_t getMultiplier(
void)
const;
1335 virtual void setMultiplier(int32_t newValue);
1349 int32_t getMultiplierScale(
void)
const;
1370 void setMultiplierScale(int32_t newValue);
1381 virtual double getRoundingIncrement(
void)
const;
1394 virtual void setRoundingIncrement(
double newValue);
1427 virtual int32_t getFormatWidth(
void)
const;
1443 virtual void setFormatWidth(int32_t width);
1520 virtual UBool isScientificNotation(
void)
const;
1537 virtual void setScientificNotation(
UBool useScientific);
1549 virtual int8_t getMinimumExponentDigits(
void)
const;
1563 virtual void setMinimumExponentDigits(int8_t minExpDig);
1577 virtual UBool isExponentSignAlwaysShown(
void)
const;
1592 virtual void setExponentSignAlwaysShown(
UBool expSignAlways);
1605 int32_t getGroupingSize(
void)
const;
1618 virtual void setGroupingSize(int32_t newValue);
1638 int32_t getSecondaryGroupingSize(
void)
const;
1651 virtual void setSecondaryGroupingSize(int32_t newValue);
1653 #ifndef U_HIDE_DRAFT_API 1677 int32_t getMinimumGroupingDigits()
const;
1689 void setMinimumGroupingDigits(int32_t newValue);
1701 UBool isDecimalSeparatorAlwaysShown(
void)
const;
1711 virtual void setDecimalSeparatorAlwaysShown(
UBool newValue);
1719 UBool isDecimalPatternMatchRequired(
void)
const;
1730 virtual void setDecimalPatternMatchRequired(
UBool newValue);
1732 #ifndef U_HIDE_DRAFT_API 1740 UBool isParseNoExponent()
const;
1750 void setParseNoExponent(
UBool value);
1759 UBool isParseCaseSensitive()
const;
1772 void setParseCaseSensitive(
UBool value);
1782 UBool isFormatFailIfMoreThanMaxDigits()
const;
1791 void setFormatFailIfMoreThanMaxDigits(
UBool value);
1914 void setMaximumIntegerDigits(int32_t newValue)
U_OVERRIDE;
1925 void setMinimumIntegerDigits(int32_t newValue)
U_OVERRIDE;
1936 void setMaximumFractionDigits(int32_t newValue)
U_OVERRIDE;
1947 void setMinimumFractionDigits(int32_t newValue)
U_OVERRIDE;
1956 int32_t getMinimumSignificantDigits()
const;
1965 int32_t getMaximumSignificantDigits()
const;
1978 void setMinimumSignificantDigits(int32_t min);
1991 void setMaximumSignificantDigits(int32_t max);
1999 UBool areSignificantDigitsUsed()
const;
2008 void setSignificantDigitsUsed(
UBool useSignificantDigits);
2024 #ifndef U_FORCE_HIDE_DEPRECATED_API 2030 virtual void setCurrency(
const char16_t* theCurrency);
2031 #endif // U_FORCE_HIDE_DEPRECATED_API 2049 #ifndef U_HIDE_INTERNAL_API 2056 void formatToDecimalQuantity(
double number, number::impl::DecimalQuantity& output,
2065 void formatToDecimalQuantity(
const Formattable& number, number::impl::DecimalQuantity& output,
2070 #ifndef U_HIDE_DRAFT_API 2130 static UClassID U_EXPORT2 getStaticClassID(
void);
2151 void touchNoError();
2164 void setPropertiesFromPattern(
const UnicodeString& pattern, int32_t ignoreRounding,
2167 const numparse::impl::NumberParserImpl* getParser(
UErrorCode& status)
const;
2169 const numparse::impl::NumberParserImpl* getCurrencyParser(
UErrorCode& status)
const;
2177 void setupFastFormat();
2179 bool fastFormatDouble(
double input,
UnicodeString& output)
const;
2181 bool fastFormatInt64(int64_t input,
UnicodeString& output)
const;
2183 void doFastFormatInt32(int32_t input,
bool isNegative,
UnicodeString& output)
const;
2192 number::impl::DecimalFormatFields* fields =
nullptr;
#define U_OVERRIDE
Defined to the C++11 "override" keyword if available.
C++ API: FieldPosition Iterator.
U_EXPORT UBool operator==(const StringPiece &x, const StringPiece &y)
Global operator == for StringPiece.
void * UClassID
UClassID is used to identify classes without using the compiler's RTTI.
#define U_I18N_API
Set to export library symbols from inside the i18n library, and to import them from outside...
C++ API: StringPiece: Read-only byte string wrapper class.
C++ API: Currency Amount Object.
UNumberFormatStyle
The possible number format styles.
FieldPositionIterator returns the field ids and their start/limit positions generated by a call to Fo...
UCurrencyUsage
Currency Usage used for Decimal Format.
UErrorCode
Standard ICU4C error code type, a substitute for exceptions.
FieldPosition is a simple class used by Format and its subclasses to identify fields in formatted out...
C++ API: Symbols for formatting numbers.
ParsePosition is a simple class used by Format and its subclasses to keep track of the current positi...
C++ API: Locale ID object.
This class represents the information needed by DecimalFormat to format currency plural, such as "3.00 US dollars" or "1.00 US dollar".
A UParseError struct is used to returned detailed information about parsing errors.
Basic definitions for ICU, for both C and C++ APIs.
UnicodeString is a string class that stores Unicode characters directly and provides similar function...
C++: internal template EnumSet<>
C++ API: Compatibility APIs for number formatting.
UNumberFormatAttribute
The possible UNumberFormat numeric attributes.
A string-like object that points to a sized piece of memory.
A currency together with a numeric amount, such as 200 USD.
int8_t UBool
The ICU boolean type.