11 #ifndef __MEASUREUNIT_H__
12 #define __MEASUREUNIT_H__
16 #if !UCONFIG_NO_FORMATTING
27 class StringEnumeration;
79 #ifndef U_HIDE_DRAFT_API
86 return !(*
this == other);
93 const char *getType()
const;
99 const char *getSubtype()
const;
112 static int32_t getAvailable(
114 int32_t destCapacity,
129 static int32_t getAvailable(
132 int32_t destCapacity,
157 static UClassID U_EXPORT2 getStaticClassID(
void);
172 #ifndef U_HIDE_INTERNAL_API
179 int32_t getIndex()
const;
186 static int32_t getIndexCount();
191 #ifndef U_HIDE_DRAFT_API
563 #ifndef U_HIDE_INTERNAL_API
568 void initTime(
const char *timeId);
574 void initCurrency(
const char *isoCurrency);
583 MeasureUnit(int32_t typeId, int32_t subTypeId) : fTypeId(typeId), fSubTypeId(subTypeId) {
586 void setTo(int32_t typeId, int32_t subTypeId);
587 int32_t getOffset()
const;
588 static MeasureUnit *create(
int typeId,
int subTypeId,
UErrorCode &status);
593 #endif // !UNCONFIG_NO_FORMATTING
594 #endif // __MEASUREUNIT_H__
UBool operator!=(const UObject &other) const
Inequality operator.
A unit such as length, mass, volume, currency, etc.
virtual UClassID getDynamicClassID() const
ICU4C "poor man's RTTI", returns a UClassID for the actual ICU class.
U_EXPORT UBool operator==(const StringPiece &x, const StringPiece &y)
Global operator == for StringPiece.
void * UClassID
UClassID is used to identify classes without using the compiler's RTTI.
Base class for 'pure' C++ implementations of uenum api.
#define U_I18N_API
Set to export library symbols from inside the i18n library, and to import them from outside...
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
MeasureUnit()
Default constructor.
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers...
Basic definitions for ICU, for both C and C++ APIs.
UObject is the common ICU "boilerplate" class.
int8_t UBool
The ICU boolean type.