33 #if !UCONFIG_NO_FORMATTING
47 #if UCONFIG_FORMAT_FASTPATHS_49
48 #define UNUM_DECIMALFORMAT_INTERNAL_SIZE 16
55 class CurrencyPluralInfo;
58 class FieldPositionHandler;
61 #if defined (_MSC_VER)
749 #ifndef U_HIDE_INTERNAL_API
794 #if UCONFIG_HAVE_PARSEALLINPUT
798 void setParseAllInput(UNumberFormatAttributeValue value);
1302 virtual void setPositivePrefix(
const UnicodeString& newValue);
1321 virtual void setNegativePrefix(
const UnicodeString& newValue);
1340 virtual void setPositiveSuffix(
const UnicodeString& newValue);
1359 virtual void setNegativeSuffix(
const UnicodeString& newValue);
1371 int32_t getMultiplier(
void)
const;
1383 virtual void setMultiplier(int32_t newValue);
1394 virtual double getRoundingIncrement(
void)
const;
1406 virtual void setRoundingIncrement(
double newValue);
1416 virtual ERoundingMode getRoundingMode(
void)
const;
1426 virtual void setRoundingMode(ERoundingMode roundingMode);
1439 virtual int32_t getFormatWidth(
void)
const;
1455 virtual void setFormatWidth(int32_t width);
1502 virtual EPadPosition getPadPosition(
void)
const;
1520 virtual void setPadPosition(EPadPosition padPos);
1532 virtual UBool isScientificNotation(
void);
1549 virtual void setScientificNotation(
UBool useScientific);
1561 virtual int8_t getMinimumExponentDigits(
void)
const;
1575 virtual void setMinimumExponentDigits(int8_t minExpDig);
1589 virtual UBool isExponentSignAlwaysShown(
void);
1604 virtual void setExponentSignAlwaysShown(
UBool expSignAlways);
1617 int32_t getGroupingSize(
void)
const;
1630 virtual void setGroupingSize(int32_t newValue);
1650 int32_t getSecondaryGroupingSize(
void)
const;
1663 virtual void setSecondaryGroupingSize(int32_t newValue);
1673 UBool isDecimalSeparatorAlwaysShown(
void)
const;
1683 virtual void setDecimalSeparatorAlwaysShown(
UBool newValue);
1782 virtual void applyLocalizedPattern(
const UnicodeString& pattern,
1795 virtual void applyLocalizedPattern(
const UnicodeString& pattern,
1850 int32_t getMinimumSignificantDigits()
const;
1859 int32_t getMaximumSignificantDigits()
const;
1870 void setMinimumSignificantDigits(int32_t min);
1882 void setMaximumSignificantDigits(int32_t max);
1890 UBool areSignificantDigitsUsed()
const;
1899 void setSignificantDigitsUsed(
UBool useSignificantDigits);
1928 static const char fgNumberPatterns[];
1962 int32_t precision()
const;
2007 void applyPatternInternally(
const UnicodeString& pluralCount,
2016 void applyPatternWithoutExpandAffix(
const UnicodeString& pattern,
2025 void expandAffixAdjustWidth(
const UnicodeString* pluralCount);
2039 FieldPositionHandler& handler,
2048 UChar* currency)
const;
2060 UBool currencyParsing,
2063 DigitList& digits,
UBool* status,
2064 UChar* currency)
const;
2075 UChar* currency)
const;
2077 int32_t skipPadding(
const UnicodeString& text, int32_t position)
const;
2084 UBool currencyParsing,
2086 UChar* currency)
const;
2088 static int32_t compareSimpleAffix(
const UnicodeString& affix,
2093 static int32_t skipPatternWhiteSpace(
const UnicodeString& text, int32_t pos);
2095 static int32_t skipUWhiteSpace(
const UnicodeString& text, int32_t pos);
2101 UChar* currency)
const;
2129 FieldPositionHandler& handler,
2131 UBool isPrefix)
const;
2139 UBool localized)
const;
2148 FieldPositionHandler& handler,
2155 FieldPositionHandler& handler,
2156 int32_t prefixLen, int32_t suffixLen)
const;
2158 UBool isGroupingPosition(int32_t pos)
const;
2160 void setCurrencyForSymbols();
2166 virtual void setCurrencyInternally(
const UChar* theCurrency,
UErrorCode& ec);
2172 void setupCurrencyAffixPatterns(
UErrorCode& status);
2179 UBool setupForCurrentPattern,
2180 UBool setupForPluralPattern,
2184 Hashtable* initHashForAffixPattern(
UErrorCode& status);
2185 Hashtable* initHashForAffix(
UErrorCode& status);
2187 void deleteHashForAffixPattern();
2188 void deleteHashForAffix(Hashtable*& table);
2190 void copyHashForAffixPattern(
const Hashtable* source,
2192 void copyHashForAffix(
const Hashtable* source,
2197 FieldPositionHandler& handler,
2201 FieldPositionHandler& handler,
2205 FieldPositionHandler& handler,
2210 fgCurrencySignCountZero,
2211 fgCurrencySignCountInSymbolFormat,
2212 fgCurrencySignCountInISOFormat,
2213 fgCurrencySignCountInPluralFormat
2214 } CurrencySignCount;
2220 UnicodeString fPositivePrefix;
2221 UnicodeString fPositiveSuffix;
2222 UnicodeString fNegativePrefix;
2223 UnicodeString fNegativeSuffix;
2224 UnicodeString* fPosPrefixPattern;
2225 UnicodeString* fPosSuffixPattern;
2226 UnicodeString* fNegPrefixPattern;
2227 UnicodeString* fNegSuffixPattern;
2234 ChoiceFormat* fCurrencyChoice;
2236 DigitList * fMultiplier;
2237 int32_t fGroupingSize;
2238 int32_t fGroupingSize2;
2239 UBool fDecimalSeparatorAlwaysShown;
2240 DecimalFormatSymbols* fSymbols;
2242 UBool fUseSignificantDigits;
2243 int32_t fMinSignificantDigits;
2244 int32_t fMaxSignificantDigits;
2246 UBool fUseExponentialNotation;
2247 int8_t fMinExponentDigits;
2248 UBool fExponentSignAlwaysShown;
2255 DigitList* fRoundingIncrement;
2256 ERoundingMode fRoundingMode;
2259 int32_t fFormatWidth;
2260 EPadPosition fPadPosition;
2266 UnicodeString fFormatPattern;
2280 int fCurrencySignCount;
2358 Hashtable* fAffixPatternsForCurrency;
2367 Hashtable* fAffixesForCurrency;
2368 Hashtable* fPluralAffixesForCurrency;
2371 CurrencyPluralInfo* fCurrencyPluralInfo;
2373 #if UCONFIG_HAVE_PARSEALLINPUT
2374 UNumberFormatAttributeValue fParseAllInput;
2411 #if UCONFIG_FORMAT_FASTPATHS_49
2417 uint8_t fReserved[UNUM_DECIMALFORMAT_INTERNAL_SIZE];
2423 void handleChanged();
2433 return NumberFormat::format(obj, appendTo, status);
2437 DecimalFormat::format(
double number,
2440 return format(number, appendTo, pos);
2444 DecimalFormat::format(int32_t number,
2447 return format((int64_t)number, appendTo, pos);
2450 #ifndef U_HIDE_INTERNAL_API
2453 return fSymbols->getConstSymbol(symbol);
C++ API: FieldPosition Iterator.
void * UClassID
UClassID is used to identify classes without using the compiler's RTTI.
Limit of boolean attributes.
#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.
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
UNumberFormatStyle
The possible number format styles.
FieldPositionIterator returns the field ids and their start/limit positions generated by a call to Fo...
int32_t UChar32
Define UChar32 as a type for single Unicode code points.
A mutable set of Unicode characters and multicharacter strings.
One below the first bitfield-boolean item.
uint16_t UChar
Define UChar to be UCHAR_TYPE, if that is #defined (for example, to char16_t), or wchar_t if that is ...
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers...
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: Abstract base class for all number formats.
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.