13 #ifndef __MEASUREUNIT_H__
14 #define __MEASUREUNIT_H__
18 #if U_SHOW_CPLUSPLUS_API
20 #if !UCONFIG_NO_FORMATTING
32 class StringEnumeration;
33 class MeasureUnitImpl;
37 class LongNameHandler;
80 #ifndef U_HIDE_DRAFT_API
250 #ifndef U_HIDE_INTERNAL_API
257 #endif // U_HIDE_INTERNAL_API
275 #ifndef U_HIDE_INTERNAL_API
282 #endif // U_HIDE_INTERNAL_API
333 #ifndef U_HIDE_INTERNAL_API
340 #endif // U_HIDE_INTERNAL_API
360 #endif // U_HIDE_DRAFT_API
444 return !(*
this == other);
454 const char *getType()
const;
463 const char *getSubtype()
const;
471 const char* getIdentifier()
const;
482 #ifndef U_HIDE_DRAFT_API
514 #endif // U_HIDE_DRAFT_API
545 int32_t getDimensionality(
UErrorCode& status)
const;
580 #ifndef U_HIDE_DRAFT_API
596 inline std::pair<LocalArray<MeasureUnit>, int32_t> splitToSingleUnits(
UErrorCode& status)
const;
597 #endif // U_HIDE_DRAFT_API
610 static int32_t getAvailable(
612 int32_t destCapacity,
627 static int32_t getAvailable(
630 int32_t destCapacity,
654 static UClassID U_EXPORT2 getStaticClassID(
void);
669 #ifndef U_HIDE_INTERNAL_API
675 int32_t getOffset()
const;
974 #ifndef U_HIDE_DRAFT_API
989 static MeasureUnit getMilligramOfglucosePerDeciliter();
1904 #ifndef U_HIDE_DRAFT_API
2082 #ifndef U_HIDE_DRAFT_API
2388 #ifndef U_HIDE_DRAFT_API
2406 #ifndef U_HIDE_DRAFT_API
2504 #ifndef U_HIDE_DRAFT_API
3338 #ifndef U_HIDE_DRAFT_API
3356 #ifndef U_HIDE_DRAFT_API
3374 #ifndef U_HIDE_DRAFT_API
3392 #ifndef U_HIDE_DRAFT_API
3490 #ifndef U_HIDE_DRAFT_API
3556 #ifndef U_HIDE_DRAFT_API
3622 #ifndef U_HIDE_DRAFT_API
3676 #ifndef U_HIDE_INTERNAL_API
3681 void initTime(
const char *timeId);
3695 MeasureUnitImpl* fImpl;
3706 void setTo(int32_t typeId, int32_t subTypeId);
3721 friend class MeasureUnitImpl;
3724 friend class number::impl::LongNameHandler;
3727 #ifndef U_HIDE_DRAFT_API
3729 inline std::pair<LocalArray<MeasureUnit>, int32_t>
3732 auto array = splitToSingleUnitsImpl(length, status);
3733 return std::make_pair(std::move(array), length);
3735 #endif // U_HIDE_DRAFT_API
3739 #endif // !UNCONFIG_NO_FORMATTING
3743 #endif // __MEASUREUNIT_H__
SI prefix: femto, 10^-15.
UBool operator!=(const UObject &other) const
Inequality operator.
Binary prefix: yobi, 1024^8.
The absence of an SI or binary prefix.
A unit such as length, mass, volume, currency, etc.
#define U_CAPI
This is used to declare a function as a public ICU C API.
virtual UClassID getDynamicClassID() const
ICU4C "poor man's RTTI", returns a UClassID for the actual ICU class.
Binary prefix: pebi, 1024^5.
Binary prefix: exbi, 1024^6.
SI prefix: zepto, 10^-21.
U_EXPORT UBool operator==(const StringPiece &x, const StringPiece &y)
Global operator == for StringPiece.
A compound unit, like meter-per-second.
void * UClassID
UClassID is used to identify classes without using the compiler's RTTI.
SI prefix: yocto, 10^-24.
Binary prefix: gibi, 1024^3.
Base class for 'pure' C++ implementations of uenum api.
Binary prefix: mebi, 1024^2.
#define U_I18N_API
Set to export library symbols from inside the i18n library, and to import them from outside...
A mixed unit, like hour+minute.
Binary prefix: tebi, 1024^4.
C++ API: "Smart pointers" for use with and in ICU4C C++ code.
"Smart pointer" class, deletes objects via the C++ array delete[] operator.
U_CAPI int32_t umeas_getPrefixBase(UMeasurePrefix unitPrefix)
Returns the base of the factor associated with the given unit prefix: the base is 10 for SI prefixes ...
Binary prefix: zebi, 1024^7.
UMeasurePrefix
Enumeration for SI and binary prefixes, e.g.
U_CAPI int32_t umeas_getPrefixPower(UMeasurePrefix unitPrefix)
Returns the exponent of the factor associated with the given unit prefix, for example 3 for kilo...
UErrorCode
Standard ICU4C error code type, a substitute for exceptions.
Binary prefix: kibi, 1024^1.
Basic definitions for ICU, for both C and C++ APIs.
A single unit, like kilojoule.
A string-like object that points to a sized piece of memory.
UObject is the common ICU "boilerplate" class.
int8_t UBool
The ICU boolean type, a signed-byte integer.
UMeasureUnitComplexity
Enumeration for unit complexity.