34 #if !UCONFIG_NO_FORMATTING
48 #if UCONFIG_FORMAT_FASTPATHS_49
49 #define UNUM_DECIMALFORMAT_INTERNAL_SIZE 16
56 class CurrencyPluralInfo;
59 class FieldPositionHandler;
60 class DecimalFormatStaticSets;
64 #if defined (_MSC_VER)
752 #ifndef U_HIDE_INTERNAL_API
770 #if UCONFIG_HAVE_PARSEALLINPUT
774 void setParseAllInput(UNumberFormatAttributeValue value);
1222 virtual void setPositivePrefix(
const UnicodeString& newValue);
1241 virtual void setNegativePrefix(
const UnicodeString& newValue);
1260 virtual void setPositiveSuffix(
const UnicodeString& newValue);
1279 virtual void setNegativeSuffix(
const UnicodeString& newValue);
1291 int32_t getMultiplier(
void)
const;
1303 virtual void setMultiplier(int32_t newValue);
1314 virtual double getRoundingIncrement(
void)
const;
1327 virtual void setRoundingIncrement(
double newValue);
1337 virtual ERoundingMode getRoundingMode(
void)
const;
1347 virtual void setRoundingMode(ERoundingMode roundingMode);
1360 virtual int32_t getFormatWidth(
void)
const;
1376 virtual void setFormatWidth(int32_t width);
1423 virtual EPadPosition getPadPosition(
void)
const;
1441 virtual void setPadPosition(EPadPosition padPos);
1453 virtual UBool isScientificNotation(
void)
const;
1470 virtual void setScientificNotation(
UBool useScientific);
1482 virtual int8_t getMinimumExponentDigits(
void)
const;
1496 virtual void setMinimumExponentDigits(int8_t minExpDig);
1510 virtual UBool isExponentSignAlwaysShown(
void)
const;
1525 virtual void setExponentSignAlwaysShown(
UBool expSignAlways);
1538 int32_t getGroupingSize(
void)
const;
1551 virtual void setGroupingSize(int32_t newValue);
1571 int32_t getSecondaryGroupingSize(
void)
const;
1584 virtual void setSecondaryGroupingSize(int32_t newValue);
1594 UBool isDecimalSeparatorAlwaysShown(
void)
const;
1604 virtual void setDecimalSeparatorAlwaysShown(
UBool newValue);
1703 virtual void applyLocalizedPattern(
const UnicodeString& pattern,
1716 virtual void applyLocalizedPattern(
const UnicodeString& pattern,
1771 int32_t getMinimumSignificantDigits()
const;
1780 int32_t getMaximumSignificantDigits()
const;
1793 void setMinimumSignificantDigits(int32_t min);
1806 void setMaximumSignificantDigits(int32_t max);
1814 UBool areSignificantDigitsUsed()
const;
1823 void setSignificantDigitsUsed(
UBool useSignificantDigits);
1852 static const char fgNumberPatterns[];
1854 #ifndef U_HIDE_INTERNAL_API
1861 FixedDecimal getFixedDecimal(
double number,
UErrorCode &status)
const;
1877 FixedDecimal getFixedDecimal(DigitList &number,
UErrorCode &status)
const;
1912 int32_t precision()
const;
1957 void applyPatternInternally(
const UnicodeString& pluralCount,
1966 void applyPatternWithoutExpandAffix(
const UnicodeString& pattern,
1975 void expandAffixAdjustWidth(
const UnicodeString* pluralCount);
1989 FieldPositionHandler& handler,
1998 UChar* currency)
const;
2010 UBool complexCurrencyParsing,
2013 DigitList& digits,
UBool* status,
2014 UChar* currency)
const;
2025 UChar* currency)
const;
2027 int32_t skipPadding(
const UnicodeString& text, int32_t position)
const;
2034 UBool complexCurrencyParsing,
2036 UChar* currency)
const;
2045 UBool lenient)
const;
2047 static int32_t skipPatternWhiteSpace(
const UnicodeString& text, int32_t pos);
2049 static int32_t skipUWhiteSpace(
const UnicodeString& text, int32_t pos);
2051 static int32_t skipUWhiteSpaceAndMarks(
const UnicodeString& text, int32_t pos);
2053 static int32_t skipBidiMarks(
const UnicodeString& text, int32_t pos);
2059 UChar* currency)
const;
2087 FieldPositionHandler& handler,
2089 UBool isPrefix)
const;
2097 UBool localized)
const;
2106 FieldPositionHandler& handler,
2113 FieldPositionHandler& handler,
2114 int32_t prefixLen, int32_t suffixLen)
const;
2116 UBool isGroupingPosition(int32_t pos)
const;
2118 void setCurrencyForSymbols();
2124 virtual void setCurrencyInternally(
const UChar* theCurrency,
UErrorCode& ec);
2130 void setupCurrencyAffixPatterns(
UErrorCode& status);
2137 UBool setupForCurrentPattern,
2138 UBool setupForPluralPattern,
2142 Hashtable* initHashForAffixPattern(
UErrorCode& status);
2143 Hashtable* initHashForAffix(
UErrorCode& status);
2145 void deleteHashForAffixPattern();
2146 void deleteHashForAffix(Hashtable*& table);
2148 void copyHashForAffixPattern(
const Hashtable* source,
2150 void copyHashForAffix(
const Hashtable* source,
2155 FieldPositionHandler& handler,
2159 FieldPositionHandler& handler,
2163 FieldPositionHandler& handler,
2168 fgCurrencySignCountZero,
2169 fgCurrencySignCountInSymbolFormat,
2170 fgCurrencySignCountInISOFormat,
2171 fgCurrencySignCountInPluralFormat
2172 } CurrencySignCount;
2178 UnicodeString fPositivePrefix;
2179 UnicodeString fPositiveSuffix;
2180 UnicodeString fNegativePrefix;
2181 UnicodeString fNegativeSuffix;
2182 UnicodeString* fPosPrefixPattern;
2183 UnicodeString* fPosSuffixPattern;
2184 UnicodeString* fNegPrefixPattern;
2185 UnicodeString* fNegSuffixPattern;
2192 ChoiceFormat* fCurrencyChoice;
2194 DigitList * fMultiplier;
2196 int32_t fGroupingSize;
2197 int32_t fGroupingSize2;
2198 UBool fDecimalSeparatorAlwaysShown;
2199 DecimalFormatSymbols* fSymbols;
2201 UBool fUseSignificantDigits;
2202 int32_t fMinSignificantDigits;
2203 int32_t fMaxSignificantDigits;
2205 UBool fUseExponentialNotation;
2206 int8_t fMinExponentDigits;
2207 UBool fExponentSignAlwaysShown;
2214 DigitList* fRoundingIncrement;
2215 ERoundingMode fRoundingMode;
2218 int32_t fFormatWidth;
2219 EPadPosition fPadPosition;
2225 UnicodeString fFormatPattern;
2239 int fCurrencySignCount;
2317 Hashtable* fAffixPatternsForCurrency;
2326 Hashtable* fAffixesForCurrency;
2327 Hashtable* fPluralAffixesForCurrency;
2330 CurrencyPluralInfo* fCurrencyPluralInfo;
2332 #if UCONFIG_HAVE_PARSEALLINPUT
2333 UNumberFormatAttributeValue fParseAllInput;
2337 const DecimalFormatStaticSets *fStaticSets;
2342 #ifndef U_HIDE_INTERNAL_API
2347 DigitList& _round(
const DigitList& number, DigitList& adjustedNum,
UBool& isNegative,
UErrorCode& status)
const;
2381 #if UCONFIG_FORMAT_FASTPATHS_49
2387 uint8_t fReserved[UNUM_DECIMALFORMAT_INTERNAL_SIZE];
2393 void handleChanged();
2399 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.