13 #ifndef __MEASUREUNIT_H__
14 #define __MEASUREUNIT_H__
18 #if U_SHOW_CPLUSPLUS_API
20 #if !UCONFIG_NO_FORMATTING
33 class StringEnumeration;
34 class MeasureUnitImpl;
36 namespace number::impl {
37 class LongNameHandler;
122 #ifndef U_HIDE_INTERNAL_API
128 #ifndef U_HIDE_DRAFT_API
283 #ifndef U_HIDE_INTERNAL_API
289 #ifndef U_HIDE_DRAFT_API
295 #endif // U_HIDE_INTERNAL_API
313 #ifndef U_HIDE_INTERNAL_API
320 #endif // U_HIDE_INTERNAL_API
371 #ifndef U_HIDE_INTERNAL_API
378 #endif // U_HIDE_INTERNAL_API
484 return !(*
this == other);
494 const char *getType()
const;
503 const char *getSubtype()
const;
511 const char* getIdentifier()
const;
554 #ifndef U_HIDE_DRAFT_API
588 uint64_t getConstantDenominator(
UErrorCode &status)
const;
621 int32_t getDimensionality(
UErrorCode& status)
const;
677 inline std::pair<LocalArray<MeasureUnit>, int32_t> splitToSingleUnits(
UErrorCode& status)
const;
690 static int32_t getAvailable(
692 int32_t destCapacity,
707 static int32_t getAvailable(
710 int32_t destCapacity,
734 static UClassID U_EXPORT2 getStaticClassID();
749 #ifndef U_HIDE_INTERNAL_API
755 int32_t getOffset()
const;
878 #ifndef U_HIDE_DRAFT_API
912 #ifndef U_HIDE_DRAFT_API
930 #ifndef U_HIDE_DRAFT_API
980 #ifndef U_HIDE_DRAFT_API
1142 #ifndef U_HIDE_DRAFT_API
1174 static MeasureUnit getMilligramOfglucosePerDeciliter();
1176 #ifndef U_HIDE_DEPRECATED_API
1230 #ifndef U_HIDE_DRAFT_API
1248 #ifndef U_HIDE_DRAFT_API
1266 #ifndef U_HIDE_DRAFT_API
1304 #ifndef U_HIDE_DRAFT_API
1674 #ifndef U_HIDE_DRAFT_API
1932 #ifndef U_HIDE_DRAFT_API
1950 #ifndef U_HIDE_DRAFT_API
1968 #ifndef U_HIDE_DRAFT_API
2018 #ifndef U_HIDE_DRAFT_API
2052 #ifndef U_HIDE_DRAFT_API
2086 #ifndef U_HIDE_DRAFT_API
2120 #ifndef U_HIDE_DRAFT_API
2170 #ifndef U_HIDE_DRAFT_API
2252 #ifndef U_HIDE_DRAFT_API
2286 #ifndef U_HIDE_DRAFT_API
2318 static MeasureUnit getKilowattHourPer100Kilometer();
2576 #ifndef U_HIDE_DRAFT_API
2690 #ifndef U_HIDE_DRAFT_API
2708 #ifndef U_HIDE_DRAFT_API
2918 #ifndef U_HIDE_DRAFT_API
2936 #ifndef U_HIDE_DRAFT_API
2954 #ifndef U_HIDE_DRAFT_API
2972 #ifndef U_HIDE_DRAFT_API
2990 #ifndef U_HIDE_DRAFT_API
3024 #ifndef U_HIDE_DRAFT_API
3122 #ifndef U_HIDE_DRAFT_API
3140 #ifndef U_HIDE_DRAFT_API
3206 #ifndef U_HIDE_DRAFT_API
3352 #ifndef U_HIDE_DRAFT_API
3434 #ifndef U_HIDE_DEPRECATED_API
3694 #ifndef U_HIDE_DRAFT_API
3904 #ifndef U_HIDE_DRAFT_API
4146 #ifndef U_HIDE_DRAFT_API
4164 #ifndef U_HIDE_DRAFT_API
4310 #ifndef U_HIDE_DRAFT_API
4392 #ifndef U_HIDE_DRAFT_API
4410 #ifndef U_HIDE_DRAFT_API
4476 #ifndef U_HIDE_DRAFT_API
4526 #ifndef U_HIDE_DRAFT_API
4592 #ifndef U_HIDE_DRAFT_API
4610 #ifndef U_HIDE_DRAFT_API
4660 #ifndef U_HIDE_DRAFT_API
4682 #ifndef U_HIDE_INTERNAL_API
4687 void initTime(
const char *timeId);
4701 MeasureUnitImpl* fImpl;
4712 void setTo(int32_t typeId, int32_t subTypeId);
4727 friend class MeasureUnitImpl;
4730 friend class number::impl::LongNameHandler;
4734 inline std::pair<LocalArray<MeasureUnit>, int32_t>
4737 auto array = splitToSingleUnitsImpl(length, status);
4738 return std::make_pair(std::move(array), length);
4743 #endif // !UNCONFIG_NO_FORMATTING
4747 #endif // __MEASUREUNIT_H__
SI prefix: femto, 10^-15.
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.
U_COMMON_API UBool operator==(const StringPiece &x, const StringPiece &y)
Global operator == for StringPiece.
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.
A compound unit, like meter-per-second.
void * UClassID
UClassID is used to identify classes without using the compiler's RTTI.
SI prefix: quecto, 10^-30.
SI prefix: yocto, 10^-24.
Binary prefix: gibi, 1024^3.
Base class for 'pure' C++ implementations of uenum api.
Binary prefix: mebi, 1024^2.
SI prefix: ronto, 10^-27.
#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.
SI prefix: quetta, 10^30.
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.
bool operator!=(const UObject &other) const
Inequality operator.
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.
UMeasureUnitComplexity
Enumeration for unit complexity.