33 #if !UCONFIG_NO_FORMATTING
50 class FieldPositionHandler;
1200 virtual void setPositivePrefix(
const UnicodeString& newValue);
1219 virtual void setNegativePrefix(
const UnicodeString& newValue);
1238 virtual void setPositiveSuffix(
const UnicodeString& newValue);
1257 virtual void setNegativeSuffix(
const UnicodeString& newValue);
1269 int32_t getMultiplier(
void)
const;
1281 virtual void setMultiplier(int32_t newValue);
1292 virtual double getRoundingIncrement(
void)
const;
1304 virtual void setRoundingIncrement(
double newValue);
1314 virtual ERoundingMode getRoundingMode(
void)
const;
1324 virtual void setRoundingMode(ERoundingMode roundingMode);
1337 virtual int32_t getFormatWidth(
void)
const;
1353 virtual void setFormatWidth(int32_t width);
1400 virtual EPadPosition getPadPosition(
void)
const;
1418 virtual void setPadPosition(EPadPosition padPos);
1430 virtual UBool isScientificNotation(
void);
1447 virtual void setScientificNotation(
UBool useScientific);
1459 virtual int8_t getMinimumExponentDigits(
void)
const;
1473 virtual void setMinimumExponentDigits(int8_t minExpDig);
1487 virtual UBool isExponentSignAlwaysShown(
void);
1502 virtual void setExponentSignAlwaysShown(
UBool expSignAlways);
1515 int32_t getGroupingSize(
void)
const;
1528 virtual void setGroupingSize(int32_t newValue);
1548 int32_t getSecondaryGroupingSize(
void)
const;
1561 virtual void setSecondaryGroupingSize(int32_t newValue);
1571 UBool isDecimalSeparatorAlwaysShown(
void)
const;
1581 virtual void setDecimalSeparatorAlwaysShown(
UBool newValue);
1680 virtual void applyLocalizedPattern(
const UnicodeString& pattern,
1693 virtual void applyLocalizedPattern(
const UnicodeString& pattern,
1748 int32_t getMinimumSignificantDigits()
const;
1757 int32_t getMaximumSignificantDigits()
const;
1768 void setMinimumSignificantDigits(int32_t min);
1780 void setMaximumSignificantDigits(int32_t max);
1788 UBool areSignificantDigitsUsed()
const;
1797 void setSignificantDigitsUsed(
UBool useSignificantDigits);
1826 static const char fgNumberPatterns[];
1860 int32_t precision()
const;
1905 void applyPatternInternally(
const UnicodeString& pluralCount,
1914 void applyPatternWithoutExpandAffix(
const UnicodeString& pattern,
1923 void expandAffixAdjustWidth(
const UnicodeString* pluralCount);
1937 FieldPositionHandler& handler,
1939 UBool isInteger)
const;
1945 UBool parseCurrency)
const;
1957 UBool currencyParsing,
1960 DigitList& digits,
UBool* status,
1961 UChar* currency)
const;
1972 UChar* currency)
const;
1974 int32_t skipPadding(
const UnicodeString& text, int32_t position)
const;
1981 UBool currencyParsing,
1983 UChar* currency)
const;
1985 static int32_t compareSimpleAffix(
const UnicodeString& affix,
1990 static int32_t skipPatternWhiteSpace(
const UnicodeString& text, int32_t pos);
1992 static int32_t skipUWhiteSpace(
const UnicodeString& text, int32_t pos);
1998 UChar* currency)
const;
2026 FieldPositionHandler& handler,
2028 UBool isPrefix)
const;
2036 UBool localized)
const;
2045 FieldPositionHandler& handler,
2052 FieldPositionHandler& handler,
2053 int32_t prefixLen, int32_t suffixLen)
const;
2055 UBool isGroupingPosition(int32_t pos)
const;
2057 void setCurrencyForSymbols();
2063 virtual void setCurrencyInternally(
const UChar* theCurrency,
UErrorCode& ec);
2069 void setupCurrencyAffixPatterns(
UErrorCode& status);
2076 UBool setupForCurrentPattern,
2077 UBool setupForPluralPattern,
2081 Hashtable* initHashForAffixPattern(
UErrorCode& status);
2082 Hashtable* initHashForAffix(
UErrorCode& status);
2084 void deleteHashForAffixPattern();
2085 void deleteHashForAffix(Hashtable*& table);
2087 void copyHashForAffixPattern(
const Hashtable* source,
2089 void copyHashForAffix(
const Hashtable* source,
2094 FieldPositionHandler& handler)
const;
2097 FieldPositionHandler& handler)
const;
2100 FieldPositionHandler& handler,
2105 fgCurrencySignCountZero,
2106 fgCurrencySignCountInSymbolFormat,
2107 fgCurrencySignCountInISOFormat,
2108 fgCurrencySignCountInPluralFormat
2109 } CurrencySignCount;
2131 DigitList * fMultiplier;
2132 int32_t fGroupingSize;
2133 int32_t fGroupingSize2;
2134 UBool fDecimalSeparatorAlwaysShown;
2137 UBool fUseSignificantDigits;
2138 int32_t fMinSignificantDigits;
2139 int32_t fMaxSignificantDigits;
2141 UBool fUseExponentialNotation;
2142 int8_t fMinExponentDigits;
2143 UBool fExponentSignAlwaysShown;
2145 DigitList* fRoundingIncrement;
2146 ERoundingMode fRoundingMode;
2149 int32_t fFormatWidth;
2150 EPadPosition fPadPosition;
2170 int fCurrencySignCount;
2248 Hashtable* fAffixPatternsForCurrency;
2257 Hashtable* fAffixesForCurrency;
2258 Hashtable* fPluralAffixesForCurrency;
2310 return format(number, appendTo, pos);
2317 return format((int64_t)number, appendTo, pos);
This class represents the information needed by DecimalFormat to format currency plural, such as "3.00 US dollars" or "1.00 US dollar".
A mutable set of Unicode characters and multicharacter strings.
C++ API: FieldPosition Iterator.
A string-like object that points to a sized piece of memory.
#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.
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
UNumberFormatStyle
The possible number format styles.
ParsePosition is a simple class used by Format and its subclasses to keep track of the current positi...
int32_t UChar32
Define UChar32 as a type for single Unicode code points.
UnicodeString is a string class that stores Unicode characters directly and provides similar function...
FieldPositionIterator returns the field ids and their start/limit positions generated by a call to Fo...
FieldPosition is a simple class used by Format and its subclasses to identify fields in formatted out...
uint16_t UChar
Define UChar to be wchar_t if that is 16 bits wide; always assumed to be unsigned.
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
void * UClassID
UClassID is used to identify classes without using RTTI, since RTTI is not yet supported by all C++ c...
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers...
C++ API: Symbols for formatting numbers.
C++ API: Locale ID object.
A UParseError struct is used to returned detailed information about parsing errors.
Basic definitions for ICU, for both C and C++ APIs.
C++ API: Abstract base class for all number formats.
int8_t UBool
The ICU boolean type.