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);
1250 virtual void setPositivePrefix(
const UnicodeString& newValue);
1269 virtual void setNegativePrefix(
const UnicodeString& newValue);
1288 virtual void setPositiveSuffix(
const UnicodeString& newValue);
1307 virtual void setNegativeSuffix(
const UnicodeString& newValue);
1319 int32_t getMultiplier(
void)
const;
1331 virtual void setMultiplier(int32_t newValue);
1342 virtual double getRoundingIncrement(
void)
const;
1355 virtual void setRoundingIncrement(
double newValue);
1365 virtual ERoundingMode getRoundingMode(
void)
const;
1375 virtual void setRoundingMode(ERoundingMode roundingMode);
1388 virtual int32_t getFormatWidth(
void)
const;
1404 virtual void setFormatWidth(int32_t width);
1451 virtual EPadPosition getPadPosition(
void)
const;
1469 virtual void setPadPosition(EPadPosition padPos);
1481 virtual UBool isScientificNotation(
void)
const;
1498 virtual void setScientificNotation(
UBool useScientific);
1510 virtual int8_t getMinimumExponentDigits(
void)
const;
1524 virtual void setMinimumExponentDigits(int8_t minExpDig);
1538 virtual UBool isExponentSignAlwaysShown(
void)
const;
1553 virtual void setExponentSignAlwaysShown(
UBool expSignAlways);
1566 int32_t getGroupingSize(
void)
const;
1579 virtual void setGroupingSize(int32_t newValue);
1599 int32_t getSecondaryGroupingSize(
void)
const;
1612 virtual void setSecondaryGroupingSize(int32_t newValue);
1622 UBool isDecimalSeparatorAlwaysShown(
void)
const;
1632 virtual void setDecimalSeparatorAlwaysShown(
UBool newValue);
1731 virtual void applyLocalizedPattern(
const UnicodeString& pattern,
1744 virtual void applyLocalizedPattern(
const UnicodeString& pattern,
1799 int32_t getMinimumSignificantDigits()
const;
1808 int32_t getMaximumSignificantDigits()
const;
1821 void setMinimumSignificantDigits(int32_t min);
1834 void setMaximumSignificantDigits(int32_t max);
1842 UBool areSignificantDigitsUsed()
const;
1851 void setSignificantDigitsUsed(
UBool useSignificantDigits);
1880 static const char fgNumberPatterns[];
1882 #ifndef U_HIDE_INTERNAL_API
1889 FixedDecimal getFixedDecimal(
double number,
UErrorCode &status)
const;
1905 FixedDecimal getFixedDecimal(DigitList &number,
UErrorCode &status)
const;
1940 int32_t precision()
const;
1985 void applyPatternInternally(
const UnicodeString& pluralCount,
1994 void applyPatternWithoutExpandAffix(
const UnicodeString& pattern,
2003 void expandAffixAdjustWidth(
const UnicodeString* pluralCount);
2017 FieldPositionHandler& handler,
2026 UChar* currency)
const;
2038 UBool complexCurrencyParsing,
2041 DigitList& digits,
UBool* status,
2042 UChar* currency)
const;
2053 UChar* currency)
const;
2055 int32_t skipPadding(
const UnicodeString& text, int32_t position)
const;
2062 UBool complexCurrencyParsing,
2064 UChar* currency)
const;
2073 UBool lenient)
const;
2075 static int32_t skipPatternWhiteSpace(
const UnicodeString& text, int32_t pos);
2077 static int32_t skipUWhiteSpace(
const UnicodeString& text, int32_t pos);
2079 static int32_t skipUWhiteSpaceAndMarks(
const UnicodeString& text, int32_t pos);
2081 static int32_t skipBidiMarks(
const UnicodeString& text, int32_t pos);
2087 UChar* currency)
const;
2115 FieldPositionHandler& handler,
2117 UBool isPrefix)
const;
2125 UBool localized)
const;
2134 FieldPositionHandler& handler,
2141 FieldPositionHandler& handler,
2142 int32_t prefixLen, int32_t suffixLen)
const;
2144 UBool isGroupingPosition(int32_t pos)
const;
2146 void setCurrencyForSymbols();
2152 virtual void setCurrencyInternally(
const UChar* theCurrency,
UErrorCode& ec);
2158 void setupCurrencyAffixPatterns(
UErrorCode& status);
2165 UBool setupForCurrentPattern,
2166 UBool setupForPluralPattern,
2170 Hashtable* initHashForAffixPattern(
UErrorCode& status);
2171 Hashtable* initHashForAffix(
UErrorCode& status);
2173 void deleteHashForAffixPattern();
2174 void deleteHashForAffix(Hashtable*& table);
2176 void copyHashForAffixPattern(
const Hashtable* source,
2178 void copyHashForAffix(
const Hashtable* source,
2183 FieldPositionHandler& handler,
2187 FieldPositionHandler& handler,
2191 FieldPositionHandler& handler,
2214 DigitList * fMultiplier;
2216 int32_t fGroupingSize;
2217 int32_t fGroupingSize2;
2218 UBool fDecimalSeparatorAlwaysShown;
2221 UBool fUseSignificantDigits;
2222 int32_t fMinSignificantDigits;
2223 int32_t fMaxSignificantDigits;
2225 UBool fUseExponentialNotation;
2226 int8_t fMinExponentDigits;
2227 UBool fExponentSignAlwaysShown;
2234 DigitList* fRoundingIncrement;
2235 ERoundingMode fRoundingMode;
2238 int32_t fFormatWidth;
2239 EPadPosition fPadPosition;
2259 int fCurrencySignCount;
2337 Hashtable* fAffixPatternsForCurrency;
2346 Hashtable* fAffixesForCurrency;
2347 Hashtable* fPluralAffixesForCurrency;
2352 #if UCONFIG_HAVE_PARSEALLINPUT
2353 UNumberFormatAttributeValue fParseAllInput;
2357 const DecimalFormatStaticSets *fStaticSets;
2362 #ifndef U_HIDE_INTERNAL_API
2367 DigitList& _round(
const DigitList& number, DigitList& adjustedNum,
UBool& isNegative,
UErrorCode& status)
const;
2401 #if UCONFIG_FORMAT_FASTPATHS_49
2407 uint8_t fReserved[UNUM_DECIMALFORMAT_INTERNAL_SIZE];
2413 void handleChanged();
2419 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...
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.