4 #ifndef __FORMATTEDNUMBER_H__ 5 #define __FORMATTEDNUMBER_H__ 9 #if U_SHOW_CPLUSPLUS_API 11 #if !UCONFIG_NO_FORMATTING 27 class FieldPositionIteratorHandler;
28 class SimpleDateFormat;
33 class DecimalQuantity;
34 class UFormattedNumberData;
35 struct UFormattedNumberImpl;
128 template<
typename StringClass>
129 inline StringClass toDecimalNumber(
UErrorCode& status)
const;
153 #ifndef U_HIDE_INTERNAL_API 159 void getDecimalQuantity(impl::DecimalQuantity& output,
UErrorCode& status)
const;
165 void getAllFieldPositionsImpl(FieldPositionIteratorHandler& fpih,
UErrorCode& status)
const;
171 impl::UFormattedNumberData *fData;
183 explicit FormattedNumber(
UErrorCode errorCode)
184 : fData(nullptr), fErrorCode(errorCode) {}
186 void toDecimalNumber(ByteSink& sink,
UErrorCode& status)
const;
189 friend class LocalizedNumberFormatter;
190 friend class SimpleNumberFormatter;
193 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.