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);
1249 virtual void setPositivePrefix(
const UnicodeString& newValue);
1268 virtual void setNegativePrefix(
const UnicodeString& newValue);
1287 virtual void setPositiveSuffix(
const UnicodeString& newValue);
1306 virtual void setNegativeSuffix(
const UnicodeString& newValue);
1318 int32_t getMultiplier(
void)
const;
1330 virtual void setMultiplier(int32_t newValue);
1341 virtual double getRoundingIncrement(
void)
const;
1354 virtual void setRoundingIncrement(
double newValue);
1387 virtual int32_t getFormatWidth(
void)
const;
1403 virtual void setFormatWidth(int32_t width);
1480 virtual UBool isScientificNotation(
void)
const;
1497 virtual void setScientificNotation(
UBool useScientific);
1509 virtual int8_t getMinimumExponentDigits(
void)
const;
1523 virtual void setMinimumExponentDigits(int8_t minExpDig);
1537 virtual UBool isExponentSignAlwaysShown(
void)
const;
1552 virtual void setExponentSignAlwaysShown(
UBool expSignAlways);
1565 int32_t getGroupingSize(
void)
const;
1578 virtual void setGroupingSize(int32_t newValue);
1598 int32_t getSecondaryGroupingSize(
void)
const;
1611 virtual void setSecondaryGroupingSize(int32_t newValue);
1621 UBool isDecimalSeparatorAlwaysShown(
void)
const;
1631 virtual void setDecimalSeparatorAlwaysShown(
UBool newValue);
1633 #ifndef U_HIDE_DRAFT_API 1640 UBool isDecimalPatternMatchRequired(
void)
const;
1652 virtual void setDecimalPatternMatchRequired(
UBool newValue);
1752 virtual void applyLocalizedPattern(
const UnicodeString& pattern,
1765 virtual void applyLocalizedPattern(
const UnicodeString& pattern,
1820 int32_t getMinimumSignificantDigits()
const;
1829 int32_t getMaximumSignificantDigits()
const;
1842 void setMinimumSignificantDigits(int32_t min);
1855 void setMaximumSignificantDigits(int32_t max);
1863 UBool areSignificantDigitsUsed()
const;
1872 void setSignificantDigitsUsed(
UBool useSignificantDigits);
1896 #ifndef U_HIDE_DRAFT_API 1914 #ifndef U_HIDE_DEPRECATED_API 1920 static const char fgNumberPatterns[];
1923 #ifndef U_HIDE_INTERNAL_API 1930 FixedDecimal getFixedDecimal(
double number,
UErrorCode &status)
const;
1946 FixedDecimal getFixedDecimal(DigitList &number,
UErrorCode &status)
const;
1981 int32_t precision()
const;
2026 void applyPatternInternally(
const UnicodeString& pluralCount,
2035 void applyPatternWithoutExpandAffix(
const UnicodeString& pattern,
2044 void expandAffixAdjustWidth(
const UnicodeString* pluralCount);
2058 FieldPositionHandler& handler,
2067 UChar* currency)
const;
2079 UBool complexCurrencyParsing,
2082 DigitList& digits,
UBool* status,
2083 UChar* currency)
const;
2094 UChar* currency)
const;
2096 int32_t skipPadding(
const UnicodeString& text, int32_t position)
const;
2103 UBool complexCurrencyParsing,
2105 UChar* currency)
const;
2114 UBool lenient)
const;
2116 static int32_t skipPatternWhiteSpace(
const UnicodeString& text, int32_t pos);
2118 static int32_t skipUWhiteSpace(
const UnicodeString& text, int32_t pos);
2120 static int32_t skipUWhiteSpaceAndMarks(
const UnicodeString& text, int32_t pos);
2122 static int32_t skipBidiMarks(
const UnicodeString& text, int32_t pos);
2128 UChar* currency)
const;
2156 FieldPositionHandler& handler,
2158 UBool isPrefix)
const;
2166 UBool localized)
const;
2175 FieldPositionHandler& handler,
2182 FieldPositionHandler& handler,
2183 int32_t prefixLen, int32_t suffixLen)
const;
2185 UBool isGroupingPosition(int32_t pos)
const;
2187 void setCurrencyForSymbols();
2193 virtual void setCurrencyInternally(
const UChar* theCurrency,
UErrorCode& ec);
2199 void setupCurrencyAffixPatterns(
UErrorCode& status);
2206 UBool setupForCurrentPattern,
2207 UBool setupForPluralPattern,
2211 double getCurrencyRounding(
const UChar* currency,
2215 int getCurrencyFractionDigits(
const UChar* currency,
2219 Hashtable* initHashForAffixPattern(
UErrorCode& status);
2220 Hashtable* initHashForAffix(
UErrorCode& status);
2222 void deleteHashForAffixPattern();
2223 void deleteHashForAffix(Hashtable*& table);
2225 void copyHashForAffixPattern(
const Hashtable* source,
2227 void copyHashForAffix(
const Hashtable* source,
2232 FieldPositionHandler& handler,
2236 FieldPositionHandler& handler,
2240 FieldPositionHandler& handler,
2263 DigitList * fMultiplier;
2265 int32_t fGroupingSize;
2266 int32_t fGroupingSize2;
2267 UBool fDecimalSeparatorAlwaysShown;
2270 UBool fUseSignificantDigits;
2271 int32_t fMinSignificantDigits;
2272 int32_t fMaxSignificantDigits;
2274 UBool fUseExponentialNotation;
2275 int8_t fMinExponentDigits;
2276 UBool fExponentSignAlwaysShown;
2283 DigitList* fRoundingIncrement;
2287 int32_t fFormatWidth;
2308 int fCurrencySignCount;
2386 Hashtable* fAffixPatternsForCurrency;
2395 Hashtable* fAffixesForCurrency;
2396 Hashtable* fPluralAffixesForCurrency;
2401 #if UCONFIG_HAVE_PARSEALLINPUT 2402 UNumberFormatAttributeValue fParseAllInput;
2406 const DecimalFormatStaticSets *fStaticSets;
2413 #ifndef U_HIDE_INTERNAL_API 2418 DigitList& _round(
const DigitList& number, DigitList& adjustedNum,
UBool& isNegative,
UErrorCode& status)
const;
2452 #if UCONFIG_FORMAT_FASTPATHS_49 2458 uint8_t fReserved[UNUM_DECIMALFORMAT_INTERNAL_SIZE];
2464 void handleChanged();
2470 return fSymbols->getConstSymbol(symbol);
enum bitset for boolean fields.
C++ API: FieldPosition Iterator.
UDisplayContext
Display context settings.
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...
UCurrencyUsage
Currency Usage used for Decimal Format.
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.