]>
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 !UCONFIG_NO_FORMATTING
20 #include "unicode/unistr.h"
24 * \brief C++ API: A unit for measuring a quantity.
27 #if U_SHOW_CPLUSPLUS_API
30 class StringEnumeration
;
33 * A unit such as length, mass, volume, currency, etc. A unit is
34 * coupled with a numeric amount to produce a Measure.
39 class U_I18N_API MeasureUnit
: public UObject
{
43 * Default constructor.
44 * Populates the instance with the base dimensionless unit.
53 MeasureUnit(const MeasureUnit
&other
);
56 * Assignment operator.
59 MeasureUnit
&operator=(const MeasureUnit
&other
);
62 * Returns a polymorphic clone of this object. The result will
63 * have the same class as returned by getDynamicClassID().
66 virtual UObject
* clone() const;
72 virtual ~MeasureUnit();
75 * Equality operator. Return true if this object is equal
76 * to the given object.
79 virtual UBool
operator==(const UObject
& other
) const;
82 * Inequality operator. Return true if this object is not equal
83 * to the given object.
86 UBool
operator!=(const UObject
& other
) const {
87 return !(*this == other
);
94 const char *getType() const;
100 const char *getSubtype() const;
103 * getAvailable gets all of the available units.
104 * If there are too many units to fit into destCapacity then the
105 * error code is set to U_BUFFER_OVERFLOW_ERROR.
107 * @param destArray destination buffer.
108 * @param destCapacity number of MeasureUnit instances available at dest.
109 * @param errorCode ICU error code.
110 * @return number of available units.
113 static int32_t getAvailable(
114 MeasureUnit
*destArray
,
115 int32_t destCapacity
,
116 UErrorCode
&errorCode
);
119 * getAvailable gets all of the available units for a specific type.
120 * If there are too many units to fit into destCapacity then the
121 * error code is set to U_BUFFER_OVERFLOW_ERROR.
123 * @param type the type
124 * @param destArray destination buffer.
125 * @param destCapacity number of MeasureUnit instances available at dest.
126 * @param errorCode ICU error code.
127 * @return number of available units for type.
130 static int32_t getAvailable(
132 MeasureUnit
*destArray
,
133 int32_t destCapacity
,
134 UErrorCode
&errorCode
);
137 * getAvailableTypes gets all of the available types. Caller owns the
138 * returned StringEnumeration and must delete it when finished using it.
140 * @param errorCode ICU error code.
144 static StringEnumeration
* getAvailableTypes(UErrorCode
&errorCode
);
147 * Return the class ID for this class. This is useful only for comparing to
148 * a return value from getDynamicClassID(). For example:
150 * . Base* polymorphic_pointer = createPolymorphicObject();
151 * . if (polymorphic_pointer->getDynamicClassID() ==
152 * . Derived::getStaticClassID()) ...
154 * @return The class ID for all objects of this class.
157 static UClassID U_EXPORT2
getStaticClassID(void);
160 * Returns a unique class ID POLYMORPHICALLY. Pure virtual override. This
161 * method is to implement a simple version of RTTI, since not all C++
162 * compilers support genuine RTTI. Polymorphic operator==() and clone()
163 * methods call this method.
165 * @return The class ID for this object. All objects of a
166 * given class have the same class ID. Objects of
167 * other classes have different class IDs.
170 virtual UClassID
getDynamicClassID(void) const;
172 #ifndef U_HIDE_INTERNAL_API
175 * Returns associated array index for this measure unit. Only valid for
176 * non-currency measure units.
179 int32_t getIndex() const;
183 * Returns maximum value from getIndex plus 1.
186 static int32_t getIndexCount();
190 * @return the unit.getIndex() of the unit which has this unit.getType() and unit.getSubtype(),
191 * or a negative value if there is no such unit
194 static int32_t internalGetIndexForTypeAndSubtype(const char *type
, const char *subtype
);
200 static MeasureUnit
resolveUnitPerUnit(
201 const MeasureUnit
&unit
, const MeasureUnit
&perUnit
, bool* isResolved
);
202 #endif /* U_HIDE_INTERNAL_API */
204 // All code between the "Start generated createXXX methods" comment and
205 // the "End generated createXXX methods" comment is auto generated code
206 // and must not be edited manually. For instructions on how to correctly
207 // update this code, refer to:
208 // http://site.icu-project.org/design/formatting/measureformat/updating-measure-unit
210 // Start generated createXXX methods
213 * Returns by pointer, unit of acceleration: g-force.
214 * Caller owns returned value and must free it.
215 * Also see {@link #getGForce()}.
216 * @param status ICU error code.
219 static MeasureUnit
*createGForce(UErrorCode
&status
);
221 #ifndef U_HIDE_DRAFT_API
223 * Returns by value, unit of acceleration: g-force.
224 * Also see {@link #createGForce()}.
227 static MeasureUnit
getGForce();
228 #endif /* U_HIDE_DRAFT_API */
231 * Returns by pointer, unit of acceleration: meter-per-second-squared.
232 * Caller owns returned value and must free it.
233 * Also see {@link #getMeterPerSecondSquared()}.
234 * @param status ICU error code.
237 static MeasureUnit
*createMeterPerSecondSquared(UErrorCode
&status
);
239 #ifndef U_HIDE_DRAFT_API
241 * Returns by value, unit of acceleration: meter-per-second-squared.
242 * Also see {@link #createMeterPerSecondSquared()}.
245 static MeasureUnit
getMeterPerSecondSquared();
246 #endif /* U_HIDE_DRAFT_API */
249 * Returns by pointer, unit of angle: arc-minute.
250 * Caller owns returned value and must free it.
251 * Also see {@link #getArcMinute()}.
252 * @param status ICU error code.
255 static MeasureUnit
*createArcMinute(UErrorCode
&status
);
257 #ifndef U_HIDE_DRAFT_API
259 * Returns by value, unit of angle: arc-minute.
260 * Also see {@link #createArcMinute()}.
263 static MeasureUnit
getArcMinute();
264 #endif /* U_HIDE_DRAFT_API */
267 * Returns by pointer, unit of angle: arc-second.
268 * Caller owns returned value and must free it.
269 * Also see {@link #getArcSecond()}.
270 * @param status ICU error code.
273 static MeasureUnit
*createArcSecond(UErrorCode
&status
);
275 #ifndef U_HIDE_DRAFT_API
277 * Returns by value, unit of angle: arc-second.
278 * Also see {@link #createArcSecond()}.
281 static MeasureUnit
getArcSecond();
282 #endif /* U_HIDE_DRAFT_API */
285 * Returns by pointer, unit of angle: degree.
286 * Caller owns returned value and must free it.
287 * Also see {@link #getDegree()}.
288 * @param status ICU error code.
291 static MeasureUnit
*createDegree(UErrorCode
&status
);
293 #ifndef U_HIDE_DRAFT_API
295 * Returns by value, unit of angle: degree.
296 * Also see {@link #createDegree()}.
299 static MeasureUnit
getDegree();
300 #endif /* U_HIDE_DRAFT_API */
303 * Returns by pointer, unit of angle: radian.
304 * Caller owns returned value and must free it.
305 * Also see {@link #getRadian()}.
306 * @param status ICU error code.
309 static MeasureUnit
*createRadian(UErrorCode
&status
);
311 #ifndef U_HIDE_DRAFT_API
313 * Returns by value, unit of angle: radian.
314 * Also see {@link #createRadian()}.
317 static MeasureUnit
getRadian();
318 #endif /* U_HIDE_DRAFT_API */
321 * Returns by pointer, unit of angle: revolution.
322 * Caller owns returned value and must free it.
323 * Also see {@link #getRevolutionAngle()}.
324 * @param status ICU error code.
327 static MeasureUnit
*createRevolutionAngle(UErrorCode
&status
);
329 #ifndef U_HIDE_DRAFT_API
331 * Returns by value, unit of angle: revolution.
332 * Also see {@link #createRevolutionAngle()}.
335 static MeasureUnit
getRevolutionAngle();
336 #endif /* U_HIDE_DRAFT_API */
339 * Returns by pointer, unit of area: acre.
340 * Caller owns returned value and must free it.
341 * Also see {@link #getAcre()}.
342 * @param status ICU error code.
345 static MeasureUnit
*createAcre(UErrorCode
&status
);
347 #ifndef U_HIDE_DRAFT_API
349 * Returns by value, unit of area: acre.
350 * Also see {@link #createAcre()}.
353 static MeasureUnit
getAcre();
354 #endif /* U_HIDE_DRAFT_API */
356 #ifndef U_HIDE_DRAFT_API
358 * Returns by pointer, unit of area: dunam.
359 * Caller owns returned value and must free it.
360 * Also see {@link #getDunam()}.
361 * @param status ICU error code.
364 static MeasureUnit
*createDunam(UErrorCode
&status
);
367 * Returns by value, unit of area: dunam.
368 * Also see {@link #createDunam()}.
371 static MeasureUnit
getDunam();
372 #endif /* U_HIDE_DRAFT_API */
375 * Returns by pointer, unit of area: hectare.
376 * Caller owns returned value and must free it.
377 * Also see {@link #getHectare()}.
378 * @param status ICU error code.
381 static MeasureUnit
*createHectare(UErrorCode
&status
);
383 #ifndef U_HIDE_DRAFT_API
385 * Returns by value, unit of area: hectare.
386 * Also see {@link #createHectare()}.
389 static MeasureUnit
getHectare();
390 #endif /* U_HIDE_DRAFT_API */
393 * Returns by pointer, unit of area: square-centimeter.
394 * Caller owns returned value and must free it.
395 * Also see {@link #getSquareCentimeter()}.
396 * @param status ICU error code.
399 static MeasureUnit
*createSquareCentimeter(UErrorCode
&status
);
401 #ifndef U_HIDE_DRAFT_API
403 * Returns by value, unit of area: square-centimeter.
404 * Also see {@link #createSquareCentimeter()}.
407 static MeasureUnit
getSquareCentimeter();
408 #endif /* U_HIDE_DRAFT_API */
411 * Returns by pointer, unit of area: square-foot.
412 * Caller owns returned value and must free it.
413 * Also see {@link #getSquareFoot()}.
414 * @param status ICU error code.
417 static MeasureUnit
*createSquareFoot(UErrorCode
&status
);
419 #ifndef U_HIDE_DRAFT_API
421 * Returns by value, unit of area: square-foot.
422 * Also see {@link #createSquareFoot()}.
425 static MeasureUnit
getSquareFoot();
426 #endif /* U_HIDE_DRAFT_API */
429 * Returns by pointer, unit of area: square-inch.
430 * Caller owns returned value and must free it.
431 * Also see {@link #getSquareInch()}.
432 * @param status ICU error code.
435 static MeasureUnit
*createSquareInch(UErrorCode
&status
);
437 #ifndef U_HIDE_DRAFT_API
439 * Returns by value, unit of area: square-inch.
440 * Also see {@link #createSquareInch()}.
443 static MeasureUnit
getSquareInch();
444 #endif /* U_HIDE_DRAFT_API */
447 * Returns by pointer, unit of area: square-kilometer.
448 * Caller owns returned value and must free it.
449 * Also see {@link #getSquareKilometer()}.
450 * @param status ICU error code.
453 static MeasureUnit
*createSquareKilometer(UErrorCode
&status
);
455 #ifndef U_HIDE_DRAFT_API
457 * Returns by value, unit of area: square-kilometer.
458 * Also see {@link #createSquareKilometer()}.
461 static MeasureUnit
getSquareKilometer();
462 #endif /* U_HIDE_DRAFT_API */
465 * Returns by pointer, unit of area: square-meter.
466 * Caller owns returned value and must free it.
467 * Also see {@link #getSquareMeter()}.
468 * @param status ICU error code.
471 static MeasureUnit
*createSquareMeter(UErrorCode
&status
);
473 #ifndef U_HIDE_DRAFT_API
475 * Returns by value, unit of area: square-meter.
476 * Also see {@link #createSquareMeter()}.
479 static MeasureUnit
getSquareMeter();
480 #endif /* U_HIDE_DRAFT_API */
483 * Returns by pointer, unit of area: square-mile.
484 * Caller owns returned value and must free it.
485 * Also see {@link #getSquareMile()}.
486 * @param status ICU error code.
489 static MeasureUnit
*createSquareMile(UErrorCode
&status
);
491 #ifndef U_HIDE_DRAFT_API
493 * Returns by value, unit of area: square-mile.
494 * Also see {@link #createSquareMile()}.
497 static MeasureUnit
getSquareMile();
498 #endif /* U_HIDE_DRAFT_API */
501 * Returns by pointer, unit of area: square-yard.
502 * Caller owns returned value and must free it.
503 * Also see {@link #getSquareYard()}.
504 * @param status ICU error code.
507 static MeasureUnit
*createSquareYard(UErrorCode
&status
);
509 #ifndef U_HIDE_DRAFT_API
511 * Returns by value, unit of area: square-yard.
512 * Also see {@link #createSquareYard()}.
515 static MeasureUnit
getSquareYard();
516 #endif /* U_HIDE_DRAFT_API */
519 * Returns by pointer, unit of concentr: karat.
520 * Caller owns returned value and must free it.
521 * Also see {@link #getKarat()}.
522 * @param status ICU error code.
525 static MeasureUnit
*createKarat(UErrorCode
&status
);
527 #ifndef U_HIDE_DRAFT_API
529 * Returns by value, unit of concentr: karat.
530 * Also see {@link #createKarat()}.
533 static MeasureUnit
getKarat();
534 #endif /* U_HIDE_DRAFT_API */
537 * Returns by pointer, unit of concentr: milligram-per-deciliter.
538 * Caller owns returned value and must free it.
539 * Also see {@link #getMilligramPerDeciliter()}.
540 * @param status ICU error code.
543 static MeasureUnit
*createMilligramPerDeciliter(UErrorCode
&status
);
545 #ifndef U_HIDE_DRAFT_API
547 * Returns by value, unit of concentr: milligram-per-deciliter.
548 * Also see {@link #createMilligramPerDeciliter()}.
551 static MeasureUnit
getMilligramPerDeciliter();
552 #endif /* U_HIDE_DRAFT_API */
555 * Returns by pointer, unit of concentr: millimole-per-liter.
556 * Caller owns returned value and must free it.
557 * Also see {@link #getMillimolePerLiter()}.
558 * @param status ICU error code.
561 static MeasureUnit
*createMillimolePerLiter(UErrorCode
&status
);
563 #ifndef U_HIDE_DRAFT_API
565 * Returns by value, unit of concentr: millimole-per-liter.
566 * Also see {@link #createMillimolePerLiter()}.
569 static MeasureUnit
getMillimolePerLiter();
570 #endif /* U_HIDE_DRAFT_API */
572 #ifndef U_HIDE_DRAFT_API
574 * Returns by pointer, unit of concentr: mole.
575 * Caller owns returned value and must free it.
576 * Also see {@link #getMole()}.
577 * @param status ICU error code.
580 static MeasureUnit
*createMole(UErrorCode
&status
);
583 * Returns by value, unit of concentr: mole.
584 * Also see {@link #createMole()}.
587 static MeasureUnit
getMole();
588 #endif /* U_HIDE_DRAFT_API */
591 * Returns by pointer, unit of concentr: part-per-million.
592 * Caller owns returned value and must free it.
593 * Also see {@link #getPartPerMillion()}.
594 * @param status ICU error code.
597 static MeasureUnit
*createPartPerMillion(UErrorCode
&status
);
599 #ifndef U_HIDE_DRAFT_API
601 * Returns by value, unit of concentr: part-per-million.
602 * Also see {@link #createPartPerMillion()}.
605 static MeasureUnit
getPartPerMillion();
606 #endif /* U_HIDE_DRAFT_API */
608 #ifndef 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
);
617 #endif /* U_HIDE_DRAFT_API */
619 #ifndef U_HIDE_DRAFT_API
621 * Returns by value, unit of concentr: percent.
622 * Also see {@link #createPercent()}.
625 static MeasureUnit
getPercent();
626 #endif /* U_HIDE_DRAFT_API */
628 #ifndef U_HIDE_DRAFT_API
630 * Returns by pointer, unit of concentr: permille.
631 * Caller owns returned value and must free it.
632 * Also see {@link #getPermille()}.
633 * @param status ICU error code.
636 static MeasureUnit
*createPermille(UErrorCode
&status
);
637 #endif /* U_HIDE_DRAFT_API */
639 #ifndef U_HIDE_DRAFT_API
641 * Returns by value, unit of concentr: permille.
642 * Also see {@link #createPermille()}.
645 static MeasureUnit
getPermille();
646 #endif /* U_HIDE_DRAFT_API */
648 #ifndef U_HIDE_DRAFT_API
650 * Returns by pointer, unit of concentr: permyriad.
651 * Caller owns returned value and must free it.
652 * Also see {@link #getPermyriad()}.
653 * @param status ICU error code.
656 static MeasureUnit
*createPermyriad(UErrorCode
&status
);
659 * Returns by value, unit of concentr: permyriad.
660 * Also see {@link #createPermyriad()}.
663 static MeasureUnit
getPermyriad();
664 #endif /* U_HIDE_DRAFT_API */
667 * Returns by pointer, unit of consumption: liter-per-100kilometers.
668 * Caller owns returned value and must free it.
669 * Also see {@link #getLiterPer100Kilometers()}.
670 * @param status ICU error code.
673 static MeasureUnit
*createLiterPer100Kilometers(UErrorCode
&status
);
675 #ifndef U_HIDE_DRAFT_API
677 * Returns by value, unit of consumption: liter-per-100kilometers.
678 * Also see {@link #createLiterPer100Kilometers()}.
681 static MeasureUnit
getLiterPer100Kilometers();
682 #endif /* U_HIDE_DRAFT_API */
685 * Returns by pointer, unit of consumption: liter-per-kilometer.
686 * Caller owns returned value and must free it.
687 * Also see {@link #getLiterPerKilometer()}.
688 * @param status ICU error code.
691 static MeasureUnit
*createLiterPerKilometer(UErrorCode
&status
);
693 #ifndef U_HIDE_DRAFT_API
695 * Returns by value, unit of consumption: liter-per-kilometer.
696 * Also see {@link #createLiterPerKilometer()}.
699 static MeasureUnit
getLiterPerKilometer();
700 #endif /* U_HIDE_DRAFT_API */
703 * Returns by pointer, unit of consumption: mile-per-gallon.
704 * Caller owns returned value and must free it.
705 * Also see {@link #getMilePerGallon()}.
706 * @param status ICU error code.
709 static MeasureUnit
*createMilePerGallon(UErrorCode
&status
);
711 #ifndef U_HIDE_DRAFT_API
713 * Returns by value, unit of consumption: mile-per-gallon.
714 * Also see {@link #createMilePerGallon()}.
717 static MeasureUnit
getMilePerGallon();
718 #endif /* U_HIDE_DRAFT_API */
721 * Returns by pointer, unit of consumption: mile-per-gallon-imperial.
722 * Caller owns returned value and must free it.
723 * Also see {@link #getMilePerGallonImperial()}.
724 * @param status ICU error code.
727 static MeasureUnit
*createMilePerGallonImperial(UErrorCode
&status
);
729 #ifndef U_HIDE_DRAFT_API
731 * Returns by value, unit of consumption: mile-per-gallon-imperial.
732 * Also see {@link #createMilePerGallonImperial()}.
735 static MeasureUnit
getMilePerGallonImperial();
736 #endif /* U_HIDE_DRAFT_API */
739 * Returns by pointer, unit of digital: bit.
740 * Caller owns returned value and must free it.
741 * Also see {@link #getBit()}.
742 * @param status ICU error code.
745 static MeasureUnit
*createBit(UErrorCode
&status
);
747 #ifndef U_HIDE_DRAFT_API
749 * Returns by value, unit of digital: bit.
750 * Also see {@link #createBit()}.
753 static MeasureUnit
getBit();
754 #endif /* U_HIDE_DRAFT_API */
757 * Returns by pointer, unit of digital: byte.
758 * Caller owns returned value and must free it.
759 * Also see {@link #getByte()}.
760 * @param status ICU error code.
763 static MeasureUnit
*createByte(UErrorCode
&status
);
765 #ifndef U_HIDE_DRAFT_API
767 * Returns by value, unit of digital: byte.
768 * Also see {@link #createByte()}.
771 static MeasureUnit
getByte();
772 #endif /* U_HIDE_DRAFT_API */
775 * Returns by pointer, unit of digital: gigabit.
776 * Caller owns returned value and must free it.
777 * Also see {@link #getGigabit()}.
778 * @param status ICU error code.
781 static MeasureUnit
*createGigabit(UErrorCode
&status
);
783 #ifndef U_HIDE_DRAFT_API
785 * Returns by value, unit of digital: gigabit.
786 * Also see {@link #createGigabit()}.
789 static MeasureUnit
getGigabit();
790 #endif /* U_HIDE_DRAFT_API */
793 * Returns by pointer, unit of digital: gigabyte.
794 * Caller owns returned value and must free it.
795 * Also see {@link #getGigabyte()}.
796 * @param status ICU error code.
799 static MeasureUnit
*createGigabyte(UErrorCode
&status
);
801 #ifndef U_HIDE_DRAFT_API
803 * Returns by value, unit of digital: gigabyte.
804 * Also see {@link #createGigabyte()}.
807 static MeasureUnit
getGigabyte();
808 #endif /* U_HIDE_DRAFT_API */
811 * Returns by pointer, unit of digital: kilobit.
812 * Caller owns returned value and must free it.
813 * Also see {@link #getKilobit()}.
814 * @param status ICU error code.
817 static MeasureUnit
*createKilobit(UErrorCode
&status
);
819 #ifndef U_HIDE_DRAFT_API
821 * Returns by value, unit of digital: kilobit.
822 * Also see {@link #createKilobit()}.
825 static MeasureUnit
getKilobit();
826 #endif /* U_HIDE_DRAFT_API */
829 * Returns by pointer, unit of digital: kilobyte.
830 * Caller owns returned value and must free it.
831 * Also see {@link #getKilobyte()}.
832 * @param status ICU error code.
835 static MeasureUnit
*createKilobyte(UErrorCode
&status
);
837 #ifndef U_HIDE_DRAFT_API
839 * Returns by value, unit of digital: kilobyte.
840 * Also see {@link #createKilobyte()}.
843 static MeasureUnit
getKilobyte();
844 #endif /* U_HIDE_DRAFT_API */
847 * Returns by pointer, unit of digital: megabit.
848 * Caller owns returned value and must free it.
849 * Also see {@link #getMegabit()}.
850 * @param status ICU error code.
853 static MeasureUnit
*createMegabit(UErrorCode
&status
);
855 #ifndef U_HIDE_DRAFT_API
857 * Returns by value, unit of digital: megabit.
858 * Also see {@link #createMegabit()}.
861 static MeasureUnit
getMegabit();
862 #endif /* U_HIDE_DRAFT_API */
865 * Returns by pointer, unit of digital: megabyte.
866 * Caller owns returned value and must free it.
867 * Also see {@link #getMegabyte()}.
868 * @param status ICU error code.
871 static MeasureUnit
*createMegabyte(UErrorCode
&status
);
873 #ifndef U_HIDE_DRAFT_API
875 * Returns by value, unit of digital: megabyte.
876 * Also see {@link #createMegabyte()}.
879 static MeasureUnit
getMegabyte();
880 #endif /* U_HIDE_DRAFT_API */
882 #ifndef U_HIDE_DRAFT_API
884 * Returns by pointer, unit of digital: petabyte.
885 * Caller owns returned value and must free it.
886 * Also see {@link #getPetabyte()}.
887 * @param status ICU error code.
890 static MeasureUnit
*createPetabyte(UErrorCode
&status
);
891 #endif /* U_HIDE_DRAFT_API */
893 #ifndef U_HIDE_DRAFT_API
895 * Returns by value, unit of digital: petabyte.
896 * Also see {@link #createPetabyte()}.
899 static MeasureUnit
getPetabyte();
900 #endif /* U_HIDE_DRAFT_API */
903 * Returns by pointer, unit of digital: terabit.
904 * Caller owns returned value and must free it.
905 * Also see {@link #getTerabit()}.
906 * @param status ICU error code.
909 static MeasureUnit
*createTerabit(UErrorCode
&status
);
911 #ifndef U_HIDE_DRAFT_API
913 * Returns by value, unit of digital: terabit.
914 * Also see {@link #createTerabit()}.
917 static MeasureUnit
getTerabit();
918 #endif /* U_HIDE_DRAFT_API */
921 * Returns by pointer, unit of digital: terabyte.
922 * Caller owns returned value and must free it.
923 * Also see {@link #getTerabyte()}.
924 * @param status ICU error code.
927 static MeasureUnit
*createTerabyte(UErrorCode
&status
);
929 #ifndef U_HIDE_DRAFT_API
931 * Returns by value, unit of digital: terabyte.
932 * Also see {@link #createTerabyte()}.
935 static MeasureUnit
getTerabyte();
936 #endif /* U_HIDE_DRAFT_API */
939 * Returns by pointer, unit of duration: century.
940 * Caller owns returned value and must free it.
941 * Also see {@link #getCentury()}.
942 * @param status ICU error code.
945 static MeasureUnit
*createCentury(UErrorCode
&status
);
947 #ifndef U_HIDE_DRAFT_API
949 * Returns by value, unit of duration: century.
950 * Also see {@link #createCentury()}.
953 static MeasureUnit
getCentury();
954 #endif /* U_HIDE_DRAFT_API */
957 * Returns by pointer, unit of duration: day.
958 * Caller owns returned value and must free it.
959 * Also see {@link #getDay()}.
960 * @param status ICU error code.
963 static MeasureUnit
*createDay(UErrorCode
&status
);
965 #ifndef U_HIDE_DRAFT_API
967 * Returns by value, unit of duration: day.
968 * Also see {@link #createDay()}.
971 static MeasureUnit
getDay();
972 #endif /* U_HIDE_DRAFT_API */
974 #ifndef U_HIDE_DRAFT_API
976 * Returns by pointer, unit of duration: day-person.
977 * Caller owns returned value and must free it.
978 * Also see {@link #getDayPerson()}.
979 * @param status ICU error code.
982 static MeasureUnit
*createDayPerson(UErrorCode
&status
);
983 #endif /* U_HIDE_DRAFT_API */
985 #ifndef U_HIDE_DRAFT_API
987 * Returns by value, unit of duration: day-person.
988 * Also see {@link #createDayPerson()}.
991 static MeasureUnit
getDayPerson();
992 #endif /* U_HIDE_DRAFT_API */
995 * Returns by pointer, unit of duration: hour.
996 * Caller owns returned value and must free it.
997 * Also see {@link #getHour()}.
998 * @param status ICU error code.
1001 static MeasureUnit
*createHour(UErrorCode
&status
);
1003 #ifndef U_HIDE_DRAFT_API
1005 * Returns by value, unit of duration: hour.
1006 * Also see {@link #createHour()}.
1009 static MeasureUnit
getHour();
1010 #endif /* U_HIDE_DRAFT_API */
1013 * Returns by pointer, unit of duration: microsecond.
1014 * Caller owns returned value and must free it.
1015 * Also see {@link #getMicrosecond()}.
1016 * @param status ICU error code.
1019 static MeasureUnit
*createMicrosecond(UErrorCode
&status
);
1021 #ifndef U_HIDE_DRAFT_API
1023 * Returns by value, unit of duration: microsecond.
1024 * Also see {@link #createMicrosecond()}.
1027 static MeasureUnit
getMicrosecond();
1028 #endif /* U_HIDE_DRAFT_API */
1031 * Returns by pointer, unit of duration: millisecond.
1032 * Caller owns returned value and must free it.
1033 * Also see {@link #getMillisecond()}.
1034 * @param status ICU error code.
1037 static MeasureUnit
*createMillisecond(UErrorCode
&status
);
1039 #ifndef U_HIDE_DRAFT_API
1041 * Returns by value, unit of duration: millisecond.
1042 * Also see {@link #createMillisecond()}.
1045 static MeasureUnit
getMillisecond();
1046 #endif /* U_HIDE_DRAFT_API */
1049 * Returns by pointer, unit of duration: minute.
1050 * Caller owns returned value and must free it.
1051 * Also see {@link #getMinute()}.
1052 * @param status ICU error code.
1055 static MeasureUnit
*createMinute(UErrorCode
&status
);
1057 #ifndef U_HIDE_DRAFT_API
1059 * Returns by value, unit of duration: minute.
1060 * Also see {@link #createMinute()}.
1063 static MeasureUnit
getMinute();
1064 #endif /* U_HIDE_DRAFT_API */
1067 * Returns by pointer, unit of duration: month.
1068 * Caller owns returned value and must free it.
1069 * Also see {@link #getMonth()}.
1070 * @param status ICU error code.
1073 static MeasureUnit
*createMonth(UErrorCode
&status
);
1075 #ifndef U_HIDE_DRAFT_API
1077 * Returns by value, unit of duration: month.
1078 * Also see {@link #createMonth()}.
1081 static MeasureUnit
getMonth();
1082 #endif /* U_HIDE_DRAFT_API */
1084 #ifndef U_HIDE_DRAFT_API
1086 * Returns by pointer, unit of duration: month-person.
1087 * Caller owns returned value and must free it.
1088 * Also see {@link #getMonthPerson()}.
1089 * @param status ICU error code.
1092 static MeasureUnit
*createMonthPerson(UErrorCode
&status
);
1093 #endif /* U_HIDE_DRAFT_API */
1095 #ifndef U_HIDE_DRAFT_API
1097 * Returns by value, unit of duration: month-person.
1098 * Also see {@link #createMonthPerson()}.
1101 static MeasureUnit
getMonthPerson();
1102 #endif /* U_HIDE_DRAFT_API */
1105 * Returns by pointer, unit of duration: nanosecond.
1106 * Caller owns returned value and must free it.
1107 * Also see {@link #getNanosecond()}.
1108 * @param status ICU error code.
1111 static MeasureUnit
*createNanosecond(UErrorCode
&status
);
1113 #ifndef U_HIDE_DRAFT_API
1115 * Returns by value, unit of duration: nanosecond.
1116 * Also see {@link #createNanosecond()}.
1119 static MeasureUnit
getNanosecond();
1120 #endif /* U_HIDE_DRAFT_API */
1123 * Returns by pointer, unit of duration: second.
1124 * Caller owns returned value and must free it.
1125 * Also see {@link #getSecond()}.
1126 * @param status ICU error code.
1129 static MeasureUnit
*createSecond(UErrorCode
&status
);
1131 #ifndef U_HIDE_DRAFT_API
1133 * Returns by value, unit of duration: second.
1134 * Also see {@link #createSecond()}.
1137 static MeasureUnit
getSecond();
1138 #endif /* U_HIDE_DRAFT_API */
1141 * Returns by pointer, unit of duration: week.
1142 * Caller owns returned value and must free it.
1143 * Also see {@link #getWeek()}.
1144 * @param status ICU error code.
1147 static MeasureUnit
*createWeek(UErrorCode
&status
);
1149 #ifndef U_HIDE_DRAFT_API
1151 * Returns by value, unit of duration: week.
1152 * Also see {@link #createWeek()}.
1155 static MeasureUnit
getWeek();
1156 #endif /* U_HIDE_DRAFT_API */
1158 #ifndef U_HIDE_DRAFT_API
1160 * Returns by pointer, unit of duration: week-person.
1161 * Caller owns returned value and must free it.
1162 * Also see {@link #getWeekPerson()}.
1163 * @param status ICU error code.
1166 static MeasureUnit
*createWeekPerson(UErrorCode
&status
);
1167 #endif /* U_HIDE_DRAFT_API */
1169 #ifndef U_HIDE_DRAFT_API
1171 * Returns by value, unit of duration: week-person.
1172 * Also see {@link #createWeekPerson()}.
1175 static MeasureUnit
getWeekPerson();
1176 #endif /* U_HIDE_DRAFT_API */
1179 * Returns by pointer, unit of duration: year.
1180 * Caller owns returned value and must free it.
1181 * Also see {@link #getYear()}.
1182 * @param status ICU error code.
1185 static MeasureUnit
*createYear(UErrorCode
&status
);
1187 #ifndef U_HIDE_DRAFT_API
1189 * Returns by value, unit of duration: year.
1190 * Also see {@link #createYear()}.
1193 static MeasureUnit
getYear();
1194 #endif /* U_HIDE_DRAFT_API */
1196 #ifndef U_HIDE_DRAFT_API
1198 * Returns by pointer, unit of duration: year-person.
1199 * Caller owns returned value and must free it.
1200 * Also see {@link #getYearPerson()}.
1201 * @param status ICU error code.
1204 static MeasureUnit
*createYearPerson(UErrorCode
&status
);
1205 #endif /* U_HIDE_DRAFT_API */
1207 #ifndef U_HIDE_DRAFT_API
1209 * Returns by value, unit of duration: year-person.
1210 * Also see {@link #createYearPerson()}.
1213 static MeasureUnit
getYearPerson();
1214 #endif /* U_HIDE_DRAFT_API */
1217 * Returns by pointer, unit of electric: ampere.
1218 * Caller owns returned value and must free it.
1219 * Also see {@link #getAmpere()}.
1220 * @param status ICU error code.
1223 static MeasureUnit
*createAmpere(UErrorCode
&status
);
1225 #ifndef U_HIDE_DRAFT_API
1227 * Returns by value, unit of electric: ampere.
1228 * Also see {@link #createAmpere()}.
1231 static MeasureUnit
getAmpere();
1232 #endif /* U_HIDE_DRAFT_API */
1235 * Returns by pointer, unit of electric: milliampere.
1236 * Caller owns returned value and must free it.
1237 * Also see {@link #getMilliampere()}.
1238 * @param status ICU error code.
1241 static MeasureUnit
*createMilliampere(UErrorCode
&status
);
1243 #ifndef U_HIDE_DRAFT_API
1245 * Returns by value, unit of electric: milliampere.
1246 * Also see {@link #createMilliampere()}.
1249 static MeasureUnit
getMilliampere();
1250 #endif /* U_HIDE_DRAFT_API */
1253 * Returns by pointer, unit of electric: ohm.
1254 * Caller owns returned value and must free it.
1255 * Also see {@link #getOhm()}.
1256 * @param status ICU error code.
1259 static MeasureUnit
*createOhm(UErrorCode
&status
);
1261 #ifndef U_HIDE_DRAFT_API
1263 * Returns by value, unit of electric: ohm.
1264 * Also see {@link #createOhm()}.
1267 static MeasureUnit
getOhm();
1268 #endif /* U_HIDE_DRAFT_API */
1271 * Returns by pointer, unit of electric: volt.
1272 * Caller owns returned value and must free it.
1273 * Also see {@link #getVolt()}.
1274 * @param status ICU error code.
1277 static MeasureUnit
*createVolt(UErrorCode
&status
);
1279 #ifndef U_HIDE_DRAFT_API
1281 * Returns by value, unit of electric: volt.
1282 * Also see {@link #createVolt()}.
1285 static MeasureUnit
getVolt();
1286 #endif /* U_HIDE_DRAFT_API */
1288 #ifndef U_HIDE_DRAFT_API
1290 * Returns by pointer, unit of energy: british-thermal-unit.
1291 * Caller owns returned value and must free it.
1292 * Also see {@link #getBritishThermalUnit()}.
1293 * @param status ICU error code.
1296 static MeasureUnit
*createBritishThermalUnit(UErrorCode
&status
);
1299 * Returns by value, unit of energy: british-thermal-unit.
1300 * Also see {@link #createBritishThermalUnit()}.
1303 static MeasureUnit
getBritishThermalUnit();
1304 #endif /* U_HIDE_DRAFT_API */
1307 * Returns by pointer, unit of energy: calorie.
1308 * Caller owns returned value and must free it.
1309 * Also see {@link #getCalorie()}.
1310 * @param status ICU error code.
1313 static MeasureUnit
*createCalorie(UErrorCode
&status
);
1315 #ifndef U_HIDE_DRAFT_API
1317 * Returns by value, unit of energy: calorie.
1318 * Also see {@link #createCalorie()}.
1321 static MeasureUnit
getCalorie();
1322 #endif /* U_HIDE_DRAFT_API */
1324 #ifndef U_HIDE_DRAFT_API
1326 * Returns by pointer, unit of energy: electronvolt.
1327 * Caller owns returned value and must free it.
1328 * Also see {@link #getElectronvolt()}.
1329 * @param status ICU error code.
1332 static MeasureUnit
*createElectronvolt(UErrorCode
&status
);
1335 * Returns by value, unit of energy: electronvolt.
1336 * Also see {@link #createElectronvolt()}.
1339 static MeasureUnit
getElectronvolt();
1340 #endif /* U_HIDE_DRAFT_API */
1343 * Returns by pointer, unit of energy: foodcalorie.
1344 * Caller owns returned value and must free it.
1345 * Also see {@link #getFoodcalorie()}.
1346 * @param status ICU error code.
1349 static MeasureUnit
*createFoodcalorie(UErrorCode
&status
);
1351 #ifndef U_HIDE_DRAFT_API
1353 * Returns by value, unit of energy: foodcalorie.
1354 * Also see {@link #createFoodcalorie()}.
1357 static MeasureUnit
getFoodcalorie();
1358 #endif /* U_HIDE_DRAFT_API */
1361 * Returns by pointer, unit of energy: joule.
1362 * Caller owns returned value and must free it.
1363 * Also see {@link #getJoule()}.
1364 * @param status ICU error code.
1367 static MeasureUnit
*createJoule(UErrorCode
&status
);
1369 #ifndef U_HIDE_DRAFT_API
1371 * Returns by value, unit of energy: joule.
1372 * Also see {@link #createJoule()}.
1375 static MeasureUnit
getJoule();
1376 #endif /* U_HIDE_DRAFT_API */
1379 * Returns by pointer, unit of energy: kilocalorie.
1380 * Caller owns returned value and must free it.
1381 * Also see {@link #getKilocalorie()}.
1382 * @param status ICU error code.
1385 static MeasureUnit
*createKilocalorie(UErrorCode
&status
);
1387 #ifndef U_HIDE_DRAFT_API
1389 * Returns by value, unit of energy: kilocalorie.
1390 * Also see {@link #createKilocalorie()}.
1393 static MeasureUnit
getKilocalorie();
1394 #endif /* U_HIDE_DRAFT_API */
1397 * Returns by pointer, unit of energy: kilojoule.
1398 * Caller owns returned value and must free it.
1399 * Also see {@link #getKilojoule()}.
1400 * @param status ICU error code.
1403 static MeasureUnit
*createKilojoule(UErrorCode
&status
);
1405 #ifndef U_HIDE_DRAFT_API
1407 * Returns by value, unit of energy: kilojoule.
1408 * Also see {@link #createKilojoule()}.
1411 static MeasureUnit
getKilojoule();
1412 #endif /* U_HIDE_DRAFT_API */
1415 * Returns by pointer, unit of energy: kilowatt-hour.
1416 * Caller owns returned value and must free it.
1417 * Also see {@link #getKilowattHour()}.
1418 * @param status ICU error code.
1421 static MeasureUnit
*createKilowattHour(UErrorCode
&status
);
1423 #ifndef U_HIDE_DRAFT_API
1425 * Returns by value, unit of energy: kilowatt-hour.
1426 * Also see {@link #createKilowattHour()}.
1429 static MeasureUnit
getKilowattHour();
1430 #endif /* U_HIDE_DRAFT_API */
1432 #ifndef U_HIDE_DRAFT_API
1434 * Returns by pointer, unit of force: newton.
1435 * Caller owns returned value and must free it.
1436 * Also see {@link #getNewton()}.
1437 * @param status ICU error code.
1440 static MeasureUnit
*createNewton(UErrorCode
&status
);
1443 * Returns by value, unit of force: newton.
1444 * Also see {@link #createNewton()}.
1447 static MeasureUnit
getNewton();
1448 #endif /* U_HIDE_DRAFT_API */
1450 #ifndef U_HIDE_DRAFT_API
1452 * Returns by pointer, unit of force: pound-force.
1453 * Caller owns returned value and must free it.
1454 * Also see {@link #getPoundForce()}.
1455 * @param status ICU error code.
1458 static MeasureUnit
*createPoundForce(UErrorCode
&status
);
1461 * Returns by value, unit of force: pound-force.
1462 * Also see {@link #createPoundForce()}.
1465 static MeasureUnit
getPoundForce();
1466 #endif /* U_HIDE_DRAFT_API */
1469 * Returns by pointer, unit of frequency: gigahertz.
1470 * Caller owns returned value and must free it.
1471 * Also see {@link #getGigahertz()}.
1472 * @param status ICU error code.
1475 static MeasureUnit
*createGigahertz(UErrorCode
&status
);
1477 #ifndef U_HIDE_DRAFT_API
1479 * Returns by value, unit of frequency: gigahertz.
1480 * Also see {@link #createGigahertz()}.
1483 static MeasureUnit
getGigahertz();
1484 #endif /* U_HIDE_DRAFT_API */
1487 * Returns by pointer, unit of frequency: hertz.
1488 * Caller owns returned value and must free it.
1489 * Also see {@link #getHertz()}.
1490 * @param status ICU error code.
1493 static MeasureUnit
*createHertz(UErrorCode
&status
);
1495 #ifndef U_HIDE_DRAFT_API
1497 * Returns by value, unit of frequency: hertz.
1498 * Also see {@link #createHertz()}.
1501 static MeasureUnit
getHertz();
1502 #endif /* U_HIDE_DRAFT_API */
1505 * Returns by pointer, unit of frequency: kilohertz.
1506 * Caller owns returned value and must free it.
1507 * Also see {@link #getKilohertz()}.
1508 * @param status ICU error code.
1511 static MeasureUnit
*createKilohertz(UErrorCode
&status
);
1513 #ifndef U_HIDE_DRAFT_API
1515 * Returns by value, unit of frequency: kilohertz.
1516 * Also see {@link #createKilohertz()}.
1519 static MeasureUnit
getKilohertz();
1520 #endif /* U_HIDE_DRAFT_API */
1523 * Returns by pointer, unit of frequency: megahertz.
1524 * Caller owns returned value and must free it.
1525 * Also see {@link #getMegahertz()}.
1526 * @param status ICU error code.
1529 static MeasureUnit
*createMegahertz(UErrorCode
&status
);
1531 #ifndef U_HIDE_DRAFT_API
1533 * Returns by value, unit of frequency: megahertz.
1534 * Also see {@link #createMegahertz()}.
1537 static MeasureUnit
getMegahertz();
1538 #endif /* U_HIDE_DRAFT_API */
1541 * Returns by pointer, unit of length: astronomical-unit.
1542 * Caller owns returned value and must free it.
1543 * Also see {@link #getAstronomicalUnit()}.
1544 * @param status ICU error code.
1547 static MeasureUnit
*createAstronomicalUnit(UErrorCode
&status
);
1549 #ifndef U_HIDE_DRAFT_API
1551 * Returns by value, unit of length: astronomical-unit.
1552 * Also see {@link #createAstronomicalUnit()}.
1555 static MeasureUnit
getAstronomicalUnit();
1556 #endif /* U_HIDE_DRAFT_API */
1559 * Returns by pointer, unit of length: centimeter.
1560 * Caller owns returned value and must free it.
1561 * Also see {@link #getCentimeter()}.
1562 * @param status ICU error code.
1565 static MeasureUnit
*createCentimeter(UErrorCode
&status
);
1567 #ifndef U_HIDE_DRAFT_API
1569 * Returns by value, unit of length: centimeter.
1570 * Also see {@link #createCentimeter()}.
1573 static MeasureUnit
getCentimeter();
1574 #endif /* U_HIDE_DRAFT_API */
1577 * Returns by pointer, unit of length: decimeter.
1578 * Caller owns returned value and must free it.
1579 * Also see {@link #getDecimeter()}.
1580 * @param status ICU error code.
1583 static MeasureUnit
*createDecimeter(UErrorCode
&status
);
1585 #ifndef U_HIDE_DRAFT_API
1587 * Returns by value, unit of length: decimeter.
1588 * Also see {@link #createDecimeter()}.
1591 static MeasureUnit
getDecimeter();
1592 #endif /* U_HIDE_DRAFT_API */
1595 * Returns by pointer, unit of length: fathom.
1596 * Caller owns returned value and must free it.
1597 * Also see {@link #getFathom()}.
1598 * @param status ICU error code.
1601 static MeasureUnit
*createFathom(UErrorCode
&status
);
1603 #ifndef U_HIDE_DRAFT_API
1605 * Returns by value, unit of length: fathom.
1606 * Also see {@link #createFathom()}.
1609 static MeasureUnit
getFathom();
1610 #endif /* U_HIDE_DRAFT_API */
1613 * Returns by pointer, unit of length: foot.
1614 * Caller owns returned value and must free it.
1615 * Also see {@link #getFoot()}.
1616 * @param status ICU error code.
1619 static MeasureUnit
*createFoot(UErrorCode
&status
);
1621 #ifndef U_HIDE_DRAFT_API
1623 * Returns by value, unit of length: foot.
1624 * Also see {@link #createFoot()}.
1627 static MeasureUnit
getFoot();
1628 #endif /* U_HIDE_DRAFT_API */
1631 * Returns by pointer, unit of length: furlong.
1632 * Caller owns returned value and must free it.
1633 * Also see {@link #getFurlong()}.
1634 * @param status ICU error code.
1637 static MeasureUnit
*createFurlong(UErrorCode
&status
);
1639 #ifndef U_HIDE_DRAFT_API
1641 * Returns by value, unit of length: furlong.
1642 * Also see {@link #createFurlong()}.
1645 static MeasureUnit
getFurlong();
1646 #endif /* U_HIDE_DRAFT_API */
1649 * Returns by pointer, unit of length: inch.
1650 * Caller owns returned value and must free it.
1651 * Also see {@link #getInch()}.
1652 * @param status ICU error code.
1655 static MeasureUnit
*createInch(UErrorCode
&status
);
1657 #ifndef U_HIDE_DRAFT_API
1659 * Returns by value, unit of length: inch.
1660 * Also see {@link #createInch()}.
1663 static MeasureUnit
getInch();
1664 #endif /* U_HIDE_DRAFT_API */
1667 * Returns by pointer, unit of length: kilometer.
1668 * Caller owns returned value and must free it.
1669 * Also see {@link #getKilometer()}.
1670 * @param status ICU error code.
1673 static MeasureUnit
*createKilometer(UErrorCode
&status
);
1675 #ifndef U_HIDE_DRAFT_API
1677 * Returns by value, unit of length: kilometer.
1678 * Also see {@link #createKilometer()}.
1681 static MeasureUnit
getKilometer();
1682 #endif /* U_HIDE_DRAFT_API */
1685 * Returns by pointer, unit of length: light-year.
1686 * Caller owns returned value and must free it.
1687 * Also see {@link #getLightYear()}.
1688 * @param status ICU error code.
1691 static MeasureUnit
*createLightYear(UErrorCode
&status
);
1693 #ifndef U_HIDE_DRAFT_API
1695 * Returns by value, unit of length: light-year.
1696 * Also see {@link #createLightYear()}.
1699 static MeasureUnit
getLightYear();
1700 #endif /* U_HIDE_DRAFT_API */
1703 * Returns by pointer, unit of length: meter.
1704 * Caller owns returned value and must free it.
1705 * Also see {@link #getMeter()}.
1706 * @param status ICU error code.
1709 static MeasureUnit
*createMeter(UErrorCode
&status
);
1711 #ifndef U_HIDE_DRAFT_API
1713 * Returns by value, unit of length: meter.
1714 * Also see {@link #createMeter()}.
1717 static MeasureUnit
getMeter();
1718 #endif /* U_HIDE_DRAFT_API */
1721 * Returns by pointer, unit of length: micrometer.
1722 * Caller owns returned value and must free it.
1723 * Also see {@link #getMicrometer()}.
1724 * @param status ICU error code.
1727 static MeasureUnit
*createMicrometer(UErrorCode
&status
);
1729 #ifndef U_HIDE_DRAFT_API
1731 * Returns by value, unit of length: micrometer.
1732 * Also see {@link #createMicrometer()}.
1735 static MeasureUnit
getMicrometer();
1736 #endif /* U_HIDE_DRAFT_API */
1739 * Returns by pointer, unit of length: mile.
1740 * Caller owns returned value and must free it.
1741 * Also see {@link #getMile()}.
1742 * @param status ICU error code.
1745 static MeasureUnit
*createMile(UErrorCode
&status
);
1747 #ifndef U_HIDE_DRAFT_API
1749 * Returns by value, unit of length: mile.
1750 * Also see {@link #createMile()}.
1753 static MeasureUnit
getMile();
1754 #endif /* U_HIDE_DRAFT_API */
1757 * Returns by pointer, unit of length: mile-scandinavian.
1758 * Caller owns returned value and must free it.
1759 * Also see {@link #getMileScandinavian()}.
1760 * @param status ICU error code.
1763 static MeasureUnit
*createMileScandinavian(UErrorCode
&status
);
1765 #ifndef U_HIDE_DRAFT_API
1767 * Returns by value, unit of length: mile-scandinavian.
1768 * Also see {@link #createMileScandinavian()}.
1771 static MeasureUnit
getMileScandinavian();
1772 #endif /* U_HIDE_DRAFT_API */
1775 * Returns by pointer, unit of length: millimeter.
1776 * Caller owns returned value and must free it.
1777 * Also see {@link #getMillimeter()}.
1778 * @param status ICU error code.
1781 static MeasureUnit
*createMillimeter(UErrorCode
&status
);
1783 #ifndef U_HIDE_DRAFT_API
1785 * Returns by value, unit of length: millimeter.
1786 * Also see {@link #createMillimeter()}.
1789 static MeasureUnit
getMillimeter();
1790 #endif /* U_HIDE_DRAFT_API */
1793 * Returns by pointer, unit of length: nanometer.
1794 * Caller owns returned value and must free it.
1795 * Also see {@link #getNanometer()}.
1796 * @param status ICU error code.
1799 static MeasureUnit
*createNanometer(UErrorCode
&status
);
1801 #ifndef U_HIDE_DRAFT_API
1803 * Returns by value, unit of length: nanometer.
1804 * Also see {@link #createNanometer()}.
1807 static MeasureUnit
getNanometer();
1808 #endif /* U_HIDE_DRAFT_API */
1811 * Returns by pointer, unit of length: nautical-mile.
1812 * Caller owns returned value and must free it.
1813 * Also see {@link #getNauticalMile()}.
1814 * @param status ICU error code.
1817 static MeasureUnit
*createNauticalMile(UErrorCode
&status
);
1819 #ifndef U_HIDE_DRAFT_API
1821 * Returns by value, unit of length: nautical-mile.
1822 * Also see {@link #createNauticalMile()}.
1825 static MeasureUnit
getNauticalMile();
1826 #endif /* U_HIDE_DRAFT_API */
1829 * Returns by pointer, unit of length: parsec.
1830 * Caller owns returned value and must free it.
1831 * Also see {@link #getParsec()}.
1832 * @param status ICU error code.
1835 static MeasureUnit
*createParsec(UErrorCode
&status
);
1837 #ifndef U_HIDE_DRAFT_API
1839 * Returns by value, unit of length: parsec.
1840 * Also see {@link #createParsec()}.
1843 static MeasureUnit
getParsec();
1844 #endif /* U_HIDE_DRAFT_API */
1847 * Returns by pointer, unit of length: picometer.
1848 * Caller owns returned value and must free it.
1849 * Also see {@link #getPicometer()}.
1850 * @param status ICU error code.
1853 static MeasureUnit
*createPicometer(UErrorCode
&status
);
1855 #ifndef U_HIDE_DRAFT_API
1857 * Returns by value, unit of length: picometer.
1858 * Also see {@link #createPicometer()}.
1861 static MeasureUnit
getPicometer();
1862 #endif /* U_HIDE_DRAFT_API */
1865 * Returns by pointer, unit of length: point.
1866 * Caller owns returned value and must free it.
1867 * Also see {@link #getPoint()}.
1868 * @param status ICU error code.
1871 static MeasureUnit
*createPoint(UErrorCode
&status
);
1873 #ifndef U_HIDE_DRAFT_API
1875 * Returns by value, unit of length: point.
1876 * Also see {@link #createPoint()}.
1879 static MeasureUnit
getPoint();
1880 #endif /* U_HIDE_DRAFT_API */
1882 #ifndef U_HIDE_DRAFT_API
1884 * Returns by pointer, unit of length: solar-radius.
1885 * Caller owns returned value and must free it.
1886 * Also see {@link #getSolarRadius()}.
1887 * @param status ICU error code.
1890 static MeasureUnit
*createSolarRadius(UErrorCode
&status
);
1893 * Returns by value, unit of length: solar-radius.
1894 * Also see {@link #createSolarRadius()}.
1897 static MeasureUnit
getSolarRadius();
1898 #endif /* U_HIDE_DRAFT_API */
1901 * Returns by pointer, unit of length: yard.
1902 * Caller owns returned value and must free it.
1903 * Also see {@link #getYard()}.
1904 * @param status ICU error code.
1907 static MeasureUnit
*createYard(UErrorCode
&status
);
1909 #ifndef U_HIDE_DRAFT_API
1911 * Returns by value, unit of length: yard.
1912 * Also see {@link #createYard()}.
1915 static MeasureUnit
getYard();
1916 #endif /* U_HIDE_DRAFT_API */
1919 * Returns by pointer, unit of light: lux.
1920 * Caller owns returned value and must free it.
1921 * Also see {@link #getLux()}.
1922 * @param status ICU error code.
1925 static MeasureUnit
*createLux(UErrorCode
&status
);
1927 #ifndef U_HIDE_DRAFT_API
1929 * Returns by value, unit of light: lux.
1930 * Also see {@link #createLux()}.
1933 static MeasureUnit
getLux();
1934 #endif /* U_HIDE_DRAFT_API */
1936 #ifndef U_HIDE_DRAFT_API
1938 * Returns by pointer, unit of light: solar-luminosity.
1939 * Caller owns returned value and must free it.
1940 * Also see {@link #getSolarLuminosity()}.
1941 * @param status ICU error code.
1944 static MeasureUnit
*createSolarLuminosity(UErrorCode
&status
);
1947 * Returns by value, unit of light: solar-luminosity.
1948 * Also see {@link #createSolarLuminosity()}.
1951 static MeasureUnit
getSolarLuminosity();
1952 #endif /* U_HIDE_DRAFT_API */
1955 * Returns by pointer, unit of mass: carat.
1956 * Caller owns returned value and must free it.
1957 * Also see {@link #getCarat()}.
1958 * @param status ICU error code.
1961 static MeasureUnit
*createCarat(UErrorCode
&status
);
1963 #ifndef U_HIDE_DRAFT_API
1965 * Returns by value, unit of mass: carat.
1966 * Also see {@link #createCarat()}.
1969 static MeasureUnit
getCarat();
1970 #endif /* U_HIDE_DRAFT_API */
1972 #ifndef U_HIDE_DRAFT_API
1974 * Returns by pointer, unit of mass: dalton.
1975 * Caller owns returned value and must free it.
1976 * Also see {@link #getDalton()}.
1977 * @param status ICU error code.
1980 static MeasureUnit
*createDalton(UErrorCode
&status
);
1983 * Returns by value, unit of mass: dalton.
1984 * Also see {@link #createDalton()}.
1987 static MeasureUnit
getDalton();
1988 #endif /* U_HIDE_DRAFT_API */
1990 #ifndef U_HIDE_DRAFT_API
1992 * Returns by pointer, unit of mass: earth-mass.
1993 * Caller owns returned value and must free it.
1994 * Also see {@link #getEarthMass()}.
1995 * @param status ICU error code.
1998 static MeasureUnit
*createEarthMass(UErrorCode
&status
);
2001 * Returns by value, unit of mass: earth-mass.
2002 * Also see {@link #createEarthMass()}.
2005 static MeasureUnit
getEarthMass();
2006 #endif /* U_HIDE_DRAFT_API */
2009 * Returns by pointer, unit of mass: gram.
2010 * Caller owns returned value and must free it.
2011 * Also see {@link #getGram()}.
2012 * @param status ICU error code.
2015 static MeasureUnit
*createGram(UErrorCode
&status
);
2017 #ifndef U_HIDE_DRAFT_API
2019 * Returns by value, unit of mass: gram.
2020 * Also see {@link #createGram()}.
2023 static MeasureUnit
getGram();
2024 #endif /* U_HIDE_DRAFT_API */
2027 * Returns by pointer, unit of mass: kilogram.
2028 * Caller owns returned value and must free it.
2029 * Also see {@link #getKilogram()}.
2030 * @param status ICU error code.
2033 static MeasureUnit
*createKilogram(UErrorCode
&status
);
2035 #ifndef U_HIDE_DRAFT_API
2037 * Returns by value, unit of mass: kilogram.
2038 * Also see {@link #createKilogram()}.
2041 static MeasureUnit
getKilogram();
2042 #endif /* U_HIDE_DRAFT_API */
2045 * Returns by pointer, unit of mass: metric-ton.
2046 * Caller owns returned value and must free it.
2047 * Also see {@link #getMetricTon()}.
2048 * @param status ICU error code.
2051 static MeasureUnit
*createMetricTon(UErrorCode
&status
);
2053 #ifndef U_HIDE_DRAFT_API
2055 * Returns by value, unit of mass: metric-ton.
2056 * Also see {@link #createMetricTon()}.
2059 static MeasureUnit
getMetricTon();
2060 #endif /* U_HIDE_DRAFT_API */
2063 * Returns by pointer, unit of mass: microgram.
2064 * Caller owns returned value and must free it.
2065 * Also see {@link #getMicrogram()}.
2066 * @param status ICU error code.
2069 static MeasureUnit
*createMicrogram(UErrorCode
&status
);
2071 #ifndef U_HIDE_DRAFT_API
2073 * Returns by value, unit of mass: microgram.
2074 * Also see {@link #createMicrogram()}.
2077 static MeasureUnit
getMicrogram();
2078 #endif /* U_HIDE_DRAFT_API */
2081 * Returns by pointer, unit of mass: milligram.
2082 * Caller owns returned value and must free it.
2083 * Also see {@link #getMilligram()}.
2084 * @param status ICU error code.
2087 static MeasureUnit
*createMilligram(UErrorCode
&status
);
2089 #ifndef U_HIDE_DRAFT_API
2091 * Returns by value, unit of mass: milligram.
2092 * Also see {@link #createMilligram()}.
2095 static MeasureUnit
getMilligram();
2096 #endif /* U_HIDE_DRAFT_API */
2099 * Returns by pointer, unit of mass: ounce.
2100 * Caller owns returned value and must free it.
2101 * Also see {@link #getOunce()}.
2102 * @param status ICU error code.
2105 static MeasureUnit
*createOunce(UErrorCode
&status
);
2107 #ifndef U_HIDE_DRAFT_API
2109 * Returns by value, unit of mass: ounce.
2110 * Also see {@link #createOunce()}.
2113 static MeasureUnit
getOunce();
2114 #endif /* U_HIDE_DRAFT_API */
2117 * Returns by pointer, unit of mass: ounce-troy.
2118 * Caller owns returned value and must free it.
2119 * Also see {@link #getOunceTroy()}.
2120 * @param status ICU error code.
2123 static MeasureUnit
*createOunceTroy(UErrorCode
&status
);
2125 #ifndef U_HIDE_DRAFT_API
2127 * Returns by value, unit of mass: ounce-troy.
2128 * Also see {@link #createOunceTroy()}.
2131 static MeasureUnit
getOunceTroy();
2132 #endif /* U_HIDE_DRAFT_API */
2135 * Returns by pointer, unit of mass: pound.
2136 * Caller owns returned value and must free it.
2137 * Also see {@link #getPound()}.
2138 * @param status ICU error code.
2141 static MeasureUnit
*createPound(UErrorCode
&status
);
2143 #ifndef U_HIDE_DRAFT_API
2145 * Returns by value, unit of mass: pound.
2146 * Also see {@link #createPound()}.
2149 static MeasureUnit
getPound();
2150 #endif /* U_HIDE_DRAFT_API */
2152 #ifndef U_HIDE_DRAFT_API
2154 * Returns by pointer, unit of mass: solar-mass.
2155 * Caller owns returned value and must free it.
2156 * Also see {@link #getSolarMass()}.
2157 * @param status ICU error code.
2160 static MeasureUnit
*createSolarMass(UErrorCode
&status
);
2163 * Returns by value, unit of mass: solar-mass.
2164 * Also see {@link #createSolarMass()}.
2167 static MeasureUnit
getSolarMass();
2168 #endif /* U_HIDE_DRAFT_API */
2171 * Returns by pointer, unit of mass: stone.
2172 * Caller owns returned value and must free it.
2173 * Also see {@link #getStone()}.
2174 * @param status ICU error code.
2177 static MeasureUnit
*createStone(UErrorCode
&status
);
2179 #ifndef U_HIDE_DRAFT_API
2181 * Returns by value, unit of mass: stone.
2182 * Also see {@link #createStone()}.
2185 static MeasureUnit
getStone();
2186 #endif /* U_HIDE_DRAFT_API */
2189 * Returns by pointer, unit of mass: ton.
2190 * Caller owns returned value and must free it.
2191 * Also see {@link #getTon()}.
2192 * @param status ICU error code.
2195 static MeasureUnit
*createTon(UErrorCode
&status
);
2197 #ifndef U_HIDE_DRAFT_API
2199 * Returns by value, unit of mass: ton.
2200 * Also see {@link #createTon()}.
2203 static MeasureUnit
getTon();
2204 #endif /* U_HIDE_DRAFT_API */
2207 * Returns by pointer, unit of power: gigawatt.
2208 * Caller owns returned value and must free it.
2209 * Also see {@link #getGigawatt()}.
2210 * @param status ICU error code.
2213 static MeasureUnit
*createGigawatt(UErrorCode
&status
);
2215 #ifndef U_HIDE_DRAFT_API
2217 * Returns by value, unit of power: gigawatt.
2218 * Also see {@link #createGigawatt()}.
2221 static MeasureUnit
getGigawatt();
2222 #endif /* U_HIDE_DRAFT_API */
2225 * Returns by pointer, unit of power: horsepower.
2226 * Caller owns returned value and must free it.
2227 * Also see {@link #getHorsepower()}.
2228 * @param status ICU error code.
2231 static MeasureUnit
*createHorsepower(UErrorCode
&status
);
2233 #ifndef U_HIDE_DRAFT_API
2235 * Returns by value, unit of power: horsepower.
2236 * Also see {@link #createHorsepower()}.
2239 static MeasureUnit
getHorsepower();
2240 #endif /* U_HIDE_DRAFT_API */
2243 * Returns by pointer, unit of power: kilowatt.
2244 * Caller owns returned value and must free it.
2245 * Also see {@link #getKilowatt()}.
2246 * @param status ICU error code.
2249 static MeasureUnit
*createKilowatt(UErrorCode
&status
);
2251 #ifndef U_HIDE_DRAFT_API
2253 * Returns by value, unit of power: kilowatt.
2254 * Also see {@link #createKilowatt()}.
2257 static MeasureUnit
getKilowatt();
2258 #endif /* U_HIDE_DRAFT_API */
2261 * Returns by pointer, unit of power: megawatt.
2262 * Caller owns returned value and must free it.
2263 * Also see {@link #getMegawatt()}.
2264 * @param status ICU error code.
2267 static MeasureUnit
*createMegawatt(UErrorCode
&status
);
2269 #ifndef U_HIDE_DRAFT_API
2271 * Returns by value, unit of power: megawatt.
2272 * Also see {@link #createMegawatt()}.
2275 static MeasureUnit
getMegawatt();
2276 #endif /* U_HIDE_DRAFT_API */
2279 * Returns by pointer, unit of power: milliwatt.
2280 * Caller owns returned value and must free it.
2281 * Also see {@link #getMilliwatt()}.
2282 * @param status ICU error code.
2285 static MeasureUnit
*createMilliwatt(UErrorCode
&status
);
2287 #ifndef U_HIDE_DRAFT_API
2289 * Returns by value, unit of power: milliwatt.
2290 * Also see {@link #createMilliwatt()}.
2293 static MeasureUnit
getMilliwatt();
2294 #endif /* U_HIDE_DRAFT_API */
2297 * Returns by pointer, unit of power: watt.
2298 * Caller owns returned value and must free it.
2299 * Also see {@link #getWatt()}.
2300 * @param status ICU error code.
2303 static MeasureUnit
*createWatt(UErrorCode
&status
);
2305 #ifndef U_HIDE_DRAFT_API
2307 * Returns by value, unit of power: watt.
2308 * Also see {@link #createWatt()}.
2311 static MeasureUnit
getWatt();
2312 #endif /* U_HIDE_DRAFT_API */
2314 #ifndef U_HIDE_DRAFT_API
2316 * Returns by pointer, unit of pressure: atmosphere.
2317 * Caller owns returned value and must free it.
2318 * Also see {@link #getAtmosphere()}.
2319 * @param status ICU error code.
2322 static MeasureUnit
*createAtmosphere(UErrorCode
&status
);
2323 #endif /* U_HIDE_DRAFT_API */
2325 #ifndef U_HIDE_DRAFT_API
2327 * Returns by value, unit of pressure: atmosphere.
2328 * Also see {@link #createAtmosphere()}.
2331 static MeasureUnit
getAtmosphere();
2332 #endif /* U_HIDE_DRAFT_API */
2335 * Returns by pointer, unit of pressure: hectopascal.
2336 * Caller owns returned value and must free it.
2337 * Also see {@link #getHectopascal()}.
2338 * @param status ICU error code.
2341 static MeasureUnit
*createHectopascal(UErrorCode
&status
);
2343 #ifndef U_HIDE_DRAFT_API
2345 * Returns by value, unit of pressure: hectopascal.
2346 * Also see {@link #createHectopascal()}.
2349 static MeasureUnit
getHectopascal();
2350 #endif /* U_HIDE_DRAFT_API */
2353 * Returns by pointer, unit of pressure: inch-hg.
2354 * Caller owns returned value and must free it.
2355 * Also see {@link #getInchHg()}.
2356 * @param status ICU error code.
2359 static MeasureUnit
*createInchHg(UErrorCode
&status
);
2361 #ifndef U_HIDE_DRAFT_API
2363 * Returns by value, unit of pressure: inch-hg.
2364 * Also see {@link #createInchHg()}.
2367 static MeasureUnit
getInchHg();
2368 #endif /* U_HIDE_DRAFT_API */
2370 #ifndef U_HIDE_DRAFT_API
2372 * Returns by pointer, unit of pressure: kilopascal.
2373 * Caller owns returned value and must free it.
2374 * Also see {@link #getKilopascal()}.
2375 * @param status ICU error code.
2378 static MeasureUnit
*createKilopascal(UErrorCode
&status
);
2381 * Returns by value, unit of pressure: kilopascal.
2382 * Also see {@link #createKilopascal()}.
2385 static MeasureUnit
getKilopascal();
2386 #endif /* U_HIDE_DRAFT_API */
2388 #ifndef U_HIDE_DRAFT_API
2390 * Returns by pointer, unit of pressure: megapascal.
2391 * Caller owns returned value and must free it.
2392 * Also see {@link #getMegapascal()}.
2393 * @param status ICU error code.
2396 static MeasureUnit
*createMegapascal(UErrorCode
&status
);
2399 * Returns by value, unit of pressure: megapascal.
2400 * Also see {@link #createMegapascal()}.
2403 static MeasureUnit
getMegapascal();
2404 #endif /* U_HIDE_DRAFT_API */
2407 * Returns by pointer, unit of pressure: millibar.
2408 * Caller owns returned value and must free it.
2409 * Also see {@link #getMillibar()}.
2410 * @param status ICU error code.
2413 static MeasureUnit
*createMillibar(UErrorCode
&status
);
2415 #ifndef U_HIDE_DRAFT_API
2417 * Returns by value, unit of pressure: millibar.
2418 * Also see {@link #createMillibar()}.
2421 static MeasureUnit
getMillibar();
2422 #endif /* U_HIDE_DRAFT_API */
2425 * Returns by pointer, unit of pressure: millimeter-of-mercury.
2426 * Caller owns returned value and must free it.
2427 * Also see {@link #getMillimeterOfMercury()}.
2428 * @param status ICU error code.
2431 static MeasureUnit
*createMillimeterOfMercury(UErrorCode
&status
);
2433 #ifndef U_HIDE_DRAFT_API
2435 * Returns by value, unit of pressure: millimeter-of-mercury.
2436 * Also see {@link #createMillimeterOfMercury()}.
2439 static MeasureUnit
getMillimeterOfMercury();
2440 #endif /* U_HIDE_DRAFT_API */
2443 * Returns by pointer, unit of pressure: pound-per-square-inch.
2444 * Caller owns returned value and must free it.
2445 * Also see {@link #getPoundPerSquareInch()}.
2446 * @param status ICU error code.
2449 static MeasureUnit
*createPoundPerSquareInch(UErrorCode
&status
);
2451 #ifndef U_HIDE_DRAFT_API
2453 * Returns by value, unit of pressure: pound-per-square-inch.
2454 * Also see {@link #createPoundPerSquareInch()}.
2457 static MeasureUnit
getPoundPerSquareInch();
2458 #endif /* U_HIDE_DRAFT_API */
2461 * Returns by pointer, unit of speed: kilometer-per-hour.
2462 * Caller owns returned value and must free it.
2463 * Also see {@link #getKilometerPerHour()}.
2464 * @param status ICU error code.
2467 static MeasureUnit
*createKilometerPerHour(UErrorCode
&status
);
2469 #ifndef U_HIDE_DRAFT_API
2471 * Returns by value, unit of speed: kilometer-per-hour.
2472 * Also see {@link #createKilometerPerHour()}.
2475 static MeasureUnit
getKilometerPerHour();
2476 #endif /* U_HIDE_DRAFT_API */
2479 * Returns by pointer, unit of speed: knot.
2480 * Caller owns returned value and must free it.
2481 * Also see {@link #getKnot()}.
2482 * @param status ICU error code.
2485 static MeasureUnit
*createKnot(UErrorCode
&status
);
2487 #ifndef U_HIDE_DRAFT_API
2489 * Returns by value, unit of speed: knot.
2490 * Also see {@link #createKnot()}.
2493 static MeasureUnit
getKnot();
2494 #endif /* U_HIDE_DRAFT_API */
2497 * Returns by pointer, unit of speed: meter-per-second.
2498 * Caller owns returned value and must free it.
2499 * Also see {@link #getMeterPerSecond()}.
2500 * @param status ICU error code.
2503 static MeasureUnit
*createMeterPerSecond(UErrorCode
&status
);
2505 #ifndef U_HIDE_DRAFT_API
2507 * Returns by value, unit of speed: meter-per-second.
2508 * Also see {@link #createMeterPerSecond()}.
2511 static MeasureUnit
getMeterPerSecond();
2512 #endif /* U_HIDE_DRAFT_API */
2515 * Returns by pointer, unit of speed: mile-per-hour.
2516 * Caller owns returned value and must free it.
2517 * Also see {@link #getMilePerHour()}.
2518 * @param status ICU error code.
2521 static MeasureUnit
*createMilePerHour(UErrorCode
&status
);
2523 #ifndef U_HIDE_DRAFT_API
2525 * Returns by value, unit of speed: mile-per-hour.
2526 * Also see {@link #createMilePerHour()}.
2529 static MeasureUnit
getMilePerHour();
2530 #endif /* U_HIDE_DRAFT_API */
2533 * Returns by pointer, unit of temperature: celsius.
2534 * Caller owns returned value and must free it.
2535 * Also see {@link #getCelsius()}.
2536 * @param status ICU error code.
2539 static MeasureUnit
*createCelsius(UErrorCode
&status
);
2541 #ifndef U_HIDE_DRAFT_API
2543 * Returns by value, unit of temperature: celsius.
2544 * Also see {@link #createCelsius()}.
2547 static MeasureUnit
getCelsius();
2548 #endif /* U_HIDE_DRAFT_API */
2551 * Returns by pointer, unit of temperature: fahrenheit.
2552 * Caller owns returned value and must free it.
2553 * Also see {@link #getFahrenheit()}.
2554 * @param status ICU error code.
2557 static MeasureUnit
*createFahrenheit(UErrorCode
&status
);
2559 #ifndef U_HIDE_DRAFT_API
2561 * Returns by value, unit of temperature: fahrenheit.
2562 * Also see {@link #createFahrenheit()}.
2565 static MeasureUnit
getFahrenheit();
2566 #endif /* U_HIDE_DRAFT_API */
2569 * Returns by pointer, unit of temperature: generic.
2570 * Caller owns returned value and must free it.
2571 * Also see {@link #getGenericTemperature()}.
2572 * @param status ICU error code.
2575 static MeasureUnit
*createGenericTemperature(UErrorCode
&status
);
2577 #ifndef U_HIDE_DRAFT_API
2579 * Returns by value, unit of temperature: generic.
2580 * Also see {@link #createGenericTemperature()}.
2583 static MeasureUnit
getGenericTemperature();
2584 #endif /* U_HIDE_DRAFT_API */
2587 * Returns by pointer, unit of temperature: kelvin.
2588 * Caller owns returned value and must free it.
2589 * Also see {@link #getKelvin()}.
2590 * @param status ICU error code.
2593 static MeasureUnit
*createKelvin(UErrorCode
&status
);
2595 #ifndef U_HIDE_DRAFT_API
2597 * Returns by value, unit of temperature: kelvin.
2598 * Also see {@link #createKelvin()}.
2601 static MeasureUnit
getKelvin();
2602 #endif /* U_HIDE_DRAFT_API */
2604 #ifndef U_HIDE_DRAFT_API
2606 * Returns by pointer, unit of torque: newton-meter.
2607 * Caller owns returned value and must free it.
2608 * Also see {@link #getNewtonMeter()}.
2609 * @param status ICU error code.
2612 static MeasureUnit
*createNewtonMeter(UErrorCode
&status
);
2615 * Returns by value, unit of torque: newton-meter.
2616 * Also see {@link #createNewtonMeter()}.
2619 static MeasureUnit
getNewtonMeter();
2620 #endif /* U_HIDE_DRAFT_API */
2622 #ifndef U_HIDE_DRAFT_API
2624 * Returns by pointer, unit of torque: pound-foot.
2625 * Caller owns returned value and must free it.
2626 * Also see {@link #getPoundFoot()}.
2627 * @param status ICU error code.
2630 static MeasureUnit
*createPoundFoot(UErrorCode
&status
);
2633 * Returns by value, unit of torque: pound-foot.
2634 * Also see {@link #createPoundFoot()}.
2637 static MeasureUnit
getPoundFoot();
2638 #endif /* U_HIDE_DRAFT_API */
2641 * Returns by pointer, unit of volume: acre-foot.
2642 * Caller owns returned value and must free it.
2643 * Also see {@link #getAcreFoot()}.
2644 * @param status ICU error code.
2647 static MeasureUnit
*createAcreFoot(UErrorCode
&status
);
2649 #ifndef U_HIDE_DRAFT_API
2651 * Returns by value, unit of volume: acre-foot.
2652 * Also see {@link #createAcreFoot()}.
2655 static MeasureUnit
getAcreFoot();
2656 #endif /* U_HIDE_DRAFT_API */
2658 #ifndef U_HIDE_DRAFT_API
2660 * Returns by pointer, unit of volume: barrel.
2661 * Caller owns returned value and must free it.
2662 * Also see {@link #getBarrel()}.
2663 * @param status ICU error code.
2666 static MeasureUnit
*createBarrel(UErrorCode
&status
);
2669 * Returns by value, unit of volume: barrel.
2670 * Also see {@link #createBarrel()}.
2673 static MeasureUnit
getBarrel();
2674 #endif /* U_HIDE_DRAFT_API */
2677 * Returns by pointer, unit of volume: bushel.
2678 * Caller owns returned value and must free it.
2679 * Also see {@link #getBushel()}.
2680 * @param status ICU error code.
2683 static MeasureUnit
*createBushel(UErrorCode
&status
);
2685 #ifndef U_HIDE_DRAFT_API
2687 * Returns by value, unit of volume: bushel.
2688 * Also see {@link #createBushel()}.
2691 static MeasureUnit
getBushel();
2692 #endif /* U_HIDE_DRAFT_API */
2695 * Returns by pointer, unit of volume: centiliter.
2696 * Caller owns returned value and must free it.
2697 * Also see {@link #getCentiliter()}.
2698 * @param status ICU error code.
2701 static MeasureUnit
*createCentiliter(UErrorCode
&status
);
2703 #ifndef U_HIDE_DRAFT_API
2705 * Returns by value, unit of volume: centiliter.
2706 * Also see {@link #createCentiliter()}.
2709 static MeasureUnit
getCentiliter();
2710 #endif /* U_HIDE_DRAFT_API */
2713 * Returns by pointer, unit of volume: cubic-centimeter.
2714 * Caller owns returned value and must free it.
2715 * Also see {@link #getCubicCentimeter()}.
2716 * @param status ICU error code.
2719 static MeasureUnit
*createCubicCentimeter(UErrorCode
&status
);
2721 #ifndef U_HIDE_DRAFT_API
2723 * Returns by value, unit of volume: cubic-centimeter.
2724 * Also see {@link #createCubicCentimeter()}.
2727 static MeasureUnit
getCubicCentimeter();
2728 #endif /* U_HIDE_DRAFT_API */
2731 * Returns by pointer, unit of volume: cubic-foot.
2732 * Caller owns returned value and must free it.
2733 * Also see {@link #getCubicFoot()}.
2734 * @param status ICU error code.
2737 static MeasureUnit
*createCubicFoot(UErrorCode
&status
);
2739 #ifndef U_HIDE_DRAFT_API
2741 * Returns by value, unit of volume: cubic-foot.
2742 * Also see {@link #createCubicFoot()}.
2745 static MeasureUnit
getCubicFoot();
2746 #endif /* U_HIDE_DRAFT_API */
2749 * Returns by pointer, unit of volume: cubic-inch.
2750 * Caller owns returned value and must free it.
2751 * Also see {@link #getCubicInch()}.
2752 * @param status ICU error code.
2755 static MeasureUnit
*createCubicInch(UErrorCode
&status
);
2757 #ifndef U_HIDE_DRAFT_API
2759 * Returns by value, unit of volume: cubic-inch.
2760 * Also see {@link #createCubicInch()}.
2763 static MeasureUnit
getCubicInch();
2764 #endif /* U_HIDE_DRAFT_API */
2767 * Returns by pointer, unit of volume: cubic-kilometer.
2768 * Caller owns returned value and must free it.
2769 * Also see {@link #getCubicKilometer()}.
2770 * @param status ICU error code.
2773 static MeasureUnit
*createCubicKilometer(UErrorCode
&status
);
2775 #ifndef U_HIDE_DRAFT_API
2777 * Returns by value, unit of volume: cubic-kilometer.
2778 * Also see {@link #createCubicKilometer()}.
2781 static MeasureUnit
getCubicKilometer();
2782 #endif /* U_HIDE_DRAFT_API */
2785 * Returns by pointer, unit of volume: cubic-meter.
2786 * Caller owns returned value and must free it.
2787 * Also see {@link #getCubicMeter()}.
2788 * @param status ICU error code.
2791 static MeasureUnit
*createCubicMeter(UErrorCode
&status
);
2793 #ifndef U_HIDE_DRAFT_API
2795 * Returns by value, unit of volume: cubic-meter.
2796 * Also see {@link #createCubicMeter()}.
2799 static MeasureUnit
getCubicMeter();
2800 #endif /* U_HIDE_DRAFT_API */
2803 * Returns by pointer, unit of volume: cubic-mile.
2804 * Caller owns returned value and must free it.
2805 * Also see {@link #getCubicMile()}.
2806 * @param status ICU error code.
2809 static MeasureUnit
*createCubicMile(UErrorCode
&status
);
2811 #ifndef U_HIDE_DRAFT_API
2813 * Returns by value, unit of volume: cubic-mile.
2814 * Also see {@link #createCubicMile()}.
2817 static MeasureUnit
getCubicMile();
2818 #endif /* U_HIDE_DRAFT_API */
2821 * Returns by pointer, unit of volume: cubic-yard.
2822 * Caller owns returned value and must free it.
2823 * Also see {@link #getCubicYard()}.
2824 * @param status ICU error code.
2827 static MeasureUnit
*createCubicYard(UErrorCode
&status
);
2829 #ifndef U_HIDE_DRAFT_API
2831 * Returns by value, unit of volume: cubic-yard.
2832 * Also see {@link #createCubicYard()}.
2835 static MeasureUnit
getCubicYard();
2836 #endif /* U_HIDE_DRAFT_API */
2839 * Returns by pointer, unit of volume: cup.
2840 * Caller owns returned value and must free it.
2841 * Also see {@link #getCup()}.
2842 * @param status ICU error code.
2845 static MeasureUnit
*createCup(UErrorCode
&status
);
2847 #ifndef U_HIDE_DRAFT_API
2849 * Returns by value, unit of volume: cup.
2850 * Also see {@link #createCup()}.
2853 static MeasureUnit
getCup();
2854 #endif /* U_HIDE_DRAFT_API */
2857 * Returns by pointer, unit of volume: cup-metric.
2858 * Caller owns returned value and must free it.
2859 * Also see {@link #getCupMetric()}.
2860 * @param status ICU error code.
2863 static MeasureUnit
*createCupMetric(UErrorCode
&status
);
2865 #ifndef U_HIDE_DRAFT_API
2867 * Returns by value, unit of volume: cup-metric.
2868 * Also see {@link #createCupMetric()}.
2871 static MeasureUnit
getCupMetric();
2872 #endif /* U_HIDE_DRAFT_API */
2875 * Returns by pointer, unit of volume: deciliter.
2876 * Caller owns returned value and must free it.
2877 * Also see {@link #getDeciliter()}.
2878 * @param status ICU error code.
2881 static MeasureUnit
*createDeciliter(UErrorCode
&status
);
2883 #ifndef U_HIDE_DRAFT_API
2885 * Returns by value, unit of volume: deciliter.
2886 * Also see {@link #createDeciliter()}.
2889 static MeasureUnit
getDeciliter();
2890 #endif /* U_HIDE_DRAFT_API */
2893 * Returns by pointer, unit of volume: fluid-ounce.
2894 * Caller owns returned value and must free it.
2895 * Also see {@link #getFluidOunce()}.
2896 * @param status ICU error code.
2899 static MeasureUnit
*createFluidOunce(UErrorCode
&status
);
2901 #ifndef U_HIDE_DRAFT_API
2903 * Returns by value, unit of volume: fluid-ounce.
2904 * Also see {@link #createFluidOunce()}.
2907 static MeasureUnit
getFluidOunce();
2908 #endif /* U_HIDE_DRAFT_API */
2910 #ifndef U_HIDE_DRAFT_API
2912 * Returns by pointer, unit of volume: fluid-ounce-imperial.
2913 * Caller owns returned value and must free it.
2914 * Also see {@link #getFluidOunceImperial()}.
2915 * @param status ICU error code.
2918 static MeasureUnit
*createFluidOunceImperial(UErrorCode
&status
);
2921 * Returns by value, unit of volume: fluid-ounce-imperial.
2922 * Also see {@link #createFluidOunceImperial()}.
2925 static MeasureUnit
getFluidOunceImperial();
2926 #endif /* U_HIDE_DRAFT_API */
2929 * Returns by pointer, unit of volume: gallon.
2930 * Caller owns returned value and must free it.
2931 * Also see {@link #getGallon()}.
2932 * @param status ICU error code.
2935 static MeasureUnit
*createGallon(UErrorCode
&status
);
2937 #ifndef U_HIDE_DRAFT_API
2939 * Returns by value, unit of volume: gallon.
2940 * Also see {@link #createGallon()}.
2943 static MeasureUnit
getGallon();
2944 #endif /* U_HIDE_DRAFT_API */
2947 * Returns by pointer, unit of volume: gallon-imperial.
2948 * Caller owns returned value and must free it.
2949 * Also see {@link #getGallonImperial()}.
2950 * @param status ICU error code.
2953 static MeasureUnit
*createGallonImperial(UErrorCode
&status
);
2955 #ifndef U_HIDE_DRAFT_API
2957 * Returns by value, unit of volume: gallon-imperial.
2958 * Also see {@link #createGallonImperial()}.
2961 static MeasureUnit
getGallonImperial();
2962 #endif /* U_HIDE_DRAFT_API */
2965 * Returns by pointer, unit of volume: hectoliter.
2966 * Caller owns returned value and must free it.
2967 * Also see {@link #getHectoliter()}.
2968 * @param status ICU error code.
2971 static MeasureUnit
*createHectoliter(UErrorCode
&status
);
2973 #ifndef U_HIDE_DRAFT_API
2975 * Returns by value, unit of volume: hectoliter.
2976 * Also see {@link #createHectoliter()}.
2979 static MeasureUnit
getHectoliter();
2980 #endif /* U_HIDE_DRAFT_API */
2983 * Returns by pointer, unit of volume: liter.
2984 * Caller owns returned value and must free it.
2985 * Also see {@link #getLiter()}.
2986 * @param status ICU error code.
2989 static MeasureUnit
*createLiter(UErrorCode
&status
);
2991 #ifndef U_HIDE_DRAFT_API
2993 * Returns by value, unit of volume: liter.
2994 * Also see {@link #createLiter()}.
2997 static MeasureUnit
getLiter();
2998 #endif /* U_HIDE_DRAFT_API */
3001 * Returns by pointer, unit of volume: megaliter.
3002 * Caller owns returned value and must free it.
3003 * Also see {@link #getMegaliter()}.
3004 * @param status ICU error code.
3007 static MeasureUnit
*createMegaliter(UErrorCode
&status
);
3009 #ifndef U_HIDE_DRAFT_API
3011 * Returns by value, unit of volume: megaliter.
3012 * Also see {@link #createMegaliter()}.
3015 static MeasureUnit
getMegaliter();
3016 #endif /* U_HIDE_DRAFT_API */
3019 * Returns by pointer, unit of volume: milliliter.
3020 * Caller owns returned value and must free it.
3021 * Also see {@link #getMilliliter()}.
3022 * @param status ICU error code.
3025 static MeasureUnit
*createMilliliter(UErrorCode
&status
);
3027 #ifndef U_HIDE_DRAFT_API
3029 * Returns by value, unit of volume: milliliter.
3030 * Also see {@link #createMilliliter()}.
3033 static MeasureUnit
getMilliliter();
3034 #endif /* U_HIDE_DRAFT_API */
3037 * Returns by pointer, unit of volume: pint.
3038 * Caller owns returned value and must free it.
3039 * Also see {@link #getPint()}.
3040 * @param status ICU error code.
3043 static MeasureUnit
*createPint(UErrorCode
&status
);
3045 #ifndef U_HIDE_DRAFT_API
3047 * Returns by value, unit of volume: pint.
3048 * Also see {@link #createPint()}.
3051 static MeasureUnit
getPint();
3052 #endif /* U_HIDE_DRAFT_API */
3055 * Returns by pointer, unit of volume: pint-metric.
3056 * Caller owns returned value and must free it.
3057 * Also see {@link #getPintMetric()}.
3058 * @param status ICU error code.
3061 static MeasureUnit
*createPintMetric(UErrorCode
&status
);
3063 #ifndef U_HIDE_DRAFT_API
3065 * Returns by value, unit of volume: pint-metric.
3066 * Also see {@link #createPintMetric()}.
3069 static MeasureUnit
getPintMetric();
3070 #endif /* U_HIDE_DRAFT_API */
3073 * Returns by pointer, unit of volume: quart.
3074 * Caller owns returned value and must free it.
3075 * Also see {@link #getQuart()}.
3076 * @param status ICU error code.
3079 static MeasureUnit
*createQuart(UErrorCode
&status
);
3081 #ifndef U_HIDE_DRAFT_API
3083 * Returns by value, unit of volume: quart.
3084 * Also see {@link #createQuart()}.
3087 static MeasureUnit
getQuart();
3088 #endif /* U_HIDE_DRAFT_API */
3091 * Returns by pointer, unit of volume: tablespoon.
3092 * Caller owns returned value and must free it.
3093 * Also see {@link #getTablespoon()}.
3094 * @param status ICU error code.
3097 static MeasureUnit
*createTablespoon(UErrorCode
&status
);
3099 #ifndef U_HIDE_DRAFT_API
3101 * Returns by value, unit of volume: tablespoon.
3102 * Also see {@link #createTablespoon()}.
3105 static MeasureUnit
getTablespoon();
3106 #endif /* U_HIDE_DRAFT_API */
3109 * Returns by pointer, unit of volume: teaspoon.
3110 * Caller owns returned value and must free it.
3111 * Also see {@link #getTeaspoon()}.
3112 * @param status ICU error code.
3115 static MeasureUnit
*createTeaspoon(UErrorCode
&status
);
3117 #ifndef U_HIDE_DRAFT_API
3119 * Returns by value, unit of volume: teaspoon.
3120 * Also see {@link #createTeaspoon()}.
3123 static MeasureUnit
getTeaspoon();
3124 #endif /* U_HIDE_DRAFT_API */
3127 // End generated createXXX methods
3131 #ifndef U_HIDE_INTERNAL_API
3136 void initTime(const char *timeId
);
3142 void initCurrency(const char *isoCurrency
);
3148 void initNoUnit(const char *subtype
);
3150 #endif /* U_HIDE_INTERNAL_API */
3157 MeasureUnit(int32_t typeId
, int32_t subTypeId
) : fTypeId(typeId
), fSubTypeId(subTypeId
) {
3160 void setTo(int32_t typeId
, int32_t subTypeId
);
3161 int32_t getOffset() const;
3162 static MeasureUnit
*create(int typeId
, int subTypeId
, UErrorCode
&status
);
3166 #endif // U_SHOW_CPLUSPLUS_API
3168 #endif // !UNCONFIG_NO_FORMATTING
3169 #endif // __MEASUREUNIT_H__