4#ifndef __SIMPLENUMBERFORMATTERH__
5#define __SIMPLENUMBERFORMATTERH__
9#if U_SHOW_CPLUSPLUS_API
11#if !UCONFIG_NO_FORMATTING
34class SimpleDateFormat;
40class UFormattedNumberData;
41struct SimpleMicroProps;
42class AdoptingSignumModifierStore;
81#ifndef U_HIDE_DRAFT_API
141 other.fData =
nullptr;
153 other.fData =
nullptr;
164 impl::UFormattedNumberData* fData =
nullptr;
237 return format(SimpleNumber::forInt64(value,
status),
status);
240#ifndef U_HIDE_INTERNAL_API
270 fGroupingStrategy =
other.fGroupingStrategy;
271 fOwnedSymbols =
other.fOwnedSymbols;
272 fMicros =
other.fMicros;
273 fPatternModifier =
other.fPatternModifier;
274 other.fOwnedSymbols =
nullptr;
275 other.fMicros =
nullptr;
276 other.fPatternModifier =
nullptr;
286 fGroupingStrategy =
other.fGroupingStrategy;
287 fOwnedSymbols =
other.fOwnedSymbols;
288 fMicros =
other.fMicros;
289 fPatternModifier =
other.fPatternModifier;
290 other.fOwnedSymbols =
nullptr;
291 other.fMicros =
nullptr;
292 other.fPatternModifier =
nullptr;
313 impl::SimpleMicroProps* fMicros =
nullptr;
314 impl::AdoptingSignumModifierStore* fPatternModifier =
nullptr;
"Smart pointer" base class; do not use directly: use LocalPointer etc.
A Locale object represents a specific geographical, political, or cultural region.
UMemory is the common ICU base class.
An input type for SimpleNumberFormatter.
void setSign(USimpleNumberSign sign, UErrorCode &status)
Sets the sign of the number: an explicit plus sign, explicit minus sign, or no sign.
SimpleNumber & operator=(SimpleNumber &&other) noexcept
SimpleNumber move assignment.
SimpleNumber(SimpleNumber &&other) noexcept
SimpleNumber move constructor.
void setMinimumIntegerDigits(uint32_t minimumIntegerDigits, UErrorCode &status)
Pads the beginning of the number with zeros up to the given minimum number of integer digits.
void setMaximumIntegerDigits(uint32_t maximumIntegerDigits, UErrorCode &status)
Sets the number of integer digits to the given amount, truncating if necessary.
void setMinimumFractionDigits(uint32_t minimumFractionDigits, UErrorCode &status)
Pads the end of the number with zeros up to the given minimum number of fraction digits.
~SimpleNumber()
Destruct this SimpleNumber, cleaning up any memory it might own.
void multiplyByPowerOfTen(int32_t power, UErrorCode &status)
Changes the value of the SimpleNumber by a power of 10.
SimpleNumber()=default
Creates a new, empty SimpleNumber that does not contain a value.
static SimpleNumber forInt64(int64_t value, UErrorCode &status)
Creates a SimpleNumber for an integer.
void roundTo(int32_t power, UNumberFormatRoundingMode roundingMode, UErrorCode &status)
Rounds the value currently stored in the SimpleNumber to the given power of 10, which can be before o...
C++ API: Symbols for formatting numbers.
UNumberFormatRoundingMode
The possible number format rounding modes.
UNumberGroupingStrategy
An enum declaring the strategy for when and how to display grouping separators (i....
@ UNUM_GROUPING_AUTO
Display grouping using the default strategy for all locales.
Basic definitions for ICU, for both C and C++ APIs.
UErrorCode
Standard ICU4C error code type, a substitute for exceptions.
#define U_I18N_API
Set to export library symbols from inside the i18n library, and to import them from outside.