4 #ifndef __SIMPLENUMBERFORMATTERH__
5 #define __SIMPLENUMBERFORMATTERH__
9 #if U_SHOW_CPLUSPLUS_API
11 #if !UCONFIG_NO_FORMATTING
34 class SimpleDateFormat;
40 class UFormattedNumberData;
41 struct SimpleMicroProps;
42 class AdoptingSignumModifierStore;
69 void multiplyByPowerOfTen(int32_t power,
UErrorCode& status);
81 #ifndef U_HIDE_DRAFT_API
87 void setMaximumIntegerDigits(uint32_t maximumIntegerDigits,
UErrorCode& status);
88 #endif // U_HIDE_DRAFT_API
90 #ifndef U_HIDE_DEPRECATED_API
97 void truncateStart(uint32_t maximumIntegerDigits,
UErrorCode& status);
98 #endif // U_HIDE_DEPRECATED_API
105 void setMinimumIntegerDigits(uint32_t minimumIntegerDigits,
UErrorCode& status);
112 void setMinimumFractionDigits(uint32_t minimumFractionDigits,
UErrorCode& status);
151 other.fData =
nullptr;
163 other.fData =
nullptr;
174 impl::UFormattedNumberData* fData =
nullptr;
247 return format(SimpleNumber::forInt64(value, status), status);
250 #ifndef U_HIDE_INTERNAL_API
256 #endif // U_HIDE_INTERNAL_API
280 fGroupingStrategy = other.fGroupingStrategy;
281 fOwnedSymbols = other.fOwnedSymbols;
282 fMicros = other.fMicros;
283 fPatternModifier = other.fPatternModifier;
284 other.fOwnedSymbols =
nullptr;
285 other.fMicros =
nullptr;
286 other.fPatternModifier =
nullptr;
296 fGroupingStrategy = other.fGroupingStrategy;
297 fOwnedSymbols = other.fOwnedSymbols;
298 fMicros = other.fMicros;
299 fPatternModifier = other.fPatternModifier;
300 other.fOwnedSymbols =
nullptr;
301 other.fMicros =
nullptr;
302 other.fPatternModifier =
nullptr;
323 impl::SimpleMicroProps* fMicros =
nullptr;
324 impl::AdoptingSignumModifierStore* fPatternModifier =
nullptr;
335 #endif // __SIMPLENUMBERFORMATTERH__
SimpleNumber & operator=(SimpleNumber &&other) noexcept
SimpleNumber move assignment.
UNumberGroupingStrategy
An enum declaring the strategy for when and how to display grouping separators (i.e., the separator, often a comma or period, after every 2-3 powers of ten).
#define U_I18N_API
Set to export library symbols from inside the i18n library, and to import them from outside...
~SimpleNumber()
Destruct this SimpleNumber, cleaning up any memory it might own.
UNumberFormatRoundingMode
The possible number format rounding modes.
An input type for SimpleNumberFormatter.
UErrorCode
Standard ICU4C error code type, a substitute for exceptions.
C++ API: Symbols for formatting numbers.
Basic definitions for ICU, for both C and C++ APIs.
Display grouping using the default strategy for all locales.
SimpleNumber(SimpleNumber &&other) noexcept
SimpleNumber move constructor.
UMemory is the common ICU base class.
A Locale object represents a specific geographical, political, or cultural region.