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;
152 #ifndef U_HIDE_INTERNAL_API 158 void getDecimalQuantity(impl::DecimalQuantity& output,
UErrorCode& status)
const;
164 void getAllFieldPositionsImpl(FieldPositionIteratorHandler& fpih,
UErrorCode& status)
const;
170 impl::UFormattedNumberData *fData;
182 explicit FormattedNumber(
UErrorCode errorCode)
183 : fData(nullptr), fErrorCode(errorCode) {}
185 void toDecimalNumber(ByteSink& sink,
UErrorCode& status)
const;
188 friend class LocalizedNumberFormatter;
189 friend class SimpleNumberFormatter;
192 friend struct impl::UFormattedNumberImpl;
195 template<
typename StringClass>
196 StringClass FormattedNumber::toDecimalNumber(
UErrorCode& status)
const {
199 toDecimalNumber(sink, status);
210 #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.