ICU 68.2: measunit.h Source File

ICU 68.2 68.2

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 "unicode/unistr.h"
23 #include "unicode/localpointer.h"
24
30 U_NAMESPACE_BEGIN
31
32 class StringEnumeration;
33 struct MeasureUnitImpl;
34
35 #ifndef U_HIDE_DRAFT_API
36
51 enum UMeasureUnitComplexity {
57 UMEASURE_UNIT_SINGLE,
58
64 UMEASURE_UNIT_COMPOUND,
65
71 UMEASURE_UNIT_MIXED
72 };
73
79 typedef enum UMeasureSIPrefix {
80
86 UMEASURE_SI_PREFIX_YOTTA = 24,
87
93 UMEASURE_SI_PREFIX_ZETTA = 21,
94
100 UMEASURE_SI_PREFIX_EXA = 18,
101
107 UMEASURE_SI_PREFIX_PETA = 15,
108
114 UMEASURE_SI_PREFIX_TERA = 12,
115
121 UMEASURE_SI_PREFIX_GIGA = 9,
122
128 UMEASURE_SI_PREFIX_MEGA = 6,
129
135 UMEASURE_SI_PREFIX_KILO = 3,
136
142 UMEASURE_SI_PREFIX_HECTO = 2,
143
149 UMEASURE_SI_PREFIX_DEKA = 1,
150
156 UMEASURE_SI_PREFIX_ONE = 0,
157
163 UMEASURE_SI_PREFIX_DECI = -1,
164
170 UMEASURE_SI_PREFIX_CENTI = -2,
171
177 UMEASURE_SI_PREFIX_MILLI = -3,
178
184 UMEASURE_SI_PREFIX_MICRO = -6,
185
191 UMEASURE_SI_PREFIX_NANO = -9,
192
198 UMEASURE_SI_PREFIX_PICO = -12,
199
205 UMEASURE_SI_PREFIX_FEMTO = -15,
206
212 UMEASURE_SI_PREFIX_ATTO = -18,
213
219 UMEASURE_SI_PREFIX_ZEPTO = -21,
220
226 UMEASURE_SI_PREFIX_YOCTO = -24
227 } UMeasureSIPrefix;
228 #endif // U_HIDE_DRAFT_API
229
237 class U_I18N_API MeasureUnit: public UObject {
238 public:
239
245 MeasureUnit();
246
251 MeasureUnit(const MeasureUnit &other);
252
253 #ifndef U_HIDE_DRAFT_API
254
258 MeasureUnit(MeasureUnit &&other) noexcept;
259
272 static MeasureUnit forIdentifier(StringPiece identifier, UErrorCode& status);
273 #endif // U_HIDE_DRAFT_API
274
279 MeasureUnit &operator=(const MeasureUnit &other);
280
281 #ifndef U_HIDE_DRAFT_API
282
286 MeasureUnit &operator=(MeasureUnit &&other) noexcept;
287 #endif // U_HIDE_DRAFT_API
288
294 virtual MeasureUnit* clone() const;
295
300 virtual ~MeasureUnit();
301
307 virtual UBool operator==(const UObject& other) const;
308
314 UBool operator!=(const UObject& other) const {
315 return !(*this == other);
316 }
317
325 const char *getType() const;
326
334 const char *getSubtype() const;
335
336 #ifndef U_HIDE_DRAFT_API
337
343 const char* getIdentifier() const;
344
352 UMeasureUnitComplexity getComplexity(UErrorCode& status) const;
353
368 MeasureUnit withSIPrefix(UMeasureSIPrefix prefix, UErrorCode& status) const;
369
381 UMeasureSIPrefix getSIPrefix(UErrorCode& status) const;
382
397 MeasureUnit withDimensionality(int32_t dimensionality, UErrorCode& status) const;
398
412 int32_t getDimensionality(UErrorCode& status) const;
413
426 MeasureUnit reciprocal(UErrorCode& status) const;
427
445 MeasureUnit product(const MeasureUnit& other, UErrorCode& status) const;
446 #endif // U_HIDE_DRAFT_API
447
448 #ifndef U_HIDE_DRAFT_API
449
464 inline std::pair<LocalArray<MeasureUnit>, int32_t> splitToSingleUnits(UErrorCode& status) const;
465 #endif // U_HIDE_DRAFT_API
466
478 static int32_t getAvailable(
479 MeasureUnit *destArray,
480 int32_t destCapacity,
481 UErrorCode &errorCode);
482
495 static int32_t getAvailable(
496 const char *type,
497 MeasureUnit *destArray,
498 int32_t destCapacity,
499 UErrorCode &errorCode);
500
509 static StringEnumeration* getAvailableTypes(UErrorCode &errorCode);
510
522 static UClassID U_EXPORT2 getStaticClassID(void);
523
535 virtual UClassID getDynamicClassID(void) const;
536
537 #ifndef U_HIDE_INTERNAL_API
538
543 int32_t getOffset() const;
544 #endif /* U_HIDE_INTERNAL_API */
545
546 // All code between the "Start generated createXXX methods" comment and
547 // the "End generated createXXX methods" comment is auto generated code
548 // and must not be edited manually. For instructions on how to correctly
549 // update this code, refer to:
550 // http://site.icu-project.org/design/formatting/measureformat/updating-measure-unit
551 //
552 // Start generated createXXX methods
553
561 static MeasureUnit *createGForce(UErrorCode &status);
562
568 static MeasureUnit getGForce();
569
577 static MeasureUnit *createMeterPerSecondSquared(UErrorCode &status);
578
584 static MeasureUnit getMeterPerSecondSquared();
585
593 static MeasureUnit *createArcMinute(UErrorCode &status);
594
600 static MeasureUnit getArcMinute();
601
609 static MeasureUnit *createArcSecond(UErrorCode &status);
610
616 static MeasureUnit getArcSecond();
617
625 static MeasureUnit *createDegree(UErrorCode &status);
626
632 static MeasureUnit getDegree();
633
641 static MeasureUnit *createRadian(UErrorCode &status);
642
648 static MeasureUnit getRadian();
649
657 static MeasureUnit *createRevolutionAngle(UErrorCode &status);
658
664 static MeasureUnit getRevolutionAngle();
665
673 static MeasureUnit *createAcre(UErrorCode &status);
674
680 static MeasureUnit getAcre();
681
689 static MeasureUnit *createDunam(UErrorCode &status);
690
696 static MeasureUnit getDunam();
697
705 static MeasureUnit *createHectare(UErrorCode &status);
706
712 static MeasureUnit getHectare();
713
721 static MeasureUnit *createSquareCentimeter(UErrorCode &status);
722
728 static MeasureUnit getSquareCentimeter();
729
737 static MeasureUnit *createSquareFoot(UErrorCode &status);
738
744 static MeasureUnit getSquareFoot();
745
753 static MeasureUnit *createSquareInch(UErrorCode &status);
754
760 static MeasureUnit getSquareInch();
761
769 static MeasureUnit *createSquareKilometer(UErrorCode &status);
770
776 static MeasureUnit getSquareKilometer();
777
785 static MeasureUnit *createSquareMeter(UErrorCode &status);
786
792 static MeasureUnit getSquareMeter();
793
801 static MeasureUnit *createSquareMile(UErrorCode &status);
802
808 static MeasureUnit getSquareMile();
809
817 static MeasureUnit *createSquareYard(UErrorCode &status);
818
824 static MeasureUnit getSquareYard();
825
833 static MeasureUnit *createKarat(UErrorCode &status);
834
840 static MeasureUnit getKarat();
841
849 static MeasureUnit *createMilligramPerDeciliter(UErrorCode &status);
850
856 static MeasureUnit getMilligramPerDeciliter();
857
865 static MeasureUnit *createMillimolePerLiter(UErrorCode &status);
866
872 static MeasureUnit getMillimolePerLiter();
873
881 static MeasureUnit *createMole(UErrorCode &status);
882
888 static MeasureUnit getMole();
889
897 static MeasureUnit *createPercent(UErrorCode &status);
898
904 static MeasureUnit getPercent();
905
913 static MeasureUnit *createPermille(UErrorCode &status);
914
920 static MeasureUnit getPermille();
921
929 static MeasureUnit *createPartPerMillion(UErrorCode &status);
930
936 static MeasureUnit getPartPerMillion();
937
945 static MeasureUnit *createPermyriad(UErrorCode &status);
946
952 static MeasureUnit getPermyriad();
953
961 static MeasureUnit *createLiterPer100Kilometers(UErrorCode &status);
962
968 static MeasureUnit getLiterPer100Kilometers();
969
977 static MeasureUnit *createLiterPerKilometer(UErrorCode &status);
978
984 static MeasureUnit getLiterPerKilometer();
985
993 static MeasureUnit *createMilePerGallon(UErrorCode &status);
994
1000 static MeasureUnit getMilePerGallon();
1001
1009 static MeasureUnit *createMilePerGallonImperial(UErrorCode &status);
1010
1016 static MeasureUnit getMilePerGallonImperial();
1017
1025 static MeasureUnit *createBit(UErrorCode &status);
1026
1032 static MeasureUnit getBit();
1033
1041 static MeasureUnit *createByte(UErrorCode &status);
1042
1048 static MeasureUnit getByte();
1049
1057 static MeasureUnit *createGigabit(UErrorCode &status);
1058
1064 static MeasureUnit getGigabit();
1065
1073 static MeasureUnit *createGigabyte(UErrorCode &status);
1074
1080 static MeasureUnit getGigabyte();
1081
1089 static MeasureUnit *createKilobit(UErrorCode &status);
1090
1096 static MeasureUnit getKilobit();
1097
1105 static MeasureUnit *createKilobyte(UErrorCode &status);
1106
1112 static MeasureUnit getKilobyte();
1113
1121 static MeasureUnit *createMegabit(UErrorCode &status);
1122
1128 static MeasureUnit getMegabit();
1129
1137 static MeasureUnit *createMegabyte(UErrorCode &status);
1138
1144 static MeasureUnit getMegabyte();
1145
1153 static MeasureUnit *createPetabyte(UErrorCode &status);
1154
1160 static MeasureUnit getPetabyte();
1161
1169 static MeasureUnit *createTerabit(UErrorCode &status);
1170
1176 static MeasureUnit getTerabit();
1177
1185 static MeasureUnit *createTerabyte(UErrorCode &status);
1186
1192 static MeasureUnit getTerabyte();
1193
1201 static MeasureUnit *createCentury(UErrorCode &status);
1202
1208 static MeasureUnit getCentury();
1209
1217 static MeasureUnit *createDay(UErrorCode &status);
1218
1224 static MeasureUnit getDay();
1225
1233 static MeasureUnit *createDayPerson(UErrorCode &status);
1234
1240 static MeasureUnit getDayPerson();
1241
1249 static MeasureUnit *createDecade(UErrorCode &status);
1250
1256 static MeasureUnit getDecade();
1257
1265 static MeasureUnit *createHour(UErrorCode &status);
1266
1272 static MeasureUnit getHour();
1273
1281 static MeasureUnit *createMicrosecond(UErrorCode &status);
1282
1288 static MeasureUnit getMicrosecond();
1289
1297 static MeasureUnit *createMillisecond(UErrorCode &status);
1298
1304 static MeasureUnit getMillisecond();
1305
1313 static MeasureUnit *createMinute(UErrorCode &status);
1314
1320 static MeasureUnit getMinute();
1321
1329 static MeasureUnit *createMonth(UErrorCode &status);
1330
1336 static MeasureUnit getMonth();
1337
1345 static MeasureUnit *createMonthPerson(UErrorCode &status);
1346
1352 static MeasureUnit getMonthPerson();
1353
1361 static MeasureUnit *createNanosecond(UErrorCode &status);
1362
1368 static MeasureUnit getNanosecond();
1369
1377 static MeasureUnit *createSecond(UErrorCode &status);
1378
1384 static MeasureUnit getSecond();
1385
1393 static MeasureUnit *createWeek(UErrorCode &status);
1394
1400 static MeasureUnit getWeek();
1401
1409 static MeasureUnit *createWeekPerson(UErrorCode &status);
1410
1416 static MeasureUnit getWeekPerson();
1417
1425 static MeasureUnit *createYear(UErrorCode &status);
1426
1432 static MeasureUnit getYear();
1433
1441 static MeasureUnit *createYearPerson(UErrorCode &status);
1442
1448 static MeasureUnit getYearPerson();
1449
1457 static MeasureUnit *createAmpere(UErrorCode &status);
1458
1464 static MeasureUnit getAmpere();
1465
1473 static MeasureUnit *createMilliampere(UErrorCode &status);
1474
1480 static MeasureUnit getMilliampere();
1481
1489 static MeasureUnit *createOhm(UErrorCode &status);
1490
1496 static MeasureUnit getOhm();
1497
1505 static MeasureUnit *createVolt(UErrorCode &status);
1506
1512 static MeasureUnit getVolt();
1513
1521 static MeasureUnit *createBritishThermalUnit(UErrorCode &status);
1522
1528 static MeasureUnit getBritishThermalUnit();
1529
1537 static MeasureUnit *createCalorie(UErrorCode &status);
1538
1544 static MeasureUnit getCalorie();
1545
1553 static MeasureUnit *createElectronvolt(UErrorCode &status);
1554
1560 static MeasureUnit getElectronvolt();
1561
1569 static MeasureUnit *createFoodcalorie(UErrorCode &status);
1570
1576 static MeasureUnit getFoodcalorie();
1577
1585 static MeasureUnit *createJoule(UErrorCode &status);
1586
1592 static MeasureUnit getJoule();
1593
1601 static MeasureUnit *createKilocalorie(UErrorCode &status);
1602
1608 static MeasureUnit getKilocalorie();
1609
1617 static MeasureUnit *createKilojoule(UErrorCode &status);
1618
1624 static MeasureUnit getKilojoule();
1625
1633 static MeasureUnit *createKilowattHour(UErrorCode &status);
1634
1640 static MeasureUnit getKilowattHour();
1641
1649 static MeasureUnit *createThermUs(UErrorCode &status);
1650
1656 static MeasureUnit getThermUs();
1657
1665 static MeasureUnit *createNewton(UErrorCode &status);
1666
1672 static MeasureUnit getNewton();
1673
1681 static MeasureUnit *createPoundForce(UErrorCode &status);
1682
1688 static MeasureUnit getPoundForce();
1689
1697 static MeasureUnit *createGigahertz(UErrorCode &status);
1698
1704 static MeasureUnit getGigahertz();
1705
1713 static MeasureUnit *createHertz(UErrorCode &status);
1714
1720 static MeasureUnit getHertz();
1721
1729 static MeasureUnit *createKilohertz(UErrorCode &status);
1730
1736 static MeasureUnit getKilohertz();
1737
1745 static MeasureUnit *createMegahertz(UErrorCode &status);
1746
1752 static MeasureUnit getMegahertz();
1753
1754 #ifndef U_HIDE_DRAFT_API
1755
1762 static MeasureUnit *createDot(UErrorCode &status);
1763
1769 static MeasureUnit getDot();
1770 #endif /* U_HIDE_DRAFT_API */
1771
1779 static MeasureUnit *createDotPerCentimeter(UErrorCode &status);
1780
1786 static MeasureUnit getDotPerCentimeter();
1787
1795 static MeasureUnit *createDotPerInch(UErrorCode &status);
1796
1802 static MeasureUnit getDotPerInch();
1803
1811 static MeasureUnit *createEm(UErrorCode &status);
1812
1818 static MeasureUnit getEm();
1819
1827 static MeasureUnit *createMegapixel(UErrorCode &status);
1828
1834 static MeasureUnit getMegapixel();
1835
1843 static MeasureUnit *createPixel(UErrorCode &status);
1844
1850 static MeasureUnit getPixel();
1851
1859 static MeasureUnit *createPixelPerCentimeter(UErrorCode &status);
1860
1866 static MeasureUnit getPixelPerCentimeter();
1867
1875 static MeasureUnit *createPixelPerInch(UErrorCode &status);
1876
1882 static MeasureUnit getPixelPerInch();
1883
1891 static MeasureUnit *createAstronomicalUnit(UErrorCode &status);
1892
1898 static MeasureUnit getAstronomicalUnit();
1899
1907 static MeasureUnit *createCentimeter(UErrorCode &status);
1908
1914 static MeasureUnit getCentimeter();
1915
1923 static MeasureUnit *createDecimeter(UErrorCode &status);
1924
1930 static MeasureUnit getDecimeter();
1931
1932 #ifndef U_HIDE_DRAFT_API
1933
1940 static MeasureUnit *createEarthRadius(UErrorCode &status);
1941
1947 static MeasureUnit getEarthRadius();
1948 #endif /* U_HIDE_DRAFT_API */
1949
1957 static MeasureUnit *createFathom(UErrorCode &status);
1958
1964 static MeasureUnit getFathom();
1965
1973 static MeasureUnit *createFoot(UErrorCode &status);
1974
1980 static MeasureUnit getFoot();
1981
1989 static MeasureUnit *createFurlong(UErrorCode &status);
1990
1996 static MeasureUnit getFurlong();
1997
2005 static MeasureUnit *createInch(UErrorCode &status);
2006
2012 static MeasureUnit getInch();
2013
2021 static MeasureUnit *createKilometer(UErrorCode &status);
2022
2028 static MeasureUnit getKilometer();
2029
2037 static MeasureUnit *createLightYear(UErrorCode &status);
2038
2044 static MeasureUnit getLightYear();
2045
2053 static MeasureUnit *createMeter(UErrorCode &status);
2054
2060 static MeasureUnit getMeter();
2061
2069 static MeasureUnit *createMicrometer(UErrorCode &status);
2070
2076 static MeasureUnit getMicrometer();
2077
2085 static MeasureUnit *createMile(UErrorCode &status);
2086
2092 static MeasureUnit getMile();
2093
2101 static MeasureUnit *createMileScandinavian(UErrorCode &status);
2102
2108 static MeasureUnit getMileScandinavian();
2109
2117 static MeasureUnit *createMillimeter(UErrorCode &status);
2118
2124 static MeasureUnit getMillimeter();
2125
2133 static MeasureUnit *createNanometer(UErrorCode &status);
2134
2140 static MeasureUnit getNanometer();
2141
2149 static MeasureUnit *createNauticalMile(UErrorCode &status);
2150
2156 static MeasureUnit getNauticalMile();
2157
2165 static MeasureUnit *createParsec(UErrorCode &status);
2166
2172 static MeasureUnit getParsec();
2173
2181 static MeasureUnit *createPicometer(UErrorCode &status);
2182
2188 static MeasureUnit getPicometer();
2189
2197 static MeasureUnit *createPoint(UErrorCode &status);
2198
2204 static MeasureUnit getPoint();
2205
2213 static MeasureUnit *createSolarRadius(UErrorCode &status);
2214
2220 static MeasureUnit getSolarRadius();
2221
2229 static MeasureUnit *createYard(UErrorCode &status);
2230
2236 static MeasureUnit getYard();
2237
2238 #ifndef U_HIDE_DRAFT_API
2239
2246 static MeasureUnit *createCandela(UErrorCode &status);
2247
2253 static MeasureUnit getCandela();
2254 #endif /* U_HIDE_DRAFT_API */
2255
2256 #ifndef U_HIDE_DRAFT_API
2257
2264 static MeasureUnit *createLumen(UErrorCode &status);
2265
2271 static MeasureUnit getLumen();
2272 #endif /* U_HIDE_DRAFT_API */
2273
2281 static MeasureUnit *createLux(UErrorCode &status);
2282
2288 static MeasureUnit getLux();
2289
2297 static MeasureUnit *createSolarLuminosity(UErrorCode &status);
2298
2304 static MeasureUnit getSolarLuminosity();
2305
2313 static MeasureUnit *createCarat(UErrorCode &status);
2314
2320 static MeasureUnit getCarat();
2321
2329 static MeasureUnit *createDalton(UErrorCode &status);
2330
2336 static MeasureUnit getDalton();
2337
2345 static MeasureUnit *createEarthMass(UErrorCode &status);
2346
2352 static MeasureUnit getEarthMass();
2353
2354 #ifndef U_HIDE_DRAFT_API
2355
2362 static MeasureUnit *createGrain(UErrorCode &status);
2363
2369 static MeasureUnit getGrain();
2370 #endif /* U_HIDE_DRAFT_API */
2371
2379 static MeasureUnit *createGram(UErrorCode &status);
2380
2386 static MeasureUnit getGram();
2387
2395 static MeasureUnit *createKilogram(UErrorCode &status);
2396
2402 static MeasureUnit getKilogram();
2403
2411 static MeasureUnit *createMetricTon(UErrorCode &status);
2412
2418 static MeasureUnit getMetricTon();
2419
2427 static MeasureUnit *createMicrogram(UErrorCode &status);
2428
2434 static MeasureUnit getMicrogram();
2435
2443 static MeasureUnit *createMilligram(UErrorCode &status);
2444
2450 static MeasureUnit getMilligram();
2451
2459 static MeasureUnit *createOunce(UErrorCode &status);
2460
2466 static MeasureUnit getOunce();
2467
2475 static MeasureUnit *createOunceTroy(UErrorCode &status);
2476
2482 static MeasureUnit getOunceTroy();
2483
2491 static MeasureUnit *createPound(UErrorCode &status);
2492
2498 static MeasureUnit getPound();
2499
2507 static MeasureUnit *createSolarMass(UErrorCode &status);
2508
2514 static MeasureUnit getSolarMass();
2515
2523 static MeasureUnit *createStone(UErrorCode &status);
2524
2530 static MeasureUnit getStone();
2531
2539 static MeasureUnit *createTon(UErrorCode &status);
2540
2546 static MeasureUnit getTon();
2547
2555 static MeasureUnit *createGigawatt(UErrorCode &status);
2556
2562 static MeasureUnit getGigawatt();
2563
2571 static MeasureUnit *createHorsepower(UErrorCode &status);
2572
2578 static MeasureUnit getHorsepower();
2579
2587 static MeasureUnit *createKilowatt(UErrorCode &status);
2588
2594 static MeasureUnit getKilowatt();
2595
2603 static MeasureUnit *createMegawatt(UErrorCode &status);
2604
2610 static MeasureUnit getMegawatt();
2611
2619 static MeasureUnit *createMilliwatt(UErrorCode &status);
2620
2626 static MeasureUnit getMilliwatt();
2627
2635 static MeasureUnit *createWatt(UErrorCode &status);
2636
2642 static MeasureUnit getWatt();
2643
2651 static MeasureUnit *createAtmosphere(UErrorCode &status);
2652
2658 static MeasureUnit getAtmosphere();
2659
2667 static MeasureUnit *createBar(UErrorCode &status);
2668
2674 static MeasureUnit getBar();
2675
2683 static MeasureUnit *createHectopascal(UErrorCode &status);
2684
2690 static MeasureUnit getHectopascal();
2691
2699 static MeasureUnit *createInchHg(UErrorCode &status);
2700
2706 static MeasureUnit getInchHg();
2707
2715 static MeasureUnit *createKilopascal(UErrorCode &status);
2716
2722 static MeasureUnit getKilopascal();
2723
2731 static MeasureUnit *createMegapascal(UErrorCode &status);
2732
2738 static MeasureUnit getMegapascal();
2739
2747 static MeasureUnit *createMillibar(UErrorCode &status);
2748
2754 static MeasureUnit getMillibar();
2755
2763 static MeasureUnit *createMillimeterOfMercury(UErrorCode &status);
2764
2770 static MeasureUnit getMillimeterOfMercury();
2771
2779 static MeasureUnit *createPascal(UErrorCode &status);
2780
2786 static MeasureUnit getPascal();
2787
2795 static MeasureUnit *createPoundPerSquareInch(UErrorCode &status);
2796
2802 static MeasureUnit getPoundPerSquareInch();
2803
2811 static MeasureUnit *createKilometerPerHour(UErrorCode &status);
2812
2818 static MeasureUnit getKilometerPerHour();
2819
2827 static MeasureUnit *createKnot(UErrorCode &status);
2828
2834 static MeasureUnit getKnot();
2835
2843 static MeasureUnit *createMeterPerSecond(UErrorCode &status);
2844
2850 static MeasureUnit getMeterPerSecond();
2851
2859 static MeasureUnit *createMilePerHour(UErrorCode &status);
2860
2866 static MeasureUnit getMilePerHour();
2867
2875 static MeasureUnit *createCelsius(UErrorCode &status);
2876
2882 static MeasureUnit getCelsius();
2883
2891 static MeasureUnit *createFahrenheit(UErrorCode &status);
2892
2898 static MeasureUnit getFahrenheit();
2899
2907 static MeasureUnit *createGenericTemperature(UErrorCode &status);
2908
2914 static MeasureUnit getGenericTemperature();
2915
2923 static MeasureUnit *createKelvin(UErrorCode &status);
2924
2930 static MeasureUnit getKelvin();
2931
2939 static MeasureUnit *createNewtonMeter(UErrorCode &status);
2940
2946 static MeasureUnit getNewtonMeter();
2947
2955 static MeasureUnit *createPoundFoot(UErrorCode &status);
2956
2962 static MeasureUnit getPoundFoot();
2963
2971 static MeasureUnit *createAcreFoot(UErrorCode &status);
2972
2978 static MeasureUnit getAcreFoot();
2979
2987 static MeasureUnit *createBarrel(UErrorCode &status);
2988
2994 static MeasureUnit getBarrel();
2995
3003 static MeasureUnit *createBushel(UErrorCode &status);
3004
3010 static MeasureUnit getBushel();
3011
3019 static MeasureUnit *createCentiliter(UErrorCode &status);
3020
3026 static MeasureUnit getCentiliter();
3027
3035 static MeasureUnit *createCubicCentimeter(UErrorCode &status);
3036
3042 static MeasureUnit getCubicCentimeter();
3043
3051 static MeasureUnit *createCubicFoot(UErrorCode &status);
3052
3058 static MeasureUnit getCubicFoot();
3059
3067 static MeasureUnit *createCubicInch(UErrorCode &status);
3068
3074 static MeasureUnit getCubicInch();
3075
3083 static MeasureUnit *createCubicKilometer(UErrorCode &status);
3084
3090 static MeasureUnit getCubicKilometer();
3091
3099 static MeasureUnit *createCubicMeter(UErrorCode &status);
3100
3106 static MeasureUnit getCubicMeter();
3107
3115 static MeasureUnit *createCubicMile(UErrorCode &status);
3116
3122 static MeasureUnit getCubicMile();
3123
3131 static MeasureUnit *createCubicYard(UErrorCode &status);
3132
3138 static MeasureUnit getCubicYard();
3139
3147 static MeasureUnit *createCup(UErrorCode &status);
3148
3154 static MeasureUnit getCup();
3155
3163 static MeasureUnit *createCupMetric(UErrorCode &status);
3164
3170 static MeasureUnit getCupMetric();
3171
3179 static MeasureUnit *createDeciliter(UErrorCode &status);
3180
3186 static MeasureUnit getDeciliter();
3187
3188 #ifndef U_HIDE_DRAFT_API
3189
3196 static MeasureUnit *createDessertSpoon(UErrorCode &status);
3197
3203 static MeasureUnit getDessertSpoon();
3204 #endif /* U_HIDE_DRAFT_API */
3205
3206 #ifndef U_HIDE_DRAFT_API
3207
3214 static MeasureUnit *createDessertSpoonImperial(UErrorCode &status);
3215
3221 static MeasureUnit getDessertSpoonImperial();
3222 #endif /* U_HIDE_DRAFT_API */
3223
3224 #ifndef U_HIDE_DRAFT_API
3225
3232 static MeasureUnit *createDram(UErrorCode &status);
3233
3239 static MeasureUnit getDram();
3240 #endif /* U_HIDE_DRAFT_API */
3241
3242 #ifndef U_HIDE_DRAFT_API
3243
3250 static MeasureUnit *createDrop(UErrorCode &status);
3251
3257 static MeasureUnit getDrop();
3258 #endif /* U_HIDE_DRAFT_API */
3259
3267 static MeasureUnit *createFluidOunce(UErrorCode &status);
3268
3274 static MeasureUnit getFluidOunce();
3275
3283 static MeasureUnit *createFluidOunceImperial(UErrorCode &status);
3284
3290 static MeasureUnit getFluidOunceImperial();
3291
3299 static MeasureUnit *createGallon(UErrorCode &status);
3300
3306 static MeasureUnit getGallon();
3307
3315 static MeasureUnit *createGallonImperial(UErrorCode &status);
3316
3322 static MeasureUnit getGallonImperial();
3323
3331 static MeasureUnit *createHectoliter(UErrorCode &status);
3332
3338 static MeasureUnit getHectoliter();
3339
3340 #ifndef U_HIDE_DRAFT_API
3341
3348 static MeasureUnit *createJigger(UErrorCode &status);
3349
3355 static MeasureUnit getJigger();
3356 #endif /* U_HIDE_DRAFT_API */
3357
3365 static MeasureUnit *createLiter(UErrorCode &status);
3366
3372 static MeasureUnit getLiter();
3373
3381 static MeasureUnit *createMegaliter(UErrorCode &status);
3382
3388 static MeasureUnit getMegaliter();
3389
3397 static MeasureUnit *createMilliliter(UErrorCode &status);
3398
3404 static MeasureUnit getMilliliter();
3405
3406 #ifndef U_HIDE_DRAFT_API
3407
3414 static MeasureUnit *createPinch(UErrorCode &status);
3415
3421 static MeasureUnit getPinch();
3422 #endif /* U_HIDE_DRAFT_API */
3423
3431 static MeasureUnit *createPint(UErrorCode &status);
3432
3438 static MeasureUnit getPint();
3439
3447 static MeasureUnit *createPintMetric(UErrorCode &status);
3448
3454 static MeasureUnit getPintMetric();
3455
3463 static MeasureUnit *createQuart(UErrorCode &status);
3464
3470 static MeasureUnit getQuart();
3471
3472 #ifndef U_HIDE_DRAFT_API
3473
3480 static MeasureUnit *createQuartImperial(UErrorCode &status);
3481
3487 static MeasureUnit getQuartImperial();
3488 #endif /* U_HIDE_DRAFT_API */
3489
3497 static MeasureUnit *createTablespoon(UErrorCode &status);
3498
3504 static MeasureUnit getTablespoon();
3505
3513 static MeasureUnit *createTeaspoon(UErrorCode &status);
3514
3520 static MeasureUnit getTeaspoon();
3521
3522
3523 // End generated createXXX methods
3524
3525 protected:
3526
3527 #ifndef U_HIDE_INTERNAL_API
3528
3532 void initTime(const char *timeId);
3533
3538 void initCurrency(StringPiece isoCurrency);
3539
3540 #endif /* U_HIDE_INTERNAL_API */
3541
3542 private:
3543
3544 // Used by new draft APIs in ICU 67. If non-null, fImpl is owned by the
3545 // MeasureUnit.
3546 MeasureUnitImpl* fImpl;
3547
3548 // An index into a static string list in measunit.cpp. If set to -1, fImpl
3549 // is in use instead of fTypeId and fSubTypeId.
3550 int16_t fSubTypeId;
3551 // An index into a static string list in measunit.cpp. If set to -1, fImpl
3552 // is in use instead of fTypeId and fSubTypeId.
3553 int8_t fTypeId;
3554
3555 MeasureUnit(int32_t typeId, int32_t subTypeId);
3556 MeasureUnit(MeasureUnitImpl&& impl);
3557 void setTo(int32_t typeId, int32_t subTypeId);
3558 static MeasureUnit *create(int typeId, int subTypeId, UErrorCode &status);
3559
3567 static bool findBySubType(StringPiece subType, MeasureUnit* output);
3568
3570 LocalArray<MeasureUnit> splitToSingleUnitsImpl(int32_t& outCount, UErrorCode& status) const;
3571
3572 friend struct MeasureUnitImpl;
3573 };
3574
3575 #ifndef U_HIDE_DRAFT_API // @draft ICU 68
3576 inline std::pair<LocalArray<MeasureUnit>, int32_t>
3577 MeasureUnit::splitToSingleUnits(UErrorCode& status) const {
3578 int32_t length;
3579 auto array = splitToSingleUnitsImpl(length, status);
3580 return std::make_pair(std::move(array), length);
3581 }
3582 #endif // U_HIDE_DRAFT_API
3583
3584 U_NAMESPACE_END
3585
3586 #endif // !UNCONFIG_NO_FORMATTING
3587
3588 #endif /* U_SHOW_CPLUSPLUS_API */
3589
3590 #endif // __MEASUREUNIT_H__
icu::MeasureUnit::getPixel
static MeasureUnit getPixel()
Returns by value, unit of graphics: pixel.
icu::MeasureUnit::createMilligram
static MeasureUnit * createMilligram(UErrorCode &status)
Returns by pointer, unit of mass: milligram.
icu::MeasureUnit::createKilobyte
static MeasureUnit * createKilobyte(UErrorCode &status)
Returns by pointer, unit of digital: kilobyte.
icu::MeasureUnit::getDegree
static MeasureUnit getDegree()
Returns by value, unit of angle: degree.
icu::MeasureUnit::createTablespoon
static MeasureUnit * createTablespoon(UErrorCode &status)
Returns by pointer, unit of volume: tablespoon.
icu::MeasureUnit::createPicometer
static MeasureUnit * createPicometer(UErrorCode &status)
Returns by pointer, unit of length: picometer.
icu::MeasureUnit::createMicrosecond
static MeasureUnit * createMicrosecond(UErrorCode &status)
Returns by pointer, unit of duration: microsecond.
icu::MeasureUnit::getMillibar
static MeasureUnit getMillibar()
Returns by value, unit of pressure: millibar.
icu::MeasureUnit::createCubicKilometer
static MeasureUnit * createCubicKilometer(UErrorCode &status)
Returns by pointer, unit of volume: cubic-kilometer.
icu::MeasureUnit::getMilligramPerDeciliter
static MeasureUnit getMilligramPerDeciliter()
Returns by value, unit of concentr: milligram-per-deciliter.
icu::MeasureUnit::getMicrometer
static MeasureUnit getMicrometer()
Returns by value, unit of length: micrometer.
icu::MeasureUnit::getCubicYard
static MeasureUnit getCubicYard()
Returns by value, unit of volume: cubic-yard.
icu::MeasureUnit::getDunam
static MeasureUnit getDunam()
Returns by value, unit of area: dunam.
icu::MeasureUnit::getPoundPerSquareInch
static MeasureUnit getPoundPerSquareInch()
Returns by value, unit of pressure: pound-force-per-square-inch.
icu::MeasureUnit::getSquareInch
static MeasureUnit getSquareInch()
Returns by value, unit of area: square-inch.
icu::MeasureUnit::createDay
static MeasureUnit * createDay(UErrorCode &status)
Returns by pointer, unit of duration: day.
icu::UMEASURE_SI_PREFIX_NANO
@ UMEASURE_SI_PREFIX_NANO
SI prefix: nano, 10^-9.
Definition: measunit.h:191
icu::MeasureUnit
A unit such as length, mass, volume, currency, etc.
Definition: measunit.h:237
icu::MeasureUnit::getMegahertz
static MeasureUnit getMegahertz()
Returns by value, unit of frequency: megahertz.
icu::MeasureUnit::createCelsius
static MeasureUnit * createCelsius(UErrorCode &status)
Returns by pointer, unit of temperature: celsius.
icu::MeasureUnit::createPixelPerInch
static MeasureUnit * createPixelPerInch(UErrorCode &status)
Returns by pointer, unit of graphics: pixel-per-inch.
icu::MeasureUnit::createTerabit
static MeasureUnit * createTerabit(UErrorCode &status)
Returns by pointer, unit of digital: terabit.
icu::MeasureUnit::getDram
static MeasureUnit getDram()
Returns by value, unit of volume: dram.
icu::MeasureUnit::getFluidOunceImperial
static MeasureUnit getFluidOunceImperial()
Returns by value, unit of volume: fluid-ounce-imperial.
icu::MeasureUnit::createCentimeter
static MeasureUnit * createCentimeter(UErrorCode &status)
Returns by pointer, unit of length: centimeter.
icu::MeasureUnit::getNewton
static MeasureUnit getNewton()
Returns by value, unit of force: newton.
icu::MeasureUnit::getArcSecond
static MeasureUnit getArcSecond()
Returns by value, unit of angle: arc-second.
icu::MeasureUnit::createTerabyte
static MeasureUnit * createTerabyte(UErrorCode &status)
Returns by pointer, unit of digital: terabyte.
icu::MeasureUnit::getAcre
static MeasureUnit getAcre()
Returns by value, unit of area: acre.
icu::MeasureUnit::createRadian
static MeasureUnit * createRadian(UErrorCode &status)
Returns by pointer, unit of angle: radian.
icu::MeasureUnit::getLux
static MeasureUnit getLux()
Returns by value, unit of light: lux.
icu::MeasureUnit::createLiterPer100Kilometers
static MeasureUnit * createLiterPer100Kilometers(UErrorCode &status)
Returns by pointer, unit of consumption: liter-per-100-kilometer.
icu::MeasureUnit::createBar
static MeasureUnit * createBar(UErrorCode &status)
Returns by pointer, unit of pressure: bar.
icu::MeasureUnit::createEm
static MeasureUnit * createEm(UErrorCode &status)
Returns by pointer, unit of graphics: em.
icu::MeasureUnit::getAvailableTypes
static StringEnumeration * getAvailableTypes(UErrorCode &errorCode)
getAvailableTypes gets all of the available types.
icu::MeasureUnit::getDeciliter
static MeasureUnit getDeciliter()
Returns by value, unit of volume: deciliter.
icu::MeasureUnit::createPoundForce
static MeasureUnit * createPoundForce(UErrorCode &status)
Returns by pointer, unit of force: pound-force.
icu::MeasureUnit::createWeekPerson
static MeasureUnit * createWeekPerson(UErrorCode &status)
Returns by pointer, unit of duration: week-person.
icu::MeasureUnit::getMile
static MeasureUnit getMile()
Returns by value, unit of length: mile.
icu::MeasureUnit::createSquareYard
static MeasureUnit * createSquareYard(UErrorCode &status)
Returns by pointer, unit of area: square-yard.
icu::MeasureUnit::getMegabyte
static MeasureUnit getMegabyte()
Returns by value, unit of digital: megabyte.
icu::MeasureUnit::getDessertSpoonImperial
static MeasureUnit getDessertSpoonImperial()
Returns by value, unit of volume: dessert-spoon-imperial.
icu::MeasureUnit::getLiter
static MeasureUnit getLiter()
Returns by value, unit of volume: liter.
icu::MeasureUnit::createMetricTon
static MeasureUnit * createMetricTon(UErrorCode &status)
Returns by pointer, unit of mass: metric-ton.
icu::MeasureUnit::getKelvin
static MeasureUnit getKelvin()
Returns by value, unit of temperature: kelvin.
icu::MeasureUnit::getOunce
static MeasureUnit getOunce()
Returns by value, unit of mass: ounce.
icu::MeasureUnit::createMeterPerSecond
static MeasureUnit * createMeterPerSecond(UErrorCode &status)
Returns by pointer, unit of speed: meter-per-second.
icu::MeasureUnit::getTerabit
static MeasureUnit getTerabit()
Returns by value, unit of digital: terabit.
icu::MeasureUnit::getIdentifier
const char * getIdentifier() const
Get the CLDR Unit Identifier for this MeasureUnit, as defined in UTS 35.
utypes.h
Basic definitions for ICU, for both C and C++ APIs.
icu::MeasureUnit::createDotPerInch
static MeasureUnit * createDotPerInch(UErrorCode &status)
Returns by pointer, unit of graphics: dot-per-inch.
icu::MeasureUnit::createDalton
static MeasureUnit * createDalton(UErrorCode &status)
Returns by pointer, unit of mass: dalton.
icu::MeasureUnit::initCurrency
void initCurrency(StringPiece isoCurrency)
For ICU use only.
icu::MeasureUnit::createOhm
static MeasureUnit * createOhm(UErrorCode &status)
Returns by pointer, unit of electric: ohm.
icu::MeasureUnit::createPetabyte
static MeasureUnit * createPetabyte(UErrorCode &status)
Returns by pointer, unit of digital: petabyte.
icu::MeasureUnit::getCubicInch
static MeasureUnit getCubicInch()
Returns by value, unit of volume: cubic-inch.
icu::MeasureUnit::createPixelPerCentimeter
static MeasureUnit * createPixelPerCentimeter(UErrorCode &status)
Returns by pointer, unit of graphics: pixel-per-centimeter.
icu::MeasureUnit::getQuart
static MeasureUnit getQuart()
Returns by value, unit of volume: quart.
icu::MeasureUnit::createNanometer
static MeasureUnit * createNanometer(UErrorCode &status)
Returns by pointer, unit of length: nanometer.
icu::MeasureUnit::createMillibar
static MeasureUnit * createMillibar(UErrorCode &status)
Returns by pointer, unit of pressure: millibar.
icu::MeasureUnit::createFathom
static MeasureUnit * createFathom(UErrorCode &status)
Returns by pointer, unit of length: fathom.
icu::MeasureUnit::getOffset
int32_t getOffset() const
ICU use only.
icu::MeasureUnit::getCupMetric
static MeasureUnit getCupMetric()
Returns by value, unit of volume: cup-metric.
icu::MeasureUnit::getSolarLuminosity
static MeasureUnit getSolarLuminosity()
Returns by value, unit of light: solar-luminosity.
icu::MeasureUnit::createHertz
static MeasureUnit * createHertz(UErrorCode &status)
Returns by pointer, unit of frequency: hertz.
icu::MeasureUnit::getParsec
static MeasureUnit getParsec()
Returns by value, unit of length: parsec.
icu::MeasureUnit::createDotPerCentimeter
static MeasureUnit * createDotPerCentimeter(UErrorCode &status)
Returns by pointer, unit of graphics: dot-per-centimeter.
icu::MeasureUnit::createAcre
static MeasureUnit * createAcre(UErrorCode &status)
Returns by pointer, unit of area: acre.
icu::MeasureUnit::createFahrenheit
static MeasureUnit * createFahrenheit(UErrorCode &status)
Returns by pointer, unit of temperature: fahrenheit.
icu::MeasureUnit::createMegapixel
static MeasureUnit * createMegapixel(UErrorCode &status)
Returns by pointer, unit of graphics: megapixel.
U_I18N_API
#define U_I18N_API
Set to export library symbols from inside the i18n library, and to import them from outside.
Definition: utypes.h:301
icu::MeasureUnit::getTon
static MeasureUnit getTon()
Returns by value, unit of mass: ton.
icu::MeasureUnit::getGallon
static MeasureUnit getGallon()
Returns by value, unit of volume: gallon.
UBool
int8_t UBool
The ICU boolean type, a signed-byte integer.
Definition: umachine.h:269
icu::MeasureUnit::getPermyriad
static MeasureUnit getPermyriad()
Returns by value, unit of concentr: permyriad.
icu::MeasureUnit::createMillisecond
static MeasureUnit * createMillisecond(UErrorCode &status)
Returns by pointer, unit of duration: millisecond.
icu::MeasureUnit::getFluidOunce
static MeasureUnit getFluidOunce()
Returns by value, unit of volume: fluid-ounce.
icu::MeasureUnit::createPound
static MeasureUnit * createPound(UErrorCode &status)
Returns by pointer, unit of mass: pound.
icu::MeasureUnit::getSquareYard
static MeasureUnit getSquareYard()
Returns by value, unit of area: square-yard.
icu::MeasureUnit::getCandela
static MeasureUnit getCandela()
Returns by value, unit of light: candela.
icu::MeasureUnit::createYard
static MeasureUnit * createYard(UErrorCode &status)
Returns by pointer, unit of length: yard.
icu::MeasureUnit::createByte
static MeasureUnit * createByte(UErrorCode &status)
Returns by pointer, unit of digital: byte.
icu::MeasureUnit::createNewton
static MeasureUnit * createNewton(UErrorCode &status)
Returns by pointer, unit of force: newton.
icu::MeasureUnit::createKilometer
static MeasureUnit * createKilometer(UErrorCode &status)
Returns by pointer, unit of length: kilometer.
icu::MeasureUnit::createHectopascal
static MeasureUnit * createHectopascal(UErrorCode &status)
Returns by pointer, unit of pressure: hectopascal.
icu::UMEASURE_SI_PREFIX_PICO
@ UMEASURE_SI_PREFIX_PICO
SI prefix: pico, 10^-12.
Definition: measunit.h:198
icu::UMEASURE_UNIT_COMPOUND
@ UMEASURE_UNIT_COMPOUND
A compound unit, like meter-per-second.
Definition: measunit.h:64
icu::MeasureUnit::createWeek
static MeasureUnit * createWeek(UErrorCode &status)
Returns by pointer, unit of duration: week.
icu::MeasureUnit::getLiterPerKilometer
static MeasureUnit getLiterPerKilometer()
Returns by value, unit of consumption: liter-per-kilometer.
icu::UMEASURE_SI_PREFIX_ZETTA
@ UMEASURE_SI_PREFIX_ZETTA
SI prefix: zetta, 10^21.
Definition: measunit.h:93
icu::MeasureUnit::getFoodcalorie
static MeasureUnit getFoodcalorie()
Returns by value, unit of energy: foodcalorie.
icu::MeasureUnit::getNauticalMile
static MeasureUnit getNauticalMile()
Returns by value, unit of length: nautical-mile.
icu::MeasureUnit::getSolarMass
static MeasureUnit getSolarMass()
Returns by value, unit of mass: solar-mass.
icu::MeasureUnit::createBritishThermalUnit
static MeasureUnit * createBritishThermalUnit(UErrorCode &status)
Returns by pointer, unit of energy: british-thermal-unit.
icu::MeasureUnit::createMillimeterOfMercury
static MeasureUnit * createMillimeterOfMercury(UErrorCode &status)
Returns by pointer, unit of pressure: millimeter-ofhg.
icu::MeasureUnit::createCup
static MeasureUnit * createCup(UErrorCode &status)
Returns by pointer, unit of volume: cup.
icu::MeasureUnit::operator=
MeasureUnit & operator=(MeasureUnit &&other) noexcept
Move assignment operator.
icu::MeasureUnit::createMegahertz
static MeasureUnit * createMegahertz(UErrorCode &status)
Returns by pointer, unit of frequency: megahertz.
icu::MeasureUnit::createGigawatt
static MeasureUnit * createGigawatt(UErrorCode &status)
Returns by pointer, unit of power: gigawatt.
icu::MeasureUnit::getKilocalorie
static MeasureUnit getKilocalorie()
Returns by value, unit of energy: kilocalorie.
icu::MeasureUnit::getHectare
static MeasureUnit getHectare()
Returns by value, unit of area: hectare.
icu::MeasureUnit::createLux
static MeasureUnit * createLux(UErrorCode &status)
Returns by pointer, unit of light: lux.
icu::MeasureUnit::getAstronomicalUnit
static MeasureUnit getAstronomicalUnit()
Returns by value, unit of length: astronomical-unit.
icu::MeasureUnit::createDunam
static MeasureUnit * createDunam(UErrorCode &status)
Returns by pointer, unit of area: dunam.
icu::MeasureUnit::getMicrogram
static MeasureUnit getMicrogram()
Returns by value, unit of mass: microgram.
icu::MeasureUnit::createNauticalMile
static MeasureUnit * createNauticalMile(UErrorCode &status)
Returns by pointer, unit of length: nautical-mile.
icu::MeasureUnit::getSIPrefix
UMeasureSIPrefix getSIPrefix(UErrorCode &status) const
Gets the current SI prefix of this SINGLE unit.
icu::MeasureUnit::createPoint
static MeasureUnit * createPoint(UErrorCode &status)
Returns by pointer, unit of length: point.
icu::MeasureUnit::getLumen
static MeasureUnit getLumen()
Returns by value, unit of light: lumen.
icu::MeasureUnit::initTime
void initTime(const char *timeId)
For ICU use only.
icu::MeasureUnit::getKilogram
static MeasureUnit getKilogram()
Returns by value, unit of mass: kilogram.
icu::MeasureUnit::getByte
static MeasureUnit getByte()
Returns by value, unit of digital: byte.
icu::MeasureUnit::getBar
static MeasureUnit getBar()
Returns by value, unit of pressure: bar.
icu::MeasureUnit::getKilobyte
static MeasureUnit getKilobyte()
Returns by value, unit of digital: kilobyte.
icu::MeasureUnit::createGigabyte
static MeasureUnit * createGigabyte(UErrorCode &status)
Returns by pointer, unit of digital: gigabyte.
icu::MeasureUnit::forIdentifier
static MeasureUnit forIdentifier(StringPiece identifier, UErrorCode &status)
Construct a MeasureUnit from a CLDR Unit Identifier, defined in UTS 35.
icu::MeasureUnit::createKilocalorie
static MeasureUnit * createKilocalorie(UErrorCode &status)
Returns by pointer, unit of energy: kilocalorie.
icu::MeasureUnit::createEarthRadius
static MeasureUnit * createEarthRadius(UErrorCode &status)
Returns by pointer, unit of length: earth-radius.
icu::MeasureUnit::operator==
virtual UBool operator==(const UObject &other) const
Equality operator.
icu::MeasureUnit::createMicrometer
static MeasureUnit * createMicrometer(UErrorCode &status)
Returns by pointer, unit of length: micrometer.
icu::UMEASURE_SI_PREFIX_ONE
@ UMEASURE_SI_PREFIX_ONE
The absence of an SI prefix.
Definition: measunit.h:156
icu::UMEASURE_SI_PREFIX_ATTO
@ UMEASURE_SI_PREFIX_ATTO
SI prefix: atto, 10^-18.
Definition: measunit.h:212
icu::MeasureUnit::createMillimolePerLiter
static MeasureUnit * createMillimolePerLiter(UErrorCode &status)
Returns by pointer, unit of concentr: millimole-per-liter.
icu::MeasureUnit::getMegapixel
static MeasureUnit getMegapixel()
Returns by value, unit of graphics: megapixel.
icu::MeasureUnit::createInch
static MeasureUnit * createInch(UErrorCode &status)
Returns by pointer, unit of length: inch.
icu::MeasureUnit::createMole
static MeasureUnit * createMole(UErrorCode &status)
Returns by pointer, unit of concentr: mole.
icu::MeasureUnit::createArcMinute
static MeasureUnit * createArcMinute(UErrorCode &status)
Returns by pointer, unit of angle: arc-minute.
icu::MeasureUnit::getMilliampere
static MeasureUnit getMilliampere()
Returns by value, unit of electric: milliampere.
icu::MeasureUnit::getMilliliter
static MeasureUnit getMilliliter()
Returns by value, unit of volume: milliliter.
icu::MeasureUnit::getGrain
static MeasureUnit getGrain()
Returns by value, unit of mass: grain.
icu::MeasureUnit::getGram
static MeasureUnit getGram()
Returns by value, unit of mass: gram.
icu::MeasureUnit::getSolarRadius
static MeasureUnit getSolarRadius()
Returns by value, unit of length: solar-radius.
icu::MeasureUnit::getDot
static MeasureUnit getDot()
Returns by value, unit of graphics: dot.
icu::MeasureUnit::getHectopascal
static MeasureUnit getHectopascal()
Returns by value, unit of pressure: hectopascal.
icu::MeasureUnit::getMilliwatt
static MeasureUnit getMilliwatt()
Returns by value, unit of power: milliwatt.
icu::MeasureUnit::getMole
static MeasureUnit getMole()
Returns by value, unit of concentr: mole.
icu::MeasureUnit::createDessertSpoonImperial
static MeasureUnit * createDessertSpoonImperial(UErrorCode &status)
Returns by pointer, unit of volume: dessert-spoon-imperial.
icu::MeasureUnit::getKilopascal
static MeasureUnit getKilopascal()
Returns by value, unit of pressure: kilopascal.
icu::MeasureUnit::getMillimeterOfMercury
static MeasureUnit getMillimeterOfMercury()
Returns by value, unit of pressure: millimeter-ofhg.
icu::MeasureUnit::createMeter
static MeasureUnit * createMeter(UErrorCode &status)
Returns by pointer, unit of length: meter.
icu::MeasureUnit::getFahrenheit
static MeasureUnit getFahrenheit()
Returns by value, unit of temperature: fahrenheit.
icu::MeasureUnit::getMilligram
static MeasureUnit getMilligram()
Returns by value, unit of mass: milligram.
icu::MeasureUnit::createQuartImperial
static MeasureUnit * createQuartImperial(UErrorCode &status)
Returns by pointer, unit of volume: quart-imperial.
icu::MeasureUnit::getMeterPerSecond
static MeasureUnit getMeterPerSecond()
Returns by value, unit of speed: meter-per-second.
icu::MeasureUnit::createKilogram
static MeasureUnit * createKilogram(UErrorCode &status)
Returns by pointer, unit of mass: kilogram.
icu::MeasureUnit::createSquareFoot
static MeasureUnit * createSquareFoot(UErrorCode &status)
Returns by pointer, unit of area: square-foot.
icu::MeasureUnit::getFoot
static MeasureUnit getFoot()
Returns by value, unit of length: foot.
icu::MeasureUnit::getKilometer
static MeasureUnit getKilometer()
Returns by value, unit of length: kilometer.
icu::UMeasureSIPrefix
UMeasureSIPrefix
Enumeration for SI prefixes, such as "kilo".
Definition: measunit.h:79
icu::MeasureUnit::getSquareKilometer
static MeasureUnit getSquareKilometer()
Returns by value, unit of area: square-kilometer.
icu::MeasureUnit::createAmpere
static MeasureUnit * createAmpere(UErrorCode &status)
Returns by pointer, unit of electric: ampere.
icu::MeasureUnit::createSecond
static MeasureUnit * createSecond(UErrorCode &status)
Returns by pointer, unit of duration: second.
icu::MeasureUnit::createDot
static MeasureUnit * createDot(UErrorCode &status)
Returns by pointer, unit of graphics: dot.
icu::MeasureUnit::getMegabit
static MeasureUnit getMegabit()
Returns by value, unit of digital: megabit.
icu::MeasureUnit::createSquareMeter
static MeasureUnit * createSquareMeter(UErrorCode &status)
Returns by pointer, unit of area: square-meter.
icu::MeasureUnit::getGenericTemperature
static MeasureUnit getGenericTemperature()
Returns by value, unit of temperature: generic.
icu::MeasureUnit::createDram
static MeasureUnit * createDram(UErrorCode &status)
Returns by pointer, unit of volume: dram.
icu::MeasureUnit::getDayPerson
static MeasureUnit getDayPerson()
Returns by value, unit of duration: day-person.
icu::MeasureUnit::getDimensionality
int32_t getDimensionality(UErrorCode &status) const
Gets the dimensionality (power) of this MeasureUnit.
icu::MeasureUnit::createKilobit
static MeasureUnit * createKilobit(UErrorCode &status)
Returns by pointer, unit of digital: kilobit.
icu::MeasureUnit::createDayPerson
static MeasureUnit * createDayPerson(UErrorCode &status)
Returns by pointer, unit of duration: day-person.
icu::MeasureUnit::getWeekPerson
static MeasureUnit getWeekPerson()
Returns by value, unit of duration: week-person.
icu::MeasureUnit::getMegawatt
static MeasureUnit getMegawatt()
Returns by value, unit of power: megawatt.
icu::MeasureUnit::getEarthRadius
static MeasureUnit getEarthRadius()
Returns by value, unit of length: earth-radius.
icu::MeasureUnit::createPinch
static MeasureUnit * createPinch(UErrorCode &status)
Returns by pointer, unit of volume: pinch.
icu::MeasureUnit::getDynamicClassID
virtual UClassID getDynamicClassID(void) const
Returns a unique class ID POLYMORPHICALLY.
icu::MeasureUnit::createKilometerPerHour
static MeasureUnit * createKilometerPerHour(UErrorCode &status)
Returns by pointer, unit of speed: kilometer-per-hour.
icu::MeasureUnit::getMicrosecond
static MeasureUnit getMicrosecond()
Returns by value, unit of duration: microsecond.
icu::MeasureUnit::createEarthMass
static MeasureUnit * createEarthMass(UErrorCode &status)
Returns by pointer, unit of mass: earth-mass.
icu::MeasureUnit::getYard
static MeasureUnit getYard()
Returns by value, unit of length: yard.
icu::MeasureUnit::getEm
static MeasureUnit getEm()
Returns by value, unit of graphics: em.
icu::MeasureUnit::createDegree
static MeasureUnit * createDegree(UErrorCode &status)
Returns by pointer, unit of angle: degree.
icu::MeasureUnit::getHectoliter
static MeasureUnit getHectoliter()
Returns by value, unit of volume: hectoliter.
icu::MeasureUnit::createDecimeter
static MeasureUnit * createDecimeter(UErrorCode &status)
Returns by pointer, unit of length: decimeter.
icu::MeasureUnit::getKilohertz
static MeasureUnit getKilohertz()
Returns by value, unit of frequency: kilohertz.
icu::MeasureUnit::getPicometer
static MeasureUnit getPicometer()
Returns by value, unit of length: picometer.
icu::MeasureUnit::getNanosecond
static MeasureUnit getNanosecond()
Returns by value, unit of duration: nanosecond.
icu::MeasureUnit::getPixelPerCentimeter
static MeasureUnit getPixelPerCentimeter()
Returns by value, unit of graphics: pixel-per-centimeter.
icu::MeasureUnit::MeasureUnit
MeasureUnit()
Default constructor.
icu::UMEASURE_SI_PREFIX_PETA
@ UMEASURE_SI_PREFIX_PETA
SI prefix: peta, 10^15.
Definition: measunit.h:107
icu::MeasureUnit::createSquareCentimeter
static MeasureUnit * createSquareCentimeter(UErrorCode &status)
Returns by pointer, unit of area: square-centimeter.
icu::MeasureUnit::createHectare
static MeasureUnit * createHectare(UErrorCode &status)
Returns by pointer, unit of area: hectare.
icu::MeasureUnit::getPascal
static MeasureUnit getPascal()
Returns by value, unit of pressure: pascal.
icu::MeasureUnit::createMile
static MeasureUnit * createMile(UErrorCode &status)
Returns by pointer, unit of length: mile.
icu::MeasureUnit::createBarrel
static MeasureUnit * createBarrel(UErrorCode &status)
Returns by pointer, unit of volume: barrel.
icu::MeasureUnit::getAvailable
static int32_t getAvailable(MeasureUnit *destArray, int32_t destCapacity, UErrorCode &errorCode)
getAvailable gets all of the available units.
icu::UMeasureSIPrefix
enum icu::UMeasureSIPrefix UMeasureSIPrefix
Enumeration for SI prefixes, such as "kilo".
icu::MeasureUnit::getSubtype
const char * getSubtype() const
Get the sub type.
icu::MeasureUnit::getSquareFoot
static MeasureUnit getSquareFoot()
Returns by value, unit of area: square-foot.
icu::MeasureUnit::getBarrel
static MeasureUnit getBarrel()
Returns by value, unit of volume: barrel.
icu::MeasureUnit::getPintMetric
static MeasureUnit getPintMetric()
Returns by value, unit of volume: pint-metric.
icu::MeasureUnit::createFoot
static MeasureUnit * createFoot(UErrorCode &status)
Returns by pointer, unit of length: foot.
icu::MeasureUnit::getMilePerHour
static MeasureUnit getMilePerHour()
Returns by value, unit of speed: mile-per-hour.
icu::MeasureUnit::createGallon
static MeasureUnit * createGallon(UErrorCode &status)
Returns by pointer, unit of volume: gallon.
icu::MeasureUnit::operator!=
UBool operator!=(const UObject &other) const
Inequality operator.
Definition: measunit.h:314
icu::MeasureUnit::getCentiliter
static MeasureUnit getCentiliter()
Returns by value, unit of volume: centiliter.
icu::MeasureUnit::getHertz
static MeasureUnit getHertz()
Returns by value, unit of frequency: hertz.
icu::MeasureUnit::createMilligramPerDeciliter
static MeasureUnit * createMilligramPerDeciliter(UErrorCode &status)
Returns by pointer, unit of concentr: milligram-per-deciliter.
icu::MeasureUnit::getAmpere
static MeasureUnit getAmpere()
Returns by value, unit of electric: ampere.
icu::MeasureUnit::getKilowattHour
static MeasureUnit getKilowattHour()
Returns by value, unit of energy: kilowatt-hour.
icu::MeasureUnit::clone
virtual MeasureUnit * clone() const
Returns a polymorphic clone of this object.
icu::MeasureUnit::createGigabit
static MeasureUnit * createGigabit(UErrorCode &status)
Returns by pointer, unit of digital: gigabit.
icu::UObject
UObject is the common ICU "boilerplate" class.
Definition: uobject.h:223
icu::MeasureUnit::getGForce
static MeasureUnit getGForce()
Returns by value, unit of acceleration: g-force.
icu::MeasureUnit::createAcreFoot
static MeasureUnit * createAcreFoot(UErrorCode &status)
Returns by pointer, unit of volume: acre-foot.
icu::MeasureUnit::createHorsepower
static MeasureUnit * createHorsepower(UErrorCode &status)
Returns by pointer, unit of power: horsepower.
icu::MeasureUnit::getPartPerMillion
static MeasureUnit getPartPerMillion()
Returns by value, unit of concentr: permillion.
icu::MeasureUnit::createPoundFoot
static MeasureUnit * createPoundFoot(UErrorCode &status)
Returns by pointer, unit of torque: pound-force-foot.
icu::MeasureUnit::getSquareCentimeter
static MeasureUnit getSquareCentimeter()
Returns by value, unit of area: square-centimeter.
icu::MeasureUnit::getDecimeter
static MeasureUnit getDecimeter()
Returns by value, unit of length: decimeter.
UClassID
void * UClassID
UClassID is used to identify classes without using the compiler's RTTI.
Definition: uobject.h:96
icu::MeasureUnit::createArcSecond
static MeasureUnit * createArcSecond(UErrorCode &status)
Returns by pointer, unit of angle: arc-second.
UErrorCode
UErrorCode
Standard ICU4C error code type, a substitute for exceptions.
Definition: utypes.h:415
icu::MeasureUnit::createCentury
static MeasureUnit * createCentury(UErrorCode &status)
Returns by pointer, unit of duration: century.
icu::MeasureUnit::getGigabit
static MeasureUnit getGigabit()
Returns by value, unit of digital: gigabit.
icu::MeasureUnit::createMilePerHour
static MeasureUnit * createMilePerHour(UErrorCode &status)
Returns by pointer, unit of speed: mile-per-hour.
icu::MeasureUnit::getBritishThermalUnit
static MeasureUnit getBritishThermalUnit()
Returns by value, unit of energy: british-thermal-unit.
icu::MeasureUnit::getDotPerCentimeter
static MeasureUnit getDotPerCentimeter()
Returns by value, unit of graphics: dot-per-centimeter.
icu::MeasureUnit::createSquareInch
static MeasureUnit * createSquareInch(UErrorCode &status)
Returns by pointer, unit of area: square-inch.
icu::StringEnumeration
Base class for 'pure' C++ implementations of uenum api.
Definition: strenum.h:61
icu::MeasureUnit::createMilliliter
static MeasureUnit * createMilliliter(UErrorCode &status)
Returns by pointer, unit of volume: milliliter.
icu::MeasureUnit::createKilopascal
static MeasureUnit * createKilopascal(UErrorCode &status)
Returns by pointer, unit of pressure: kilopascal.
icu::MeasureUnit::getCup
static MeasureUnit getCup()
Returns by value, unit of volume: cup.
icu::MeasureUnit::getYear
static MeasureUnit getYear()
Returns by value, unit of duration: year.
icu::MeasureUnit::getMilePerGallonImperial
static MeasureUnit getMilePerGallonImperial()
Returns by value, unit of consumption: mile-per-gallon-imperial.
icu::MeasureUnit::createCubicInch
static MeasureUnit * createCubicInch(UErrorCode &status)
Returns by pointer, unit of volume: cubic-inch.
icu::MeasureUnit::createSolarRadius
static MeasureUnit * createSolarRadius(UErrorCode &status)
Returns by pointer, unit of length: solar-radius.
icu::MeasureUnit::getCubicKilometer
static MeasureUnit getCubicKilometer()
Returns by value, unit of volume: cubic-kilometer.
icu::MeasureUnit::createFurlong
static MeasureUnit * createFurlong(UErrorCode &status)
Returns by pointer, unit of length: furlong.
icu::MeasureUnit::getHorsepower
static MeasureUnit getHorsepower()
Returns by value, unit of power: horsepower.
icu::MeasureUnit::createBit
static MeasureUnit * createBit(UErrorCode &status)
Returns by pointer, unit of digital: bit.
icu::MeasureUnit::createQuart
static MeasureUnit * createQuart(UErrorCode &status)
Returns by pointer, unit of volume: quart.
icu::MeasureUnit::getPoint
static MeasureUnit getPoint()
Returns by value, unit of length: point.
icu::MeasureUnit::getFathom
static MeasureUnit getFathom()
Returns by value, unit of length: fathom.
icu::MeasureUnit::createPoundPerSquareInch
static MeasureUnit * createPoundPerSquareInch(UErrorCode &status)
Returns by pointer, unit of pressure: pound-force-per-square-inch.
icu::MeasureUnit::createStone
static MeasureUnit * createStone(UErrorCode &status)
Returns by pointer, unit of mass: stone.
icu::MeasureUnit::createCupMetric
static MeasureUnit * createCupMetric(UErrorCode &status)
Returns by pointer, unit of volume: cup-metric.
icu::MeasureUnit::getSquareMeter
static MeasureUnit getSquareMeter()
Returns by value, unit of area: square-meter.
icu::MeasureUnit::createThermUs
static MeasureUnit * createThermUs(UErrorCode &status)
Returns by pointer, unit of energy: therm-us.
icu::MeasureUnit::~MeasureUnit
virtual ~MeasureUnit()
Destructor.
icu::MeasureUnit::createPascal
static MeasureUnit * createPascal(UErrorCode &status)
Returns by pointer, unit of pressure: pascal.
icu::MeasureUnit::createGenericTemperature
static MeasureUnit * createGenericTemperature(UErrorCode &status)
Returns by pointer, unit of temperature: generic.
icu::MeasureUnit::createKnot
static MeasureUnit * createKnot(UErrorCode &status)
Returns by pointer, unit of speed: knot.
icu::MeasureUnit::createOunce
static MeasureUnit * createOunce(UErrorCode &status)
Returns by pointer, unit of mass: ounce.
icu::MeasureUnit::getKilobit
static MeasureUnit getKilobit()
Returns by value, unit of digital: kilobit.
icu::MeasureUnit::getCubicMeter
static MeasureUnit getCubicMeter()
Returns by value, unit of volume: cubic-meter.
icu::MeasureUnit::getKilometerPerHour
static MeasureUnit getKilometerPerHour()
Returns by value, unit of speed: kilometer-per-hour.
icu::MeasureUnit::product
MeasureUnit product(const MeasureUnit &other, UErrorCode &status) const
Gets the product of this unit with another unit.
icu::MeasureUnit::getPoundForce
static MeasureUnit getPoundForce()
Returns by value, unit of force: pound-force.
icu::UMEASURE_SI_PREFIX_GIGA
@ UMEASURE_SI_PREFIX_GIGA
SI prefix: giga, 10^9.
Definition: measunit.h:121
icu::MeasureUnit::createSolarMass
static MeasureUnit * createSolarMass(UErrorCode &status)
Returns by pointer, unit of mass: solar-mass.
icu::MeasureUnit::getBushel
static MeasureUnit getBushel()
Returns by value, unit of volume: bushel.
icu::MeasureUnit::createHour
static MeasureUnit * createHour(UErrorCode &status)
Returns by pointer, unit of duration: hour.
icu::MeasureUnit::createHectoliter
static MeasureUnit * createHectoliter(UErrorCode &status)
Returns by pointer, unit of volume: hectoliter.
icu::MeasureUnit::createKelvin
static MeasureUnit * createKelvin(UErrorCode &status)
Returns by pointer, unit of temperature: kelvin.
icu::MeasureUnit::createGrain
static MeasureUnit * createGrain(UErrorCode &status)
Returns by pointer, unit of mass: grain.
icu::MeasureUnit::getPoundFoot
static MeasureUnit getPoundFoot()
Returns by value, unit of torque: pound-force-foot.
icu::MeasureUnit::createMilePerGallon
static MeasureUnit * createMilePerGallon(UErrorCode &status)
Returns by pointer, unit of consumption: mile-per-gallon.
icu::MeasureUnit::createFluidOunce
static MeasureUnit * createFluidOunce(UErrorCode &status)
Returns by pointer, unit of volume: fluid-ounce.
icu::MeasureUnit::createNewtonMeter
static MeasureUnit * createNewtonMeter(UErrorCode &status)
Returns by pointer, unit of torque: newton-meter.
icu::UMEASURE_UNIT_MIXED
@ UMEASURE_UNIT_MIXED
A mixed unit, like hour+minute.
Definition: measunit.h:71
icu::MeasureUnit::getCubicMile
static MeasureUnit getCubicMile()
Returns by value, unit of volume: cubic-mile.
icu::MeasureUnit::getMinute
static MeasureUnit getMinute()
Returns by value, unit of duration: minute.
icu::MeasureUnit::createDessertSpoon
static MeasureUnit * createDessertSpoon(UErrorCode &status)
Returns by pointer, unit of volume: dessert-spoon.
icu::UMEASURE_SI_PREFIX_ZEPTO
@ UMEASURE_SI_PREFIX_ZEPTO
SI prefix: zepto, 10^-21.
Definition: measunit.h:219
icu::MeasureUnit::getJoule
static MeasureUnit getJoule()
Returns by value, unit of energy: joule.
icu::MeasureUnit::getBit
static MeasureUnit getBit()
Returns by value, unit of digital: bit.
icu::MeasureUnit::getMillimolePerLiter
static MeasureUnit getMillimolePerLiter()
Returns by value, unit of concentr: millimole-per-liter.
icu::MeasureUnit::MeasureUnit
MeasureUnit(MeasureUnit &&other) noexcept
Move constructor.
icu::MeasureUnit::createLiter
static MeasureUnit * createLiter(UErrorCode &status)
Returns by pointer, unit of volume: liter.
icu::MeasureUnit::getPermille
static MeasureUnit getPermille()
Returns by value, unit of concentr: permille.
icu::MeasureUnit::operator=
MeasureUnit & operator=(const MeasureUnit &other)
Copy assignment operator.
icu::MeasureUnit::getOunceTroy
static MeasureUnit getOunceTroy()
Returns by value, unit of mass: ounce-troy.
icu::MeasureUnit::getLiterPer100Kilometers
static MeasureUnit getLiterPer100Kilometers()
Returns by value, unit of consumption: liter-per-100-kilometer.
icu::MeasureUnit::createDrop
static MeasureUnit * createDrop(UErrorCode &status)
Returns by pointer, unit of volume: drop.
icu::MeasureUnit::getJigger
static MeasureUnit getJigger()
Returns by value, unit of volume: jigger.
icu::UMEASURE_SI_PREFIX_DEKA
@ UMEASURE_SI_PREFIX_DEKA
SI prefix: deka, 10^1.
Definition: measunit.h:149
icu::MeasureUnit::createCubicMeter
static MeasureUnit * createCubicMeter(UErrorCode &status)
Returns by pointer, unit of volume: cubic-meter.
icu::MeasureUnit::getGigahertz
static MeasureUnit getGigahertz()
Returns by value, unit of frequency: gigahertz.
icu::MeasureUnit::createMileScandinavian
static MeasureUnit * createMileScandinavian(UErrorCode &status)
Returns by pointer, unit of length: mile-scandinavian.
icu::MeasureUnit::createKilowatt
static MeasureUnit * createKilowatt(UErrorCode &status)
Returns by pointer, unit of power: kilowatt.
icu::MeasureUnit::MeasureUnit
MeasureUnit(const MeasureUnit &other)
Copy constructor.
icu::MeasureUnit::reciprocal
MeasureUnit reciprocal(UErrorCode &status) const
Gets the reciprocal of this MeasureUnit, with the numerator and denominator flipped.
icu::MeasureUnit::getOhm
static MeasureUnit getOhm()
Returns by value, unit of electric: ohm.
icu::MeasureUnit::createCentiliter
static MeasureUnit * createCentiliter(UErrorCode &status)
Returns by pointer, unit of volume: centiliter.
icu::MeasureUnit::getStone
static MeasureUnit getStone()
Returns by value, unit of mass: stone.
icu::MeasureUnit::getPetabyte
static MeasureUnit getPetabyte()
Returns by value, unit of digital: petabyte.
icu::MeasureUnit::getSquareMile
static MeasureUnit getSquareMile()
Returns by value, unit of area: square-mile.
icu::UMEASURE_SI_PREFIX_YOCTO
@ UMEASURE_SI_PREFIX_YOCTO
SI prefix: yocto, 10^-24.
Definition: measunit.h:226
icu::MeasureUnit::createKilohertz
static MeasureUnit * createKilohertz(UErrorCode &status)
Returns by pointer, unit of frequency: kilohertz.
icu::MeasureUnit::getElectronvolt
static MeasureUnit getElectronvolt()
Returns by value, unit of energy: electronvolt.
icu::MeasureUnit::getRevolutionAngle
static MeasureUnit getRevolutionAngle()
Returns by value, unit of angle: revolution.
icu::MeasureUnit::getMonthPerson
static MeasureUnit getMonthPerson()
Returns by value, unit of duration: month-person.
icu::MeasureUnit::getCentimeter
static MeasureUnit getCentimeter()
Returns by value, unit of length: centimeter.
icu::MeasureUnit::getMillimeter
static MeasureUnit getMillimeter()
Returns by value, unit of length: millimeter.
icu::MeasureUnit::getKarat
static MeasureUnit getKarat()
Returns by value, unit of concentr: karat.
icu::MeasureUnit::getEarthMass
static MeasureUnit getEarthMass()
Returns by value, unit of mass: earth-mass.
icu::MeasureUnit::createAstronomicalUnit
static MeasureUnit * createAstronomicalUnit(UErrorCode &status)
Returns by pointer, unit of length: astronomical-unit.
icu::MeasureUnit::getWeek
static MeasureUnit getWeek()
Returns by value, unit of duration: week.
icu::MeasureUnit::createGigahertz
static MeasureUnit * createGigahertz(UErrorCode &status)
Returns by pointer, unit of frequency: gigahertz.
icu::MeasureUnit::createRevolutionAngle
static MeasureUnit * createRevolutionAngle(UErrorCode &status)
Returns by pointer, unit of angle: revolution.
icu::MeasureUnit::createYearPerson
static MeasureUnit * createYearPerson(UErrorCode &status)
Returns by pointer, unit of duration: year-person.
icu::MeasureUnit::createVolt
static MeasureUnit * createVolt(UErrorCode &status)
Returns by pointer, unit of electric: volt.
icu::MeasureUnit::createMeterPerSecondSquared
static MeasureUnit * createMeterPerSecondSquared(UErrorCode &status)
Returns by pointer, unit of acceleration: meter-per-square-second.
icu::MeasureUnit::createJigger
static MeasureUnit * createJigger(UErrorCode &status)
Returns by pointer, unit of volume: jigger.
icu::MeasureUnit::getInchHg
static MeasureUnit getInchHg()
Returns by value, unit of pressure: inch-ofhg.
icu::MeasureUnit::createMicrogram
static MeasureUnit * createMicrogram(UErrorCode &status)
Returns by pointer, unit of mass: microgram.
icu::MeasureUnit::getDay
static MeasureUnit getDay()
Returns by value, unit of duration: day.
icu::MeasureUnit::getStaticClassID
static UClassID getStaticClassID(void)
Return the class ID for this class.
icu::MeasureUnit::getPint
static MeasureUnit getPint()
Returns by value, unit of volume: pint.
icu::UMEASURE_SI_PREFIX_MEGA
@ UMEASURE_SI_PREFIX_MEGA
SI prefix: mega, 10^6.
Definition: measunit.h:128
icu::MeasureUnit::createGallonImperial
static MeasureUnit * createGallonImperial(UErrorCode &status)
Returns by pointer, unit of volume: gallon-imperial.
icu::MeasureUnit::getThermUs
static MeasureUnit getThermUs()
Returns by value, unit of energy: therm-us.
icu::MeasureUnit::getFurlong
static MeasureUnit getFurlong()
Returns by value, unit of length: furlong.
icu::MeasureUnit::createWatt
static MeasureUnit * createWatt(UErrorCode &status)
Returns by pointer, unit of power: watt.
icu::MeasureUnit::getGallonImperial
static MeasureUnit getGallonImperial()
Returns by value, unit of volume: gallon-imperial.
icu::UMEASURE_SI_PREFIX_DECI
@ UMEASURE_SI_PREFIX_DECI
SI prefix: deci, 10^-1.
Definition: measunit.h:163
icu::MeasureUnit::createMegabit
static MeasureUnit * createMegabit(UErrorCode &status)
Returns by pointer, unit of digital: megabit.
icu::MeasureUnit::getComplexity
UMeasureUnitComplexity getComplexity(UErrorCode &status) const
Compute the complexity of the unit.
icu::MeasureUnit::getAtmosphere
static MeasureUnit getAtmosphere()
Returns by value, unit of pressure: atmosphere.
icu::MeasureUnit::createElectronvolt
static MeasureUnit * createElectronvolt(UErrorCode &status)
Returns by pointer, unit of energy: electronvolt.
icu::MeasureUnit::getKnot
static MeasureUnit getKnot()
Returns by value, unit of speed: knot.
icu::MeasureUnit::createParsec
static MeasureUnit * createParsec(UErrorCode &status)
Returns by pointer, unit of length: parsec.
icu::MeasureUnit::createGForce
static MeasureUnit * createGForce(UErrorCode &status)
Returns by pointer, unit of acceleration: g-force.
icu::UMEASURE_SI_PREFIX_CENTI
@ UMEASURE_SI_PREFIX_CENTI
SI prefix: centi, 10^-2.
Definition: measunit.h:170
icu::MeasureUnit::createInchHg
static MeasureUnit * createInchHg(UErrorCode &status)
Returns by pointer, unit of pressure: inch-ofhg.
icu::MeasureUnit::getKilojoule
static MeasureUnit getKilojoule()
Returns by value, unit of energy: kilojoule.
icu::MeasureUnit::getMilePerGallon
static MeasureUnit getMilePerGallon()
Returns by value, unit of consumption: mile-per-gallon.
icu::MeasureUnit::getDotPerInch
static MeasureUnit getDotPerInch()
Returns by value, unit of graphics: dot-per-inch.
icu::MeasureUnit::createPermille
static MeasureUnit * createPermille(UErrorCode &status)
Returns by pointer, unit of concentr: permille.
icu::MeasureUnit::createMegaliter
static MeasureUnit * createMegaliter(UErrorCode &status)
Returns by pointer, unit of volume: megaliter.
icu::MeasureUnit::createGram
static MeasureUnit * createGram(UErrorCode &status)
Returns by pointer, unit of mass: gram.
icu::MeasureUnit::getTerabyte
static MeasureUnit getTerabyte()
Returns by value, unit of digital: terabyte.
icu::MeasureUnit::createBushel
static MeasureUnit * createBushel(UErrorCode &status)
Returns by pointer, unit of volume: bushel.
localpointer.h
C++ API: "Smart pointers" for use with and in ICU4C C++ code.
icu::MeasureUnit::createMilliwatt
static MeasureUnit * createMilliwatt(UErrorCode &status)
Returns by pointer, unit of power: milliwatt.
icu::MeasureUnit::getPercent
static MeasureUnit getPercent()
Returns by value, unit of concentr: percent.
icu::MeasureUnit::getMileScandinavian
static MeasureUnit getMileScandinavian()
Returns by value, unit of length: mile-scandinavian.
icu::MeasureUnit::getCelsius
static MeasureUnit getCelsius()
Returns by value, unit of temperature: celsius.
icu::MeasureUnit::getDalton
static MeasureUnit getDalton()
Returns by value, unit of mass: dalton.
icu::MeasureUnit::getCubicCentimeter
static MeasureUnit getCubicCentimeter()
Returns by value, unit of volume: cubic-centimeter.
icu::MeasureUnit::createOunceTroy
static MeasureUnit * createOunceTroy(UErrorCode &status)
Returns by pointer, unit of mass: ounce-troy.
icu::MeasureUnit::createJoule
static MeasureUnit * createJoule(UErrorCode &status)
Returns by pointer, unit of energy: joule.
icu::MeasureUnit::getType
const char * getType() const
Get the type.
icu::MeasureUnit::createPartPerMillion
static MeasureUnit * createPartPerMillion(UErrorCode &status)
Returns by pointer, unit of concentr: permillion.
icu::MeasureUnit::createMegawatt
static MeasureUnit * createMegawatt(UErrorCode &status)
Returns by pointer, unit of power: megawatt.
icu::MeasureUnit::getQuartImperial
static MeasureUnit getQuartImperial()
Returns by value, unit of volume: quart-imperial.
icu::UMEASURE_SI_PREFIX_TERA
@ UMEASURE_SI_PREFIX_TERA
SI prefix: tera, 10^12.
Definition: measunit.h:114
icu::MeasureUnit::createKilojoule
static MeasureUnit * createKilojoule(UErrorCode &status)
Returns by pointer, unit of energy: kilojoule.
icu::MeasureUnit::getDessertSpoon
static MeasureUnit getDessertSpoon()
Returns by value, unit of volume: dessert-spoon.
icu::UMEASURE_SI_PREFIX_YOTTA
@ UMEASURE_SI_PREFIX_YOTTA
SI prefix: yotta, 10^24.
Definition: measunit.h:86
icu::MeasureUnit::getCentury
static MeasureUnit getCentury()
Returns by value, unit of duration: century.
icu::UMEASURE_UNIT_SINGLE
@ UMEASURE_UNIT_SINGLE
A single unit, like kilojoule.
Definition: measunit.h:57
icu::MeasureUnit::getKilowatt
static MeasureUnit getKilowatt()
Returns by value, unit of power: kilowatt.
icu::MeasureUnit::createMilePerGallonImperial
static MeasureUnit * createMilePerGallonImperial(UErrorCode &status)
Returns by pointer, unit of consumption: mile-per-gallon-imperial.
icu::MeasureUnit::getWatt
static MeasureUnit getWatt()
Returns by value, unit of power: watt.
icu::MeasureUnit::getDrop
static MeasureUnit getDrop()
Returns by value, unit of volume: drop.
icu::MeasureUnit::createMegabyte
static MeasureUnit * createMegabyte(UErrorCode &status)
Returns by pointer, unit of digital: megabyte.
icu::MeasureUnit::getDecade
static MeasureUnit getDecade()
Returns by value, unit of duration: decade.
icu::MeasureUnit::getMegapascal
static MeasureUnit getMegapascal()
Returns by value, unit of pressure: megapascal.
icu::MeasureUnit::getArcMinute
static MeasureUnit getArcMinute()
Returns by value, unit of angle: arc-minute.
icu::MeasureUnit::createCarat
static MeasureUnit * createCarat(UErrorCode &status)
Returns by pointer, unit of mass: carat.
icu::MeasureUnit::createMillimeter
static MeasureUnit * createMillimeter(UErrorCode &status)
Returns by pointer, unit of length: millimeter.
icu::MeasureUnit::createMegapascal
static MeasureUnit * createMegapascal(UErrorCode &status)
Returns by pointer, unit of pressure: megapascal.
icu::MeasureUnit::createCubicMile
static MeasureUnit * createCubicMile(UErrorCode &status)
Returns by pointer, unit of volume: cubic-mile.
icu::MeasureUnit::createSquareKilometer
static MeasureUnit * createSquareKilometer(UErrorCode &status)
Returns by pointer, unit of area: square-kilometer.
icu::MeasureUnit::createFoodcalorie
static MeasureUnit * createFoodcalorie(UErrorCode &status)
Returns by pointer, unit of energy: foodcalorie.
icu::MeasureUnit::getVolt
static MeasureUnit getVolt()
Returns by value, unit of electric: volt.
icu::MeasureUnit::getSecond
static MeasureUnit getSecond()
Returns by value, unit of duration: second.
icu::MeasureUnit::getLightYear
static MeasureUnit getLightYear()
Returns by value, unit of length: light-year.
icu::LocalArray
"Smart pointer" class, deletes objects via the C++ array delete[] operator.
Definition: localpointer.h:366
icu::MeasureUnit::withDimensionality
MeasureUnit withDimensionality(int32_t dimensionality, UErrorCode &status) const
Creates a MeasureUnit which is this SINGLE unit augmented with the specified dimensionality (power).
icu::MeasureUnit::createPermyriad
static MeasureUnit * createPermyriad(UErrorCode &status)
Returns by pointer, unit of concentr: permyriad.
icu::MeasureUnit::getGigawatt
static MeasureUnit getGigawatt()
Returns by value, unit of power: gigawatt.
icu::MeasureUnit::createCalorie
static MeasureUnit * createCalorie(UErrorCode &status)
Returns by pointer, unit of energy: calorie.
icu::MeasureUnit::createPixel
static MeasureUnit * createPixel(UErrorCode &status)
Returns by pointer, unit of graphics: pixel.
icu::MeasureUnit::getCarat
static MeasureUnit getCarat()
Returns by value, unit of mass: carat.
icu::MeasureUnit::getPixelPerInch
static MeasureUnit getPixelPerInch()
Returns by value, unit of graphics: pixel-per-inch.
icu::MeasureUnit::createLiterPerKilometer
static MeasureUnit * createLiterPerKilometer(UErrorCode &status)
Returns by pointer, unit of consumption: liter-per-kilometer.
icu::MeasureUnit::getMetricTon
static MeasureUnit getMetricTon()
Returns by value, unit of mass: metric-ton.
icu::MeasureUnit::getInch
static MeasureUnit getInch()
Returns by value, unit of length: inch.
icu::MeasureUnit::getMeter
static MeasureUnit getMeter()
Returns by value, unit of length: meter.
icu::UMEASURE_SI_PREFIX_HECTO
@ UMEASURE_SI_PREFIX_HECTO
SI prefix: hecto, 10^2.
Definition: measunit.h:142
icu::MeasureUnit::createLumen
static MeasureUnit * createLumen(UErrorCode &status)
Returns by pointer, unit of light: lumen.
icu::MeasureUnit::createPercent
static MeasureUnit * createPercent(UErrorCode &status)
Returns by pointer, unit of concentr: percent.
icu::MeasureUnit::getHour
static MeasureUnit getHour()
Returns by value, unit of duration: hour.
icu::MeasureUnit::createCubicYard
static MeasureUnit * createCubicYard(UErrorCode &status)
Returns by pointer, unit of volume: cubic-yard.
icu::MeasureUnit::createKilowattHour
static MeasureUnit * createKilowattHour(UErrorCode &status)
Returns by pointer, unit of energy: kilowatt-hour.
icu::MeasureUnit::createCubicCentimeter
static MeasureUnit * createCubicCentimeter(UErrorCode &status)
Returns by pointer, unit of volume: cubic-centimeter.
icu::MeasureUnit::getYearPerson
static MeasureUnit getYearPerson()
Returns by value, unit of duration: year-person.
icu::UMEASURE_SI_PREFIX_EXA
@ UMEASURE_SI_PREFIX_EXA
SI prefix: exa, 10^18.
Definition: measunit.h:100
icu::UMEASURE_SI_PREFIX_MICRO
@ UMEASURE_SI_PREFIX_MICRO
SI prefix: micro, 10^-6.
Definition: measunit.h:184
icu::MeasureUnit::createSolarLuminosity
static MeasureUnit * createSolarLuminosity(UErrorCode &status)
Returns by pointer, unit of light: solar-luminosity.
icu::MeasureUnit::getPinch
static MeasureUnit getPinch()
Returns by value, unit of volume: pinch.
icu::MeasureUnit::getCubicFoot
static MeasureUnit getCubicFoot()
Returns by value, unit of volume: cubic-foot.
icu::MeasureUnit::createNanosecond
static MeasureUnit * createNanosecond(UErrorCode &status)
Returns by pointer, unit of duration: nanosecond.
icu::MeasureUnit::createTon
static MeasureUnit * createTon(UErrorCode &status)
Returns by pointer, unit of mass: ton.
icu::MeasureUnit::createMonthPerson
static MeasureUnit * createMonthPerson(UErrorCode &status)
Returns by pointer, unit of duration: month-person.
icu::MeasureUnit::getAvailable
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.
icu::MeasureUnit::getMegaliter
static MeasureUnit getMegaliter()
Returns by value, unit of volume: megaliter.
icu::MeasureUnit::createCandela
static MeasureUnit * createCandela(UErrorCode &status)
Returns by pointer, unit of light: candela.
icu::StringPiece
A string-like object that points to a sized piece of memory.
Definition: stringpiece.h:60
icu::MeasureUnit::getNanometer
static MeasureUnit getNanometer()
Returns by value, unit of length: nanometer.
icu::MeasureUnit::getCalorie
static MeasureUnit getCalorie()
Returns by value, unit of energy: calorie.
icu::MeasureUnit::createDeciliter
static MeasureUnit * createDeciliter(UErrorCode &status)
Returns by pointer, unit of volume: deciliter.
icu::MeasureUnit::createFluidOunceImperial
static MeasureUnit * createFluidOunceImperial(UErrorCode &status)
Returns by pointer, unit of volume: fluid-ounce-imperial.
icu::MeasureUnit::getTeaspoon
static MeasureUnit getTeaspoon()
Returns by value, unit of volume: teaspoon.
icu::MeasureUnit::createYear
static MeasureUnit * createYear(UErrorCode &status)
Returns by pointer, unit of duration: year.
icu::MeasureUnit::getTablespoon
static MeasureUnit getTablespoon()
Returns by value, unit of volume: tablespoon.
icu::MeasureUnit::getMonth
static MeasureUnit getMonth()
Returns by value, unit of duration: month.
icu::MeasureUnit::createSquareMile
static MeasureUnit * createSquareMile(UErrorCode &status)
Returns by pointer, unit of area: square-mile.
icu::MeasureUnit::createTeaspoon
static MeasureUnit * createTeaspoon(UErrorCode &status)
Returns by pointer, unit of volume: teaspoon.
icu::MeasureUnit::getAcreFoot
static MeasureUnit getAcreFoot()
Returns by value, unit of volume: acre-foot.
icu::MeasureUnit::createMinute
static MeasureUnit * createMinute(UErrorCode &status)
Returns by pointer, unit of duration: minute.
icu::MeasureUnit::getNewtonMeter
static MeasureUnit getNewtonMeter()
Returns by value, unit of torque: newton-meter.
icu::MeasureUnit::getMillisecond
static MeasureUnit getMillisecond()
Returns by value, unit of duration: millisecond.
unistr.h
C++ API: Unicode String.
icu::MeasureUnit::createLightYear
static MeasureUnit * createLightYear(UErrorCode &status)
Returns by pointer, unit of length: light-year.
icu::MeasureUnit::createMilliampere
static MeasureUnit * createMilliampere(UErrorCode &status)
Returns by pointer, unit of electric: milliampere.
icu::MeasureUnit::withSIPrefix
MeasureUnit withSIPrefix(UMeasureSIPrefix prefix, UErrorCode &status) const
Creates a MeasureUnit which is this SINGLE unit augmented with the specified SI prefix.
icu::MeasureUnit::createPint
static MeasureUnit * createPint(UErrorCode &status)
Returns by pointer, unit of volume: pint.
icu::MeasureUnit::getRadian
static MeasureUnit getRadian()
Returns by value, unit of angle: radian.
icu::MeasureUnit::getMeterPerSecondSquared
static MeasureUnit getMeterPerSecondSquared()
Returns by value, unit of acceleration: meter-per-square-second.
icu::UMeasureUnitComplexity
UMeasureUnitComplexity
Enumeration for unit complexity.
Definition: measunit.h:51
icu::MeasureUnit::createDecade
static MeasureUnit * createDecade(UErrorCode &status)
Returns by pointer, unit of duration: decade.
icu::UMEASURE_SI_PREFIX_MILLI
@ UMEASURE_SI_PREFIX_MILLI
SI prefix: milli, 10^-3.
Definition: measunit.h:177
icu::UMEASURE_SI_PREFIX_FEMTO
@ UMEASURE_SI_PREFIX_FEMTO
SI prefix: femto, 10^-15.
Definition: measunit.h:205
icu::MeasureUnit::createCubicFoot
static MeasureUnit * createCubicFoot(UErrorCode &status)
Returns by pointer, unit of volume: cubic-foot.
icu::MeasureUnit::createKarat
static MeasureUnit * createKarat(UErrorCode &status)
Returns by pointer, unit of concentr: karat.
icu::MeasureUnit::getGigabyte
static MeasureUnit getGigabyte()
Returns by value, unit of digital: gigabyte.
icu::MeasureUnit::createMonth
static MeasureUnit * createMonth(UErrorCode &status)
Returns by pointer, unit of duration: month.
icu::MeasureUnit::createPintMetric
static MeasureUnit * createPintMetric(UErrorCode &status)
Returns by pointer, unit of volume: pint-metric.
icu::UMEASURE_SI_PREFIX_KILO
@ UMEASURE_SI_PREFIX_KILO
SI prefix: kilo, 10^3.
Definition: measunit.h:135
icu::MeasureUnit::createAtmosphere
static MeasureUnit * createAtmosphere(UErrorCode &status)
Returns by pointer, unit of pressure: atmosphere.
icu::MeasureUnit::getPound
static MeasureUnit getPound()
Returns by value, unit of mass: pound.