4 #ifndef __FORMATTEDNUMBER_H__
5 #define __FORMATTEDNUMBER_H__
9 #if U_SHOW_CPLUSPLUS_API
11 #if !UCONFIG_NO_FORMATTING
27 class FieldPositionIteratorHandler;
32 class DecimalQuantity;
33 class UFormattedNumberData;
34 struct UFormattedNumberImpl;
127 template<typename StringClass>
128 inline StringClass toDecimalNumber(
UErrorCode& status) const;
143 #ifndef U_HIDE_DRAFT_API
154 #endif // U_HIDE_DRAFT_API
156 #ifndef U_HIDE_INTERNAL_API
162 void getDecimalQuantity(impl::DecimalQuantity& output,
UErrorCode& status)
const;
168 void getAllFieldPositionsImpl(FieldPositionIteratorHandler& fpih,
UErrorCode& status)
const;
174 impl::UFormattedNumberData *fData;
186 explicit FormattedNumber(
UErrorCode errorCode)
187 : fData(nullptr), fErrorCode(errorCode) {}
189 void toDecimalNumber(ByteSink& sink,
UErrorCode& status)
const;
192 friend class LocalizedNumberFormatter;
193 friend class SimpleNumberFormatter;
196 friend struct impl::UFormattedNumberImpl;
199 template<
typename StringClass>
200 StringClass FormattedNumber::toDecimalNumber(
UErrorCode& status)
const {
203 toDecimalNumber(sink, status);
214 #endif // __FORMATTEDNUMBER_H__
A unit such as length, mass, volume, currency, etc.
#define U_I18N_API
Set to export library symbols from inside the i18n library, and to import them from outside...
C++ API: A unit for measuring a quantity.
C API: Display options (enum types, values, helper functions)
C++ API: Common ICU base class UObject.
Represents a span of a string containing a given field.
UErrorCode
Standard ICU4C error code type, a substitute for exceptions.
UDisplayOptionsNounClass
Represents all the grammatical noun classes that are supported by CLDR.
Basic definitions for ICU, for both C and C++ APIs.
Implementation of ByteSink that writes to a "string".
UnicodeString is a string class that stores Unicode characters directly and provides similar function...
UMemory is the common ICU base class.
Requested operation can not be completed with ICU in its current state.
int8_t UBool
The ICU boolean type, a signed-byte integer.
Base class for objects to which Unicode characters and strings can be appended.