]>
git.saurik.com Git - apple/icu.git/blob - icuSources/i18n/unicode/measunit.h
1 // © 2016 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
4 **********************************************************************
5 * Copyright (c) 2004-2016, International Business Machines
6 * Corporation and others. All Rights Reserved.
7 **********************************************************************
9 * Created: April 26, 2004
11 **********************************************************************
13 #ifndef __MEASUREUNIT_H__
14 #define __MEASUREUNIT_H__
16 #include "unicode/utypes.h"
18 #if U_SHOW_CPLUSPLUS_API
20 #if !UCONFIG_NO_FORMATTING
22 #include "unicode/unistr.h"
26 * \brief C++ API: A unit for measuring a quantity.
31 class StringEnumeration
;
34 * A unit such as length, mass, volume, currency, etc. A unit is
35 * coupled with a numeric amount to produce a Measure.
40 class U_I18N_API MeasureUnit
: public UObject
{
44 * Default constructor.
45 * Populates the instance with the base dimensionless unit.
54 MeasureUnit(const MeasureUnit
&other
);
57 * Assignment operator.
60 MeasureUnit
&operator=(const MeasureUnit
&other
);
63 * Returns a polymorphic clone of this object. The result will
64 * have the same class as returned by getDynamicClassID().
67 virtual MeasureUnit
* clone() const;
73 virtual ~MeasureUnit();
76 * Equality operator. Return true if this object is equal
77 * to the given object.
80 virtual UBool
operator==(const UObject
& other
) const;
83 * Inequality operator. Return true if this object is not equal
84 * to the given object.
87 UBool
operator!=(const UObject
& other
) const {
88 return !(*this == other
);
95 const char *getType() const;
101 const char *getSubtype() const;
104 * getAvailable gets all of the available units.
105 * If there are too many units to fit into destCapacity then the
106 * error code is set to U_BUFFER_OVERFLOW_ERROR.
108 * @param destArray destination buffer.
109 * @param destCapacity number of MeasureUnit instances available at dest.
110 * @param errorCode ICU error code.
111 * @return number of available units.
114 static int32_t getAvailable(
115 MeasureUnit
*destArray
,
116 int32_t destCapacity
,
117 UErrorCode
&errorCode
);
120 * getAvailable gets all of the available units for a specific type.
121 * If there are too many units to fit into destCapacity then the
122 * error code is set to U_BUFFER_OVERFLOW_ERROR.
124 * @param type the type
125 * @param destArray destination buffer.
126 * @param destCapacity number of MeasureUnit instances available at dest.
127 * @param errorCode ICU error code.
128 * @return number of available units for type.
131 static int32_t getAvailable(
133 MeasureUnit
*destArray
,
134 int32_t destCapacity
,
135 UErrorCode
&errorCode
);
138 * getAvailableTypes gets all of the available types. Caller owns the
139 * returned StringEnumeration and must delete it when finished using it.
141 * @param errorCode ICU error code.
145 static StringEnumeration
* getAvailableTypes(UErrorCode
&errorCode
);
148 * Return the class ID for this class. This is useful only for comparing to
149 * a return value from getDynamicClassID(). For example:
151 * . Base* polymorphic_pointer = createPolymorphicObject();
152 * . if (polymorphic_pointer->getDynamicClassID() ==
153 * . Derived::getStaticClassID()) ...
155 * @return The class ID for all objects of this class.
158 static UClassID U_EXPORT2
getStaticClassID(void);
161 * Returns a unique class ID POLYMORPHICALLY. Pure virtual override. This
162 * method is to implement a simple version of RTTI, since not all C++
163 * compilers support genuine RTTI. Polymorphic operator==() and clone()
164 * methods call this method.
166 * @return The class ID for this object. All objects of a
167 * given class have the same class ID. Objects of
168 * other classes have different class IDs.
171 virtual UClassID
getDynamicClassID(void) const;
173 #ifndef U_HIDE_INTERNAL_API
176 * Returns associated array index for this measure unit. Only valid for
177 * non-currency measure units.
180 int32_t getIndex() const;
184 * Returns maximum value from getIndex plus 1.
187 static int32_t getIndexCount();
191 * @return the unit.getIndex() of the unit which has this unit.getType() and unit.getSubtype(),
192 * or a negative value if there is no such unit
195 static int32_t internalGetIndexForTypeAndSubtype(const char *type
, const char *subtype
);
201 static MeasureUnit
resolveUnitPerUnit(
202 const MeasureUnit
&unit
, const MeasureUnit
&perUnit
, bool* isResolved
);
203 #endif /* U_HIDE_INTERNAL_API */
205 // All code between the "Start generated createXXX methods" comment and
206 // the "End generated createXXX methods" comment is auto generated code
207 // and must not be edited manually. For instructions on how to correctly
208 // update this code, refer to:
209 // http://site.icu-project.org/design/formatting/measureformat/updating-measure-unit
211 // Start generated createXXX methods
214 * Returns by pointer, unit of acceleration: g-force.
215 * Caller owns returned value and must free it.
216 * Also see {@link #getGForce()}.
217 * @param status ICU error code.
220 static MeasureUnit
*createGForce(UErrorCode
&status
);
222 #ifndef U_HIDE_DRAFT_API
224 * Returns by value, unit of acceleration: g-force.
225 * Also see {@link #createGForce()}.
228 static MeasureUnit
getGForce();
229 #endif /* U_HIDE_DRAFT_API */
232 * Returns by pointer, unit of acceleration: meter-per-second-squared.
233 * Caller owns returned value and must free it.
234 * Also see {@link #getMeterPerSecondSquared()}.
235 * @param status ICU error code.
238 static MeasureUnit
*createMeterPerSecondSquared(UErrorCode
&status
);
240 #ifndef U_HIDE_DRAFT_API
242 * Returns by value, unit of acceleration: meter-per-second-squared.
243 * Also see {@link #createMeterPerSecondSquared()}.
246 static MeasureUnit
getMeterPerSecondSquared();
247 #endif /* U_HIDE_DRAFT_API */
250 * Returns by pointer, unit of angle: arc-minute.
251 * Caller owns returned value and must free it.
252 * Also see {@link #getArcMinute()}.
253 * @param status ICU error code.
256 static MeasureUnit
*createArcMinute(UErrorCode
&status
);
258 #ifndef U_HIDE_DRAFT_API
260 * Returns by value, unit of angle: arc-minute.
261 * Also see {@link #createArcMinute()}.
264 static MeasureUnit
getArcMinute();
265 #endif /* U_HIDE_DRAFT_API */
268 * Returns by pointer, unit of angle: arc-second.
269 * Caller owns returned value and must free it.
270 * Also see {@link #getArcSecond()}.
271 * @param status ICU error code.
274 static MeasureUnit
*createArcSecond(UErrorCode
&status
);
276 #ifndef U_HIDE_DRAFT_API
278 * Returns by value, unit of angle: arc-second.
279 * Also see {@link #createArcSecond()}.
282 static MeasureUnit
getArcSecond();
283 #endif /* U_HIDE_DRAFT_API */
286 * Returns by pointer, unit of angle: degree.
287 * Caller owns returned value and must free it.
288 * Also see {@link #getDegree()}.
289 * @param status ICU error code.
292 static MeasureUnit
*createDegree(UErrorCode
&status
);
294 #ifndef U_HIDE_DRAFT_API
296 * Returns by value, unit of angle: degree.
297 * Also see {@link #createDegree()}.
300 static MeasureUnit
getDegree();
301 #endif /* U_HIDE_DRAFT_API */
304 * Returns by pointer, unit of angle: radian.
305 * Caller owns returned value and must free it.
306 * Also see {@link #getRadian()}.
307 * @param status ICU error code.
310 static MeasureUnit
*createRadian(UErrorCode
&status
);
312 #ifndef U_HIDE_DRAFT_API
314 * Returns by value, unit of angle: radian.
315 * Also see {@link #createRadian()}.
318 static MeasureUnit
getRadian();
319 #endif /* U_HIDE_DRAFT_API */
322 * Returns by pointer, unit of angle: revolution.
323 * Caller owns returned value and must free it.
324 * Also see {@link #getRevolutionAngle()}.
325 * @param status ICU error code.
328 static MeasureUnit
*createRevolutionAngle(UErrorCode
&status
);
330 #ifndef U_HIDE_DRAFT_API
332 * Returns by value, unit of angle: revolution.
333 * Also see {@link #createRevolutionAngle()}.
336 static MeasureUnit
getRevolutionAngle();
337 #endif /* U_HIDE_DRAFT_API */
340 * Returns by pointer, unit of area: acre.
341 * Caller owns returned value and must free it.
342 * Also see {@link #getAcre()}.
343 * @param status ICU error code.
346 static MeasureUnit
*createAcre(UErrorCode
&status
);
348 #ifndef U_HIDE_DRAFT_API
350 * Returns by value, unit of area: acre.
351 * Also see {@link #createAcre()}.
354 static MeasureUnit
getAcre();
355 #endif /* U_HIDE_DRAFT_API */
357 #ifndef U_HIDE_DRAFT_API
359 * Returns by pointer, unit of area: dunam.
360 * Caller owns returned value and must free it.
361 * Also see {@link #getDunam()}.
362 * @param status ICU error code.
365 static MeasureUnit
*createDunam(UErrorCode
&status
);
368 * Returns by value, unit of area: dunam.
369 * Also see {@link #createDunam()}.
372 static MeasureUnit
getDunam();
373 #endif /* U_HIDE_DRAFT_API */
376 * Returns by pointer, unit of area: hectare.
377 * Caller owns returned value and must free it.
378 * Also see {@link #getHectare()}.
379 * @param status ICU error code.
382 static MeasureUnit
*createHectare(UErrorCode
&status
);
384 #ifndef U_HIDE_DRAFT_API
386 * Returns by value, unit of area: hectare.
387 * Also see {@link #createHectare()}.
390 static MeasureUnit
getHectare();
391 #endif /* U_HIDE_DRAFT_API */
394 * Returns by pointer, unit of area: square-centimeter.
395 * Caller owns returned value and must free it.
396 * Also see {@link #getSquareCentimeter()}.
397 * @param status ICU error code.
400 static MeasureUnit
*createSquareCentimeter(UErrorCode
&status
);
402 #ifndef U_HIDE_DRAFT_API
404 * Returns by value, unit of area: square-centimeter.
405 * Also see {@link #createSquareCentimeter()}.
408 static MeasureUnit
getSquareCentimeter();
409 #endif /* U_HIDE_DRAFT_API */
412 * Returns by pointer, unit of area: square-foot.
413 * Caller owns returned value and must free it.
414 * Also see {@link #getSquareFoot()}.
415 * @param status ICU error code.
418 static MeasureUnit
*createSquareFoot(UErrorCode
&status
);
420 #ifndef U_HIDE_DRAFT_API
422 * Returns by value, unit of area: square-foot.
423 * Also see {@link #createSquareFoot()}.
426 static MeasureUnit
getSquareFoot();
427 #endif /* U_HIDE_DRAFT_API */
430 * Returns by pointer, unit of area: square-inch.
431 * Caller owns returned value and must free it.
432 * Also see {@link #getSquareInch()}.
433 * @param status ICU error code.
436 static MeasureUnit
*createSquareInch(UErrorCode
&status
);
438 #ifndef U_HIDE_DRAFT_API
440 * Returns by value, unit of area: square-inch.
441 * Also see {@link #createSquareInch()}.
444 static MeasureUnit
getSquareInch();
445 #endif /* U_HIDE_DRAFT_API */
448 * Returns by pointer, unit of area: square-kilometer.
449 * Caller owns returned value and must free it.
450 * Also see {@link #getSquareKilometer()}.
451 * @param status ICU error code.
454 static MeasureUnit
*createSquareKilometer(UErrorCode
&status
);
456 #ifndef U_HIDE_DRAFT_API
458 * Returns by value, unit of area: square-kilometer.
459 * Also see {@link #createSquareKilometer()}.
462 static MeasureUnit
getSquareKilometer();
463 #endif /* U_HIDE_DRAFT_API */
466 * Returns by pointer, unit of area: square-meter.
467 * Caller owns returned value and must free it.
468 * Also see {@link #getSquareMeter()}.
469 * @param status ICU error code.
472 static MeasureUnit
*createSquareMeter(UErrorCode
&status
);
474 #ifndef U_HIDE_DRAFT_API
476 * Returns by value, unit of area: square-meter.
477 * Also see {@link #createSquareMeter()}.
480 static MeasureUnit
getSquareMeter();
481 #endif /* U_HIDE_DRAFT_API */
484 * Returns by pointer, unit of area: square-mile.
485 * Caller owns returned value and must free it.
486 * Also see {@link #getSquareMile()}.
487 * @param status ICU error code.
490 static MeasureUnit
*createSquareMile(UErrorCode
&status
);
492 #ifndef U_HIDE_DRAFT_API
494 * Returns by value, unit of area: square-mile.
495 * Also see {@link #createSquareMile()}.
498 static MeasureUnit
getSquareMile();
499 #endif /* U_HIDE_DRAFT_API */
502 * Returns by pointer, unit of area: square-yard.
503 * Caller owns returned value and must free it.
504 * Also see {@link #getSquareYard()}.
505 * @param status ICU error code.
508 static MeasureUnit
*createSquareYard(UErrorCode
&status
);
510 #ifndef U_HIDE_DRAFT_API
512 * Returns by value, unit of area: square-yard.
513 * Also see {@link #createSquareYard()}.
516 static MeasureUnit
getSquareYard();
517 #endif /* U_HIDE_DRAFT_API */
520 * Returns by pointer, unit of concentr: karat.
521 * Caller owns returned value and must free it.
522 * Also see {@link #getKarat()}.
523 * @param status ICU error code.
526 static MeasureUnit
*createKarat(UErrorCode
&status
);
528 #ifndef U_HIDE_DRAFT_API
530 * Returns by value, unit of concentr: karat.
531 * Also see {@link #createKarat()}.
534 static MeasureUnit
getKarat();
535 #endif /* U_HIDE_DRAFT_API */
538 * Returns by pointer, unit of concentr: milligram-per-deciliter.
539 * Caller owns returned value and must free it.
540 * Also see {@link #getMilligramPerDeciliter()}.
541 * @param status ICU error code.
544 static MeasureUnit
*createMilligramPerDeciliter(UErrorCode
&status
);
546 #ifndef U_HIDE_DRAFT_API
548 * Returns by value, unit of concentr: milligram-per-deciliter.
549 * Also see {@link #createMilligramPerDeciliter()}.
552 static MeasureUnit
getMilligramPerDeciliter();
553 #endif /* U_HIDE_DRAFT_API */
556 * Returns by pointer, unit of concentr: millimole-per-liter.
557 * Caller owns returned value and must free it.
558 * Also see {@link #getMillimolePerLiter()}.
559 * @param status ICU error code.
562 static MeasureUnit
*createMillimolePerLiter(UErrorCode
&status
);
564 #ifndef U_HIDE_DRAFT_API
566 * Returns by value, unit of concentr: millimole-per-liter.
567 * Also see {@link #createMillimolePerLiter()}.
570 static MeasureUnit
getMillimolePerLiter();
571 #endif /* U_HIDE_DRAFT_API */
573 #ifndef U_HIDE_DRAFT_API
575 * Returns by pointer, unit of concentr: mole.
576 * Caller owns returned value and must free it.
577 * Also see {@link #getMole()}.
578 * @param status ICU error code.
581 static MeasureUnit
*createMole(UErrorCode
&status
);
584 * Returns by value, unit of concentr: mole.
585 * Also see {@link #createMole()}.
588 static MeasureUnit
getMole();
589 #endif /* U_HIDE_DRAFT_API */
592 * Returns by pointer, unit of concentr: part-per-million.
593 * Caller owns returned value and must free it.
594 * Also see {@link #getPartPerMillion()}.
595 * @param status ICU error code.
598 static MeasureUnit
*createPartPerMillion(UErrorCode
&status
);
600 #ifndef U_HIDE_DRAFT_API
602 * Returns by value, unit of concentr: part-per-million.
603 * Also see {@link #createPartPerMillion()}.
606 static MeasureUnit
getPartPerMillion();
607 #endif /* U_HIDE_DRAFT_API */
610 * Returns by pointer, unit of concentr: percent.
611 * Caller owns returned value and must free it.
612 * Also see {@link #getPercent()}.
613 * @param status ICU error code.
616 static MeasureUnit
*createPercent(UErrorCode
&status
);
618 #ifndef U_HIDE_DRAFT_API
620 * Returns by value, unit of concentr: percent.
621 * Also see {@link #createPercent()}.
624 static MeasureUnit
getPercent();
625 #endif /* U_HIDE_DRAFT_API */
628 * Returns by pointer, unit of concentr: permille.
629 * Caller owns returned value and must free it.
630 * Also see {@link #getPermille()}.
631 * @param status ICU error code.
634 static MeasureUnit
*createPermille(UErrorCode
&status
);
636 #ifndef U_HIDE_DRAFT_API
638 * Returns by value, unit of concentr: permille.
639 * Also see {@link #createPermille()}.
642 static MeasureUnit
getPermille();
643 #endif /* U_HIDE_DRAFT_API */
645 #ifndef U_HIDE_DRAFT_API
647 * Returns by pointer, unit of concentr: permyriad.
648 * Caller owns returned value and must free it.
649 * Also see {@link #getPermyriad()}.
650 * @param status ICU error code.
653 static MeasureUnit
*createPermyriad(UErrorCode
&status
);
656 * Returns by value, unit of concentr: permyriad.
657 * Also see {@link #createPermyriad()}.
660 static MeasureUnit
getPermyriad();
661 #endif /* U_HIDE_DRAFT_API */
664 * Returns by pointer, unit of consumption: liter-per-100kilometers.
665 * Caller owns returned value and must free it.
666 * Also see {@link #getLiterPer100Kilometers()}.
667 * @param status ICU error code.
670 static MeasureUnit
*createLiterPer100Kilometers(UErrorCode
&status
);
672 #ifndef U_HIDE_DRAFT_API
674 * Returns by value, unit of consumption: liter-per-100kilometers.
675 * Also see {@link #createLiterPer100Kilometers()}.
678 static MeasureUnit
getLiterPer100Kilometers();
679 #endif /* U_HIDE_DRAFT_API */
682 * Returns by pointer, unit of consumption: liter-per-kilometer.
683 * Caller owns returned value and must free it.
684 * Also see {@link #getLiterPerKilometer()}.
685 * @param status ICU error code.
688 static MeasureUnit
*createLiterPerKilometer(UErrorCode
&status
);
690 #ifndef U_HIDE_DRAFT_API
692 * Returns by value, unit of consumption: liter-per-kilometer.
693 * Also see {@link #createLiterPerKilometer()}.
696 static MeasureUnit
getLiterPerKilometer();
697 #endif /* U_HIDE_DRAFT_API */
700 * Returns by pointer, unit of consumption: mile-per-gallon.
701 * Caller owns returned value and must free it.
702 * Also see {@link #getMilePerGallon()}.
703 * @param status ICU error code.
706 static MeasureUnit
*createMilePerGallon(UErrorCode
&status
);
708 #ifndef U_HIDE_DRAFT_API
710 * Returns by value, unit of consumption: mile-per-gallon.
711 * Also see {@link #createMilePerGallon()}.
714 static MeasureUnit
getMilePerGallon();
715 #endif /* U_HIDE_DRAFT_API */
718 * Returns by pointer, unit of consumption: mile-per-gallon-imperial.
719 * Caller owns returned value and must free it.
720 * Also see {@link #getMilePerGallonImperial()}.
721 * @param status ICU error code.
724 static MeasureUnit
*createMilePerGallonImperial(UErrorCode
&status
);
726 #ifndef U_HIDE_DRAFT_API
728 * Returns by value, unit of consumption: mile-per-gallon-imperial.
729 * Also see {@link #createMilePerGallonImperial()}.
732 static MeasureUnit
getMilePerGallonImperial();
733 #endif /* U_HIDE_DRAFT_API */
736 * Returns by pointer, unit of digital: bit.
737 * Caller owns returned value and must free it.
738 * Also see {@link #getBit()}.
739 * @param status ICU error code.
742 static MeasureUnit
*createBit(UErrorCode
&status
);
744 #ifndef U_HIDE_DRAFT_API
746 * Returns by value, unit of digital: bit.
747 * Also see {@link #createBit()}.
750 static MeasureUnit
getBit();
751 #endif /* U_HIDE_DRAFT_API */
754 * Returns by pointer, unit of digital: byte.
755 * Caller owns returned value and must free it.
756 * Also see {@link #getByte()}.
757 * @param status ICU error code.
760 static MeasureUnit
*createByte(UErrorCode
&status
);
762 #ifndef U_HIDE_DRAFT_API
764 * Returns by value, unit of digital: byte.
765 * Also see {@link #createByte()}.
768 static MeasureUnit
getByte();
769 #endif /* U_HIDE_DRAFT_API */
772 * Returns by pointer, unit of digital: gigabit.
773 * Caller owns returned value and must free it.
774 * Also see {@link #getGigabit()}.
775 * @param status ICU error code.
778 static MeasureUnit
*createGigabit(UErrorCode
&status
);
780 #ifndef U_HIDE_DRAFT_API
782 * Returns by value, unit of digital: gigabit.
783 * Also see {@link #createGigabit()}.
786 static MeasureUnit
getGigabit();
787 #endif /* U_HIDE_DRAFT_API */
790 * Returns by pointer, unit of digital: gigabyte.
791 * Caller owns returned value and must free it.
792 * Also see {@link #getGigabyte()}.
793 * @param status ICU error code.
796 static MeasureUnit
*createGigabyte(UErrorCode
&status
);
798 #ifndef U_HIDE_DRAFT_API
800 * Returns by value, unit of digital: gigabyte.
801 * Also see {@link #createGigabyte()}.
804 static MeasureUnit
getGigabyte();
805 #endif /* U_HIDE_DRAFT_API */
808 * Returns by pointer, unit of digital: kilobit.
809 * Caller owns returned value and must free it.
810 * Also see {@link #getKilobit()}.
811 * @param status ICU error code.
814 static MeasureUnit
*createKilobit(UErrorCode
&status
);
816 #ifndef U_HIDE_DRAFT_API
818 * Returns by value, unit of digital: kilobit.
819 * Also see {@link #createKilobit()}.
822 static MeasureUnit
getKilobit();
823 #endif /* U_HIDE_DRAFT_API */
826 * Returns by pointer, unit of digital: kilobyte.
827 * Caller owns returned value and must free it.
828 * Also see {@link #getKilobyte()}.
829 * @param status ICU error code.
832 static MeasureUnit
*createKilobyte(UErrorCode
&status
);
834 #ifndef U_HIDE_DRAFT_API
836 * Returns by value, unit of digital: kilobyte.
837 * Also see {@link #createKilobyte()}.
840 static MeasureUnit
getKilobyte();
841 #endif /* U_HIDE_DRAFT_API */
844 * Returns by pointer, unit of digital: megabit.
845 * Caller owns returned value and must free it.
846 * Also see {@link #getMegabit()}.
847 * @param status ICU error code.
850 static MeasureUnit
*createMegabit(UErrorCode
&status
);
852 #ifndef U_HIDE_DRAFT_API
854 * Returns by value, unit of digital: megabit.
855 * Also see {@link #createMegabit()}.
858 static MeasureUnit
getMegabit();
859 #endif /* U_HIDE_DRAFT_API */
862 * Returns by pointer, unit of digital: megabyte.
863 * Caller owns returned value and must free it.
864 * Also see {@link #getMegabyte()}.
865 * @param status ICU error code.
868 static MeasureUnit
*createMegabyte(UErrorCode
&status
);
870 #ifndef U_HIDE_DRAFT_API
872 * Returns by value, unit of digital: megabyte.
873 * Also see {@link #createMegabyte()}.
876 static MeasureUnit
getMegabyte();
877 #endif /* U_HIDE_DRAFT_API */
880 * Returns by pointer, unit of digital: petabyte.
881 * Caller owns returned value and must free it.
882 * Also see {@link #getPetabyte()}.
883 * @param status ICU error code.
886 static MeasureUnit
*createPetabyte(UErrorCode
&status
);
888 #ifndef U_HIDE_DRAFT_API
890 * Returns by value, unit of digital: petabyte.
891 * Also see {@link #createPetabyte()}.
894 static MeasureUnit
getPetabyte();
895 #endif /* U_HIDE_DRAFT_API */
898 * Returns by pointer, unit of digital: terabit.
899 * Caller owns returned value and must free it.
900 * Also see {@link #getTerabit()}.
901 * @param status ICU error code.
904 static MeasureUnit
*createTerabit(UErrorCode
&status
);
906 #ifndef U_HIDE_DRAFT_API
908 * Returns by value, unit of digital: terabit.
909 * Also see {@link #createTerabit()}.
912 static MeasureUnit
getTerabit();
913 #endif /* U_HIDE_DRAFT_API */
916 * Returns by pointer, unit of digital: terabyte.
917 * Caller owns returned value and must free it.
918 * Also see {@link #getTerabyte()}.
919 * @param status ICU error code.
922 static MeasureUnit
*createTerabyte(UErrorCode
&status
);
924 #ifndef U_HIDE_DRAFT_API
926 * Returns by value, unit of digital: terabyte.
927 * Also see {@link #createTerabyte()}.
930 static MeasureUnit
getTerabyte();
931 #endif /* U_HIDE_DRAFT_API */
934 * Returns by pointer, unit of duration: century.
935 * Caller owns returned value and must free it.
936 * Also see {@link #getCentury()}.
937 * @param status ICU error code.
940 static MeasureUnit
*createCentury(UErrorCode
&status
);
942 #ifndef U_HIDE_DRAFT_API
944 * Returns by value, unit of duration: century.
945 * Also see {@link #createCentury()}.
948 static MeasureUnit
getCentury();
949 #endif /* U_HIDE_DRAFT_API */
952 * Returns by pointer, unit of duration: day.
953 * Caller owns returned value and must free it.
954 * Also see {@link #getDay()}.
955 * @param status ICU error code.
958 static MeasureUnit
*createDay(UErrorCode
&status
);
960 #ifndef U_HIDE_DRAFT_API
962 * Returns by value, unit of duration: day.
963 * Also see {@link #createDay()}.
966 static MeasureUnit
getDay();
967 #endif /* U_HIDE_DRAFT_API */
969 #ifndef U_HIDE_DRAFT_API
971 * Returns by pointer, unit of duration: day-person.
972 * Caller owns returned value and must free it.
973 * Also see {@link #getDayPerson()}.
974 * @param status ICU error code.
977 static MeasureUnit
*createDayPerson(UErrorCode
&status
);
980 * Returns by value, unit of duration: day-person.
981 * Also see {@link #createDayPerson()}.
984 static MeasureUnit
getDayPerson();
985 #endif /* U_HIDE_DRAFT_API */
987 #ifndef U_HIDE_DRAFT_API
989 * Returns by pointer, unit of duration: decade.
990 * Caller owns returned value and must free it.
991 * Also see {@link #getDecade()}.
992 * @param status ICU error code.
995 static MeasureUnit
*createDecade(UErrorCode
&status
);
998 * Returns by value, unit of duration: decade.
999 * Also see {@link #createDecade()}.
1002 static MeasureUnit
getDecade();
1003 #endif /* U_HIDE_DRAFT_API */
1006 * Returns by pointer, unit of duration: hour.
1007 * Caller owns returned value and must free it.
1008 * Also see {@link #getHour()}.
1009 * @param status ICU error code.
1012 static MeasureUnit
*createHour(UErrorCode
&status
);
1014 #ifndef U_HIDE_DRAFT_API
1016 * Returns by value, unit of duration: hour.
1017 * Also see {@link #createHour()}.
1020 static MeasureUnit
getHour();
1021 #endif /* U_HIDE_DRAFT_API */
1024 * Returns by pointer, unit of duration: microsecond.
1025 * Caller owns returned value and must free it.
1026 * Also see {@link #getMicrosecond()}.
1027 * @param status ICU error code.
1030 static MeasureUnit
*createMicrosecond(UErrorCode
&status
);
1032 #ifndef U_HIDE_DRAFT_API
1034 * Returns by value, unit of duration: microsecond.
1035 * Also see {@link #createMicrosecond()}.
1038 static MeasureUnit
getMicrosecond();
1039 #endif /* U_HIDE_DRAFT_API */
1042 * Returns by pointer, unit of duration: millisecond.
1043 * Caller owns returned value and must free it.
1044 * Also see {@link #getMillisecond()}.
1045 * @param status ICU error code.
1048 static MeasureUnit
*createMillisecond(UErrorCode
&status
);
1050 #ifndef U_HIDE_DRAFT_API
1052 * Returns by value, unit of duration: millisecond.
1053 * Also see {@link #createMillisecond()}.
1056 static MeasureUnit
getMillisecond();
1057 #endif /* U_HIDE_DRAFT_API */
1060 * Returns by pointer, unit of duration: minute.
1061 * Caller owns returned value and must free it.
1062 * Also see {@link #getMinute()}.
1063 * @param status ICU error code.
1066 static MeasureUnit
*createMinute(UErrorCode
&status
);
1068 #ifndef U_HIDE_DRAFT_API
1070 * Returns by value, unit of duration: minute.
1071 * Also see {@link #createMinute()}.
1074 static MeasureUnit
getMinute();
1075 #endif /* U_HIDE_DRAFT_API */
1078 * Returns by pointer, unit of duration: month.
1079 * Caller owns returned value and must free it.
1080 * Also see {@link #getMonth()}.
1081 * @param status ICU error code.
1084 static MeasureUnit
*createMonth(UErrorCode
&status
);
1086 #ifndef U_HIDE_DRAFT_API
1088 * Returns by value, unit of duration: month.
1089 * Also see {@link #createMonth()}.
1092 static MeasureUnit
getMonth();
1093 #endif /* U_HIDE_DRAFT_API */
1095 #ifndef U_HIDE_DRAFT_API
1097 * Returns by pointer, unit of duration: month-person.
1098 * Caller owns returned value and must free it.
1099 * Also see {@link #getMonthPerson()}.
1100 * @param status ICU error code.
1103 static MeasureUnit
*createMonthPerson(UErrorCode
&status
);
1106 * Returns by value, unit of duration: month-person.
1107 * Also see {@link #createMonthPerson()}.
1110 static MeasureUnit
getMonthPerson();
1111 #endif /* U_HIDE_DRAFT_API */
1114 * Returns by pointer, unit of duration: nanosecond.
1115 * Caller owns returned value and must free it.
1116 * Also see {@link #getNanosecond()}.
1117 * @param status ICU error code.
1120 static MeasureUnit
*createNanosecond(UErrorCode
&status
);
1122 #ifndef U_HIDE_DRAFT_API
1124 * Returns by value, unit of duration: nanosecond.
1125 * Also see {@link #createNanosecond()}.
1128 static MeasureUnit
getNanosecond();
1129 #endif /* U_HIDE_DRAFT_API */
1132 * Returns by pointer, unit of duration: second.
1133 * Caller owns returned value and must free it.
1134 * Also see {@link #getSecond()}.
1135 * @param status ICU error code.
1138 static MeasureUnit
*createSecond(UErrorCode
&status
);
1140 #ifndef U_HIDE_DRAFT_API
1142 * Returns by value, unit of duration: second.
1143 * Also see {@link #createSecond()}.
1146 static MeasureUnit
getSecond();
1147 #endif /* U_HIDE_DRAFT_API */
1150 * Returns by pointer, unit of duration: week.
1151 * Caller owns returned value and must free it.
1152 * Also see {@link #getWeek()}.
1153 * @param status ICU error code.
1156 static MeasureUnit
*createWeek(UErrorCode
&status
);
1158 #ifndef U_HIDE_DRAFT_API
1160 * Returns by value, unit of duration: week.
1161 * Also see {@link #createWeek()}.
1164 static MeasureUnit
getWeek();
1165 #endif /* U_HIDE_DRAFT_API */
1167 #ifndef U_HIDE_DRAFT_API
1169 * Returns by pointer, unit of duration: week-person.
1170 * Caller owns returned value and must free it.
1171 * Also see {@link #getWeekPerson()}.
1172 * @param status ICU error code.
1175 static MeasureUnit
*createWeekPerson(UErrorCode
&status
);
1178 * Returns by value, unit of duration: week-person.
1179 * Also see {@link #createWeekPerson()}.
1182 static MeasureUnit
getWeekPerson();
1183 #endif /* U_HIDE_DRAFT_API */
1186 * Returns by pointer, unit of duration: year.
1187 * Caller owns returned value and must free it.
1188 * Also see {@link #getYear()}.
1189 * @param status ICU error code.
1192 static MeasureUnit
*createYear(UErrorCode
&status
);
1194 #ifndef U_HIDE_DRAFT_API
1196 * Returns by value, unit of duration: year.
1197 * Also see {@link #createYear()}.
1200 static MeasureUnit
getYear();
1201 #endif /* U_HIDE_DRAFT_API */
1203 #ifndef U_HIDE_DRAFT_API
1205 * Returns by pointer, unit of duration: year-person.
1206 * Caller owns returned value and must free it.
1207 * Also see {@link #getYearPerson()}.
1208 * @param status ICU error code.
1211 static MeasureUnit
*createYearPerson(UErrorCode
&status
);
1214 * Returns by value, unit of duration: year-person.
1215 * Also see {@link #createYearPerson()}.
1218 static MeasureUnit
getYearPerson();
1219 #endif /* U_HIDE_DRAFT_API */
1222 * Returns by pointer, unit of electric: ampere.
1223 * Caller owns returned value and must free it.
1224 * Also see {@link #getAmpere()}.
1225 * @param status ICU error code.
1228 static MeasureUnit
*createAmpere(UErrorCode
&status
);
1230 #ifndef U_HIDE_DRAFT_API
1232 * Returns by value, unit of electric: ampere.
1233 * Also see {@link #createAmpere()}.
1236 static MeasureUnit
getAmpere();
1237 #endif /* U_HIDE_DRAFT_API */
1240 * Returns by pointer, unit of electric: milliampere.
1241 * Caller owns returned value and must free it.
1242 * Also see {@link #getMilliampere()}.
1243 * @param status ICU error code.
1246 static MeasureUnit
*createMilliampere(UErrorCode
&status
);
1248 #ifndef U_HIDE_DRAFT_API
1250 * Returns by value, unit of electric: milliampere.
1251 * Also see {@link #createMilliampere()}.
1254 static MeasureUnit
getMilliampere();
1255 #endif /* U_HIDE_DRAFT_API */
1258 * Returns by pointer, unit of electric: ohm.
1259 * Caller owns returned value and must free it.
1260 * Also see {@link #getOhm()}.
1261 * @param status ICU error code.
1264 static MeasureUnit
*createOhm(UErrorCode
&status
);
1266 #ifndef U_HIDE_DRAFT_API
1268 * Returns by value, unit of electric: ohm.
1269 * Also see {@link #createOhm()}.
1272 static MeasureUnit
getOhm();
1273 #endif /* U_HIDE_DRAFT_API */
1276 * Returns by pointer, unit of electric: volt.
1277 * Caller owns returned value and must free it.
1278 * Also see {@link #getVolt()}.
1279 * @param status ICU error code.
1282 static MeasureUnit
*createVolt(UErrorCode
&status
);
1284 #ifndef U_HIDE_DRAFT_API
1286 * Returns by value, unit of electric: volt.
1287 * Also see {@link #createVolt()}.
1290 static MeasureUnit
getVolt();
1291 #endif /* U_HIDE_DRAFT_API */
1293 #ifndef U_HIDE_DRAFT_API
1295 * Returns by pointer, unit of energy: british-thermal-unit.
1296 * Caller owns returned value and must free it.
1297 * Also see {@link #getBritishThermalUnit()}.
1298 * @param status ICU error code.
1301 static MeasureUnit
*createBritishThermalUnit(UErrorCode
&status
);
1304 * Returns by value, unit of energy: british-thermal-unit.
1305 * Also see {@link #createBritishThermalUnit()}.
1308 static MeasureUnit
getBritishThermalUnit();
1309 #endif /* U_HIDE_DRAFT_API */
1312 * Returns by pointer, unit of energy: calorie.
1313 * Caller owns returned value and must free it.
1314 * Also see {@link #getCalorie()}.
1315 * @param status ICU error code.
1318 static MeasureUnit
*createCalorie(UErrorCode
&status
);
1320 #ifndef U_HIDE_DRAFT_API
1322 * Returns by value, unit of energy: calorie.
1323 * Also see {@link #createCalorie()}.
1326 static MeasureUnit
getCalorie();
1327 #endif /* U_HIDE_DRAFT_API */
1329 #ifndef U_HIDE_DRAFT_API
1331 * Returns by pointer, unit of energy: electronvolt.
1332 * Caller owns returned value and must free it.
1333 * Also see {@link #getElectronvolt()}.
1334 * @param status ICU error code.
1337 static MeasureUnit
*createElectronvolt(UErrorCode
&status
);
1340 * Returns by value, unit of energy: electronvolt.
1341 * Also see {@link #createElectronvolt()}.
1344 static MeasureUnit
getElectronvolt();
1345 #endif /* U_HIDE_DRAFT_API */
1348 * Returns by pointer, unit of energy: foodcalorie.
1349 * Caller owns returned value and must free it.
1350 * Also see {@link #getFoodcalorie()}.
1351 * @param status ICU error code.
1354 static MeasureUnit
*createFoodcalorie(UErrorCode
&status
);
1356 #ifndef U_HIDE_DRAFT_API
1358 * Returns by value, unit of energy: foodcalorie.
1359 * Also see {@link #createFoodcalorie()}.
1362 static MeasureUnit
getFoodcalorie();
1363 #endif /* U_HIDE_DRAFT_API */
1366 * Returns by pointer, unit of energy: joule.
1367 * Caller owns returned value and must free it.
1368 * Also see {@link #getJoule()}.
1369 * @param status ICU error code.
1372 static MeasureUnit
*createJoule(UErrorCode
&status
);
1374 #ifndef U_HIDE_DRAFT_API
1376 * Returns by value, unit of energy: joule.
1377 * Also see {@link #createJoule()}.
1380 static MeasureUnit
getJoule();
1381 #endif /* U_HIDE_DRAFT_API */
1384 * Returns by pointer, unit of energy: kilocalorie.
1385 * Caller owns returned value and must free it.
1386 * Also see {@link #getKilocalorie()}.
1387 * @param status ICU error code.
1390 static MeasureUnit
*createKilocalorie(UErrorCode
&status
);
1392 #ifndef U_HIDE_DRAFT_API
1394 * Returns by value, unit of energy: kilocalorie.
1395 * Also see {@link #createKilocalorie()}.
1398 static MeasureUnit
getKilocalorie();
1399 #endif /* U_HIDE_DRAFT_API */
1402 * Returns by pointer, unit of energy: kilojoule.
1403 * Caller owns returned value and must free it.
1404 * Also see {@link #getKilojoule()}.
1405 * @param status ICU error code.
1408 static MeasureUnit
*createKilojoule(UErrorCode
&status
);
1410 #ifndef U_HIDE_DRAFT_API
1412 * Returns by value, unit of energy: kilojoule.
1413 * Also see {@link #createKilojoule()}.
1416 static MeasureUnit
getKilojoule();
1417 #endif /* U_HIDE_DRAFT_API */
1420 * Returns by pointer, unit of energy: kilowatt-hour.
1421 * Caller owns returned value and must free it.
1422 * Also see {@link #getKilowattHour()}.
1423 * @param status ICU error code.
1426 static MeasureUnit
*createKilowattHour(UErrorCode
&status
);
1428 #ifndef U_HIDE_DRAFT_API
1430 * Returns by value, unit of energy: kilowatt-hour.
1431 * Also see {@link #createKilowattHour()}.
1434 static MeasureUnit
getKilowattHour();
1435 #endif /* U_HIDE_DRAFT_API */
1437 #ifndef U_HIDE_DRAFT_API
1439 * Returns by pointer, unit of energy: therm-us.
1440 * Caller owns returned value and must free it.
1441 * Also see {@link #getThermUs()}.
1442 * @param status ICU error code.
1445 static MeasureUnit
*createThermUs(UErrorCode
&status
);
1448 * Returns by value, unit of energy: therm-us.
1449 * Also see {@link #createThermUs()}.
1452 static MeasureUnit
getThermUs();
1453 #endif /* U_HIDE_DRAFT_API */
1455 #ifndef U_HIDE_DRAFT_API
1457 * Returns by pointer, unit of force: newton.
1458 * Caller owns returned value and must free it.
1459 * Also see {@link #getNewton()}.
1460 * @param status ICU error code.
1463 static MeasureUnit
*createNewton(UErrorCode
&status
);
1466 * Returns by value, unit of force: newton.
1467 * Also see {@link #createNewton()}.
1470 static MeasureUnit
getNewton();
1471 #endif /* U_HIDE_DRAFT_API */
1473 #ifndef U_HIDE_DRAFT_API
1475 * Returns by pointer, unit of force: pound-force.
1476 * Caller owns returned value and must free it.
1477 * Also see {@link #getPoundForce()}.
1478 * @param status ICU error code.
1481 static MeasureUnit
*createPoundForce(UErrorCode
&status
);
1484 * Returns by value, unit of force: pound-force.
1485 * Also see {@link #createPoundForce()}.
1488 static MeasureUnit
getPoundForce();
1489 #endif /* U_HIDE_DRAFT_API */
1492 * Returns by pointer, unit of frequency: gigahertz.
1493 * Caller owns returned value and must free it.
1494 * Also see {@link #getGigahertz()}.
1495 * @param status ICU error code.
1498 static MeasureUnit
*createGigahertz(UErrorCode
&status
);
1500 #ifndef U_HIDE_DRAFT_API
1502 * Returns by value, unit of frequency: gigahertz.
1503 * Also see {@link #createGigahertz()}.
1506 static MeasureUnit
getGigahertz();
1507 #endif /* U_HIDE_DRAFT_API */
1510 * Returns by pointer, unit of frequency: hertz.
1511 * Caller owns returned value and must free it.
1512 * Also see {@link #getHertz()}.
1513 * @param status ICU error code.
1516 static MeasureUnit
*createHertz(UErrorCode
&status
);
1518 #ifndef U_HIDE_DRAFT_API
1520 * Returns by value, unit of frequency: hertz.
1521 * Also see {@link #createHertz()}.
1524 static MeasureUnit
getHertz();
1525 #endif /* U_HIDE_DRAFT_API */
1528 * Returns by pointer, unit of frequency: kilohertz.
1529 * Caller owns returned value and must free it.
1530 * Also see {@link #getKilohertz()}.
1531 * @param status ICU error code.
1534 static MeasureUnit
*createKilohertz(UErrorCode
&status
);
1536 #ifndef U_HIDE_DRAFT_API
1538 * Returns by value, unit of frequency: kilohertz.
1539 * Also see {@link #createKilohertz()}.
1542 static MeasureUnit
getKilohertz();
1543 #endif /* U_HIDE_DRAFT_API */
1546 * Returns by pointer, unit of frequency: megahertz.
1547 * Caller owns returned value and must free it.
1548 * Also see {@link #getMegahertz()}.
1549 * @param status ICU error code.
1552 static MeasureUnit
*createMegahertz(UErrorCode
&status
);
1554 #ifndef U_HIDE_DRAFT_API
1556 * Returns by value, unit of frequency: megahertz.
1557 * Also see {@link #createMegahertz()}.
1560 static MeasureUnit
getMegahertz();
1561 #endif /* U_HIDE_DRAFT_API */
1563 #ifndef U_HIDE_DRAFT_API
1565 * Returns by pointer, unit of graphics: dot-per-centimeter.
1566 * Caller owns returned value and must free it.
1567 * Also see {@link #getDotPerCentimeter()}.
1568 * @param status ICU error code.
1571 static MeasureUnit
*createDotPerCentimeter(UErrorCode
&status
);
1574 * Returns by value, unit of graphics: dot-per-centimeter.
1575 * Also see {@link #createDotPerCentimeter()}.
1578 static MeasureUnit
getDotPerCentimeter();
1579 #endif /* U_HIDE_DRAFT_API */
1581 #ifndef U_HIDE_DRAFT_API
1583 * Returns by pointer, unit of graphics: dot-per-inch.
1584 * Caller owns returned value and must free it.
1585 * Also see {@link #getDotPerInch()}.
1586 * @param status ICU error code.
1589 static MeasureUnit
*createDotPerInch(UErrorCode
&status
);
1592 * Returns by value, unit of graphics: dot-per-inch.
1593 * Also see {@link #createDotPerInch()}.
1596 static MeasureUnit
getDotPerInch();
1597 #endif /* U_HIDE_DRAFT_API */
1599 #ifndef U_HIDE_DRAFT_API
1601 * Returns by pointer, unit of graphics: em.
1602 * Caller owns returned value and must free it.
1603 * Also see {@link #getEm()}.
1604 * @param status ICU error code.
1607 static MeasureUnit
*createEm(UErrorCode
&status
);
1610 * Returns by value, unit of graphics: em.
1611 * Also see {@link #createEm()}.
1614 static MeasureUnit
getEm();
1615 #endif /* U_HIDE_DRAFT_API */
1617 #ifndef U_HIDE_DRAFT_API
1619 * Returns by pointer, unit of graphics: megapixel.
1620 * Caller owns returned value and must free it.
1621 * Also see {@link #getMegapixel()}.
1622 * @param status ICU error code.
1625 static MeasureUnit
*createMegapixel(UErrorCode
&status
);
1628 * Returns by value, unit of graphics: megapixel.
1629 * Also see {@link #createMegapixel()}.
1632 static MeasureUnit
getMegapixel();
1633 #endif /* U_HIDE_DRAFT_API */
1635 #ifndef U_HIDE_DRAFT_API
1637 * Returns by pointer, unit of graphics: pixel.
1638 * Caller owns returned value and must free it.
1639 * Also see {@link #getPixel()}.
1640 * @param status ICU error code.
1643 static MeasureUnit
*createPixel(UErrorCode
&status
);
1646 * Returns by value, unit of graphics: pixel.
1647 * Also see {@link #createPixel()}.
1650 static MeasureUnit
getPixel();
1651 #endif /* U_HIDE_DRAFT_API */
1653 #ifndef U_HIDE_DRAFT_API
1655 * Returns by pointer, unit of graphics: pixel-per-centimeter.
1656 * Caller owns returned value and must free it.
1657 * Also see {@link #getPixelPerCentimeter()}.
1658 * @param status ICU error code.
1661 static MeasureUnit
*createPixelPerCentimeter(UErrorCode
&status
);
1664 * Returns by value, unit of graphics: pixel-per-centimeter.
1665 * Also see {@link #createPixelPerCentimeter()}.
1668 static MeasureUnit
getPixelPerCentimeter();
1669 #endif /* U_HIDE_DRAFT_API */
1671 #ifndef U_HIDE_DRAFT_API
1673 * Returns by pointer, unit of graphics: pixel-per-inch.
1674 * Caller owns returned value and must free it.
1675 * Also see {@link #getPixelPerInch()}.
1676 * @param status ICU error code.
1679 static MeasureUnit
*createPixelPerInch(UErrorCode
&status
);
1682 * Returns by value, unit of graphics: pixel-per-inch.
1683 * Also see {@link #createPixelPerInch()}.
1686 static MeasureUnit
getPixelPerInch();
1687 #endif /* U_HIDE_DRAFT_API */
1690 * Returns by pointer, unit of length: astronomical-unit.
1691 * Caller owns returned value and must free it.
1692 * Also see {@link #getAstronomicalUnit()}.
1693 * @param status ICU error code.
1696 static MeasureUnit
*createAstronomicalUnit(UErrorCode
&status
);
1698 #ifndef U_HIDE_DRAFT_API
1700 * Returns by value, unit of length: astronomical-unit.
1701 * Also see {@link #createAstronomicalUnit()}.
1704 static MeasureUnit
getAstronomicalUnit();
1705 #endif /* U_HIDE_DRAFT_API */
1708 * Returns by pointer, unit of length: centimeter.
1709 * Caller owns returned value and must free it.
1710 * Also see {@link #getCentimeter()}.
1711 * @param status ICU error code.
1714 static MeasureUnit
*createCentimeter(UErrorCode
&status
);
1716 #ifndef U_HIDE_DRAFT_API
1718 * Returns by value, unit of length: centimeter.
1719 * Also see {@link #createCentimeter()}.
1722 static MeasureUnit
getCentimeter();
1723 #endif /* U_HIDE_DRAFT_API */
1726 * Returns by pointer, unit of length: decimeter.
1727 * Caller owns returned value and must free it.
1728 * Also see {@link #getDecimeter()}.
1729 * @param status ICU error code.
1732 static MeasureUnit
*createDecimeter(UErrorCode
&status
);
1734 #ifndef U_HIDE_DRAFT_API
1736 * Returns by value, unit of length: decimeter.
1737 * Also see {@link #createDecimeter()}.
1740 static MeasureUnit
getDecimeter();
1741 #endif /* U_HIDE_DRAFT_API */
1744 * Returns by pointer, unit of length: fathom.
1745 * Caller owns returned value and must free it.
1746 * Also see {@link #getFathom()}.
1747 * @param status ICU error code.
1750 static MeasureUnit
*createFathom(UErrorCode
&status
);
1752 #ifndef U_HIDE_DRAFT_API
1754 * Returns by value, unit of length: fathom.
1755 * Also see {@link #createFathom()}.
1758 static MeasureUnit
getFathom();
1759 #endif /* U_HIDE_DRAFT_API */
1762 * Returns by pointer, unit of length: foot.
1763 * Caller owns returned value and must free it.
1764 * Also see {@link #getFoot()}.
1765 * @param status ICU error code.
1768 static MeasureUnit
*createFoot(UErrorCode
&status
);
1770 #ifndef U_HIDE_DRAFT_API
1772 * Returns by value, unit of length: foot.
1773 * Also see {@link #createFoot()}.
1776 static MeasureUnit
getFoot();
1777 #endif /* U_HIDE_DRAFT_API */
1780 * Returns by pointer, unit of length: furlong.
1781 * Caller owns returned value and must free it.
1782 * Also see {@link #getFurlong()}.
1783 * @param status ICU error code.
1786 static MeasureUnit
*createFurlong(UErrorCode
&status
);
1788 #ifndef U_HIDE_DRAFT_API
1790 * Returns by value, unit of length: furlong.
1791 * Also see {@link #createFurlong()}.
1794 static MeasureUnit
getFurlong();
1795 #endif /* U_HIDE_DRAFT_API */
1798 * Returns by pointer, unit of length: inch.
1799 * Caller owns returned value and must free it.
1800 * Also see {@link #getInch()}.
1801 * @param status ICU error code.
1804 static MeasureUnit
*createInch(UErrorCode
&status
);
1806 #ifndef U_HIDE_DRAFT_API
1808 * Returns by value, unit of length: inch.
1809 * Also see {@link #createInch()}.
1812 static MeasureUnit
getInch();
1813 #endif /* U_HIDE_DRAFT_API */
1816 * Returns by pointer, unit of length: kilometer.
1817 * Caller owns returned value and must free it.
1818 * Also see {@link #getKilometer()}.
1819 * @param status ICU error code.
1822 static MeasureUnit
*createKilometer(UErrorCode
&status
);
1824 #ifndef U_HIDE_DRAFT_API
1826 * Returns by value, unit of length: kilometer.
1827 * Also see {@link #createKilometer()}.
1830 static MeasureUnit
getKilometer();
1831 #endif /* U_HIDE_DRAFT_API */
1834 * Returns by pointer, unit of length: light-year.
1835 * Caller owns returned value and must free it.
1836 * Also see {@link #getLightYear()}.
1837 * @param status ICU error code.
1840 static MeasureUnit
*createLightYear(UErrorCode
&status
);
1842 #ifndef U_HIDE_DRAFT_API
1844 * Returns by value, unit of length: light-year.
1845 * Also see {@link #createLightYear()}.
1848 static MeasureUnit
getLightYear();
1849 #endif /* U_HIDE_DRAFT_API */
1852 * Returns by pointer, unit of length: meter.
1853 * Caller owns returned value and must free it.
1854 * Also see {@link #getMeter()}.
1855 * @param status ICU error code.
1858 static MeasureUnit
*createMeter(UErrorCode
&status
);
1860 #ifndef U_HIDE_DRAFT_API
1862 * Returns by value, unit of length: meter.
1863 * Also see {@link #createMeter()}.
1866 static MeasureUnit
getMeter();
1867 #endif /* U_HIDE_DRAFT_API */
1870 * Returns by pointer, unit of length: micrometer.
1871 * Caller owns returned value and must free it.
1872 * Also see {@link #getMicrometer()}.
1873 * @param status ICU error code.
1876 static MeasureUnit
*createMicrometer(UErrorCode
&status
);
1878 #ifndef U_HIDE_DRAFT_API
1880 * Returns by value, unit of length: micrometer.
1881 * Also see {@link #createMicrometer()}.
1884 static MeasureUnit
getMicrometer();
1885 #endif /* U_HIDE_DRAFT_API */
1888 * Returns by pointer, unit of length: mile.
1889 * Caller owns returned value and must free it.
1890 * Also see {@link #getMile()}.
1891 * @param status ICU error code.
1894 static MeasureUnit
*createMile(UErrorCode
&status
);
1896 #ifndef U_HIDE_DRAFT_API
1898 * Returns by value, unit of length: mile.
1899 * Also see {@link #createMile()}.
1902 static MeasureUnit
getMile();
1903 #endif /* U_HIDE_DRAFT_API */
1906 * Returns by pointer, unit of length: mile-scandinavian.
1907 * Caller owns returned value and must free it.
1908 * Also see {@link #getMileScandinavian()}.
1909 * @param status ICU error code.
1912 static MeasureUnit
*createMileScandinavian(UErrorCode
&status
);
1914 #ifndef U_HIDE_DRAFT_API
1916 * Returns by value, unit of length: mile-scandinavian.
1917 * Also see {@link #createMileScandinavian()}.
1920 static MeasureUnit
getMileScandinavian();
1921 #endif /* U_HIDE_DRAFT_API */
1924 * Returns by pointer, unit of length: millimeter.
1925 * Caller owns returned value and must free it.
1926 * Also see {@link #getMillimeter()}.
1927 * @param status ICU error code.
1930 static MeasureUnit
*createMillimeter(UErrorCode
&status
);
1932 #ifndef U_HIDE_DRAFT_API
1934 * Returns by value, unit of length: millimeter.
1935 * Also see {@link #createMillimeter()}.
1938 static MeasureUnit
getMillimeter();
1939 #endif /* U_HIDE_DRAFT_API */
1942 * Returns by pointer, unit of length: nanometer.
1943 * Caller owns returned value and must free it.
1944 * Also see {@link #getNanometer()}.
1945 * @param status ICU error code.
1948 static MeasureUnit
*createNanometer(UErrorCode
&status
);
1950 #ifndef U_HIDE_DRAFT_API
1952 * Returns by value, unit of length: nanometer.
1953 * Also see {@link #createNanometer()}.
1956 static MeasureUnit
getNanometer();
1957 #endif /* U_HIDE_DRAFT_API */
1960 * Returns by pointer, unit of length: nautical-mile.
1961 * Caller owns returned value and must free it.
1962 * Also see {@link #getNauticalMile()}.
1963 * @param status ICU error code.
1966 static MeasureUnit
*createNauticalMile(UErrorCode
&status
);
1968 #ifndef U_HIDE_DRAFT_API
1970 * Returns by value, unit of length: nautical-mile.
1971 * Also see {@link #createNauticalMile()}.
1974 static MeasureUnit
getNauticalMile();
1975 #endif /* U_HIDE_DRAFT_API */
1978 * Returns by pointer, unit of length: parsec.
1979 * Caller owns returned value and must free it.
1980 * Also see {@link #getParsec()}.
1981 * @param status ICU error code.
1984 static MeasureUnit
*createParsec(UErrorCode
&status
);
1986 #ifndef U_HIDE_DRAFT_API
1988 * Returns by value, unit of length: parsec.
1989 * Also see {@link #createParsec()}.
1992 static MeasureUnit
getParsec();
1993 #endif /* U_HIDE_DRAFT_API */
1996 * Returns by pointer, unit of length: picometer.
1997 * Caller owns returned value and must free it.
1998 * Also see {@link #getPicometer()}.
1999 * @param status ICU error code.
2002 static MeasureUnit
*createPicometer(UErrorCode
&status
);
2004 #ifndef U_HIDE_DRAFT_API
2006 * Returns by value, unit of length: picometer.
2007 * Also see {@link #createPicometer()}.
2010 static MeasureUnit
getPicometer();
2011 #endif /* U_HIDE_DRAFT_API */
2014 * Returns by pointer, unit of length: point.
2015 * Caller owns returned value and must free it.
2016 * Also see {@link #getPoint()}.
2017 * @param status ICU error code.
2020 static MeasureUnit
*createPoint(UErrorCode
&status
);
2022 #ifndef U_HIDE_DRAFT_API
2024 * Returns by value, unit of length: point.
2025 * Also see {@link #createPoint()}.
2028 static MeasureUnit
getPoint();
2029 #endif /* U_HIDE_DRAFT_API */
2031 #ifndef U_HIDE_DRAFT_API
2033 * Returns by pointer, unit of length: solar-radius.
2034 * Caller owns returned value and must free it.
2035 * Also see {@link #getSolarRadius()}.
2036 * @param status ICU error code.
2039 static MeasureUnit
*createSolarRadius(UErrorCode
&status
);
2042 * Returns by value, unit of length: solar-radius.
2043 * Also see {@link #createSolarRadius()}.
2046 static MeasureUnit
getSolarRadius();
2047 #endif /* U_HIDE_DRAFT_API */
2050 * Returns by pointer, unit of length: yard.
2051 * Caller owns returned value and must free it.
2052 * Also see {@link #getYard()}.
2053 * @param status ICU error code.
2056 static MeasureUnit
*createYard(UErrorCode
&status
);
2058 #ifndef U_HIDE_DRAFT_API
2060 * Returns by value, unit of length: yard.
2061 * Also see {@link #createYard()}.
2064 static MeasureUnit
getYard();
2065 #endif /* U_HIDE_DRAFT_API */
2068 * Returns by pointer, unit of light: lux.
2069 * Caller owns returned value and must free it.
2070 * Also see {@link #getLux()}.
2071 * @param status ICU error code.
2074 static MeasureUnit
*createLux(UErrorCode
&status
);
2076 #ifndef U_HIDE_DRAFT_API
2078 * Returns by value, unit of light: lux.
2079 * Also see {@link #createLux()}.
2082 static MeasureUnit
getLux();
2083 #endif /* U_HIDE_DRAFT_API */
2085 #ifndef U_HIDE_DRAFT_API
2087 * Returns by pointer, unit of light: solar-luminosity.
2088 * Caller owns returned value and must free it.
2089 * Also see {@link #getSolarLuminosity()}.
2090 * @param status ICU error code.
2093 static MeasureUnit
*createSolarLuminosity(UErrorCode
&status
);
2096 * Returns by value, unit of light: solar-luminosity.
2097 * Also see {@link #createSolarLuminosity()}.
2100 static MeasureUnit
getSolarLuminosity();
2101 #endif /* U_HIDE_DRAFT_API */
2104 * Returns by pointer, unit of mass: carat.
2105 * Caller owns returned value and must free it.
2106 * Also see {@link #getCarat()}.
2107 * @param status ICU error code.
2110 static MeasureUnit
*createCarat(UErrorCode
&status
);
2112 #ifndef U_HIDE_DRAFT_API
2114 * Returns by value, unit of mass: carat.
2115 * Also see {@link #createCarat()}.
2118 static MeasureUnit
getCarat();
2119 #endif /* U_HIDE_DRAFT_API */
2121 #ifndef U_HIDE_DRAFT_API
2123 * Returns by pointer, unit of mass: dalton.
2124 * Caller owns returned value and must free it.
2125 * Also see {@link #getDalton()}.
2126 * @param status ICU error code.
2129 static MeasureUnit
*createDalton(UErrorCode
&status
);
2132 * Returns by value, unit of mass: dalton.
2133 * Also see {@link #createDalton()}.
2136 static MeasureUnit
getDalton();
2137 #endif /* U_HIDE_DRAFT_API */
2139 #ifndef U_HIDE_DRAFT_API
2141 * Returns by pointer, unit of mass: earth-mass.
2142 * Caller owns returned value and must free it.
2143 * Also see {@link #getEarthMass()}.
2144 * @param status ICU error code.
2147 static MeasureUnit
*createEarthMass(UErrorCode
&status
);
2150 * Returns by value, unit of mass: earth-mass.
2151 * Also see {@link #createEarthMass()}.
2154 static MeasureUnit
getEarthMass();
2155 #endif /* U_HIDE_DRAFT_API */
2158 * Returns by pointer, unit of mass: gram.
2159 * Caller owns returned value and must free it.
2160 * Also see {@link #getGram()}.
2161 * @param status ICU error code.
2164 static MeasureUnit
*createGram(UErrorCode
&status
);
2166 #ifndef U_HIDE_DRAFT_API
2168 * Returns by value, unit of mass: gram.
2169 * Also see {@link #createGram()}.
2172 static MeasureUnit
getGram();
2173 #endif /* U_HIDE_DRAFT_API */
2176 * Returns by pointer, unit of mass: kilogram.
2177 * Caller owns returned value and must free it.
2178 * Also see {@link #getKilogram()}.
2179 * @param status ICU error code.
2182 static MeasureUnit
*createKilogram(UErrorCode
&status
);
2184 #ifndef U_HIDE_DRAFT_API
2186 * Returns by value, unit of mass: kilogram.
2187 * Also see {@link #createKilogram()}.
2190 static MeasureUnit
getKilogram();
2191 #endif /* U_HIDE_DRAFT_API */
2194 * Returns by pointer, unit of mass: metric-ton.
2195 * Caller owns returned value and must free it.
2196 * Also see {@link #getMetricTon()}.
2197 * @param status ICU error code.
2200 static MeasureUnit
*createMetricTon(UErrorCode
&status
);
2202 #ifndef U_HIDE_DRAFT_API
2204 * Returns by value, unit of mass: metric-ton.
2205 * Also see {@link #createMetricTon()}.
2208 static MeasureUnit
getMetricTon();
2209 #endif /* U_HIDE_DRAFT_API */
2212 * Returns by pointer, unit of mass: microgram.
2213 * Caller owns returned value and must free it.
2214 * Also see {@link #getMicrogram()}.
2215 * @param status ICU error code.
2218 static MeasureUnit
*createMicrogram(UErrorCode
&status
);
2220 #ifndef U_HIDE_DRAFT_API
2222 * Returns by value, unit of mass: microgram.
2223 * Also see {@link #createMicrogram()}.
2226 static MeasureUnit
getMicrogram();
2227 #endif /* U_HIDE_DRAFT_API */
2230 * Returns by pointer, unit of mass: milligram.
2231 * Caller owns returned value and must free it.
2232 * Also see {@link #getMilligram()}.
2233 * @param status ICU error code.
2236 static MeasureUnit
*createMilligram(UErrorCode
&status
);
2238 #ifndef U_HIDE_DRAFT_API
2240 * Returns by value, unit of mass: milligram.
2241 * Also see {@link #createMilligram()}.
2244 static MeasureUnit
getMilligram();
2245 #endif /* U_HIDE_DRAFT_API */
2248 * Returns by pointer, unit of mass: ounce.
2249 * Caller owns returned value and must free it.
2250 * Also see {@link #getOunce()}.
2251 * @param status ICU error code.
2254 static MeasureUnit
*createOunce(UErrorCode
&status
);
2256 #ifndef U_HIDE_DRAFT_API
2258 * Returns by value, unit of mass: ounce.
2259 * Also see {@link #createOunce()}.
2262 static MeasureUnit
getOunce();
2263 #endif /* U_HIDE_DRAFT_API */
2266 * Returns by pointer, unit of mass: ounce-troy.
2267 * Caller owns returned value and must free it.
2268 * Also see {@link #getOunceTroy()}.
2269 * @param status ICU error code.
2272 static MeasureUnit
*createOunceTroy(UErrorCode
&status
);
2274 #ifndef U_HIDE_DRAFT_API
2276 * Returns by value, unit of mass: ounce-troy.
2277 * Also see {@link #createOunceTroy()}.
2280 static MeasureUnit
getOunceTroy();
2281 #endif /* U_HIDE_DRAFT_API */
2284 * Returns by pointer, unit of mass: pound.
2285 * Caller owns returned value and must free it.
2286 * Also see {@link #getPound()}.
2287 * @param status ICU error code.
2290 static MeasureUnit
*createPound(UErrorCode
&status
);
2292 #ifndef U_HIDE_DRAFT_API
2294 * Returns by value, unit of mass: pound.
2295 * Also see {@link #createPound()}.
2298 static MeasureUnit
getPound();
2299 #endif /* U_HIDE_DRAFT_API */
2301 #ifndef U_HIDE_DRAFT_API
2303 * Returns by pointer, unit of mass: solar-mass.
2304 * Caller owns returned value and must free it.
2305 * Also see {@link #getSolarMass()}.
2306 * @param status ICU error code.
2309 static MeasureUnit
*createSolarMass(UErrorCode
&status
);
2312 * Returns by value, unit of mass: solar-mass.
2313 * Also see {@link #createSolarMass()}.
2316 static MeasureUnit
getSolarMass();
2317 #endif /* U_HIDE_DRAFT_API */
2320 * Returns by pointer, unit of mass: stone.
2321 * Caller owns returned value and must free it.
2322 * Also see {@link #getStone()}.
2323 * @param status ICU error code.
2326 static MeasureUnit
*createStone(UErrorCode
&status
);
2328 #ifndef U_HIDE_DRAFT_API
2330 * Returns by value, unit of mass: stone.
2331 * Also see {@link #createStone()}.
2334 static MeasureUnit
getStone();
2335 #endif /* U_HIDE_DRAFT_API */
2338 * Returns by pointer, unit of mass: ton.
2339 * Caller owns returned value and must free it.
2340 * Also see {@link #getTon()}.
2341 * @param status ICU error code.
2344 static MeasureUnit
*createTon(UErrorCode
&status
);
2346 #ifndef U_HIDE_DRAFT_API
2348 * Returns by value, unit of mass: ton.
2349 * Also see {@link #createTon()}.
2352 static MeasureUnit
getTon();
2353 #endif /* U_HIDE_DRAFT_API */
2356 * Returns by pointer, unit of power: gigawatt.
2357 * Caller owns returned value and must free it.
2358 * Also see {@link #getGigawatt()}.
2359 * @param status ICU error code.
2362 static MeasureUnit
*createGigawatt(UErrorCode
&status
);
2364 #ifndef U_HIDE_DRAFT_API
2366 * Returns by value, unit of power: gigawatt.
2367 * Also see {@link #createGigawatt()}.
2370 static MeasureUnit
getGigawatt();
2371 #endif /* U_HIDE_DRAFT_API */
2374 * Returns by pointer, unit of power: horsepower.
2375 * Caller owns returned value and must free it.
2376 * Also see {@link #getHorsepower()}.
2377 * @param status ICU error code.
2380 static MeasureUnit
*createHorsepower(UErrorCode
&status
);
2382 #ifndef U_HIDE_DRAFT_API
2384 * Returns by value, unit of power: horsepower.
2385 * Also see {@link #createHorsepower()}.
2388 static MeasureUnit
getHorsepower();
2389 #endif /* U_HIDE_DRAFT_API */
2392 * Returns by pointer, unit of power: kilowatt.
2393 * Caller owns returned value and must free it.
2394 * Also see {@link #getKilowatt()}.
2395 * @param status ICU error code.
2398 static MeasureUnit
*createKilowatt(UErrorCode
&status
);
2400 #ifndef U_HIDE_DRAFT_API
2402 * Returns by value, unit of power: kilowatt.
2403 * Also see {@link #createKilowatt()}.
2406 static MeasureUnit
getKilowatt();
2407 #endif /* U_HIDE_DRAFT_API */
2410 * Returns by pointer, unit of power: megawatt.
2411 * Caller owns returned value and must free it.
2412 * Also see {@link #getMegawatt()}.
2413 * @param status ICU error code.
2416 static MeasureUnit
*createMegawatt(UErrorCode
&status
);
2418 #ifndef U_HIDE_DRAFT_API
2420 * Returns by value, unit of power: megawatt.
2421 * Also see {@link #createMegawatt()}.
2424 static MeasureUnit
getMegawatt();
2425 #endif /* U_HIDE_DRAFT_API */
2428 * Returns by pointer, unit of power: milliwatt.
2429 * Caller owns returned value and must free it.
2430 * Also see {@link #getMilliwatt()}.
2431 * @param status ICU error code.
2434 static MeasureUnit
*createMilliwatt(UErrorCode
&status
);
2436 #ifndef U_HIDE_DRAFT_API
2438 * Returns by value, unit of power: milliwatt.
2439 * Also see {@link #createMilliwatt()}.
2442 static MeasureUnit
getMilliwatt();
2443 #endif /* U_HIDE_DRAFT_API */
2446 * Returns by pointer, unit of power: watt.
2447 * Caller owns returned value and must free it.
2448 * Also see {@link #getWatt()}.
2449 * @param status ICU error code.
2452 static MeasureUnit
*createWatt(UErrorCode
&status
);
2454 #ifndef U_HIDE_DRAFT_API
2456 * Returns by value, unit of power: watt.
2457 * Also see {@link #createWatt()}.
2460 static MeasureUnit
getWatt();
2461 #endif /* U_HIDE_DRAFT_API */
2464 * Returns by pointer, unit of pressure: atmosphere.
2465 * Caller owns returned value and must free it.
2466 * Also see {@link #getAtmosphere()}.
2467 * @param status ICU error code.
2470 static MeasureUnit
*createAtmosphere(UErrorCode
&status
);
2472 #ifndef U_HIDE_DRAFT_API
2474 * Returns by value, unit of pressure: atmosphere.
2475 * Also see {@link #createAtmosphere()}.
2478 static MeasureUnit
getAtmosphere();
2479 #endif /* U_HIDE_DRAFT_API */
2481 #ifndef U_HIDE_DRAFT_API
2483 * Returns by pointer, unit of pressure: bar.
2484 * Caller owns returned value and must free it.
2485 * Also see {@link #getBar()}.
2486 * @param status ICU error code.
2489 static MeasureUnit
*createBar(UErrorCode
&status
);
2492 * Returns by value, unit of pressure: bar.
2493 * Also see {@link #createBar()}.
2496 static MeasureUnit
getBar();
2497 #endif /* U_HIDE_DRAFT_API */
2500 * Returns by pointer, unit of pressure: hectopascal.
2501 * Caller owns returned value and must free it.
2502 * Also see {@link #getHectopascal()}.
2503 * @param status ICU error code.
2506 static MeasureUnit
*createHectopascal(UErrorCode
&status
);
2508 #ifndef U_HIDE_DRAFT_API
2510 * Returns by value, unit of pressure: hectopascal.
2511 * Also see {@link #createHectopascal()}.
2514 static MeasureUnit
getHectopascal();
2515 #endif /* U_HIDE_DRAFT_API */
2518 * Returns by pointer, unit of pressure: inch-hg.
2519 * Caller owns returned value and must free it.
2520 * Also see {@link #getInchHg()}.
2521 * @param status ICU error code.
2524 static MeasureUnit
*createInchHg(UErrorCode
&status
);
2526 #ifndef U_HIDE_DRAFT_API
2528 * Returns by value, unit of pressure: inch-hg.
2529 * Also see {@link #createInchHg()}.
2532 static MeasureUnit
getInchHg();
2533 #endif /* U_HIDE_DRAFT_API */
2535 #ifndef U_HIDE_DRAFT_API
2537 * Returns by pointer, unit of pressure: kilopascal.
2538 * Caller owns returned value and must free it.
2539 * Also see {@link #getKilopascal()}.
2540 * @param status ICU error code.
2543 static MeasureUnit
*createKilopascal(UErrorCode
&status
);
2546 * Returns by value, unit of pressure: kilopascal.
2547 * Also see {@link #createKilopascal()}.
2550 static MeasureUnit
getKilopascal();
2551 #endif /* U_HIDE_DRAFT_API */
2553 #ifndef U_HIDE_DRAFT_API
2555 * Returns by pointer, unit of pressure: megapascal.
2556 * Caller owns returned value and must free it.
2557 * Also see {@link #getMegapascal()}.
2558 * @param status ICU error code.
2561 static MeasureUnit
*createMegapascal(UErrorCode
&status
);
2564 * Returns by value, unit of pressure: megapascal.
2565 * Also see {@link #createMegapascal()}.
2568 static MeasureUnit
getMegapascal();
2569 #endif /* U_HIDE_DRAFT_API */
2572 * Returns by pointer, unit of pressure: millibar.
2573 * Caller owns returned value and must free it.
2574 * Also see {@link #getMillibar()}.
2575 * @param status ICU error code.
2578 static MeasureUnit
*createMillibar(UErrorCode
&status
);
2580 #ifndef U_HIDE_DRAFT_API
2582 * Returns by value, unit of pressure: millibar.
2583 * Also see {@link #createMillibar()}.
2586 static MeasureUnit
getMillibar();
2587 #endif /* U_HIDE_DRAFT_API */
2590 * Returns by pointer, unit of pressure: millimeter-of-mercury.
2591 * Caller owns returned value and must free it.
2592 * Also see {@link #getMillimeterOfMercury()}.
2593 * @param status ICU error code.
2596 static MeasureUnit
*createMillimeterOfMercury(UErrorCode
&status
);
2598 #ifndef U_HIDE_DRAFT_API
2600 * Returns by value, unit of pressure: millimeter-of-mercury.
2601 * Also see {@link #createMillimeterOfMercury()}.
2604 static MeasureUnit
getMillimeterOfMercury();
2605 #endif /* U_HIDE_DRAFT_API */
2607 #ifndef U_HIDE_DRAFT_API
2609 * Returns by pointer, unit of pressure: pascal.
2610 * Caller owns returned value and must free it.
2611 * Also see {@link #getPascal()}.
2612 * @param status ICU error code.
2615 static MeasureUnit
*createPascal(UErrorCode
&status
);
2618 * Returns by value, unit of pressure: pascal.
2619 * Also see {@link #createPascal()}.
2622 static MeasureUnit
getPascal();
2623 #endif /* U_HIDE_DRAFT_API */
2626 * Returns by pointer, unit of pressure: pound-per-square-inch.
2627 * Caller owns returned value and must free it.
2628 * Also see {@link #getPoundPerSquareInch()}.
2629 * @param status ICU error code.
2632 static MeasureUnit
*createPoundPerSquareInch(UErrorCode
&status
);
2634 #ifndef U_HIDE_DRAFT_API
2636 * Returns by value, unit of pressure: pound-per-square-inch.
2637 * Also see {@link #createPoundPerSquareInch()}.
2640 static MeasureUnit
getPoundPerSquareInch();
2641 #endif /* U_HIDE_DRAFT_API */
2644 * Returns by pointer, unit of speed: kilometer-per-hour.
2645 * Caller owns returned value and must free it.
2646 * Also see {@link #getKilometerPerHour()}.
2647 * @param status ICU error code.
2650 static MeasureUnit
*createKilometerPerHour(UErrorCode
&status
);
2652 #ifndef U_HIDE_DRAFT_API
2654 * Returns by value, unit of speed: kilometer-per-hour.
2655 * Also see {@link #createKilometerPerHour()}.
2658 static MeasureUnit
getKilometerPerHour();
2659 #endif /* U_HIDE_DRAFT_API */
2662 * Returns by pointer, unit of speed: knot.
2663 * Caller owns returned value and must free it.
2664 * Also see {@link #getKnot()}.
2665 * @param status ICU error code.
2668 static MeasureUnit
*createKnot(UErrorCode
&status
);
2670 #ifndef U_HIDE_DRAFT_API
2672 * Returns by value, unit of speed: knot.
2673 * Also see {@link #createKnot()}.
2676 static MeasureUnit
getKnot();
2677 #endif /* U_HIDE_DRAFT_API */
2680 * Returns by pointer, unit of speed: meter-per-second.
2681 * Caller owns returned value and must free it.
2682 * Also see {@link #getMeterPerSecond()}.
2683 * @param status ICU error code.
2686 static MeasureUnit
*createMeterPerSecond(UErrorCode
&status
);
2688 #ifndef U_HIDE_DRAFT_API
2690 * Returns by value, unit of speed: meter-per-second.
2691 * Also see {@link #createMeterPerSecond()}.
2694 static MeasureUnit
getMeterPerSecond();
2695 #endif /* U_HIDE_DRAFT_API */
2698 * Returns by pointer, unit of speed: mile-per-hour.
2699 * Caller owns returned value and must free it.
2700 * Also see {@link #getMilePerHour()}.
2701 * @param status ICU error code.
2704 static MeasureUnit
*createMilePerHour(UErrorCode
&status
);
2706 #ifndef U_HIDE_DRAFT_API
2708 * Returns by value, unit of speed: mile-per-hour.
2709 * Also see {@link #createMilePerHour()}.
2712 static MeasureUnit
getMilePerHour();
2713 #endif /* U_HIDE_DRAFT_API */
2716 * Returns by pointer, unit of temperature: celsius.
2717 * Caller owns returned value and must free it.
2718 * Also see {@link #getCelsius()}.
2719 * @param status ICU error code.
2722 static MeasureUnit
*createCelsius(UErrorCode
&status
);
2724 #ifndef U_HIDE_DRAFT_API
2726 * Returns by value, unit of temperature: celsius.
2727 * Also see {@link #createCelsius()}.
2730 static MeasureUnit
getCelsius();
2731 #endif /* U_HIDE_DRAFT_API */
2734 * Returns by pointer, unit of temperature: fahrenheit.
2735 * Caller owns returned value and must free it.
2736 * Also see {@link #getFahrenheit()}.
2737 * @param status ICU error code.
2740 static MeasureUnit
*createFahrenheit(UErrorCode
&status
);
2742 #ifndef U_HIDE_DRAFT_API
2744 * Returns by value, unit of temperature: fahrenheit.
2745 * Also see {@link #createFahrenheit()}.
2748 static MeasureUnit
getFahrenheit();
2749 #endif /* U_HIDE_DRAFT_API */
2752 * Returns by pointer, unit of temperature: generic.
2753 * Caller owns returned value and must free it.
2754 * Also see {@link #getGenericTemperature()}.
2755 * @param status ICU error code.
2758 static MeasureUnit
*createGenericTemperature(UErrorCode
&status
);
2760 #ifndef U_HIDE_DRAFT_API
2762 * Returns by value, unit of temperature: generic.
2763 * Also see {@link #createGenericTemperature()}.
2766 static MeasureUnit
getGenericTemperature();
2767 #endif /* U_HIDE_DRAFT_API */
2770 * Returns by pointer, unit of temperature: kelvin.
2771 * Caller owns returned value and must free it.
2772 * Also see {@link #getKelvin()}.
2773 * @param status ICU error code.
2776 static MeasureUnit
*createKelvin(UErrorCode
&status
);
2778 #ifndef U_HIDE_DRAFT_API
2780 * Returns by value, unit of temperature: kelvin.
2781 * Also see {@link #createKelvin()}.
2784 static MeasureUnit
getKelvin();
2785 #endif /* U_HIDE_DRAFT_API */
2787 #ifndef U_HIDE_DRAFT_API
2789 * Returns by pointer, unit of torque: newton-meter.
2790 * Caller owns returned value and must free it.
2791 * Also see {@link #getNewtonMeter()}.
2792 * @param status ICU error code.
2795 static MeasureUnit
*createNewtonMeter(UErrorCode
&status
);
2798 * Returns by value, unit of torque: newton-meter.
2799 * Also see {@link #createNewtonMeter()}.
2802 static MeasureUnit
getNewtonMeter();
2803 #endif /* U_HIDE_DRAFT_API */
2805 #ifndef U_HIDE_DRAFT_API
2807 * Returns by pointer, unit of torque: pound-foot.
2808 * Caller owns returned value and must free it.
2809 * Also see {@link #getPoundFoot()}.
2810 * @param status ICU error code.
2813 static MeasureUnit
*createPoundFoot(UErrorCode
&status
);
2816 * Returns by value, unit of torque: pound-foot.
2817 * Also see {@link #createPoundFoot()}.
2820 static MeasureUnit
getPoundFoot();
2821 #endif /* U_HIDE_DRAFT_API */
2824 * Returns by pointer, unit of volume: acre-foot.
2825 * Caller owns returned value and must free it.
2826 * Also see {@link #getAcreFoot()}.
2827 * @param status ICU error code.
2830 static MeasureUnit
*createAcreFoot(UErrorCode
&status
);
2832 #ifndef U_HIDE_DRAFT_API
2834 * Returns by value, unit of volume: acre-foot.
2835 * Also see {@link #createAcreFoot()}.
2838 static MeasureUnit
getAcreFoot();
2839 #endif /* U_HIDE_DRAFT_API */
2841 #ifndef U_HIDE_DRAFT_API
2843 * Returns by pointer, unit of volume: barrel.
2844 * Caller owns returned value and must free it.
2845 * Also see {@link #getBarrel()}.
2846 * @param status ICU error code.
2849 static MeasureUnit
*createBarrel(UErrorCode
&status
);
2852 * Returns by value, unit of volume: barrel.
2853 * Also see {@link #createBarrel()}.
2856 static MeasureUnit
getBarrel();
2857 #endif /* U_HIDE_DRAFT_API */
2860 * Returns by pointer, unit of volume: bushel.
2861 * Caller owns returned value and must free it.
2862 * Also see {@link #getBushel()}.
2863 * @param status ICU error code.
2866 static MeasureUnit
*createBushel(UErrorCode
&status
);
2868 #ifndef U_HIDE_DRAFT_API
2870 * Returns by value, unit of volume: bushel.
2871 * Also see {@link #createBushel()}.
2874 static MeasureUnit
getBushel();
2875 #endif /* U_HIDE_DRAFT_API */
2878 * Returns by pointer, unit of volume: centiliter.
2879 * Caller owns returned value and must free it.
2880 * Also see {@link #getCentiliter()}.
2881 * @param status ICU error code.
2884 static MeasureUnit
*createCentiliter(UErrorCode
&status
);
2886 #ifndef U_HIDE_DRAFT_API
2888 * Returns by value, unit of volume: centiliter.
2889 * Also see {@link #createCentiliter()}.
2892 static MeasureUnit
getCentiliter();
2893 #endif /* U_HIDE_DRAFT_API */
2896 * Returns by pointer, unit of volume: cubic-centimeter.
2897 * Caller owns returned value and must free it.
2898 * Also see {@link #getCubicCentimeter()}.
2899 * @param status ICU error code.
2902 static MeasureUnit
*createCubicCentimeter(UErrorCode
&status
);
2904 #ifndef U_HIDE_DRAFT_API
2906 * Returns by value, unit of volume: cubic-centimeter.
2907 * Also see {@link #createCubicCentimeter()}.
2910 static MeasureUnit
getCubicCentimeter();
2911 #endif /* U_HIDE_DRAFT_API */
2914 * Returns by pointer, unit of volume: cubic-foot.
2915 * Caller owns returned value and must free it.
2916 * Also see {@link #getCubicFoot()}.
2917 * @param status ICU error code.
2920 static MeasureUnit
*createCubicFoot(UErrorCode
&status
);
2922 #ifndef U_HIDE_DRAFT_API
2924 * Returns by value, unit of volume: cubic-foot.
2925 * Also see {@link #createCubicFoot()}.
2928 static MeasureUnit
getCubicFoot();
2929 #endif /* U_HIDE_DRAFT_API */
2932 * Returns by pointer, unit of volume: cubic-inch.
2933 * Caller owns returned value and must free it.
2934 * Also see {@link #getCubicInch()}.
2935 * @param status ICU error code.
2938 static MeasureUnit
*createCubicInch(UErrorCode
&status
);
2940 #ifndef U_HIDE_DRAFT_API
2942 * Returns by value, unit of volume: cubic-inch.
2943 * Also see {@link #createCubicInch()}.
2946 static MeasureUnit
getCubicInch();
2947 #endif /* U_HIDE_DRAFT_API */
2950 * Returns by pointer, unit of volume: cubic-kilometer.
2951 * Caller owns returned value and must free it.
2952 * Also see {@link #getCubicKilometer()}.
2953 * @param status ICU error code.
2956 static MeasureUnit
*createCubicKilometer(UErrorCode
&status
);
2958 #ifndef U_HIDE_DRAFT_API
2960 * Returns by value, unit of volume: cubic-kilometer.
2961 * Also see {@link #createCubicKilometer()}.
2964 static MeasureUnit
getCubicKilometer();
2965 #endif /* U_HIDE_DRAFT_API */
2968 * Returns by pointer, unit of volume: cubic-meter.
2969 * Caller owns returned value and must free it.
2970 * Also see {@link #getCubicMeter()}.
2971 * @param status ICU error code.
2974 static MeasureUnit
*createCubicMeter(UErrorCode
&status
);
2976 #ifndef U_HIDE_DRAFT_API
2978 * Returns by value, unit of volume: cubic-meter.
2979 * Also see {@link #createCubicMeter()}.
2982 static MeasureUnit
getCubicMeter();
2983 #endif /* U_HIDE_DRAFT_API */
2986 * Returns by pointer, unit of volume: cubic-mile.
2987 * Caller owns returned value and must free it.
2988 * Also see {@link #getCubicMile()}.
2989 * @param status ICU error code.
2992 static MeasureUnit
*createCubicMile(UErrorCode
&status
);
2994 #ifndef U_HIDE_DRAFT_API
2996 * Returns by value, unit of volume: cubic-mile.
2997 * Also see {@link #createCubicMile()}.
3000 static MeasureUnit
getCubicMile();
3001 #endif /* U_HIDE_DRAFT_API */
3004 * Returns by pointer, unit of volume: cubic-yard.
3005 * Caller owns returned value and must free it.
3006 * Also see {@link #getCubicYard()}.
3007 * @param status ICU error code.
3010 static MeasureUnit
*createCubicYard(UErrorCode
&status
);
3012 #ifndef U_HIDE_DRAFT_API
3014 * Returns by value, unit of volume: cubic-yard.
3015 * Also see {@link #createCubicYard()}.
3018 static MeasureUnit
getCubicYard();
3019 #endif /* U_HIDE_DRAFT_API */
3022 * Returns by pointer, unit of volume: cup.
3023 * Caller owns returned value and must free it.
3024 * Also see {@link #getCup()}.
3025 * @param status ICU error code.
3028 static MeasureUnit
*createCup(UErrorCode
&status
);
3030 #ifndef U_HIDE_DRAFT_API
3032 * Returns by value, unit of volume: cup.
3033 * Also see {@link #createCup()}.
3036 static MeasureUnit
getCup();
3037 #endif /* U_HIDE_DRAFT_API */
3040 * Returns by pointer, unit of volume: cup-metric.
3041 * Caller owns returned value and must free it.
3042 * Also see {@link #getCupMetric()}.
3043 * @param status ICU error code.
3046 static MeasureUnit
*createCupMetric(UErrorCode
&status
);
3048 #ifndef U_HIDE_DRAFT_API
3050 * Returns by value, unit of volume: cup-metric.
3051 * Also see {@link #createCupMetric()}.
3054 static MeasureUnit
getCupMetric();
3055 #endif /* U_HIDE_DRAFT_API */
3058 * Returns by pointer, unit of volume: deciliter.
3059 * Caller owns returned value and must free it.
3060 * Also see {@link #getDeciliter()}.
3061 * @param status ICU error code.
3064 static MeasureUnit
*createDeciliter(UErrorCode
&status
);
3066 #ifndef U_HIDE_DRAFT_API
3068 * Returns by value, unit of volume: deciliter.
3069 * Also see {@link #createDeciliter()}.
3072 static MeasureUnit
getDeciliter();
3073 #endif /* U_HIDE_DRAFT_API */
3076 * Returns by pointer, unit of volume: fluid-ounce.
3077 * Caller owns returned value and must free it.
3078 * Also see {@link #getFluidOunce()}.
3079 * @param status ICU error code.
3082 static MeasureUnit
*createFluidOunce(UErrorCode
&status
);
3084 #ifndef U_HIDE_DRAFT_API
3086 * Returns by value, unit of volume: fluid-ounce.
3087 * Also see {@link #createFluidOunce()}.
3090 static MeasureUnit
getFluidOunce();
3091 #endif /* U_HIDE_DRAFT_API */
3093 #ifndef U_HIDE_DRAFT_API
3095 * Returns by pointer, unit of volume: fluid-ounce-imperial.
3096 * Caller owns returned value and must free it.
3097 * Also see {@link #getFluidOunceImperial()}.
3098 * @param status ICU error code.
3101 static MeasureUnit
*createFluidOunceImperial(UErrorCode
&status
);
3104 * Returns by value, unit of volume: fluid-ounce-imperial.
3105 * Also see {@link #createFluidOunceImperial()}.
3108 static MeasureUnit
getFluidOunceImperial();
3109 #endif /* U_HIDE_DRAFT_API */
3112 * Returns by pointer, unit of volume: gallon.
3113 * Caller owns returned value and must free it.
3114 * Also see {@link #getGallon()}.
3115 * @param status ICU error code.
3118 static MeasureUnit
*createGallon(UErrorCode
&status
);
3120 #ifndef U_HIDE_DRAFT_API
3122 * Returns by value, unit of volume: gallon.
3123 * Also see {@link #createGallon()}.
3126 static MeasureUnit
getGallon();
3127 #endif /* U_HIDE_DRAFT_API */
3130 * Returns by pointer, unit of volume: gallon-imperial.
3131 * Caller owns returned value and must free it.
3132 * Also see {@link #getGallonImperial()}.
3133 * @param status ICU error code.
3136 static MeasureUnit
*createGallonImperial(UErrorCode
&status
);
3138 #ifndef U_HIDE_DRAFT_API
3140 * Returns by value, unit of volume: gallon-imperial.
3141 * Also see {@link #createGallonImperial()}.
3144 static MeasureUnit
getGallonImperial();
3145 #endif /* U_HIDE_DRAFT_API */
3148 * Returns by pointer, unit of volume: hectoliter.
3149 * Caller owns returned value and must free it.
3150 * Also see {@link #getHectoliter()}.
3151 * @param status ICU error code.
3154 static MeasureUnit
*createHectoliter(UErrorCode
&status
);
3156 #ifndef U_HIDE_DRAFT_API
3158 * Returns by value, unit of volume: hectoliter.
3159 * Also see {@link #createHectoliter()}.
3162 static MeasureUnit
getHectoliter();
3163 #endif /* U_HIDE_DRAFT_API */
3166 * Returns by pointer, unit of volume: liter.
3167 * Caller owns returned value and must free it.
3168 * Also see {@link #getLiter()}.
3169 * @param status ICU error code.
3172 static MeasureUnit
*createLiter(UErrorCode
&status
);
3174 #ifndef U_HIDE_DRAFT_API
3176 * Returns by value, unit of volume: liter.
3177 * Also see {@link #createLiter()}.
3180 static MeasureUnit
getLiter();
3181 #endif /* U_HIDE_DRAFT_API */
3184 * Returns by pointer, unit of volume: megaliter.
3185 * Caller owns returned value and must free it.
3186 * Also see {@link #getMegaliter()}.
3187 * @param status ICU error code.
3190 static MeasureUnit
*createMegaliter(UErrorCode
&status
);
3192 #ifndef U_HIDE_DRAFT_API
3194 * Returns by value, unit of volume: megaliter.
3195 * Also see {@link #createMegaliter()}.
3198 static MeasureUnit
getMegaliter();
3199 #endif /* U_HIDE_DRAFT_API */
3202 * Returns by pointer, unit of volume: milliliter.
3203 * Caller owns returned value and must free it.
3204 * Also see {@link #getMilliliter()}.
3205 * @param status ICU error code.
3208 static MeasureUnit
*createMilliliter(UErrorCode
&status
);
3210 #ifndef U_HIDE_DRAFT_API
3212 * Returns by value, unit of volume: milliliter.
3213 * Also see {@link #createMilliliter()}.
3216 static MeasureUnit
getMilliliter();
3217 #endif /* U_HIDE_DRAFT_API */
3220 * Returns by pointer, unit of volume: pint.
3221 * Caller owns returned value and must free it.
3222 * Also see {@link #getPint()}.
3223 * @param status ICU error code.
3226 static MeasureUnit
*createPint(UErrorCode
&status
);
3228 #ifndef U_HIDE_DRAFT_API
3230 * Returns by value, unit of volume: pint.
3231 * Also see {@link #createPint()}.
3234 static MeasureUnit
getPint();
3235 #endif /* U_HIDE_DRAFT_API */
3238 * Returns by pointer, unit of volume: pint-metric.
3239 * Caller owns returned value and must free it.
3240 * Also see {@link #getPintMetric()}.
3241 * @param status ICU error code.
3244 static MeasureUnit
*createPintMetric(UErrorCode
&status
);
3246 #ifndef U_HIDE_DRAFT_API
3248 * Returns by value, unit of volume: pint-metric.
3249 * Also see {@link #createPintMetric()}.
3252 static MeasureUnit
getPintMetric();
3253 #endif /* U_HIDE_DRAFT_API */
3256 * Returns by pointer, unit of volume: quart.
3257 * Caller owns returned value and must free it.
3258 * Also see {@link #getQuart()}.
3259 * @param status ICU error code.
3262 static MeasureUnit
*createQuart(UErrorCode
&status
);
3264 #ifndef U_HIDE_DRAFT_API
3266 * Returns by value, unit of volume: quart.
3267 * Also see {@link #createQuart()}.
3270 static MeasureUnit
getQuart();
3271 #endif /* U_HIDE_DRAFT_API */
3274 * Returns by pointer, unit of volume: tablespoon.
3275 * Caller owns returned value and must free it.
3276 * Also see {@link #getTablespoon()}.
3277 * @param status ICU error code.
3280 static MeasureUnit
*createTablespoon(UErrorCode
&status
);
3282 #ifndef U_HIDE_DRAFT_API
3284 * Returns by value, unit of volume: tablespoon.
3285 * Also see {@link #createTablespoon()}.
3288 static MeasureUnit
getTablespoon();
3289 #endif /* U_HIDE_DRAFT_API */
3292 * Returns by pointer, unit of volume: teaspoon.
3293 * Caller owns returned value and must free it.
3294 * Also see {@link #getTeaspoon()}.
3295 * @param status ICU error code.
3298 static MeasureUnit
*createTeaspoon(UErrorCode
&status
);
3300 #ifndef U_HIDE_DRAFT_API
3302 * Returns by value, unit of volume: teaspoon.
3303 * Also see {@link #createTeaspoon()}.
3306 static MeasureUnit
getTeaspoon();
3307 #endif /* U_HIDE_DRAFT_API */
3310 // End generated createXXX methods
3314 #ifndef U_HIDE_INTERNAL_API
3319 void initTime(const char *timeId
);
3325 void initCurrency(const char *isoCurrency
);
3331 void initNoUnit(const char *subtype
);
3333 #endif /* U_HIDE_INTERNAL_API */
3340 MeasureUnit(int32_t typeId
, int32_t subTypeId
) : fTypeId(typeId
), fSubTypeId(subTypeId
) {
3343 void setTo(int32_t typeId
, int32_t subTypeId
);
3344 int32_t getOffset() const;
3345 static MeasureUnit
*create(int typeId
, int subTypeId
, UErrorCode
&status
);
3350 #endif // !UNCONFIG_NO_FORMATTING
3352 #endif /* U_SHOW_CPLUSPLUS_API */
3354 #endif // __MEASUREUNIT_H__