Go to the documentation of this file.
27 #if !UCONFIG_NO_FORMATTING
38 class DecimalQuantity;
110 #if !UCONFIG_NO_CONVERSION
275 Type getType(
void)
const;
283 UBool isNumeric()
const;
313 int32_t
getLong(
void)
const {
return (int32_t)fValue.fInt64; }
339 int64_t
getInt64(
void)
const {
return fValue.fInt64; }
384 { result=*fValue.fString;
return result; }
442 { count=fValue.fArrayAndCount.fCount;
return fValue.fArrayAndCount.fArray; }
471 const UObject* getObject()
const;
499 void setDouble(
double d);
507 void setLong(int32_t l);
515 void setInt64(int64_t ll);
523 void setDate(
UDate d);
540 void setArray(
const Formattable* array, int32_t count);
555 void adoptArray(
Formattable* array, int32_t count);
564 void adoptObject(
UObject* objectToAdopt);
595 static UClassID U_EXPORT2 getStaticClassID();
631 #ifndef U_HIDE_DEPRECATED_API
638 inline int32_t getLong(
UErrorCode* status)
const;
641 #ifndef U_HIDE_INTERNAL_API
656 void populateDecimalQuantity(number::impl::DecimalQuantity& output,
UErrorCode& status)
const;
664 void adoptDecimalQuantity(number::impl::DecimalQuantity *dq);
672 CharString *internalGetCharString(
UErrorCode &status);
702 CharString *fDecimalStr;
704 number::impl::DecimalQuantity *fDecimalQuantity;
707 UnicodeString fBogus;
711 if (fType != kDate) {
721 return *fValue.fString;
725 return *fValue.fString;
728 #ifndef U_HIDE_DEPRECATED_API
729 inline int32_t Formattable::getLong(
UErrorCode* status)
const {
730 return getLong(*status);
738 inline const UFormattable* Formattable::toUFormattable()
const {
Basic definitions for ICU, for both C and C++ APIs.
@ U_INVALID_FORMAT_ERROR
Data format is not what is expected.
int8_t UBool
The ICU boolean type.
U_EXPORT UBool operator==(const StringPiece &x, const StringPiece &y)
Global operator == for StringPiece.
C++ API: StringPiece: Read-only byte string wrapper class.
UnicodeString is a string class that stores Unicode characters directly and provides similar function...
UObject is the common ICU "boilerplate" class.
void * UClassID
UClassID is used to identify classes without using the compiler's RTTI.
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers,...
virtual UClassID getDynamicClassID() const
ICU4C "poor man's RTTI", returns a UClassID for the actual ICU class.
#define U_SUCCESS(x)
Does the error code indicate success?
double UDate
Date and Time data type.
#define U_NAMESPACE_BEGIN
A string-like object that points to a sized piece of memory.