ICU 78.1  78.1
measunit.h
Go to the documentation of this file.
1 // © 2016 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
3 /*
4 **********************************************************************
5 * Copyright (c) 2004-2016, International Business Machines
6 * Corporation and others. All Rights Reserved.
7 **********************************************************************
8 * Author: Alan Liu
9 * Created: April 26, 2004
10 * Since: ICU 3.0
11 **********************************************************************
12 */
13 #ifndef __MEASUREUNIT_H__
14 #define __MEASUREUNIT_H__
15 
16 #include "unicode/utypes.h"
17 
18 #if U_SHOW_CPLUSPLUS_API
19 
20 #if !UCONFIG_NO_FORMATTING
21 
22 #include <utility>
23 #include "unicode/unistr.h"
24 #include "unicode/localpointer.h"
25 
31 U_NAMESPACE_BEGIN
32 
33 class StringEnumeration;
34 class MeasureUnitImpl;
35 
36 namespace number::impl {
37 class LongNameHandler;
38 } // namespace number::impl
39 
62 
69 
76 };
77 
78 
89 typedef enum UMeasurePrefix {
100 
107 
114 
121 
122 #ifndef U_HIDE_INTERNAL_API
128 #ifndef U_HIDE_DRAFT_API
130 #else /* U_HIDE_DRAFT_API */
132 #endif /* U_HIDE_DRAFT_API */
133 
134 #endif /* U_HIDE_INTERNAL_API */
135 
142 
149 
156 
163 
170 
177 
184 
191 
198 
205 
212 
219 
226 
233 
240 
247 
254 
261 
268 
275 
282 
283 #ifndef U_HIDE_INTERNAL_API
289 #ifndef U_HIDE_DRAFT_API
291 #else /* U_HIDE_DRAFT_API */
293 #endif /* U_HIDE_DRAFT_API */
294 
295 #endif // U_HIDE_INTERNAL_API
296 
297  // Cannot conditionalize the following with #ifndef U_HIDE_INTERNAL_API,
298  // used in definitions of non-internal enum values
305 
312 
313 #ifndef U_HIDE_INTERNAL_API
320 #endif // U_HIDE_INTERNAL_API
321 
328 
335 
342 
349 
356 
363 
370 
371 #ifndef U_HIDE_INTERNAL_API
378 #endif // U_HIDE_INTERNAL_API
380 
388 U_CAPI int32_t U_EXPORT2 umeas_getPrefixBase(UMeasurePrefix unitPrefix);
389 
396 U_CAPI int32_t U_EXPORT2 umeas_getPrefixPower(UMeasurePrefix unitPrefix);
397 
406  public:
407 
415 
420  MeasureUnit(const MeasureUnit &other);
421 
426  MeasureUnit(MeasureUnit &&other) noexcept;
427 
444  static MeasureUnit forIdentifier(StringPiece identifier, UErrorCode& status);
445 
451 
456  MeasureUnit &operator=(MeasureUnit &&other) noexcept;
457 
463  virtual MeasureUnit* clone() const;
464 
469  virtual ~MeasureUnit();
470 
476  virtual bool operator==(const UObject& other) const;
477 
483  bool operator!=(const UObject& other) const {
484  return !(*this == other);
485  }
486 
494  const char *getType() const;
495 
503  const char *getSubtype() const;
504 
511  const char* getIdentifier() const;
512 
521 
537 
553 
554 #ifndef U_HIDE_DRAFT_API
555 
570  MeasureUnit withConstantDenominator(uint64_t denominator, UErrorCode &status) const;
571 
588  uint64_t getConstantDenominator(UErrorCode &status) const;
589 
590 #endif /* U_HIDE_DRAFT_API */
591 
606  MeasureUnit withDimensionality(int32_t dimensionality, UErrorCode& status) const;
607 
621  int32_t getDimensionality(UErrorCode& status) const;
622 
638 
656  MeasureUnit product(const MeasureUnit& other, UErrorCode& status) const;
657 
677  inline std::pair<LocalArray<MeasureUnit>, int32_t> splitToSingleUnits(UErrorCode& status) const;
678 
690  static int32_t getAvailable(
691  MeasureUnit *destArray,
692  int32_t destCapacity,
693  UErrorCode &errorCode);
694 
707  static int32_t getAvailable(
708  const char *type,
709  MeasureUnit *destArray,
710  int32_t destCapacity,
711  UErrorCode &errorCode);
712 
722 
734  static UClassID U_EXPORT2 getStaticClassID();
735 
747  virtual UClassID getDynamicClassID() const override;
748 
749 #ifndef U_HIDE_INTERNAL_API
755  int32_t getOffset() const;
756 #endif /* U_HIDE_INTERNAL_API */
757 
758 // All code between the "Start generated createXXX methods" comment and
759 // the "End generated createXXX methods" comment is auto generated code
760 // and must not be edited manually. For instructions on how to correctly
761 // update this code, refer to:
762 // docs/processes/release/tasks/updating-measure-unit.md
763 //
764 // Start generated createXXX methods
765 
774 
781 
790 
797 
806 
813 
822 
829 
838 
845 
854 
861 
870 
877 
878 #ifndef U_HIDE_DRAFT_API
887 
894 #endif /* U_HIDE_DRAFT_API */
895 
904 
911 
912 #ifndef U_HIDE_DRAFT_API
921 
928 #endif /* U_HIDE_DRAFT_API */
929 
930 #ifndef U_HIDE_DRAFT_API
938  static MeasureUnit *createCho(UErrorCode &status);
939 
945  static MeasureUnit getCho();
946 #endif /* U_HIDE_DRAFT_API */
947 
956 
963 
972 
979 
980 #ifndef U_HIDE_DRAFT_API
989 
996 #endif /* U_HIDE_DRAFT_API */
997 
1006 
1013 
1022 
1029 
1038 
1045 
1054 
1061 
1070 
1077 
1086 
1093 
1102 
1109 
1118 
1125 
1134 
1141 
1142 #ifndef U_HIDE_DRAFT_API
1151 
1158 #endif /* U_HIDE_DRAFT_API */
1159 
1168 
1175 
1176 #ifndef U_HIDE_DEPRECATED_API
1187 
1196 #endif /* U_HIDE_DEPRECATED_API */
1197 
1206 
1213 
1222 
1229 
1230 #ifndef U_HIDE_DRAFT_API
1239 
1246 #endif /* U_HIDE_DRAFT_API */
1247 
1248 #ifndef U_HIDE_DRAFT_API
1257 
1264 #endif /* U_HIDE_DRAFT_API */
1265 
1266 #ifndef U_HIDE_DRAFT_API
1275 
1282 #endif /* U_HIDE_DRAFT_API */
1283 
1294 
1303 
1304 #ifndef U_HIDE_DRAFT_API
1313 
1320 #endif /* U_HIDE_DRAFT_API */
1321 
1330 
1337 
1346 
1353 
1362 
1369 
1378 
1385 
1394 
1401 
1410 
1417 
1426 
1433 
1442 
1449 
1458 
1465 
1474 
1481 
1490 
1497 
1506 
1513 
1522 
1529 
1538 
1545 
1554 
1561 
1570 
1577 
1586 
1593 
1602 
1609 
1618 
1625 
1634 
1641 
1650 
1657 
1666 
1673 
1674 #ifndef U_HIDE_DRAFT_API
1683 
1690 #endif /* U_HIDE_DRAFT_API */
1691 
1700 
1707 
1716 
1723 
1732 
1739 
1748 
1755 
1764 
1771 
1780 
1787 
1796 
1803 
1812 
1819 
1828 
1835 
1844 
1851 
1860 
1867 
1876 
1883 
1892 
1899 
1908 
1915 
1924 
1931 
1932 #ifndef U_HIDE_DRAFT_API
1941 
1948 #endif /* U_HIDE_DRAFT_API */
1949 
1950 #ifndef U_HIDE_DRAFT_API
1959 
1966 #endif /* U_HIDE_DRAFT_API */
1967 
1968 #ifndef U_HIDE_DRAFT_API
1977 
1984 #endif /* U_HIDE_DRAFT_API */
1985 
1994 
2001 
2010 
2017 
2018 #ifndef U_HIDE_DRAFT_API
2027 
2034 #endif /* U_HIDE_DRAFT_API */
2035 
2044 
2051 
2052 #ifndef U_HIDE_DRAFT_API
2061 
2068 #endif /* U_HIDE_DRAFT_API */
2069 
2078 
2085 
2086 #ifndef U_HIDE_DRAFT_API
2095 
2102 #endif /* U_HIDE_DRAFT_API */
2103 
2112 
2119 
2120 #ifndef U_HIDE_DRAFT_API
2129 
2136 #endif /* U_HIDE_DRAFT_API */
2137 
2146 
2153 
2162 
2169 
2170 #ifndef U_HIDE_DRAFT_API
2179 
2186 #endif /* U_HIDE_DRAFT_API */
2187 
2196 
2203 
2212 
2219 
2228 
2235 
2244 
2251 
2252 #ifndef U_HIDE_DRAFT_API
2261 
2268 #endif /* U_HIDE_DRAFT_API */
2269 
2278 
2285 
2286 #ifndef U_HIDE_DRAFT_API
2295 
2302 #endif /* U_HIDE_DRAFT_API */
2303 
2312 
2319 
2328 
2335 
2344 
2351 
2360 
2367 
2376 
2383 
2392 
2399 
2408 
2415 
2424 
2431 
2440 
2447 
2456 
2463 
2471  static MeasureUnit *createEm(UErrorCode &status);
2472 
2478  static MeasureUnit getEm();
2479 
2488 
2495 
2504 
2511 
2520 
2527 
2536 
2543 
2552 
2559 
2568 
2575 
2576 #ifndef U_HIDE_DRAFT_API
2585 
2592 #endif /* U_HIDE_DRAFT_API */
2593 
2602 
2609 
2618 
2625 
2634 
2641 
2650 
2657 
2666 
2673 
2682 
2689 
2690 #ifndef U_HIDE_DRAFT_API
2699 
2706 #endif /* U_HIDE_DRAFT_API */
2707 
2708 #ifndef U_HIDE_DRAFT_API
2717 
2724 #endif /* U_HIDE_DRAFT_API */
2725 
2734 
2741 
2750 
2757 
2766 
2773 
2782 
2789 
2798 
2805 
2814 
2821 
2830 
2837 
2846 
2853 
2862 
2869 
2878 
2885 
2894 
2901 
2910 
2917 
2918 #ifndef U_HIDE_DRAFT_API
2927 
2934 #endif /* U_HIDE_DRAFT_API */
2935 
2936 #ifndef U_HIDE_DRAFT_API
2945 
2952 #endif /* U_HIDE_DRAFT_API */
2953 
2954 #ifndef U_HIDE_DRAFT_API
2963 
2970 #endif /* U_HIDE_DRAFT_API */
2971 
2972 #ifndef U_HIDE_DRAFT_API
2981 
2988 #endif /* U_HIDE_DRAFT_API */
2989 
2990 #ifndef U_HIDE_DRAFT_API
2999 
3006 #endif /* U_HIDE_DRAFT_API */
3007 
3016 
3023 
3024 #ifndef U_HIDE_DRAFT_API
3033 
3040 #endif /* U_HIDE_DRAFT_API */
3041 
3050 
3057 
3066 
3073 
3082 
3089 
3098 
3105 
3114 
3121 
3122 #ifndef U_HIDE_DRAFT_API
3131 
3138 #endif /* U_HIDE_DRAFT_API */
3139 
3140 #ifndef U_HIDE_DRAFT_API
3149 
3156 #endif /* U_HIDE_DRAFT_API */
3157 
3166 
3173 
3182 
3189 
3198 
3205 
3206 #ifndef U_HIDE_DRAFT_API
3215 
3222 #endif /* U_HIDE_DRAFT_API */
3223 
3232 
3239 
3248 
3255 
3264 
3271 
3280 
3287 
3296 
3303 
3312 
3319 
3328 
3335 
3344 
3351 
3352 #ifndef U_HIDE_DRAFT_API
3361 
3368 #endif /* U_HIDE_DRAFT_API */
3369 
3378 
3385 
3394 
3401 
3410 
3417 
3426 
3433 
3434 #ifndef U_HIDE_DEPRECATED_API
3444 
3452 #endif /* U_HIDE_DEPRECATED_API */
3453 
3462 
3469 
3478 
3485 
3494 
3501 
3510 
3517 
3526 
3533 
3542 
3549 
3558 
3565 
3574 
3581 
3590 
3597 
3606 
3613 
3622 
3629 
3638 
3645 
3654 
3661 
3670 
3677 
3686 
3693 
3694 #ifndef U_HIDE_DRAFT_API
3703 
3710 #endif /* U_HIDE_DRAFT_API */
3711 
3720 
3727 
3736 
3743 
3752 
3759 
3768 
3775 
3784 
3791 
3800 
3807 
3816 
3823 
3832 
3839 
3848 
3855 
3864 
3871 
3880 
3887 
3896 
3903 
3904 #ifndef U_HIDE_DRAFT_API
3913 
3920 #endif /* U_HIDE_DRAFT_API */
3921 
3930 
3937 
3946 
3953 
3962 
3969 
3978 
3985 
3994 
4001 
4010 
4017 
4026 
4033 
4042 
4049 
4058 
4065 
4074 
4081 
4090 
4097 
4106 
4113 
4122 
4129 
4138 
4145 
4146 #ifndef U_HIDE_DRAFT_API
4155 
4162 #endif /* U_HIDE_DRAFT_API */
4163 
4164 #ifndef U_HIDE_DRAFT_API
4173 
4180 #endif /* U_HIDE_DRAFT_API */
4181 
4190 
4197 
4206 
4213 
4222 
4229 
4238 
4245 
4254 
4261 
4270 
4277 
4286 
4293 
4302 
4309 
4310 #ifndef U_HIDE_DRAFT_API
4319 
4326 #endif /* U_HIDE_DRAFT_API */
4327 
4336 
4343 
4352 
4359 
4368 
4375 
4384 
4391 
4392 #ifndef U_HIDE_DRAFT_API
4401 
4408 #endif /* U_HIDE_DRAFT_API */
4409 
4410 #ifndef U_HIDE_DRAFT_API
4419 
4426 #endif /* U_HIDE_DRAFT_API */
4427 
4436 
4443 
4452 
4459 
4468 
4475 
4476 #ifndef U_HIDE_DRAFT_API
4485 
4492 #endif /* U_HIDE_DRAFT_API */
4493 
4502 
4509 
4518 
4525 
4526 #ifndef U_HIDE_DRAFT_API
4535 
4542 #endif /* U_HIDE_DRAFT_API */
4543 
4552 
4559 
4568 
4575 
4584 
4591 
4592 #ifndef U_HIDE_DRAFT_API
4601 
4608 #endif /* U_HIDE_DRAFT_API */
4609 
4610 #ifndef U_HIDE_DRAFT_API
4619 
4626 #endif /* U_HIDE_DRAFT_API */
4627 
4636 
4643 
4652 
4659 
4660 #ifndef U_HIDE_DRAFT_API
4669 
4676 #endif /* U_HIDE_DRAFT_API */
4677 
4678 // End generated createXXX methods
4679 
4680  protected:
4681 
4682 #ifndef U_HIDE_INTERNAL_API
4687  void initTime(const char *timeId);
4688 
4693  void initCurrency(StringPiece isoCurrency);
4694 
4695 #endif /* U_HIDE_INTERNAL_API */
4696 
4697 private:
4698 
4699  // Used by new draft APIs in ICU 67. If non-null, fImpl is owned by the
4700  // MeasureUnit.
4701  MeasureUnitImpl* fImpl;
4702 
4703  // An index into a static string list in measunit.cpp. If set to -1, fImpl
4704  // is in use instead of fTypeId and fSubTypeId.
4705  int16_t fSubTypeId;
4706  // An index into a static string list in measunit.cpp. If set to -1, fImpl
4707  // is in use instead of fTypeId and fSubTypeId.
4708  int8_t fTypeId;
4709 
4710  MeasureUnit(int32_t typeId, int32_t subTypeId);
4711  MeasureUnit(MeasureUnitImpl&& impl);
4712  void setTo(int32_t typeId, int32_t subTypeId);
4713  static MeasureUnit *create(int typeId, int subTypeId, UErrorCode &status);
4714 
4722  static bool findBySubType(StringPiece subType, MeasureUnit* output);
4723 
4725  LocalArray<MeasureUnit> splitToSingleUnitsImpl(int32_t& outCount, UErrorCode& status) const;
4726 
4727  friend class MeasureUnitImpl;
4728 
4729  // For access to findBySubType
4730  friend class number::impl::LongNameHandler;
4731 };
4732 
4733 // inline impl of @stable ICU 68 method
4734 inline std::pair<LocalArray<MeasureUnit>, int32_t>
4735 MeasureUnit::splitToSingleUnits(UErrorCode& status) const {
4736  int32_t length;
4737  auto array = splitToSingleUnitsImpl(length, status);
4738  return std::make_pair(std::move(array), length);
4739 }
4740 
4741 U_NAMESPACE_END
4742 
4743 #endif // !UNCONFIG_NO_FORMATTING
4744 
4745 #endif /* U_SHOW_CPLUSPLUS_API */
4746 
4747 #endif // __MEASUREUNIT_H__
"Smart pointer" class, deletes objects via the C++ array delete[] operator.
Definition: localpointer.h:364
A unit such as length, mass, volume, currency, etc.
Definition: measunit.h:405
static MeasureUnit * createGasolineEnergyDensity(UErrorCode &status)
Returns by pointer, unit of pressure: gasoline-energy-density.
static MeasureUnit * createArcSecond(UErrorCode &status)
Returns by pointer, unit of angle: arc-second.
static MeasureUnit getBritishThermalUnit()
Returns by value, unit of energy: british-thermal-unit.
static MeasureUnit getInch()
Returns by value, unit of length: inch.
static MeasureUnit * createNewton(UErrorCode &status)
Returns by pointer, unit of force: newton.
static MeasureUnit * createOhm(UErrorCode &status)
Returns by pointer, unit of electric: ohm.
static MeasureUnit getMilligramPerDeciliter()
Returns by value, unit of concentr: milligram-per-deciliter.
static MeasureUnit getSievert()
Returns by value, unit of energy: sievert.
static MeasureUnit * createMegabyte(UErrorCode &status)
Returns by pointer, unit of digital: megabyte.
static MeasureUnit getKilogramForce()
Returns by value, unit of force: kilogram-force.
static MeasureUnit * createCubicFoot(UErrorCode &status)
Returns by pointer, unit of volume: cubic-foot.
static MeasureUnit * createMillimeter(UErrorCode &status)
Returns by pointer, unit of length: millimeter.
static int32_t getAvailable(const char *type, MeasureUnit *destArray, int32_t destCapacity, UErrorCode &errorCode)
getAvailable gets all of the available units for a specific type.
static MeasureUnit getKilobit()
Returns by value, unit of digital: kilobit.
static MeasureUnit getLiterPerKilometer()
Returns by value, unit of consumption: liter-per-kilometer.
static MeasureUnit getFortnight()
Returns by value, unit of duration: fortnight.
static MeasureUnit * createGigabyte(UErrorCode &status)
Returns by pointer, unit of digital: gigabyte.
static MeasureUnit getNight()
Returns by value, unit of duration: night.
static MeasureUnit getMillimolePerLiter()
Returns by value, unit of concentr: millimole-per-liter.
static MeasureUnit getDegree()
Returns by value, unit of angle: degree.
static MeasureUnit getMilePerGallon()
Returns by value, unit of consumption: mile-per-gallon.
static MeasureUnit * createKosaji(UErrorCode &status)
Returns by pointer, unit of volume: kosaji.
static MeasureUnit getKilohertz()
Returns by value, unit of frequency: kilohertz.
static MeasureUnit * createAcreFoot(UErrorCode &status)
Returns by pointer, unit of volume: acre-foot.
static MeasureUnit getKatal()
Returns by value, unit of concentr: katal.
static MeasureUnit getMinute()
Returns by value, unit of duration: minute.
static MeasureUnit getTerabyte()
Returns by value, unit of digital: terabyte.
static MeasureUnit * createCubicMile(UErrorCode &status)
Returns by pointer, unit of volume: cubic-mile.
static MeasureUnit getMillimeterOfMercury()
Returns by value, unit of pressure: millimeter-ofhg.
static MeasureUnit getCubicYard()
Returns by value, unit of volume: cubic-yard.
void initCurrency(StringPiece isoCurrency)
For ICU use only.
static MeasureUnit getGenericTemperature()
Returns by value, unit of temperature: generic.
static MeasureUnit getKilowattHour()
Returns by value, unit of energy: kilowatt-hour.
static MeasureUnit getBit()
Returns by value, unit of digital: bit.
static MeasureUnit getCho()
Returns by value, unit of area: cho.
static MeasureUnit * createLiterPerKilometer(UErrorCode &status)
Returns by pointer, unit of consumption: liter-per-kilometer.
static MeasureUnit getStone()
Returns by value, unit of mass: stone.
static MeasureUnit getPart()
Returns by value, unit of concentr: part.
static MeasureUnit getParsec()
Returns by value, unit of length: parsec.
static MeasureUnit getKilopascal()
Returns by value, unit of pressure: kilopascal.
static MeasureUnit getHour()
Returns by value, unit of duration: hour.
static MeasureUnit getLightSpeed()
Returns by value, unit of speed: light-speed.
static MeasureUnit getPoundFoot()
Returns by value, unit of torque: pound-force-foot.
static MeasureUnit * createAstronomicalUnit(UErrorCode &status)
Returns by pointer, unit of length: astronomical-unit.
static MeasureUnit * createJigger(UErrorCode &status)
Returns by pointer, unit of volume: jigger.
static MeasureUnit getPixelPerCentimeter()
Returns by value, unit of graphics: pixel-per-centimeter.
static MeasureUnit * createCubicMeter(UErrorCode &status)
Returns by pointer, unit of volume: cubic-meter.
static MeasureUnit getMegabyte()
Returns by value, unit of digital: megabyte.
static MeasureUnit getShaku()
Returns by value, unit of volume: shaku.
static MeasureUnit * createAtmosphere(UErrorCode &status)
Returns by pointer, unit of pressure: atmosphere.
static MeasureUnit * createCup(UErrorCode &status)
Returns by pointer, unit of volume: cup.
static MeasureUnit * createWeber(UErrorCode &status)
Returns by pointer, unit of magnetic: weber.
static MeasureUnit getKen()
Returns by value, unit of length: ken.
static MeasureUnit getMile()
Returns by value, unit of length: mile.
static MeasureUnit getPermyriad()
Returns by value, unit of concentr: permyriad.
static MeasureUnit * createPint(UErrorCode &status)
Returns by pointer, unit of volume: pint.
static MeasureUnit * createKilocalorie(UErrorCode &status)
Returns by pointer, unit of energy: kilocalorie.
static MeasureUnit * createMegabit(UErrorCode &status)
Returns by pointer, unit of digital: megabit.
static MeasureUnit * createMeter(UErrorCode &status)
Returns by pointer, unit of length: meter.
static MeasureUnit getAstronomicalUnit()
Returns by value, unit of length: astronomical-unit.
static MeasureUnit * createCupJp(UErrorCode &status)
Returns by pointer, unit of volume: cup-jp.
static MeasureUnit getBarrel()
Returns by value, unit of volume: barrel.
static MeasureUnit * createCentury(UErrorCode &status)
Returns by pointer, unit of duration: century.
static MeasureUnit getSiemens()
Returns by value, unit of electric: siemens.
static MeasureUnit getDalton()
Returns by value, unit of mass: dalton.
static MeasureUnit * createPicometer(UErrorCode &status)
Returns by pointer, unit of length: picometer.
static MeasureUnit getMilePerHour()
Returns by value, unit of speed: mile-per-hour.
static MeasureUnit getTerabit()
Returns by value, unit of digital: terabit.
static MeasureUnit getDotPerCentimeter()
Returns by value, unit of graphics: dot-per-centimeter.
static MeasureUnit * createSquareInch(UErrorCode &status)
Returns by pointer, unit of area: square-inch.
static MeasureUnit * createLiter(UErrorCode &status)
Returns by pointer, unit of volume: liter.
int32_t getDimensionality(UErrorCode &status) const
Gets the dimensionality (power) of this MeasureUnit.
static MeasureUnit getCalorie()
Returns by value, unit of energy: calorie.
static MeasureUnit * createMinute(UErrorCode &status)
Returns by pointer, unit of duration: minute.
static MeasureUnit * createSievert(UErrorCode &status)
Returns by pointer, unit of energy: sievert.
static MeasureUnit getCentimeter()
Returns by value, unit of length: centimeter.
static MeasureUnit getJigger()
Returns by value, unit of volume: jigger.
static MeasureUnit * createBit(UErrorCode &status)
Returns by pointer, unit of digital: bit.
static MeasureUnit * createDeciliter(UErrorCode &status)
Returns by pointer, unit of volume: deciliter.
static MeasureUnit getGigahertz()
Returns by value, unit of frequency: gigahertz.
static MeasureUnit getCupJp()
Returns by value, unit of volume: cup-jp.
static MeasureUnit getPixelPerInch()
Returns by value, unit of graphics: pixel-per-inch.
static MeasureUnit getCalorieIt()
Returns by value, unit of energy: calorie-it.
static MeasureUnit * createBar(UErrorCode &status)
Returns by pointer, unit of pressure: bar.
static MeasureUnit getFoodcalorie()
Returns by value, unit of energy: foodcalorie.
static MeasureUnit getKosaji()
Returns by value, unit of volume: kosaji.
static MeasureUnit * createCandela(UErrorCode &status)
Returns by pointer, unit of light: candela.
static MeasureUnit * createSteradian(UErrorCode &status)
Returns by pointer, unit of angle: steradian.
static MeasureUnit * createCoulomb(UErrorCode &status)
Returns by pointer, unit of electric: coulomb.
static MeasureUnit * createCalorieIt(UErrorCode &status)
Returns by pointer, unit of energy: calorie-it.
static MeasureUnit * createMicrometer(UErrorCode &status)
Returns by pointer, unit of length: micrometer.
static MeasureUnit getMicrogram()
Returns by value, unit of mass: microgram.
static MeasureUnit * createKelvin(UErrorCode &status)
Returns by pointer, unit of temperature: kelvin.
static MeasureUnit * createRod(UErrorCode &status)
Returns by pointer, unit of length: rod.
static MeasureUnit getSquareKilometer()
Returns by value, unit of area: square-kilometer.
static MeasureUnit getKilometer()
Returns by value, unit of length: kilometer.
static MeasureUnit * createMilligramOfglucosePerDeciliter(UErrorCode &status)
Returns by pointer, unit of concentr: milligram-ofglucose-per-deciliter.
static MeasureUnit getGigabyte()
Returns by value, unit of digital: gigabyte.
static MeasureUnit getFun()
Returns by value, unit of mass: fun.
static MeasureUnit * createFluidOunce(UErrorCode &status)
Returns by pointer, unit of volume: fluid-ounce.
static MeasureUnit getMilligram()
Returns by value, unit of mass: milligram.
static MeasureUnit getPascal()
Returns by value, unit of pressure: pascal.
static MeasureUnit * createCelsius(UErrorCode &status)
Returns by pointer, unit of temperature: celsius.
static MeasureUnit getRadian()
Returns by value, unit of angle: radian.
static MeasureUnit getPoint()
Returns by value, unit of length: point.
static MeasureUnit getPoundForce()
Returns by value, unit of force: pound-force.
static MeasureUnit * createGram(UErrorCode &status)
Returns by pointer, unit of mass: gram.
static MeasureUnit * createKilogramForce(UErrorCode &status)
Returns by pointer, unit of force: kilogram-force.
static MeasureUnit * createMonth(UErrorCode &status)
Returns by pointer, unit of duration: month.
MeasureUnit product(const MeasureUnit &other, UErrorCode &status) const
Gets the product of this unit with another unit.
static MeasureUnit * createPercent(UErrorCode &status)
Returns by pointer, unit of concentr: percent.
static MeasureUnit getFarad()
Returns by value, unit of electric: farad.
static MeasureUnit getKilocalorie()
Returns by value, unit of energy: kilocalorie.
static MeasureUnit * createThermUs(UErrorCode &status)
Returns by pointer, unit of energy: therm-us.
static MeasureUnit getMicrosecond()
Returns by value, unit of duration: microsecond.
static MeasureUnit * createTablespoon(UErrorCode &status)
Returns by pointer, unit of volume: tablespoon.
static MeasureUnit getBushel()
Returns by value, unit of volume: bushel.
static MeasureUnit * createMegawatt(UErrorCode &status)
Returns by pointer, unit of power: megawatt.
static MeasureUnit * createFoot(UErrorCode &status)
Returns by pointer, unit of length: foot.
static MeasureUnit * createHectopascal(UErrorCode &status)
Returns by pointer, unit of pressure: hectopascal.
static MeasureUnit * createBushel(UErrorCode &status)
Returns by pointer, unit of volume: bushel.
static MeasureUnit getFluidOunce()
Returns by value, unit of volume: fluid-ounce.
static MeasureUnit getHectoliter()
Returns by value, unit of volume: hectoliter.
static MeasureUnit * createFurlong(UErrorCode &status)
Returns by pointer, unit of length: furlong.
static MeasureUnit * createDot(UErrorCode &status)
Returns by pointer, unit of graphics: dot.
static MeasureUnit getCarat()
Returns by value, unit of mass: carat.
static MeasureUnit * createFahrenheit(UErrorCode &status)
Returns by pointer, unit of temperature: fahrenheit.
static MeasureUnit * createCarat(UErrorCode &status)
Returns by pointer, unit of mass: carat.
static MeasureUnit * createOunceTroy(UErrorCode &status)
Returns by pointer, unit of mass: ounce-troy.
static MeasureUnit getVolt()
Returns by value, unit of electric: volt.
static MeasureUnit getPartPer1E6()
Returns by value, unit of concentr: part-per-1e6.
static MeasureUnit getBuJp()
Returns by value, unit of area: bu-jp.
static MeasureUnit * createMillisecond(UErrorCode &status)
Returns by pointer, unit of duration: millisecond.
static MeasureUnit getOunce()
Returns by value, unit of mass: ounce.
uint64_t getConstantDenominator(UErrorCode &status) const
Retrieves the constant denominator for this COMPOUND unit.
static MeasureUnit getHectare()
Returns by value, unit of area: hectare.
static MeasureUnit * createKilobyte(UErrorCode &status)
Returns by pointer, unit of digital: kilobyte.
static MeasureUnit getNanosecond()
Returns by value, unit of duration: nanosecond.
static MeasureUnit * createHour(UErrorCode &status)
Returns by pointer, unit of duration: hour.
static MeasureUnit getEarthMass()
Returns by value, unit of mass: earth-mass.
static MeasureUnit getFahrenheit()
Returns by value, unit of temperature: fahrenheit.
static MeasureUnit * createSeJp(UErrorCode &status)
Returns by pointer, unit of area: se-jp.
static int32_t getAvailable(MeasureUnit *destArray, int32_t destCapacity, UErrorCode &errorCode)
getAvailable gets all of the available units.
static MeasureUnit getMileScandinavian()
Returns by value, unit of length: mile-scandinavian.
static MeasureUnit * createGallonImperial(UErrorCode &status)
Returns by pointer, unit of volume: gallon-imperial.
static MeasureUnit getMegapascal()
Returns by value, unit of pressure: megapascal.
static MeasureUnit * createRadian(UErrorCode &status)
Returns by pointer, unit of angle: radian.
static MeasureUnit getDeciliter()
Returns by value, unit of volume: deciliter.
static MeasureUnit * createSquareMeter(UErrorCode &status)
Returns by pointer, unit of area: square-meter.
static MeasureUnit getPartPer1E9()
Returns by value, unit of concentr: part-per-1e9.
static MeasureUnit getPixel()
Returns by value, unit of graphics: pixel.
MeasureUnit(const MeasureUnit &other)
Copy constructor.
static MeasureUnit getSolarLuminosity()
Returns by value, unit of light: solar-luminosity.
static MeasureUnit * createShakuCloth(UErrorCode &status)
Returns by pointer, unit of length: shaku-cloth.
static MeasureUnit getMonthPerson()
Returns by value, unit of duration: month-person.
static MeasureUnit * createDecade(UErrorCode &status)
Returns by pointer, unit of duration: decade.
static MeasureUnit * createKilowatt(UErrorCode &status)
Returns by pointer, unit of power: kilowatt.
static MeasureUnit getCentiliter()
Returns by value, unit of volume: centiliter.
static MeasureUnit * createMeterPerSecondSquared(UErrorCode &status)
Returns by pointer, unit of acceleration: meter-per-square-second.
static MeasureUnit * createMole(UErrorCode &status)
Returns by pointer, unit of concentr: mole.
static MeasureUnit * createDessertSpoonImperial(UErrorCode &status)
Returns by pointer, unit of volume: dessert-spoon-imperial.
static MeasureUnit getPartPerMillion()
Returns by value, unit of concentr: part-per-million.
static MeasureUnit * createKatal(UErrorCode &status)
Returns by pointer, unit of concentr: katal.
static MeasureUnit getMegawatt()
Returns by value, unit of power: megawatt.
static MeasureUnit getShakuCloth()
Returns by value, unit of length: shaku-cloth.
static MeasureUnit * createGrain(UErrorCode &status)
Returns by pointer, unit of mass: grain.
UMeasureUnitComplexity getComplexity(UErrorCode &status) const
Compute the complexity of the unit.
static MeasureUnit * createNauticalMile(UErrorCode &status)
Returns by pointer, unit of length: nautical-mile.
static MeasureUnit getGigabit()
Returns by value, unit of digital: gigabit.
static MeasureUnit getTon()
Returns by value, unit of mass: ton.
static MeasureUnit * createHectare(UErrorCode &status)
Returns by pointer, unit of area: hectare.
static MeasureUnit getBeaufort()
Returns by value, unit of speed: beaufort.
static MeasureUnit getGray()
Returns by value, unit of energy: gray.
static MeasureUnit * createFortnight(UErrorCode &status)
Returns by pointer, unit of duration: fortnight.
static MeasureUnit * createMile(UErrorCode &status)
Returns by pointer, unit of length: mile.
static MeasureUnit getFurlong()
Returns by value, unit of length: furlong.
static MeasureUnit * createTesla(UErrorCode &status)
Returns by pointer, unit of magnetic: tesla.
static MeasureUnit getBecquerel()
Returns by value, unit of energy: becquerel.
static MeasureUnit getLightYear()
Returns by value, unit of length: light-year.
static MeasureUnit getHenry()
Returns by value, unit of electric: henry.
static MeasureUnit getJoJp()
Returns by value, unit of length: jo-jp.
static MeasureUnit getJoule()
Returns by value, unit of energy: joule.
static MeasureUnit * createCubicYard(UErrorCode &status)
Returns by pointer, unit of volume: cubic-yard.
static MeasureUnit getTeaspoon()
Returns by value, unit of volume: teaspoon.
static MeasureUnit getWeekPerson()
Returns by value, unit of duration: week-person.
static MeasureUnit * createBritishThermalUnitIt(UErrorCode &status)
Returns by pointer, unit of energy: british-thermal-unit-it.
static MeasureUnit * createTerabit(UErrorCode &status)
Returns by pointer, unit of digital: terabit.
static MeasureUnit getLiter()
Returns by value, unit of volume: liter.
static MeasureUnit getPermille()
Returns by value, unit of concentr: permille.
static MeasureUnit * createDegree(UErrorCode &status)
Returns by pointer, unit of angle: degree.
static MeasureUnit * createLumen(UErrorCode &status)
Returns by pointer, unit of light: lumen.
static MeasureUnit getYard()
Returns by value, unit of length: yard.
static MeasureUnit * createShakuLength(UErrorCode &status)
Returns by pointer, unit of length: shaku-length.
static MeasureUnit getByte()
Returns by value, unit of digital: byte.
static MeasureUnit getKilogram()
Returns by value, unit of mass: kilogram.
static MeasureUnit * createPartPer1E6(UErrorCode &status)
Returns by pointer, unit of concentr: part-per-1e6.
static MeasureUnit * createBecquerel(UErrorCode &status)
Returns by pointer, unit of energy: becquerel.
static MeasureUnit * createSolarMass(UErrorCode &status)
Returns by pointer, unit of mass: solar-mass.
static MeasureUnit * createMegahertz(UErrorCode &status)
Returns by pointer, unit of frequency: megahertz.
static MeasureUnit * createMicrosecond(UErrorCode &status)
Returns by pointer, unit of duration: microsecond.
static MeasureUnit getDessertSpoon()
Returns by value, unit of volume: dessert-spoon.
static MeasureUnit * createNight(UErrorCode &status)
Returns by pointer, unit of duration: night.
static MeasureUnit getDrop()
Returns by value, unit of volume: drop.
static MeasureUnit * createQuart(UErrorCode &status)
Returns by pointer, unit of volume: quart.
static MeasureUnit * createDayPerson(UErrorCode &status)
Returns by pointer, unit of duration: day-person.
static MeasureUnit * createFluidOunceMetric(UErrorCode &status)
Returns by pointer, unit of volume: fluid-ounce-metric.
UMeasurePrefix getPrefix(UErrorCode &status) const
Returns the current SI or binary prefix of this SINGLE unit.
static MeasureUnit * createWeek(UErrorCode &status)
Returns by pointer, unit of duration: week.
const char * getSubtype() const
Get the sub type.
static MeasureUnit * createYearPerson(UErrorCode &status)
Returns by pointer, unit of duration: year-person.
static MeasureUnit * createKilometerPerHour(UErrorCode &status)
Returns by pointer, unit of speed: kilometer-per-hour.
static MeasureUnit * createPintMetric(UErrorCode &status)
Returns by pointer, unit of volume: pint-metric.
static MeasureUnit getSquareYard()
Returns by value, unit of area: square-yard.
static MeasureUnit * createHectoliter(UErrorCode &status)
Returns by pointer, unit of volume: hectoliter.
static MeasureUnit * createPartPerMillion(UErrorCode &status)
Returns by pointer, unit of concentr: part-per-million.
static MeasureUnit * createPixel(UErrorCode &status)
Returns by pointer, unit of graphics: pixel.
static MeasureUnit getDot()
Returns by value, unit of graphics: dot.
static MeasureUnit * createRin(UErrorCode &status)
Returns by pointer, unit of length: rin.
static MeasureUnit * createCupMetric(UErrorCode &status)
Returns by pointer, unit of volume: cup-metric.
static MeasureUnit getDunam()
Returns by value, unit of area: dunam.
static MeasureUnit getDessertSpoonImperial()
Returns by value, unit of volume: dessert-spoon-imperial.
static MeasureUnit * createTerabyte(UErrorCode &status)
Returns by pointer, unit of digital: terabyte.
static MeasureUnit getKilowatt()
Returns by value, unit of power: kilowatt.
static MeasureUnit getBritishThermalUnitIt()
Returns by value, unit of energy: british-thermal-unit-it.
static MeasureUnit getSun()
Returns by value, unit of length: sun.
static MeasureUnit * createSai(UErrorCode &status)
Returns by pointer, unit of volume: sai.
static MeasureUnit getSolarRadius()
Returns by value, unit of length: solar-radius.
static MeasureUnit getMegapixel()
Returns by value, unit of graphics: megapixel.
static MeasureUnit getLux()
Returns by value, unit of light: lux.
static MeasureUnit getMillimeter()
Returns by value, unit of length: millimeter.
static MeasureUnit getChain()
Returns by value, unit of length: chain.
static MeasureUnit * createFarad(UErrorCode &status)
Returns by pointer, unit of electric: farad.
static MeasureUnit * createMonthPerson(UErrorCode &status)
Returns by pointer, unit of duration: month-person.
static MeasureUnit * createNanometer(UErrorCode &status)
Returns by pointer, unit of length: nanometer.
static MeasureUnit * createMileScandinavian(UErrorCode &status)
Returns by pointer, unit of length: mile-scandinavian.
static MeasureUnit * createSquareMile(UErrorCode &status)
Returns by pointer, unit of area: square-mile.
static MeasureUnit * createDunam(UErrorCode &status)
Returns by pointer, unit of area: dunam.
static MeasureUnit getMilliwatt()
Returns by value, unit of power: milliwatt.
static MeasureUnit * createStone(UErrorCode &status)
Returns by pointer, unit of mass: stone.
static MeasureUnit getOunceTroy()
Returns by value, unit of mass: ounce-troy.
static MeasureUnit * createKilowattHour(UErrorCode &status)
Returns by pointer, unit of energy: kilowatt-hour.
static MeasureUnit * createDecimeter(UErrorCode &status)
Returns by pointer, unit of length: decimeter.
static MeasureUnit getNewtonMeter()
Returns by value, unit of torque: newton-meter.
static MeasureUnit * createDay(UErrorCode &status)
Returns by pointer, unit of duration: day.
static MeasureUnit getAcreFoot()
Returns by value, unit of volume: acre-foot.
static MeasureUnit * createOfglucose(UErrorCode &status)
Returns by pointer, unit of concentr: ofglucose.
static MeasureUnit * createMillimolePerLiter(UErrorCode &status)
Returns by pointer, unit of concentr: millimole-per-liter.
static MeasureUnit * createRevolutionAngle(UErrorCode &status)
Returns by pointer, unit of angle: revolution.
static MeasureUnit * createInch(UErrorCode &status)
Returns by pointer, unit of length: inch.
static MeasureUnit getCandela()
Returns by value, unit of light: candela.
static MeasureUnit getKoku()
Returns by value, unit of volume: koku.
static MeasureUnit getNauticalMile()
Returns by value, unit of length: nautical-mile.
static MeasureUnit * createPixelPerInch(UErrorCode &status)
Returns by pointer, unit of graphics: pixel-per-inch.
virtual UClassID getDynamicClassID() const override
Returns a unique class ID POLYMORPHICALLY.
static MeasureUnit * createKilopascal(UErrorCode &status)
Returns by pointer, unit of pressure: kilopascal.
static MeasureUnit getMegaliter()
Returns by value, unit of volume: megaliter.
static MeasureUnit * createSecond(UErrorCode &status)
Returns by pointer, unit of duration: second.
static MeasureUnit * createCentiliter(UErrorCode &status)
Returns by pointer, unit of volume: centiliter.
static MeasureUnit getWatt()
Returns by value, unit of power: watt.
static MeasureUnit * createCentimeter(UErrorCode &status)
Returns by pointer, unit of length: centimeter.
static MeasureUnit getFluidOunceImperial()
Returns by value, unit of volume: fluid-ounce-imperial.
static MeasureUnit getPintMetric()
Returns by value, unit of volume: pint-metric.
static MeasureUnit getSquareFoot()
Returns by value, unit of area: square-foot.
static MeasureUnit getGigawatt()
Returns by value, unit of power: gigawatt.
static MeasureUnit * createSolarLuminosity(UErrorCode &status)
Returns by pointer, unit of light: solar-luminosity.
static MeasureUnit * createElectronvolt(UErrorCode &status)
Returns by pointer, unit of energy: electronvolt.
static MeasureUnit * createCubicCentimeter(UErrorCode &status)
Returns by pointer, unit of volume: cubic-centimeter.
static MeasureUnit * createMegapascal(UErrorCode &status)
Returns by pointer, unit of pressure: megapascal.
static MeasureUnit getCoulomb()
Returns by value, unit of electric: coulomb.
static MeasureUnit * createKilogram(UErrorCode &status)
Returns by pointer, unit of mass: kilogram.
static MeasureUnit getMilliampere()
Returns by value, unit of electric: milliampere.
static MeasureUnit getDram()
Returns by value, unit of volume: dram.
static MeasureUnit * createGigahertz(UErrorCode &status)
Returns by pointer, unit of frequency: gigahertz.
static MeasureUnit * createSquareYard(UErrorCode &status)
Returns by pointer, unit of area: square-yard.
static MeasureUnit getHectopascal()
Returns by value, unit of pressure: hectopascal.
static MeasureUnit * createDotPerCentimeter(UErrorCode &status)
Returns by pointer, unit of graphics: dot-per-centimeter.
static MeasureUnit * createDessertSpoon(UErrorCode &status)
Returns by pointer, unit of volume: dessert-spoon.
static MeasureUnit getSquareMeter()
Returns by value, unit of area: square-meter.
static MeasureUnit getKilowattHourPer100Kilometer()
Returns by value, unit of force: kilowatt-hour-per-100-kilometer.
virtual MeasureUnit * clone() const
Returns a polymorphic clone of this object.
static MeasureUnit * createAcre(UErrorCode &status)
Returns by pointer, unit of area: acre.
static MeasureUnit * createGray(UErrorCode &status)
Returns by pointer, unit of energy: gray.
static MeasureUnit getCupMetric()
Returns by value, unit of volume: cup-metric.
static MeasureUnit * createDalton(UErrorCode &status)
Returns by pointer, unit of mass: dalton.
static MeasureUnit * createKarat(UErrorCode &status)
Returns by pointer, unit of concentr: karat.
static MeasureUnit getMillisecond()
Returns by value, unit of duration: millisecond.
static MeasureUnit * createYard(UErrorCode &status)
Returns by pointer, unit of length: yard.
static MeasureUnit * createBritishThermalUnit(UErrorCode &status)
Returns by pointer, unit of energy: british-thermal-unit.
static MeasureUnit * createKilobit(UErrorCode &status)
Returns by pointer, unit of digital: kilobit.
static MeasureUnit * createTon(UErrorCode &status)
Returns by pointer, unit of mass: ton.
static MeasureUnit * createDrop(UErrorCode &status)
Returns by pointer, unit of volume: drop.
static MeasureUnit * createMilePerHour(UErrorCode &status)
Returns by pointer, unit of speed: mile-per-hour.
static MeasureUnit * createMilliwatt(UErrorCode &status)
Returns by pointer, unit of power: milliwatt.
static MeasureUnit * createMillibar(UErrorCode &status)
Returns by pointer, unit of pressure: millibar.
static MeasureUnit * createItem(UErrorCode &status)
Returns by pointer, unit of concentr: item.
static MeasureUnit * createPoundPerSquareInch(UErrorCode &status)
Returns by pointer, unit of pressure: pound-force-per-square-inch.
static MeasureUnit getArcMinute()
Returns by value, unit of angle: arc-minute.
MeasureUnit(MeasureUnit &&other) noexcept
Move constructor.
static MeasureUnit forIdentifier(StringPiece identifier, UErrorCode &status)
Constructs a MeasureUnit from a CLDR Core Unit Identifier, as defined in UTS 35.
static MeasureUnit * createPartPer1E9(UErrorCode &status)
Returns by pointer, unit of concentr: part-per-1e9.
static MeasureUnit getItem()
Returns by value, unit of concentr: item.
MeasureUnit & operator=(const MeasureUnit &other)
Copy assignment operator.
static MeasureUnit * createGallon(UErrorCode &status)
Returns by pointer, unit of volume: gallon.
static MeasureUnit getMillibar()
Returns by value, unit of pressure: millibar.
static MeasureUnit getPetabyte()
Returns by value, unit of digital: petabyte.
static MeasureUnit getYearPerson()
Returns by value, unit of duration: year-person.
static MeasureUnit getGrain()
Returns by value, unit of mass: grain.
MeasureUnit()
Default constructor.
static MeasureUnit getDayPerson()
Returns by value, unit of duration: day-person.
static MeasureUnit * createHenry(UErrorCode &status)
Returns by pointer, unit of electric: henry.
static MeasureUnit * createMilePerGallon(UErrorCode &status)
Returns by pointer, unit of consumption: mile-per-gallon.
static MeasureUnit * createMicrogram(UErrorCode &status)
Returns by pointer, unit of mass: microgram.
const char * getIdentifier() const
Get CLDR Unit Identifier for this MeasureUnit, as defined in UTS 35.
static MeasureUnit getNanometer()
Returns by value, unit of length: nanometer.
static MeasureUnit getGram()
Returns by value, unit of mass: gram.
static MeasureUnit getOsaji()
Returns by value, unit of volume: osaji.
static UClassID getStaticClassID()
Return the class ID for this class.
static MeasureUnit getOfglucose()
Returns by value, unit of concentr: ofglucose.
static MeasureUnit getSquareInch()
Returns by value, unit of area: square-inch.
static MeasureUnit * createBarrel(UErrorCode &status)
Returns by pointer, unit of volume: barrel.
static MeasureUnit getFluidOunceMetric()
Returns by value, unit of volume: fluid-ounce-metric.
static MeasureUnit getAtmosphere()
Returns by value, unit of pressure: atmosphere.
static MeasureUnit getKarat()
Returns by value, unit of concentr: karat.
static MeasureUnit * createMilligramPerDeciliter(UErrorCode &status)
Returns by pointer, unit of concentr: milligram-per-deciliter.
static MeasureUnit getEarthRadius()
Returns by value, unit of length: earth-radius.
static MeasureUnit getMole()
Returns by value, unit of concentr: mole.
static MeasureUnit * createCho(UErrorCode &status)
Returns by pointer, unit of area: cho.
static MeasureUnit getMilePerGallonImperial()
Returns by value, unit of consumption: mile-per-gallon-imperial.
static MeasureUnit getMegahertz()
Returns by value, unit of frequency: megahertz.
static MeasureUnit getPintImperial()
Returns by value, unit of volume: pint-imperial.
static MeasureUnit getRiJp()
Returns by value, unit of length: ri-jp.
static MeasureUnit * createPoint(UErrorCode &status)
Returns by pointer, unit of length: point.
static MeasureUnit * createHorsepower(UErrorCode &status)
Returns by pointer, unit of power: horsepower.
const char * getType() const
Get the type.
static MeasureUnit * createSquareCentimeter(UErrorCode &status)
Returns by pointer, unit of area: square-centimeter.
static MeasureUnit getQuartImperial()
Returns by value, unit of volume: quart-imperial.
static MeasureUnit * createGigabit(UErrorCode &status)
Returns by pointer, unit of digital: gigabit.
static MeasureUnit * createWeekPerson(UErrorCode &status)
Returns by pointer, unit of duration: week-person.
static MeasureUnit getMegabit()
Returns by value, unit of digital: megabit.
static MeasureUnit getToJp()
Returns by value, unit of volume: to-jp.
static MeasureUnit * createRiJp(UErrorCode &status)
Returns by pointer, unit of length: ri-jp.
static MeasureUnit * createEm(UErrorCode &status)
Returns by pointer, unit of graphics: em.
static MeasureUnit * createInchHg(UErrorCode &status)
Returns by pointer, unit of pressure: inch-ofhg.
static MeasureUnit * createPermille(UErrorCode &status)
Returns by pointer, unit of concentr: permille.
static MeasureUnit getHertz()
Returns by value, unit of frequency: hertz.
static MeasureUnit * createLiterPer100Kilometers(UErrorCode &status)
Returns by pointer, unit of consumption: liter-per-100-kilometer.
static MeasureUnit getTonne()
Returns by value, unit of mass: tonne.
static MeasureUnit getKilobyte()
Returns by value, unit of digital: kilobyte.
static MeasureUnit * createPoundFoot(UErrorCode &status)
Returns by pointer, unit of torque: pound-force-foot.
static MeasureUnit getMeterPerSecond()
Returns by value, unit of speed: meter-per-second.
MeasureUnit withConstantDenominator(uint64_t denominator, UErrorCode &status) const
Creates a new MeasureUnit with a specified constant denominator.
static MeasureUnit getTesla()
Returns by value, unit of magnetic: tesla.
virtual ~MeasureUnit()
Destructor.
static MeasureUnit getMilliliter()
Returns by value, unit of volume: milliliter.
static MeasureUnit getDay()
Returns by value, unit of duration: day.
static MeasureUnit * createMilligram(UErrorCode &status)
Returns by pointer, unit of mass: milligram.
static MeasureUnit * createJoJp(UErrorCode &status)
Returns by pointer, unit of length: jo-jp.
MeasureUnit reciprocal(UErrorCode &status) const
Gets the reciprocal of this MeasureUnit, with the numerator and denominator flipped.
static MeasureUnit getQuarter()
Returns by value, unit of duration: quarter.
static MeasureUnit * createGForce(UErrorCode &status)
Returns by pointer, unit of acceleration: g-force.
static StringEnumeration * getAvailableTypes(UErrorCode &errorCode)
getAvailableTypes gets all of the available types.
static MeasureUnit * createQuartImperial(UErrorCode &status)
Returns by pointer, unit of volume: quart-imperial.
static MeasureUnit * createMegaliter(UErrorCode &status)
Returns by pointer, unit of volume: megaliter.
static MeasureUnit getCubicFoot()
Returns by value, unit of volume: cubic-foot.
static MeasureUnit * createKilojoule(UErrorCode &status)
Returns by pointer, unit of energy: kilojoule.
static MeasureUnit * createHertz(UErrorCode &status)
Returns by pointer, unit of frequency: hertz.
static MeasureUnit getSteradian()
Returns by value, unit of angle: steradian.
int32_t getOffset() const
ICU use only.
static MeasureUnit getPound()
Returns by value, unit of mass: pound.
static MeasureUnit getRin()
Returns by value, unit of length: rin.
static MeasureUnit * createPixelPerCentimeter(UErrorCode &status)
Returns by pointer, unit of graphics: pixel-per-centimeter.
static MeasureUnit * createNewtonMeter(UErrorCode &status)
Returns by pointer, unit of torque: newton-meter.
static MeasureUnit getCubicMile()
Returns by value, unit of volume: cubic-mile.
bool operator!=(const UObject &other) const
Inequality operator.
Definition: measunit.h:483
static MeasureUnit getOhm()
Returns by value, unit of electric: ohm.
static MeasureUnit getGasolineEnergyDensity()
Returns by value, unit of pressure: gasoline-energy-density.
static MeasureUnit * createBeaufort(UErrorCode &status)
Returns by pointer, unit of speed: beaufort.
static MeasureUnit * createMegapixel(UErrorCode &status)
Returns by pointer, unit of graphics: megapixel.
static MeasureUnit getPicometer()
Returns by value, unit of length: picometer.
static MeasureUnit getFathom()
Returns by value, unit of length: fathom.
static MeasureUnit getMonth()
Returns by value, unit of duration: month.
static MeasureUnit getCentury()
Returns by value, unit of duration: century.
static MeasureUnit * createMilliampere(UErrorCode &status)
Returns by pointer, unit of electric: milliampere.
static MeasureUnit * createAmpere(UErrorCode &status)
Returns by pointer, unit of electric: ampere.
static MeasureUnit getCubicInch()
Returns by value, unit of volume: cubic-inch.
static MeasureUnit * createParsec(UErrorCode &status)
Returns by pointer, unit of length: parsec.
static MeasureUnit * createSiemens(UErrorCode &status)
Returns by pointer, unit of electric: siemens.
static MeasureUnit * createYear(UErrorCode &status)
Returns by pointer, unit of duration: year.
static MeasureUnit * createCalorie(UErrorCode &status)
Returns by pointer, unit of energy: calorie.
static MeasureUnit * createFluidOunceImperial(UErrorCode &status)
Returns by pointer, unit of volume: fluid-ounce-imperial.
static MeasureUnit * createKen(UErrorCode &status)
Returns by pointer, unit of length: ken.
static MeasureUnit getRankine()
Returns by value, unit of temperature: rankine.
static MeasureUnit * createOsaji(UErrorCode &status)
Returns by pointer, unit of volume: osaji.
static MeasureUnit getYear()
Returns by value, unit of duration: year.
static MeasureUnit * createChain(UErrorCode &status)
Returns by pointer, unit of length: chain.
static MeasureUnit * createPinch(UErrorCode &status)
Returns by pointer, unit of volume: pinch.
static MeasureUnit getCupImperial()
Returns by value, unit of volume: cup-imperial.
static MeasureUnit * createMillimeterOfMercury(UErrorCode &status)
Returns by pointer, unit of pressure: millimeter-ofhg.
static MeasureUnit * createEarthRadius(UErrorCode &status)
Returns by pointer, unit of length: earth-radius.
static MeasureUnit * createOfhg(UErrorCode &status)
Returns by pointer, unit of pressure: ofhg.
static MeasureUnit * createDotPerInch(UErrorCode &status)
Returns by pointer, unit of graphics: dot-per-inch.
static MeasureUnit * createPound(UErrorCode &status)
Returns by pointer, unit of mass: pound.
static MeasureUnit getPoundPerSquareInch()
Returns by value, unit of pressure: pound-force-per-square-inch.
static MeasureUnit getInchHg()
Returns by value, unit of pressure: inch-ofhg.
static MeasureUnit getLiterPer100Kilometers()
Returns by value, unit of consumption: liter-per-100-kilometer.
static MeasureUnit getAmpere()
Returns by value, unit of electric: ampere.
static MeasureUnit * createKilowattHourPer100Kilometer(UErrorCode &status)
Returns by pointer, unit of force: kilowatt-hour-per-100-kilometer.
static MeasureUnit * createKilometer(UErrorCode &status)
Returns by pointer, unit of length: kilometer.
static MeasureUnit getTablespoon()
Returns by value, unit of volume: tablespoon.
static MeasureUnit * createPermyriad(UErrorCode &status)
Returns by pointer, unit of concentr: permyriad.
static MeasureUnit getCup()
Returns by value, unit of volume: cup.
static MeasureUnit * createPetabyte(UErrorCode &status)
Returns by pointer, unit of digital: petabyte.
MeasureUnit withPrefix(UMeasurePrefix prefix, UErrorCode &status) const
Creates a MeasureUnit which is this SINGLE unit augmented with the specified prefix.
static MeasureUnit * createEarthMass(UErrorCode &status)
Returns by pointer, unit of mass: earth-mass.
static MeasureUnit * createFoodcalorie(UErrorCode &status)
Returns by pointer, unit of energy: foodcalorie.
static MeasureUnit * createFathom(UErrorCode &status)
Returns by pointer, unit of length: fathom.
static MeasureUnit getPercent()
Returns by value, unit of concentr: percent.
static MeasureUnit getRevolutionAngle()
Returns by value, unit of angle: revolution.
static MeasureUnit getSecond()
Returns by value, unit of duration: second.
static MeasureUnit * createFun(UErrorCode &status)
Returns by pointer, unit of mass: fun.
static MeasureUnit * createLightSpeed(UErrorCode &status)
Returns by pointer, unit of speed: light-speed.
static MeasureUnit * createWatt(UErrorCode &status)
Returns by pointer, unit of power: watt.
static MeasureUnit * createKoku(UErrorCode &status)
Returns by pointer, unit of volume: koku.
static MeasureUnit * createMetricTon(UErrorCode &status)
Returns by pointer, unit of mass: metric-ton (renamed to tonne in CLDR 42 / ICU 72).
static MeasureUnit getSai()
Returns by value, unit of volume: sai.
static MeasureUnit * createByte(UErrorCode &status)
Returns by pointer, unit of digital: byte.
static MeasureUnit * createMilliliter(UErrorCode &status)
Returns by pointer, unit of volume: milliliter.
static MeasureUnit * createArcMinute(UErrorCode &status)
Returns by pointer, unit of angle: arc-minute.
static MeasureUnit * createLightYear(UErrorCode &status)
Returns by pointer, unit of length: light-year.
static MeasureUnit * createRankine(UErrorCode &status)
Returns by pointer, unit of temperature: rankine.
static MeasureUnit getQuart()
Returns by value, unit of volume: quart.
static MeasureUnit getRod()
Returns by value, unit of length: rod.
static MeasureUnit getBar()
Returns by value, unit of pressure: bar.
static MeasureUnit getElectronvolt()
Returns by value, unit of energy: electronvolt.
static MeasureUnit getKelvin()
Returns by value, unit of temperature: kelvin.
static MeasureUnit getEm()
Returns by value, unit of graphics: em.
static MeasureUnit * createSun(UErrorCode &status)
Returns by pointer, unit of length: sun.
static MeasureUnit * createJoule(UErrorCode &status)
Returns by pointer, unit of energy: joule.
static MeasureUnit getShakuLength()
Returns by value, unit of length: shaku-length.
static MeasureUnit * createSquareFoot(UErrorCode &status)
Returns by pointer, unit of area: square-foot.
static MeasureUnit * createShaku(UErrorCode &status)
Returns by pointer, unit of volume: shaku.
static MeasureUnit * createPoundForce(UErrorCode &status)
Returns by pointer, unit of force: pound-force.
static MeasureUnit * createMilePerGallonImperial(UErrorCode &status)
Returns by pointer, unit of consumption: mile-per-gallon-imperial.
static MeasureUnit * createGigawatt(UErrorCode &status)
Returns by pointer, unit of power: gigawatt.
static MeasureUnit getKilometerPerHour()
Returns by value, unit of speed: kilometer-per-hour.
static MeasureUnit getCubicMeter()
Returns by value, unit of volume: cubic-meter.
static MeasureUnit getCubicCentimeter()
Returns by value, unit of volume: cubic-centimeter.
static MeasureUnit getGallon()
Returns by value, unit of volume: gallon.
void initTime(const char *timeId)
For ICU use only.
MeasureUnit & operator=(MeasureUnit &&other) noexcept
Move assignment operator.
static MeasureUnit * createPascal(UErrorCode &status)
Returns by pointer, unit of pressure: pascal.
static MeasureUnit * createSlug(UErrorCode &status)
Returns by pointer, unit of mass: slug.
static MeasureUnit getKnot()
Returns by value, unit of speed: knot.
static MeasureUnit getFoot()
Returns by value, unit of length: foot.
static MeasureUnit getMicrometer()
Returns by value, unit of length: micrometer.
static MeasureUnit * createVolt(UErrorCode &status)
Returns by pointer, unit of electric: volt.
static MeasureUnit * createMeterPerSecond(UErrorCode &status)
Returns by pointer, unit of speed: meter-per-second.
static MeasureUnit getAcre()
Returns by value, unit of area: acre.
static MeasureUnit getNewton()
Returns by value, unit of force: newton.
static MeasureUnit getSlug()
Returns by value, unit of mass: slug.
static MeasureUnit * createCubicKilometer(UErrorCode &status)
Returns by pointer, unit of volume: cubic-kilometer.
static MeasureUnit * createTeaspoon(UErrorCode &status)
Returns by pointer, unit of volume: teaspoon.
virtual bool operator==(const UObject &other) const
Equality operator.
static MeasureUnit getPint()
Returns by value, unit of volume: pint.
static MeasureUnit * createNanosecond(UErrorCode &status)
Returns by pointer, unit of duration: nanosecond.
static MeasureUnit * createKnot(UErrorCode &status)
Returns by pointer, unit of speed: knot.
static MeasureUnit getGForce()
Returns by value, unit of acceleration: g-force.
static MeasureUnit * createDram(UErrorCode &status)
Returns by pointer, unit of volume: dram.
static MeasureUnit getGallonImperial()
Returns by value, unit of volume: gallon-imperial.
static MeasureUnit getArcSecond()
Returns by value, unit of angle: arc-second.
static MeasureUnit getMeter()
Returns by value, unit of length: meter.
static MeasureUnit getMeterPerSecondSquared()
Returns by value, unit of acceleration: meter-per-square-second.
static MeasureUnit * createKilohertz(UErrorCode &status)
Returns by pointer, unit of frequency: kilohertz.
static MeasureUnit * createPart(UErrorCode &status)
Returns by pointer, unit of concentr: part.
static MeasureUnit * createSquareKilometer(UErrorCode &status)
Returns by pointer, unit of area: square-kilometer.
static MeasureUnit getPinch()
Returns by value, unit of volume: pinch.
static MeasureUnit getCelsius()
Returns by value, unit of temperature: celsius.
static MeasureUnit getDecimeter()
Returns by value, unit of length: decimeter.
static MeasureUnit * createTonne(UErrorCode &status)
Returns by pointer, unit of mass: tonne.
static MeasureUnit * createQuarter(UErrorCode &status)
Returns by pointer, unit of duration: quarter.
static MeasureUnit getHorsepower()
Returns by value, unit of power: horsepower.
static MeasureUnit getOfhg()
Returns by value, unit of pressure: ofhg.
static MeasureUnit getMetricTon()
Returns by value, unit of mass: metric-ton (renamed to tonne in CLDR 42 / ICU 72).
static MeasureUnit getSolarMass()
Returns by value, unit of mass: solar-mass.
static MeasureUnit getSquareCentimeter()
Returns by value, unit of area: square-centimeter.
static MeasureUnit getWeber()
Returns by value, unit of magnetic: weber.
static MeasureUnit getKilojoule()
Returns by value, unit of energy: kilojoule.
static MeasureUnit getThermUs()
Returns by value, unit of energy: therm-us.
static MeasureUnit * createLux(UErrorCode &status)
Returns by pointer, unit of light: lux.
static MeasureUnit getCubicKilometer()
Returns by value, unit of volume: cubic-kilometer.
static MeasureUnit getSeJp()
Returns by value, unit of area: se-jp.
static MeasureUnit getDotPerInch()
Returns by value, unit of graphics: dot-per-inch.
static MeasureUnit getWeek()
Returns by value, unit of duration: week.
static MeasureUnit getSquareMile()
Returns by value, unit of area: square-mile.
static MeasureUnit getDecade()
Returns by value, unit of duration: decade.
static MeasureUnit * createBuJp(UErrorCode &status)
Returns by pointer, unit of area: bu-jp.
static MeasureUnit * createOunce(UErrorCode &status)
Returns by pointer, unit of mass: ounce.
static MeasureUnit * createCupImperial(UErrorCode &status)
Returns by pointer, unit of volume: cup-imperial.
static MeasureUnit * createGenericTemperature(UErrorCode &status)
Returns by pointer, unit of temperature: generic.
static MeasureUnit getLumen()
Returns by value, unit of light: lumen.
MeasureUnit withDimensionality(int32_t dimensionality, UErrorCode &status) const
Creates a MeasureUnit which is this SINGLE unit augmented with the specified dimensionality (power).
static MeasureUnit * createSolarRadius(UErrorCode &status)
Returns by pointer, unit of length: solar-radius.
static MeasureUnit getMilligramOfglucosePerDeciliter()
Returns by value, unit of concentr: milligram-ofglucose-per-deciliter.
static MeasureUnit * createPintImperial(UErrorCode &status)
Returns by pointer, unit of volume: pint-imperial.
static MeasureUnit * createToJp(UErrorCode &status)
Returns by pointer, unit of volume: to-jp.
static MeasureUnit * createCubicInch(UErrorCode &status)
Returns by pointer, unit of volume: cubic-inch.
Base class for 'pure' C++ implementations of uenum api.
Definition: strenum.h:61
A string-like object that points to a sized piece of memory.
Definition: stringpiece.h:61
UObject is the common ICU "boilerplate" class.
Definition: uobject.h:222
C++ API: "Smart pointers" for use with and in ICU4C C++ code.
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 ...
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,...
enum icu::UMeasurePrefix UMeasurePrefix
Enumeration for SI and binary prefixes, e.g.
UMeasurePrefix
Enumeration for SI and binary prefixes, e.g.
Definition: measunit.h:89
@ UMEASURE_PREFIX_QUECTO
SI prefix: quecto, 10^-30.
Definition: measunit.h:281
@ UMEASURE_PREFIX_YOBI
Binary prefix: yobi, 1024^8.
Definition: measunit.h:369
@ UMEASURE_PREFIX_GIGA
SI prefix: giga, 10^9.
Definition: measunit.h:169
@ UMEASURE_PREFIX_GIBI
Binary prefix: gibi, 1024^3.
Definition: measunit.h:334
@ UMEASURE_PREFIX_TEBI
Binary prefix: tebi, 1024^4.
Definition: measunit.h:341
@ UMEASURE_PREFIX_PICO
SI prefix: pico, 10^-12.
Definition: measunit.h:239
@ UMEASURE_PREFIX_NANO
SI prefix: nano, 10^-9.
Definition: measunit.h:232
@ UMEASURE_PREFIX_INTERNAL_MIN_SI
ICU use only.
Definition: measunit.h:290
@ UMEASURE_PREFIX_QUETTA
SI prefix: quetta, 10^30.
Definition: measunit.h:120
@ UMEASURE_PREFIX_INTERNAL_MIN_BIN
ICU use only.
Definition: measunit.h:319
@ UMEASURE_PREFIX_HECTO
SI prefix: hecto, 10^2.
Definition: measunit.h:190
@ UMEASURE_PREFIX_KIBI
Binary prefix: kibi, 1024^1.
Definition: measunit.h:311
@ UMEASURE_PREFIX_INTERNAL_ONE_BIN
ICU use only.
Definition: measunit.h:304
@ UMEASURE_PREFIX_EXA
SI prefix: exa, 10^18.
Definition: measunit.h:148
@ UMEASURE_PREFIX_FEMTO
SI prefix: femto, 10^-15.
Definition: measunit.h:246
@ UMEASURE_PREFIX_MEBI
Binary prefix: mebi, 1024^2.
Definition: measunit.h:327
@ UMEASURE_PREFIX_MEGA
SI prefix: mega, 10^6.
Definition: measunit.h:176
@ UMEASURE_PREFIX_RONNA
SI prefix: ronna, 10^27.
Definition: measunit.h:113
@ UMEASURE_PREFIX_PEBI
Binary prefix: pebi, 1024^5.
Definition: measunit.h:348
@ UMEASURE_PREFIX_RONTO
SI prefix: ronto, 10^-27.
Definition: measunit.h:274
@ UMEASURE_PREFIX_DECI
SI prefix: deci, 10^-1.
Definition: measunit.h:204
@ UMEASURE_PREFIX_ZEPTO
SI prefix: zepto, 10^-21.
Definition: measunit.h:260
@ UMEASURE_PREFIX_CENTI
SI prefix: centi, 10^-2.
Definition: measunit.h:211
@ UMEASURE_PREFIX_ZEBI
Binary prefix: zebi, 1024^7.
Definition: measunit.h:362
@ UMEASURE_PREFIX_KILO
SI prefix: kilo, 10^3.
Definition: measunit.h:183
@ UMEASURE_PREFIX_DEKA
SI prefix: deka, 10^1.
Definition: measunit.h:197
@ UMEASURE_PREFIX_ONE
The absence of an SI or binary prefix.
Definition: measunit.h:99
@ UMEASURE_PREFIX_YOTTA
SI prefix: yotta, 10^24.
Definition: measunit.h:106
@ UMEASURE_PREFIX_INTERNAL_MAX_BIN
ICU use only.
Definition: measunit.h:377
@ UMEASURE_PREFIX_ATTO
SI prefix: atto, 10^-18.
Definition: measunit.h:253
@ UMEASURE_PREFIX_YOCTO
SI prefix: yocto, 10^-24.
Definition: measunit.h:267
@ UMEASURE_PREFIX_ZETTA
SI prefix: zetta, 10^21.
Definition: measunit.h:141
@ UMEASURE_PREFIX_EXBI
Binary prefix: exbi, 1024^6.
Definition: measunit.h:355
@ UMEASURE_PREFIX_TERA
SI prefix: tera, 10^12.
Definition: measunit.h:162
@ UMEASURE_PREFIX_INTERNAL_MAX_SI
ICU use only.
Definition: measunit.h:129
@ UMEASURE_PREFIX_MILLI
SI prefix: milli, 10^-3.
Definition: measunit.h:218
@ UMEASURE_PREFIX_MICRO
SI prefix: micro, 10^-6.
Definition: measunit.h:225
@ UMEASURE_PREFIX_PETA
SI prefix: peta, 10^15.
Definition: measunit.h:155
UMeasureUnitComplexity
Enumeration for unit complexity.
Definition: measunit.h:55
@ UMEASURE_UNIT_MIXED
A mixed unit, like hour+minute.
Definition: measunit.h:75
@ UMEASURE_UNIT_COMPOUND
A compound unit, like meter-per-second.
Definition: measunit.h:68
@ UMEASURE_UNIT_SINGLE
A single unit, like kilojoule.
Definition: measunit.h:61
#define U_CAPI
This is used to declare a function as a public ICU C API.
Definition: umachine.h:110
C++ API: Unicode String.
void * UClassID
UClassID is used to identify classes without using the compiler's RTTI.
Definition: uobject.h:96
Basic definitions for ICU, for both C and C++ APIs.
UErrorCode
Standard ICU4C error code type, a substitute for exceptions.
Definition: utypes.h:509
#define U_I18N_API
Set to export library symbols from inside the i18n library, and to import them from outside.
Definition: utypes.h:316