1// © 2016 and later: Unicode, Inc. and others.
2// License & terms of use: http://www.unicode.org/copyright.html
3/*
4**********************************************************************
5* Copyright (c) 2004-2016, International Business Machines
6* Corporation and others. All Rights Reserved.
7**********************************************************************
8* Author: Alan Liu
9* Created: April 26, 2004
10* Since: ICU 3.0
11**********************************************************************
12*/
13#ifndef __MEASUREUNIT_H__
14#define __MEASUREUNIT_H__
15
16#include "unicode/utypes.h"
17
18#if U_SHOW_CPLUSPLUS_API
19
20#if !UCONFIG_NO_FORMATTING
21
22#include "unicode/unistr.h"
23
24/**
25 * \file
26 * \brief C++ API: A unit for measuring a quantity.
27 */
28
29U_NAMESPACE_BEGIN
30
31class StringEnumeration;
32
33/**
34 * A unit such as length, mass, volume, currency, etc. A unit is
35 * coupled with a numeric amount to produce a Measure.
36 *
37 * @author Alan Liu
38 * @stable ICU 3.0
39 */
40class U_I18N_API MeasureUnit: public UObject {
41 public:
42
43 /**
44 * Default constructor.
45 * Populates the instance with the base dimensionless unit.
46 * @stable ICU 3.0
47 */
48 MeasureUnit();
49
50 /**
51 * Copy constructor.
52 * @stable ICU 3.0
53 */
54 MeasureUnit(const MeasureUnit &other);
55
56 /**
57 * Assignment operator.
58 * @stable ICU 3.0
59 */
60 MeasureUnit &operator=(const MeasureUnit &other);
61
62 /**
63 * Returns a polymorphic clone of this object. The result will
64 * have the same class as returned by getDynamicClassID().
65 * @stable ICU 3.0
66 */
67 virtual MeasureUnit* clone() const;
68
69 /**
70 * Destructor
71 * @stable ICU 3.0
72 */
73 virtual ~MeasureUnit();
74
75 /**
76 * Equality operator. Return true if this object is equal
77 * to the given object.
78 * @stable ICU 3.0
79 */
80 virtual UBool operator==(const UObject& other) const;
81
82 /**
83 * Inequality operator. Return true if this object is not equal
84 * to the given object.
85 * @stable ICU 53
86 */
87 UBool operator!=(const UObject& other) const {
88 return !(*this == other);
89 }
90
91 /**
92 * Get the type.
93 * @stable ICU 53
94 */
95 const char *getType() const;
96
97 /**
98 * Get the sub type.
99 * @stable ICU 53
100 */
101 const char *getSubtype() const;
102
103 /**
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.
107 *
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.
112 * @stable ICU 53
113 */
114 static int32_t getAvailable(
115 MeasureUnit *destArray,
116 int32_t destCapacity,
117 UErrorCode &errorCode);
118
119 /**
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.
123 *
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.
129 * @stable ICU 53
130 */
131 static int32_t getAvailable(
132 const char *type,
133 MeasureUnit *destArray,
134 int32_t destCapacity,
135 UErrorCode &errorCode);
136
137 /**
138 * getAvailableTypes gets all of the available types. Caller owns the
139 * returned StringEnumeration and must delete it when finished using it.
140 *
141 * @param errorCode ICU error code.
142 * @return the types.
143 * @stable ICU 53
144 */
145 static StringEnumeration* getAvailableTypes(UErrorCode &errorCode);
146
147 /**
148 * Return the class ID for this class. This is useful only for comparing to
149 * a return value from getDynamicClassID(). For example:
150 * <pre>
151 * . Base* polymorphic_pointer = createPolymorphicObject();
152 * . if (polymorphic_pointer->getDynamicClassID() ==
153 * . Derived::getStaticClassID()) ...
154 * </pre>
155 * @return The class ID for all objects of this class.
156 * @stable ICU 53
157 */
158 static UClassID U_EXPORT2 getStaticClassID(void);
159
160 /**
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.
165 *
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.
169 * @stable ICU 53
170 */
171 virtual UClassID getDynamicClassID(void) const;
172
173#ifndef U_HIDE_INTERNAL_API
174 /**
175 * ICU use only.
176 * Returns associated array index for this measure unit. Only valid for
177 * non-currency measure units.
178 * @internal
179 */
180 int32_t getIndex() const;
181
182 /**
183 * ICU use only.
184 * Returns maximum value from getIndex plus 1.
185 * @internal
186 */
187 static int32_t getIndexCount();
188
189 /**
190 * ICU use only.
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
193 * @internal
194 */
195 static int32_t internalGetIndexForTypeAndSubtype(const char *type, const char *subtype);
196
197 /**
198 * ICU use only.
199 * @internal
200 */
201 static MeasureUnit resolveUnitPerUnit(
202 const MeasureUnit &unit, const MeasureUnit &perUnit, bool* isResolved);
203#endif /* U_HIDE_INTERNAL_API */
204
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
210//
211// Start generated createXXX methods
212
213 /**
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.
218 * @stable ICU 53
219 */
220 static MeasureUnit *createGForce(UErrorCode &status);
221
222#ifndef U_HIDE_DRAFT_API
223 /**
224 * Returns by value, unit of acceleration: g-force.
225 * Also see {@link #createGForce()}.
226 * @draft ICU 64
227 */
228 static MeasureUnit getGForce();
229#endif /* U_HIDE_DRAFT_API */
230
231 /**
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.
236 * @stable ICU 54
237 */
238 static MeasureUnit *createMeterPerSecondSquared(UErrorCode &status);
239
240#ifndef U_HIDE_DRAFT_API
241 /**
242 * Returns by value, unit of acceleration: meter-per-second-squared.
243 * Also see {@link #createMeterPerSecondSquared()}.
244 * @draft ICU 64
245 */
246 static MeasureUnit getMeterPerSecondSquared();
247#endif /* U_HIDE_DRAFT_API */
248
249 /**
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.
254 * @stable ICU 53
255 */
256 static MeasureUnit *createArcMinute(UErrorCode &status);
257
258#ifndef U_HIDE_DRAFT_API
259 /**
260 * Returns by value, unit of angle: arc-minute.
261 * Also see {@link #createArcMinute()}.
262 * @draft ICU 64
263 */
264 static MeasureUnit getArcMinute();
265#endif /* U_HIDE_DRAFT_API */
266
267 /**
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.
272 * @stable ICU 53
273 */
274 static MeasureUnit *createArcSecond(UErrorCode &status);
275
276#ifndef U_HIDE_DRAFT_API
277 /**
278 * Returns by value, unit of angle: arc-second.
279 * Also see {@link #createArcSecond()}.
280 * @draft ICU 64
281 */
282 static MeasureUnit getArcSecond();
283#endif /* U_HIDE_DRAFT_API */
284
285 /**
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.
290 * @stable ICU 53
291 */
292 static MeasureUnit *createDegree(UErrorCode &status);
293
294#ifndef U_HIDE_DRAFT_API
295 /**
296 * Returns by value, unit of angle: degree.
297 * Also see {@link #createDegree()}.
298 * @draft ICU 64
299 */
300 static MeasureUnit getDegree();
301#endif /* U_HIDE_DRAFT_API */
302
303 /**
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.
308 * @stable ICU 54
309 */
310 static MeasureUnit *createRadian(UErrorCode &status);
311
312#ifndef U_HIDE_DRAFT_API
313 /**
314 * Returns by value, unit of angle: radian.
315 * Also see {@link #createRadian()}.
316 * @draft ICU 64
317 */
318 static MeasureUnit getRadian();
319#endif /* U_HIDE_DRAFT_API */
320
321 /**
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.
326 * @stable ICU 56
327 */
328 static MeasureUnit *createRevolutionAngle(UErrorCode &status);
329
330#ifndef U_HIDE_DRAFT_API
331 /**
332 * Returns by value, unit of angle: revolution.
333 * Also see {@link #createRevolutionAngle()}.
334 * @draft ICU 64
335 */
336 static MeasureUnit getRevolutionAngle();
337#endif /* U_HIDE_DRAFT_API */
338
339 /**
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.
344 * @stable ICU 53
345 */
346 static MeasureUnit *createAcre(UErrorCode &status);
347
348#ifndef U_HIDE_DRAFT_API
349 /**
350 * Returns by value, unit of area: acre.
351 * Also see {@link #createAcre()}.
352 * @draft ICU 64
353 */
354 static MeasureUnit getAcre();
355#endif /* U_HIDE_DRAFT_API */
356
357#ifndef U_HIDE_DRAFT_API
358 /**
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.
363 * @draft ICU 64
364 */
365 static MeasureUnit *createDunam(UErrorCode &status);
366
367 /**
368 * Returns by value, unit of area: dunam.
369 * Also see {@link #createDunam()}.
370 * @draft ICU 64
371 */
372 static MeasureUnit getDunam();
373#endif /* U_HIDE_DRAFT_API */
374
375 /**
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.
380 * @stable ICU 53
381 */
382 static MeasureUnit *createHectare(UErrorCode &status);
383
384#ifndef U_HIDE_DRAFT_API
385 /**
386 * Returns by value, unit of area: hectare.
387 * Also see {@link #createHectare()}.
388 * @draft ICU 64
389 */
390 static MeasureUnit getHectare();
391#endif /* U_HIDE_DRAFT_API */
392
393 /**
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.
398 * @stable ICU 54
399 */
400 static MeasureUnit *createSquareCentimeter(UErrorCode &status);
401
402#ifndef U_HIDE_DRAFT_API
403 /**
404 * Returns by value, unit of area: square-centimeter.
405 * Also see {@link #createSquareCentimeter()}.
406 * @draft ICU 64
407 */
408 static MeasureUnit getSquareCentimeter();
409#endif /* U_HIDE_DRAFT_API */
410
411 /**
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.
416 * @stable ICU 53
417 */
418 static MeasureUnit *createSquareFoot(UErrorCode &status);
419
420#ifndef U_HIDE_DRAFT_API
421 /**
422 * Returns by value, unit of area: square-foot.
423 * Also see {@link #createSquareFoot()}.
424 * @draft ICU 64
425 */
426 static MeasureUnit getSquareFoot();
427#endif /* U_HIDE_DRAFT_API */
428
429 /**
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.
434 * @stable ICU 54
435 */
436 static MeasureUnit *createSquareInch(UErrorCode &status);
437
438#ifndef U_HIDE_DRAFT_API
439 /**
440 * Returns by value, unit of area: square-inch.
441 * Also see {@link #createSquareInch()}.
442 * @draft ICU 64
443 */
444 static MeasureUnit getSquareInch();
445#endif /* U_HIDE_DRAFT_API */
446
447 /**
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.
452 * @stable ICU 53
453 */
454 static MeasureUnit *createSquareKilometer(UErrorCode &status);
455
456#ifndef U_HIDE_DRAFT_API
457 /**
458 * Returns by value, unit of area: square-kilometer.
459 * Also see {@link #createSquareKilometer()}.
460 * @draft ICU 64
461 */
462 static MeasureUnit getSquareKilometer();
463#endif /* U_HIDE_DRAFT_API */
464
465 /**
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.
470 * @stable ICU 53
471 */
472 static MeasureUnit *createSquareMeter(UErrorCode &status);
473
474#ifndef U_HIDE_DRAFT_API
475 /**
476 * Returns by value, unit of area: square-meter.
477 * Also see {@link #createSquareMeter()}.
478 * @draft ICU 64
479 */
480 static MeasureUnit getSquareMeter();
481#endif /* U_HIDE_DRAFT_API */
482
483 /**
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.
488 * @stable ICU 53
489 */
490 static MeasureUnit *createSquareMile(UErrorCode &status);
491
492#ifndef U_HIDE_DRAFT_API
493 /**
494 * Returns by value, unit of area: square-mile.
495 * Also see {@link #createSquareMile()}.
496 * @draft ICU 64
497 */
498 static MeasureUnit getSquareMile();
499#endif /* U_HIDE_DRAFT_API */
500
501 /**
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.
506 * @stable ICU 54
507 */
508 static MeasureUnit *createSquareYard(UErrorCode &status);
509
510#ifndef U_HIDE_DRAFT_API
511 /**
512 * Returns by value, unit of area: square-yard.
513 * Also see {@link #createSquareYard()}.
514 * @draft ICU 64
515 */
516 static MeasureUnit getSquareYard();
517#endif /* U_HIDE_DRAFT_API */
518
519 /**
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.
524 * @stable ICU 54
525 */
526 static MeasureUnit *createKarat(UErrorCode &status);
527
528#ifndef U_HIDE_DRAFT_API
529 /**
530 * Returns by value, unit of concentr: karat.
531 * Also see {@link #createKarat()}.
532 * @draft ICU 64
533 */
534 static MeasureUnit getKarat();
535#endif /* U_HIDE_DRAFT_API */
536
537 /**
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.
542 * @stable ICU 57
543 */
544 static MeasureUnit *createMilligramPerDeciliter(UErrorCode &status);
545
546#ifndef U_HIDE_DRAFT_API
547 /**
548 * Returns by value, unit of concentr: milligram-per-deciliter.
549 * Also see {@link #createMilligramPerDeciliter()}.
550 * @draft ICU 64
551 */
552 static MeasureUnit getMilligramPerDeciliter();
553#endif /* U_HIDE_DRAFT_API */
554
555 /**
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.
560 * @stable ICU 57
561 */
562 static MeasureUnit *createMillimolePerLiter(UErrorCode &status);
563
564#ifndef U_HIDE_DRAFT_API
565 /**
566 * Returns by value, unit of concentr: millimole-per-liter.
567 * Also see {@link #createMillimolePerLiter()}.
568 * @draft ICU 64
569 */
570 static MeasureUnit getMillimolePerLiter();
571#endif /* U_HIDE_DRAFT_API */
572
573#ifndef U_HIDE_DRAFT_API
574 /**
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.
579 * @draft ICU 64
580 */
581 static MeasureUnit *createMole(UErrorCode &status);
582
583 /**
584 * Returns by value, unit of concentr: mole.
585 * Also see {@link #createMole()}.
586 * @draft ICU 64
587 */
588 static MeasureUnit getMole();
589#endif /* U_HIDE_DRAFT_API */
590
591 /**
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.
596 * @stable ICU 57
597 */
598 static MeasureUnit *createPartPerMillion(UErrorCode &status);
599
600#ifndef U_HIDE_DRAFT_API
601 /**
602 * Returns by value, unit of concentr: part-per-million.
603 * Also see {@link #createPartPerMillion()}.
604 * @draft ICU 64
605 */
606 static MeasureUnit getPartPerMillion();
607#endif /* U_HIDE_DRAFT_API */
608
609 /**
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.
614 * @stable ICU 63
615 */
616 static MeasureUnit *createPercent(UErrorCode &status);
617
618#ifndef U_HIDE_DRAFT_API
619 /**
620 * Returns by value, unit of concentr: percent.
621 * Also see {@link #createPercent()}.
622 * @draft ICU 64
623 */
624 static MeasureUnit getPercent();
625#endif /* U_HIDE_DRAFT_API */
626
627 /**
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.
632 * @stable ICU 63
633 */
634 static MeasureUnit *createPermille(UErrorCode &status);
635
636#ifndef U_HIDE_DRAFT_API
637 /**
638 * Returns by value, unit of concentr: permille.
639 * Also see {@link #createPermille()}.
640 * @draft ICU 64
641 */
642 static MeasureUnit getPermille();
643#endif /* U_HIDE_DRAFT_API */
644
645#ifndef U_HIDE_DRAFT_API
646 /**
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.
651 * @draft ICU 64
652 */
653 static MeasureUnit *createPermyriad(UErrorCode &status);
654
655 /**
656 * Returns by value, unit of concentr: permyriad.
657 * Also see {@link #createPermyriad()}.
658 * @draft ICU 64
659 */
660 static MeasureUnit getPermyriad();
661#endif /* U_HIDE_DRAFT_API */
662
663 /**
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.
668 * @stable ICU 56
669 */
670 static MeasureUnit *createLiterPer100Kilometers(UErrorCode &status);
671
672#ifndef U_HIDE_DRAFT_API
673 /**
674 * Returns by value, unit of consumption: liter-per-100kilometers.
675 * Also see {@link #createLiterPer100Kilometers()}.
676 * @draft ICU 64
677 */
678 static MeasureUnit getLiterPer100Kilometers();
679#endif /* U_HIDE_DRAFT_API */
680
681 /**
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.
686 * @stable ICU 54
687 */
688 static MeasureUnit *createLiterPerKilometer(UErrorCode &status);
689
690#ifndef U_HIDE_DRAFT_API
691 /**
692 * Returns by value, unit of consumption: liter-per-kilometer.
693 * Also see {@link #createLiterPerKilometer()}.
694 * @draft ICU 64
695 */
696 static MeasureUnit getLiterPerKilometer();
697#endif /* U_HIDE_DRAFT_API */
698
699 /**
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.
704 * @stable ICU 54
705 */
706 static MeasureUnit *createMilePerGallon(UErrorCode &status);
707
708#ifndef U_HIDE_DRAFT_API
709 /**
710 * Returns by value, unit of consumption: mile-per-gallon.
711 * Also see {@link #createMilePerGallon()}.
712 * @draft ICU 64
713 */
714 static MeasureUnit getMilePerGallon();
715#endif /* U_HIDE_DRAFT_API */
716
717 /**
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.
722 * @stable ICU 57
723 */
724 static MeasureUnit *createMilePerGallonImperial(UErrorCode &status);
725
726#ifndef U_HIDE_DRAFT_API
727 /**
728 * Returns by value, unit of consumption: mile-per-gallon-imperial.
729 * Also see {@link #createMilePerGallonImperial()}.
730 * @draft ICU 64
731 */
732 static MeasureUnit getMilePerGallonImperial();
733#endif /* U_HIDE_DRAFT_API */
734
735 /**
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.
740 * @stable ICU 54
741 */
742 static MeasureUnit *createBit(UErrorCode &status);
743
744#ifndef U_HIDE_DRAFT_API
745 /**
746 * Returns by value, unit of digital: bit.
747 * Also see {@link #createBit()}.
748 * @draft ICU 64
749 */
750 static MeasureUnit getBit();
751#endif /* U_HIDE_DRAFT_API */
752
753 /**
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.
758 * @stable ICU 54
759 */
760 static MeasureUnit *createByte(UErrorCode &status);
761
762#ifndef U_HIDE_DRAFT_API
763 /**
764 * Returns by value, unit of digital: byte.
765 * Also see {@link #createByte()}.
766 * @draft ICU 64
767 */
768 static MeasureUnit getByte();
769#endif /* U_HIDE_DRAFT_API */
770
771 /**
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.
776 * @stable ICU 54
777 */
778 static MeasureUnit *createGigabit(UErrorCode &status);
779
780#ifndef U_HIDE_DRAFT_API
781 /**
782 * Returns by value, unit of digital: gigabit.
783 * Also see {@link #createGigabit()}.
784 * @draft ICU 64
785 */
786 static MeasureUnit getGigabit();
787#endif /* U_HIDE_DRAFT_API */
788
789 /**
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.
794 * @stable ICU 54
795 */
796 static MeasureUnit *createGigabyte(UErrorCode &status);
797
798#ifndef U_HIDE_DRAFT_API
799 /**
800 * Returns by value, unit of digital: gigabyte.
801 * Also see {@link #createGigabyte()}.
802 * @draft ICU 64
803 */
804 static MeasureUnit getGigabyte();
805#endif /* U_HIDE_DRAFT_API */
806
807 /**
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.
812 * @stable ICU 54
813 */
814 static MeasureUnit *createKilobit(UErrorCode &status);
815
816#ifndef U_HIDE_DRAFT_API
817 /**
818 * Returns by value, unit of digital: kilobit.
819 * Also see {@link #createKilobit()}.
820 * @draft ICU 64
821 */
822 static MeasureUnit getKilobit();
823#endif /* U_HIDE_DRAFT_API */
824
825 /**
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.
830 * @stable ICU 54
831 */
832 static MeasureUnit *createKilobyte(UErrorCode &status);
833
834#ifndef U_HIDE_DRAFT_API
835 /**
836 * Returns by value, unit of digital: kilobyte.
837 * Also see {@link #createKilobyte()}.
838 * @draft ICU 64
839 */
840 static MeasureUnit getKilobyte();
841#endif /* U_HIDE_DRAFT_API */
842
843 /**
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.
848 * @stable ICU 54
849 */
850 static MeasureUnit *createMegabit(UErrorCode &status);
851
852#ifndef U_HIDE_DRAFT_API
853 /**
854 * Returns by value, unit of digital: megabit.
855 * Also see {@link #createMegabit()}.
856 * @draft ICU 64
857 */
858 static MeasureUnit getMegabit();
859#endif /* U_HIDE_DRAFT_API */
860
861 /**
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.
866 * @stable ICU 54
867 */
868 static MeasureUnit *createMegabyte(UErrorCode &status);
869
870#ifndef U_HIDE_DRAFT_API
871 /**
872 * Returns by value, unit of digital: megabyte.
873 * Also see {@link #createMegabyte()}.
874 * @draft ICU 64
875 */
876 static MeasureUnit getMegabyte();
877#endif /* U_HIDE_DRAFT_API */
878
879 /**
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.
884 * @stable ICU 63
885 */
886 static MeasureUnit *createPetabyte(UErrorCode &status);
887
888#ifndef U_HIDE_DRAFT_API
889 /**
890 * Returns by value, unit of digital: petabyte.
891 * Also see {@link #createPetabyte()}.
892 * @draft ICU 64
893 */
894 static MeasureUnit getPetabyte();
895#endif /* U_HIDE_DRAFT_API */
896
897 /**
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.
902 * @stable ICU 54
903 */
904 static MeasureUnit *createTerabit(UErrorCode &status);
905
906#ifndef U_HIDE_DRAFT_API
907 /**
908 * Returns by value, unit of digital: terabit.
909 * Also see {@link #createTerabit()}.
910 * @draft ICU 64
911 */
912 static MeasureUnit getTerabit();
913#endif /* U_HIDE_DRAFT_API */
914
915 /**
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.
920 * @stable ICU 54
921 */
922 static MeasureUnit *createTerabyte(UErrorCode &status);
923
924#ifndef U_HIDE_DRAFT_API
925 /**
926 * Returns by value, unit of digital: terabyte.
927 * Also see {@link #createTerabyte()}.
928 * @draft ICU 64
929 */
930 static MeasureUnit getTerabyte();
931#endif /* U_HIDE_DRAFT_API */
932
933 /**
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.
938 * @stable ICU 56
939 */
940 static MeasureUnit *createCentury(UErrorCode &status);
941
942#ifndef U_HIDE_DRAFT_API
943 /**
944 * Returns by value, unit of duration: century.
945 * Also see {@link #createCentury()}.
946 * @draft ICU 64
947 */
948 static MeasureUnit getCentury();
949#endif /* U_HIDE_DRAFT_API */
950
951 /**
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.
956 * @stable ICU 53
957 */
958 static MeasureUnit *createDay(UErrorCode &status);
959
960#ifndef U_HIDE_DRAFT_API
961 /**
962 * Returns by value, unit of duration: day.
963 * Also see {@link #createDay()}.
964 * @draft ICU 64
965 */
966 static MeasureUnit getDay();
967#endif /* U_HIDE_DRAFT_API */
968
969#ifndef U_HIDE_DRAFT_API
970 /**
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.
975 * @draft ICU 64
976 */
977 static MeasureUnit *createDayPerson(UErrorCode &status);
978
979 /**
980 * Returns by value, unit of duration: day-person.
981 * Also see {@link #createDayPerson()}.
982 * @draft ICU 64
983 */
984 static MeasureUnit getDayPerson();
985#endif /* U_HIDE_DRAFT_API */
986
987#ifndef U_HIDE_DRAFT_API
988 /**
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.
993 * @draft ICU 65
994 */
995 static MeasureUnit *createDecade(UErrorCode &status);
996
997 /**
998 * Returns by value, unit of duration: decade.
999 * Also see {@link #createDecade()}.
1000 * @draft ICU 65
1001 */
1002 static MeasureUnit getDecade();
1003#endif /* U_HIDE_DRAFT_API */
1004
1005 /**
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.
1010 * @stable ICU 53
1011 */
1012 static MeasureUnit *createHour(UErrorCode &status);
1013
1014#ifndef U_HIDE_DRAFT_API
1015 /**
1016 * Returns by value, unit of duration: hour.
1017 * Also see {@link #createHour()}.
1018 * @draft ICU 64
1019 */
1020 static MeasureUnit getHour();
1021#endif /* U_HIDE_DRAFT_API */
1022
1023 /**
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.
1028 * @stable ICU 54
1029 */
1030 static MeasureUnit *createMicrosecond(UErrorCode &status);
1031
1032#ifndef U_HIDE_DRAFT_API
1033 /**
1034 * Returns by value, unit of duration: microsecond.
1035 * Also see {@link #createMicrosecond()}.
1036 * @draft ICU 64
1037 */
1038 static MeasureUnit getMicrosecond();
1039#endif /* U_HIDE_DRAFT_API */
1040
1041 /**
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.
1046 * @stable ICU 53
1047 */
1048 static MeasureUnit *createMillisecond(UErrorCode &status);
1049
1050#ifndef U_HIDE_DRAFT_API
1051 /**
1052 * Returns by value, unit of duration: millisecond.
1053 * Also see {@link #createMillisecond()}.
1054 * @draft ICU 64
1055 */
1056 static MeasureUnit getMillisecond();
1057#endif /* U_HIDE_DRAFT_API */
1058
1059 /**
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.
1064 * @stable ICU 53
1065 */
1066 static MeasureUnit *createMinute(UErrorCode &status);
1067
1068#ifndef U_HIDE_DRAFT_API
1069 /**
1070 * Returns by value, unit of duration: minute.
1071 * Also see {@link #createMinute()}.
1072 * @draft ICU 64
1073 */
1074 static MeasureUnit getMinute();
1075#endif /* U_HIDE_DRAFT_API */
1076
1077 /**
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.
1082 * @stable ICU 53
1083 */
1084 static MeasureUnit *createMonth(UErrorCode &status);
1085
1086#ifndef U_HIDE_DRAFT_API
1087 /**
1088 * Returns by value, unit of duration: month.
1089 * Also see {@link #createMonth()}.
1090 * @draft ICU 64
1091 */
1092 static MeasureUnit getMonth();
1093#endif /* U_HIDE_DRAFT_API */
1094
1095#ifndef U_HIDE_DRAFT_API
1096 /**
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.
1101 * @draft ICU 64
1102 */
1103 static MeasureUnit *createMonthPerson(UErrorCode &status);
1104
1105 /**
1106 * Returns by value, unit of duration: month-person.
1107 * Also see {@link #createMonthPerson()}.
1108 * @draft ICU 64
1109 */
1110 static MeasureUnit getMonthPerson();
1111#endif /* U_HIDE_DRAFT_API */
1112
1113 /**
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.
1118 * @stable ICU 54
1119 */
1120 static MeasureUnit *createNanosecond(UErrorCode &status);
1121
1122#ifndef U_HIDE_DRAFT_API
1123 /**
1124 * Returns by value, unit of duration: nanosecond.
1125 * Also see {@link #createNanosecond()}.
1126 * @draft ICU 64
1127 */
1128 static MeasureUnit getNanosecond();
1129#endif /* U_HIDE_DRAFT_API */
1130
1131 /**
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.
1136 * @stable ICU 53
1137 */
1138 static MeasureUnit *createSecond(UErrorCode &status);
1139
1140#ifndef U_HIDE_DRAFT_API
1141 /**
1142 * Returns by value, unit of duration: second.
1143 * Also see {@link #createSecond()}.
1144 * @draft ICU 64
1145 */
1146 static MeasureUnit getSecond();
1147#endif /* U_HIDE_DRAFT_API */
1148
1149 /**
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.
1154 * @stable ICU 53
1155 */
1156 static MeasureUnit *createWeek(UErrorCode &status);
1157
1158#ifndef U_HIDE_DRAFT_API
1159 /**
1160 * Returns by value, unit of duration: week.
1161 * Also see {@link #createWeek()}.
1162 * @draft ICU 64
1163 */
1164 static MeasureUnit getWeek();
1165#endif /* U_HIDE_DRAFT_API */
1166
1167#ifndef U_HIDE_DRAFT_API
1168 /**
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.
1173 * @draft ICU 64
1174 */
1175 static MeasureUnit *createWeekPerson(UErrorCode &status);
1176
1177 /**
1178 * Returns by value, unit of duration: week-person.
1179 * Also see {@link #createWeekPerson()}.
1180 * @draft ICU 64
1181 */
1182 static MeasureUnit getWeekPerson();
1183#endif /* U_HIDE_DRAFT_API */
1184
1185 /**
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.
1190 * @stable ICU 53
1191 */
1192 static MeasureUnit *createYear(UErrorCode &status);
1193
1194#ifndef U_HIDE_DRAFT_API
1195 /**
1196 * Returns by value, unit of duration: year.
1197 * Also see {@link #createYear()}.
1198 * @draft ICU 64
1199 */
1200 static MeasureUnit getYear();
1201#endif /* U_HIDE_DRAFT_API */
1202
1203#ifndef U_HIDE_DRAFT_API
1204 /**
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.
1209 * @draft ICU 64
1210 */
1211 static MeasureUnit *createYearPerson(UErrorCode &status);
1212
1213 /**
1214 * Returns by value, unit of duration: year-person.
1215 * Also see {@link #createYearPerson()}.
1216 * @draft ICU 64
1217 */
1218 static MeasureUnit getYearPerson();
1219#endif /* U_HIDE_DRAFT_API */
1220
1221 /**
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.
1226 * @stable ICU 54
1227 */
1228 static MeasureUnit *createAmpere(UErrorCode &status);
1229
1230#ifndef U_HIDE_DRAFT_API
1231 /**
1232 * Returns by value, unit of electric: ampere.
1233 * Also see {@link #createAmpere()}.
1234 * @draft ICU 64
1235 */
1236 static MeasureUnit getAmpere();
1237#endif /* U_HIDE_DRAFT_API */
1238
1239 /**
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.
1244 * @stable ICU 54
1245 */
1246 static MeasureUnit *createMilliampere(UErrorCode &status);
1247
1248#ifndef U_HIDE_DRAFT_API
1249 /**
1250 * Returns by value, unit of electric: milliampere.
1251 * Also see {@link #createMilliampere()}.
1252 * @draft ICU 64
1253 */
1254 static MeasureUnit getMilliampere();
1255#endif /* U_HIDE_DRAFT_API */
1256
1257 /**
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.
1262 * @stable ICU 54
1263 */
1264 static MeasureUnit *createOhm(UErrorCode &status);
1265
1266#ifndef U_HIDE_DRAFT_API
1267 /**
1268 * Returns by value, unit of electric: ohm.
1269 * Also see {@link #createOhm()}.
1270 * @draft ICU 64
1271 */
1272 static MeasureUnit getOhm();
1273#endif /* U_HIDE_DRAFT_API */
1274
1275 /**
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.
1280 * @stable ICU 54
1281 */
1282 static MeasureUnit *createVolt(UErrorCode &status);
1283
1284#ifndef U_HIDE_DRAFT_API
1285 /**
1286 * Returns by value, unit of electric: volt.
1287 * Also see {@link #createVolt()}.
1288 * @draft ICU 64
1289 */
1290 static MeasureUnit getVolt();
1291#endif /* U_HIDE_DRAFT_API */
1292
1293#ifndef U_HIDE_DRAFT_API
1294 /**
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.
1299 * @draft ICU 64
1300 */
1301 static MeasureUnit *createBritishThermalUnit(UErrorCode &status);
1302
1303 /**
1304 * Returns by value, unit of energy: british-thermal-unit.
1305 * Also see {@link #createBritishThermalUnit()}.
1306 * @draft ICU 64
1307 */
1308 static MeasureUnit getBritishThermalUnit();
1309#endif /* U_HIDE_DRAFT_API */
1310
1311 /**
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.
1316 * @stable ICU 54
1317 */
1318 static MeasureUnit *createCalorie(UErrorCode &status);
1319
1320#ifndef U_HIDE_DRAFT_API
1321 /**
1322 * Returns by value, unit of energy: calorie.
1323 * Also see {@link #createCalorie()}.
1324 * @draft ICU 64
1325 */
1326 static MeasureUnit getCalorie();
1327#endif /* U_HIDE_DRAFT_API */
1328
1329#ifndef U_HIDE_DRAFT_API
1330 /**
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.
1335 * @draft ICU 64
1336 */
1337 static MeasureUnit *createElectronvolt(UErrorCode &status);
1338
1339 /**
1340 * Returns by value, unit of energy: electronvolt.
1341 * Also see {@link #createElectronvolt()}.
1342 * @draft ICU 64
1343 */
1344 static MeasureUnit getElectronvolt();
1345#endif /* U_HIDE_DRAFT_API */
1346
1347 /**
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.
1352 * @stable ICU 54
1353 */
1354 static MeasureUnit *createFoodcalorie(UErrorCode &status);
1355
1356#ifndef U_HIDE_DRAFT_API
1357 /**
1358 * Returns by value, unit of energy: foodcalorie.
1359 * Also see {@link #createFoodcalorie()}.
1360 * @draft ICU 64
1361 */
1362 static MeasureUnit getFoodcalorie();
1363#endif /* U_HIDE_DRAFT_API */
1364
1365 /**
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.
1370 * @stable ICU 54
1371 */
1372 static MeasureUnit *createJoule(UErrorCode &status);
1373
1374#ifndef U_HIDE_DRAFT_API
1375 /**
1376 * Returns by value, unit of energy: joule.
1377 * Also see {@link #createJoule()}.
1378 * @draft ICU 64
1379 */
1380 static MeasureUnit getJoule();
1381#endif /* U_HIDE_DRAFT_API */
1382
1383 /**
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.
1388 * @stable ICU 54
1389 */
1390 static MeasureUnit *createKilocalorie(UErrorCode &status);
1391
1392#ifndef U_HIDE_DRAFT_API
1393 /**
1394 * Returns by value, unit of energy: kilocalorie.
1395 * Also see {@link #createKilocalorie()}.
1396 * @draft ICU 64
1397 */
1398 static MeasureUnit getKilocalorie();
1399#endif /* U_HIDE_DRAFT_API */
1400
1401 /**
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.
1406 * @stable ICU 54
1407 */
1408 static MeasureUnit *createKilojoule(UErrorCode &status);
1409
1410#ifndef U_HIDE_DRAFT_API
1411 /**
1412 * Returns by value, unit of energy: kilojoule.
1413 * Also see {@link #createKilojoule()}.
1414 * @draft ICU 64
1415 */
1416 static MeasureUnit getKilojoule();
1417#endif /* U_HIDE_DRAFT_API */
1418
1419 /**
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.
1424 * @stable ICU 54
1425 */
1426 static MeasureUnit *createKilowattHour(UErrorCode &status);
1427
1428#ifndef U_HIDE_DRAFT_API
1429 /**
1430 * Returns by value, unit of energy: kilowatt-hour.
1431 * Also see {@link #createKilowattHour()}.
1432 * @draft ICU 64
1433 */
1434 static MeasureUnit getKilowattHour();
1435#endif /* U_HIDE_DRAFT_API */
1436
1437#ifndef U_HIDE_DRAFT_API
1438 /**
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.
1443 * @draft ICU 65
1444 */
1445 static MeasureUnit *createThermUs(UErrorCode &status);
1446
1447 /**
1448 * Returns by value, unit of energy: therm-us.
1449 * Also see {@link #createThermUs()}.
1450 * @draft ICU 65
1451 */
1452 static MeasureUnit getThermUs();
1453#endif /* U_HIDE_DRAFT_API */
1454
1455#ifndef U_HIDE_DRAFT_API
1456 /**
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.
1461 * @draft ICU 64
1462 */
1463 static MeasureUnit *createNewton(UErrorCode &status);
1464
1465 /**
1466 * Returns by value, unit of force: newton.
1467 * Also see {@link #createNewton()}.
1468 * @draft ICU 64
1469 */
1470 static MeasureUnit getNewton();
1471#endif /* U_HIDE_DRAFT_API */
1472
1473#ifndef U_HIDE_DRAFT_API
1474 /**
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.
1479 * @draft ICU 64
1480 */
1481 static MeasureUnit *createPoundForce(UErrorCode &status);
1482
1483 /**
1484 * Returns by value, unit of force: pound-force.
1485 * Also see {@link #createPoundForce()}.
1486 * @draft ICU 64
1487 */
1488 static MeasureUnit getPoundForce();
1489#endif /* U_HIDE_DRAFT_API */
1490
1491 /**
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.
1496 * @stable ICU 54
1497 */
1498 static MeasureUnit *createGigahertz(UErrorCode &status);
1499
1500#ifndef U_HIDE_DRAFT_API
1501 /**
1502 * Returns by value, unit of frequency: gigahertz.
1503 * Also see {@link #createGigahertz()}.
1504 * @draft ICU 64
1505 */
1506 static MeasureUnit getGigahertz();
1507#endif /* U_HIDE_DRAFT_API */
1508
1509 /**
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.
1514 * @stable ICU 54
1515 */
1516 static MeasureUnit *createHertz(UErrorCode &status);
1517
1518#ifndef U_HIDE_DRAFT_API
1519 /**
1520 * Returns by value, unit of frequency: hertz.
1521 * Also see {@link #createHertz()}.
1522 * @draft ICU 64
1523 */
1524 static MeasureUnit getHertz();
1525#endif /* U_HIDE_DRAFT_API */
1526
1527 /**
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.
1532 * @stable ICU 54
1533 */
1534 static MeasureUnit *createKilohertz(UErrorCode &status);
1535
1536#ifndef U_HIDE_DRAFT_API
1537 /**
1538 * Returns by value, unit of frequency: kilohertz.
1539 * Also see {@link #createKilohertz()}.
1540 * @draft ICU 64
1541 */
1542 static MeasureUnit getKilohertz();
1543#endif /* U_HIDE_DRAFT_API */
1544
1545 /**
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.
1550 * @stable ICU 54
1551 */
1552 static MeasureUnit *createMegahertz(UErrorCode &status);
1553
1554#ifndef U_HIDE_DRAFT_API
1555 /**
1556 * Returns by value, unit of frequency: megahertz.
1557 * Also see {@link #createMegahertz()}.
1558 * @draft ICU 64
1559 */
1560 static MeasureUnit getMegahertz();
1561#endif /* U_HIDE_DRAFT_API */
1562
1563#ifndef U_HIDE_DRAFT_API
1564 /**
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.
1569 * @draft ICU 65
1570 */
1571 static MeasureUnit *createDotPerCentimeter(UErrorCode &status);
1572
1573 /**
1574 * Returns by value, unit of graphics: dot-per-centimeter.
1575 * Also see {@link #createDotPerCentimeter()}.
1576 * @draft ICU 65
1577 */
1578 static MeasureUnit getDotPerCentimeter();
1579#endif /* U_HIDE_DRAFT_API */
1580
1581#ifndef U_HIDE_DRAFT_API
1582 /**
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.
1587 * @draft ICU 65
1588 */
1589 static MeasureUnit *createDotPerInch(UErrorCode &status);
1590
1591 /**
1592 * Returns by value, unit of graphics: dot-per-inch.
1593 * Also see {@link #createDotPerInch()}.
1594 * @draft ICU 65
1595 */
1596 static MeasureUnit getDotPerInch();
1597#endif /* U_HIDE_DRAFT_API */
1598
1599#ifndef U_HIDE_DRAFT_API
1600 /**
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.
1605 * @draft ICU 65
1606 */
1607 static MeasureUnit *createEm(UErrorCode &status);
1608
1609 /**
1610 * Returns by value, unit of graphics: em.
1611 * Also see {@link #createEm()}.
1612 * @draft ICU 65
1613 */
1614 static MeasureUnit getEm();
1615#endif /* U_HIDE_DRAFT_API */
1616
1617#ifndef U_HIDE_DRAFT_API
1618 /**
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.
1623 * @draft ICU 65
1624 */
1625 static MeasureUnit *createMegapixel(UErrorCode &status);
1626
1627 /**
1628 * Returns by value, unit of graphics: megapixel.
1629 * Also see {@link #createMegapixel()}.
1630 * @draft ICU 65
1631 */
1632 static MeasureUnit getMegapixel();
1633#endif /* U_HIDE_DRAFT_API */
1634
1635#ifndef U_HIDE_DRAFT_API
1636 /**
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.
1641 * @draft ICU 65
1642 */
1643 static MeasureUnit *createPixel(UErrorCode &status);
1644
1645 /**
1646 * Returns by value, unit of graphics: pixel.
1647 * Also see {@link #createPixel()}.
1648 * @draft ICU 65
1649 */
1650 static MeasureUnit getPixel();
1651#endif /* U_HIDE_DRAFT_API */
1652
1653#ifndef U_HIDE_DRAFT_API
1654 /**
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.
1659 * @draft ICU 65
1660 */
1661 static MeasureUnit *createPixelPerCentimeter(UErrorCode &status);
1662
1663 /**
1664 * Returns by value, unit of graphics: pixel-per-centimeter.
1665 * Also see {@link #createPixelPerCentimeter()}.
1666 * @draft ICU 65
1667 */
1668 static MeasureUnit getPixelPerCentimeter();
1669#endif /* U_HIDE_DRAFT_API */
1670
1671#ifndef U_HIDE_DRAFT_API
1672 /**
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.
1677 * @draft ICU 65
1678 */
1679 static MeasureUnit *createPixelPerInch(UErrorCode &status);
1680
1681 /**
1682 * Returns by value, unit of graphics: pixel-per-inch.
1683 * Also see {@link #createPixelPerInch()}.
1684 * @draft ICU 65
1685 */
1686 static MeasureUnit getPixelPerInch();
1687#endif /* U_HIDE_DRAFT_API */
1688
1689 /**
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.
1694 * @stable ICU 54
1695 */
1696 static MeasureUnit *createAstronomicalUnit(UErrorCode &status);
1697
1698#ifndef U_HIDE_DRAFT_API
1699 /**
1700 * Returns by value, unit of length: astronomical-unit.
1701 * Also see {@link #createAstronomicalUnit()}.
1702 * @draft ICU 64
1703 */
1704 static MeasureUnit getAstronomicalUnit();
1705#endif /* U_HIDE_DRAFT_API */
1706
1707 /**
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.
1712 * @stable ICU 53
1713 */
1714 static MeasureUnit *createCentimeter(UErrorCode &status);
1715
1716#ifndef U_HIDE_DRAFT_API
1717 /**
1718 * Returns by value, unit of length: centimeter.
1719 * Also see {@link #createCentimeter()}.
1720 * @draft ICU 64
1721 */
1722 static MeasureUnit getCentimeter();
1723#endif /* U_HIDE_DRAFT_API */
1724
1725 /**
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.
1730 * @stable ICU 54
1731 */
1732 static MeasureUnit *createDecimeter(UErrorCode &status);
1733
1734#ifndef U_HIDE_DRAFT_API
1735 /**
1736 * Returns by value, unit of length: decimeter.
1737 * Also see {@link #createDecimeter()}.
1738 * @draft ICU 64
1739 */
1740 static MeasureUnit getDecimeter();
1741#endif /* U_HIDE_DRAFT_API */
1742
1743 /**
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.
1748 * @stable ICU 54
1749 */
1750 static MeasureUnit *createFathom(UErrorCode &status);
1751
1752#ifndef U_HIDE_DRAFT_API
1753 /**
1754 * Returns by value, unit of length: fathom.
1755 * Also see {@link #createFathom()}.
1756 * @draft ICU 64
1757 */
1758 static MeasureUnit getFathom();
1759#endif /* U_HIDE_DRAFT_API */
1760
1761 /**
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.
1766 * @stable ICU 53
1767 */
1768 static MeasureUnit *createFoot(UErrorCode &status);
1769
1770#ifndef U_HIDE_DRAFT_API
1771 /**
1772 * Returns by value, unit of length: foot.
1773 * Also see {@link #createFoot()}.
1774 * @draft ICU 64
1775 */
1776 static MeasureUnit getFoot();
1777#endif /* U_HIDE_DRAFT_API */
1778
1779 /**
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.
1784 * @stable ICU 54
1785 */
1786 static MeasureUnit *createFurlong(UErrorCode &status);
1787
1788#ifndef U_HIDE_DRAFT_API
1789 /**
1790 * Returns by value, unit of length: furlong.
1791 * Also see {@link #createFurlong()}.
1792 * @draft ICU 64
1793 */
1794 static MeasureUnit getFurlong();
1795#endif /* U_HIDE_DRAFT_API */
1796
1797 /**
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.
1802 * @stable ICU 53
1803 */
1804 static MeasureUnit *createInch(UErrorCode &status);
1805
1806#ifndef U_HIDE_DRAFT_API
1807 /**
1808 * Returns by value, unit of length: inch.
1809 * Also see {@link #createInch()}.
1810 * @draft ICU 64
1811 */
1812 static MeasureUnit getInch();
1813#endif /* U_HIDE_DRAFT_API */
1814
1815 /**
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.
1820 * @stable ICU 53
1821 */
1822 static MeasureUnit *createKilometer(UErrorCode &status);
1823
1824#ifndef U_HIDE_DRAFT_API
1825 /**
1826 * Returns by value, unit of length: kilometer.
1827 * Also see {@link #createKilometer()}.
1828 * @draft ICU 64
1829 */
1830 static MeasureUnit getKilometer();
1831#endif /* U_HIDE_DRAFT_API */
1832
1833 /**
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.
1838 * @stable ICU 53
1839 */
1840 static MeasureUnit *createLightYear(UErrorCode &status);
1841
1842#ifndef U_HIDE_DRAFT_API
1843 /**
1844 * Returns by value, unit of length: light-year.
1845 * Also see {@link #createLightYear()}.
1846 * @draft ICU 64
1847 */
1848 static MeasureUnit getLightYear();
1849#endif /* U_HIDE_DRAFT_API */
1850
1851 /**
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.
1856 * @stable ICU 53
1857 */
1858 static MeasureUnit *createMeter(UErrorCode &status);
1859
1860#ifndef U_HIDE_DRAFT_API
1861 /**
1862 * Returns by value, unit of length: meter.
1863 * Also see {@link #createMeter()}.
1864 * @draft ICU 64
1865 */
1866 static MeasureUnit getMeter();
1867#endif /* U_HIDE_DRAFT_API */
1868
1869 /**
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.
1874 * @stable ICU 54
1875 */
1876 static MeasureUnit *createMicrometer(UErrorCode &status);
1877
1878#ifndef U_HIDE_DRAFT_API
1879 /**
1880 * Returns by value, unit of length: micrometer.
1881 * Also see {@link #createMicrometer()}.
1882 * @draft ICU 64
1883 */
1884 static MeasureUnit getMicrometer();
1885#endif /* U_HIDE_DRAFT_API */
1886
1887 /**
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.
1892 * @stable ICU 53
1893 */
1894 static MeasureUnit *createMile(UErrorCode &status);
1895
1896#ifndef U_HIDE_DRAFT_API
1897 /**
1898 * Returns by value, unit of length: mile.
1899 * Also see {@link #createMile()}.
1900 * @draft ICU 64
1901 */
1902 static MeasureUnit getMile();
1903#endif /* U_HIDE_DRAFT_API */
1904
1905 /**
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.
1910 * @stable ICU 56
1911 */
1912 static MeasureUnit *createMileScandinavian(UErrorCode &status);
1913
1914#ifndef U_HIDE_DRAFT_API
1915 /**
1916 * Returns by value, unit of length: mile-scandinavian.
1917 * Also see {@link #createMileScandinavian()}.
1918 * @draft ICU 64
1919 */
1920 static MeasureUnit getMileScandinavian();
1921#endif /* U_HIDE_DRAFT_API */
1922
1923 /**
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.
1928 * @stable ICU 53
1929 */
1930 static MeasureUnit *createMillimeter(UErrorCode &status);
1931
1932#ifndef U_HIDE_DRAFT_API
1933 /**
1934 * Returns by value, unit of length: millimeter.
1935 * Also see {@link #createMillimeter()}.
1936 * @draft ICU 64
1937 */
1938 static MeasureUnit getMillimeter();
1939#endif /* U_HIDE_DRAFT_API */
1940
1941 /**
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.
1946 * @stable ICU 54
1947 */
1948 static MeasureUnit *createNanometer(UErrorCode &status);
1949
1950#ifndef U_HIDE_DRAFT_API
1951 /**
1952 * Returns by value, unit of length: nanometer.
1953 * Also see {@link #createNanometer()}.
1954 * @draft ICU 64
1955 */
1956 static MeasureUnit getNanometer();
1957#endif /* U_HIDE_DRAFT_API */
1958
1959 /**
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.
1964 * @stable ICU 54
1965 */
1966 static MeasureUnit *createNauticalMile(UErrorCode &status);
1967
1968#ifndef U_HIDE_DRAFT_API
1969 /**
1970 * Returns by value, unit of length: nautical-mile.
1971 * Also see {@link #createNauticalMile()}.
1972 * @draft ICU 64
1973 */
1974 static MeasureUnit getNauticalMile();
1975#endif /* U_HIDE_DRAFT_API */
1976
1977 /**
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.
1982 * @stable ICU 54
1983 */
1984 static MeasureUnit *createParsec(UErrorCode &status);
1985
1986#ifndef U_HIDE_DRAFT_API
1987 /**
1988 * Returns by value, unit of length: parsec.
1989 * Also see {@link #createParsec()}.
1990 * @draft ICU 64
1991 */
1992 static MeasureUnit getParsec();
1993#endif /* U_HIDE_DRAFT_API */
1994
1995 /**
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.
2000 * @stable ICU 53
2001 */
2002 static MeasureUnit *createPicometer(UErrorCode &status);
2003
2004#ifndef U_HIDE_DRAFT_API
2005 /**
2006 * Returns by value, unit of length: picometer.
2007 * Also see {@link #createPicometer()}.
2008 * @draft ICU 64
2009 */
2010 static MeasureUnit getPicometer();
2011#endif /* U_HIDE_DRAFT_API */
2012
2013 /**
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.
2018 * @stable ICU 59
2019 */
2020 static MeasureUnit *createPoint(UErrorCode &status);
2021
2022#ifndef U_HIDE_DRAFT_API
2023 /**
2024 * Returns by value, unit of length: point.
2025 * Also see {@link #createPoint()}.
2026 * @draft ICU 64
2027 */
2028 static MeasureUnit getPoint();
2029#endif /* U_HIDE_DRAFT_API */
2030
2031#ifndef U_HIDE_DRAFT_API
2032 /**
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.
2037 * @draft ICU 64
2038 */
2039 static MeasureUnit *createSolarRadius(UErrorCode &status);
2040
2041 /**
2042 * Returns by value, unit of length: solar-radius.
2043 * Also see {@link #createSolarRadius()}.
2044 * @draft ICU 64
2045 */
2046 static MeasureUnit getSolarRadius();
2047#endif /* U_HIDE_DRAFT_API */
2048
2049 /**
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.
2054 * @stable ICU 53
2055 */
2056 static MeasureUnit *createYard(UErrorCode &status);
2057
2058#ifndef U_HIDE_DRAFT_API
2059 /**
2060 * Returns by value, unit of length: yard.
2061 * Also see {@link #createYard()}.
2062 * @draft ICU 64
2063 */
2064 static MeasureUnit getYard();
2065#endif /* U_HIDE_DRAFT_API */
2066
2067 /**
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.
2072 * @stable ICU 54
2073 */
2074 static MeasureUnit *createLux(UErrorCode &status);
2075
2076#ifndef U_HIDE_DRAFT_API
2077 /**
2078 * Returns by value, unit of light: lux.
2079 * Also see {@link #createLux()}.
2080 * @draft ICU 64
2081 */
2082 static MeasureUnit getLux();
2083#endif /* U_HIDE_DRAFT_API */
2084
2085#ifndef U_HIDE_DRAFT_API
2086 /**
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.
2091 * @draft ICU 64
2092 */
2093 static MeasureUnit *createSolarLuminosity(UErrorCode &status);
2094
2095 /**
2096 * Returns by value, unit of light: solar-luminosity.
2097 * Also see {@link #createSolarLuminosity()}.
2098 * @draft ICU 64
2099 */
2100 static MeasureUnit getSolarLuminosity();
2101#endif /* U_HIDE_DRAFT_API */
2102
2103 /**
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.
2108 * @stable ICU 54
2109 */
2110 static MeasureUnit *createCarat(UErrorCode &status);
2111
2112#ifndef U_HIDE_DRAFT_API
2113 /**
2114 * Returns by value, unit of mass: carat.
2115 * Also see {@link #createCarat()}.
2116 * @draft ICU 64
2117 */
2118 static MeasureUnit getCarat();
2119#endif /* U_HIDE_DRAFT_API */
2120
2121#ifndef U_HIDE_DRAFT_API
2122 /**
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.
2127 * @draft ICU 64
2128 */
2129 static MeasureUnit *createDalton(UErrorCode &status);
2130
2131 /**
2132 * Returns by value, unit of mass: dalton.
2133 * Also see {@link #createDalton()}.
2134 * @draft ICU 64
2135 */
2136 static MeasureUnit getDalton();
2137#endif /* U_HIDE_DRAFT_API */
2138
2139#ifndef U_HIDE_DRAFT_API
2140 /**
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.
2145 * @draft ICU 64
2146 */
2147 static MeasureUnit *createEarthMass(UErrorCode &status);
2148
2149 /**
2150 * Returns by value, unit of mass: earth-mass.
2151 * Also see {@link #createEarthMass()}.
2152 * @draft ICU 64
2153 */
2154 static MeasureUnit getEarthMass();
2155#endif /* U_HIDE_DRAFT_API */
2156
2157 /**
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.
2162 * @stable ICU 53
2163 */
2164 static MeasureUnit *createGram(UErrorCode &status);
2165
2166#ifndef U_HIDE_DRAFT_API
2167 /**
2168 * Returns by value, unit of mass: gram.
2169 * Also see {@link #createGram()}.
2170 * @draft ICU 64
2171 */
2172 static MeasureUnit getGram();
2173#endif /* U_HIDE_DRAFT_API */
2174
2175 /**
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.
2180 * @stable ICU 53
2181 */
2182 static MeasureUnit *createKilogram(UErrorCode &status);
2183
2184#ifndef U_HIDE_DRAFT_API
2185 /**
2186 * Returns by value, unit of mass: kilogram.
2187 * Also see {@link #createKilogram()}.
2188 * @draft ICU 64
2189 */
2190 static MeasureUnit getKilogram();
2191#endif /* U_HIDE_DRAFT_API */
2192
2193 /**
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.
2198 * @stable ICU 54
2199 */
2200 static MeasureUnit *createMetricTon(UErrorCode &status);
2201
2202#ifndef U_HIDE_DRAFT_API
2203 /**
2204 * Returns by value, unit of mass: metric-ton.
2205 * Also see {@link #createMetricTon()}.
2206 * @draft ICU 64
2207 */
2208 static MeasureUnit getMetricTon();
2209#endif /* U_HIDE_DRAFT_API */
2210
2211 /**
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.
2216 * @stable ICU 54
2217 */
2218 static MeasureUnit *createMicrogram(UErrorCode &status);
2219
2220#ifndef U_HIDE_DRAFT_API
2221 /**
2222 * Returns by value, unit of mass: microgram.
2223 * Also see {@link #createMicrogram()}.
2224 * @draft ICU 64
2225 */
2226 static MeasureUnit getMicrogram();
2227#endif /* U_HIDE_DRAFT_API */
2228
2229 /**
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.
2234 * @stable ICU 54
2235 */
2236 static MeasureUnit *createMilligram(UErrorCode &status);
2237
2238#ifndef U_HIDE_DRAFT_API
2239 /**
2240 * Returns by value, unit of mass: milligram.
2241 * Also see {@link #createMilligram()}.
2242 * @draft ICU 64
2243 */
2244 static MeasureUnit getMilligram();
2245#endif /* U_HIDE_DRAFT_API */
2246
2247 /**
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.
2252 * @stable ICU 53
2253 */
2254 static MeasureUnit *createOunce(UErrorCode &status);
2255
2256#ifndef U_HIDE_DRAFT_API
2257 /**
2258 * Returns by value, unit of mass: ounce.
2259 * Also see {@link #createOunce()}.
2260 * @draft ICU 64
2261 */
2262 static MeasureUnit getOunce();
2263#endif /* U_HIDE_DRAFT_API */
2264
2265 /**
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.
2270 * @stable ICU 54
2271 */
2272 static MeasureUnit *createOunceTroy(UErrorCode &status);
2273
2274#ifndef U_HIDE_DRAFT_API
2275 /**
2276 * Returns by value, unit of mass: ounce-troy.
2277 * Also see {@link #createOunceTroy()}.
2278 * @draft ICU 64
2279 */
2280 static MeasureUnit getOunceTroy();
2281#endif /* U_HIDE_DRAFT_API */
2282
2283 /**
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.
2288 * @stable ICU 53
2289 */
2290 static MeasureUnit *createPound(UErrorCode &status);
2291
2292#ifndef U_HIDE_DRAFT_API
2293 /**
2294 * Returns by value, unit of mass: pound.
2295 * Also see {@link #createPound()}.
2296 * @draft ICU 64
2297 */
2298 static MeasureUnit getPound();
2299#endif /* U_HIDE_DRAFT_API */
2300
2301#ifndef U_HIDE_DRAFT_API
2302 /**
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.
2307 * @draft ICU 64
2308 */
2309 static MeasureUnit *createSolarMass(UErrorCode &status);
2310
2311 /**
2312 * Returns by value, unit of mass: solar-mass.
2313 * Also see {@link #createSolarMass()}.
2314 * @draft ICU 64
2315 */
2316 static MeasureUnit getSolarMass();
2317#endif /* U_HIDE_DRAFT_API */
2318
2319 /**
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.
2324 * @stable ICU 54
2325 */
2326 static MeasureUnit *createStone(UErrorCode &status);
2327
2328#ifndef U_HIDE_DRAFT_API
2329 /**
2330 * Returns by value, unit of mass: stone.
2331 * Also see {@link #createStone()}.
2332 * @draft ICU 64
2333 */
2334 static MeasureUnit getStone();
2335#endif /* U_HIDE_DRAFT_API */
2336
2337 /**
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.
2342 * @stable ICU 54
2343 */
2344 static MeasureUnit *createTon(UErrorCode &status);
2345
2346#ifndef U_HIDE_DRAFT_API
2347 /**
2348 * Returns by value, unit of mass: ton.
2349 * Also see {@link #createTon()}.
2350 * @draft ICU 64
2351 */
2352 static MeasureUnit getTon();
2353#endif /* U_HIDE_DRAFT_API */
2354
2355 /**
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.
2360 * @stable ICU 54
2361 */
2362 static MeasureUnit *createGigawatt(UErrorCode &status);
2363
2364#ifndef U_HIDE_DRAFT_API
2365 /**
2366 * Returns by value, unit of power: gigawatt.
2367 * Also see {@link #createGigawatt()}.
2368 * @draft ICU 64
2369 */
2370 static MeasureUnit getGigawatt();
2371#endif /* U_HIDE_DRAFT_API */
2372
2373 /**
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.
2378 * @stable ICU 53
2379 */
2380 static MeasureUnit *createHorsepower(UErrorCode &status);
2381
2382#ifndef U_HIDE_DRAFT_API
2383 /**
2384 * Returns by value, unit of power: horsepower.
2385 * Also see {@link #createHorsepower()}.
2386 * @draft ICU 64
2387 */
2388 static MeasureUnit getHorsepower();
2389#endif /* U_HIDE_DRAFT_API */
2390
2391 /**
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.
2396 * @stable ICU 53
2397 */
2398 static MeasureUnit *createKilowatt(UErrorCode &status);
2399
2400#ifndef U_HIDE_DRAFT_API
2401 /**
2402 * Returns by value, unit of power: kilowatt.
2403 * Also see {@link #createKilowatt()}.
2404 * @draft ICU 64
2405 */
2406 static MeasureUnit getKilowatt();
2407#endif /* U_HIDE_DRAFT_API */
2408
2409 /**
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.
2414 * @stable ICU 54
2415 */
2416 static MeasureUnit *createMegawatt(UErrorCode &status);
2417
2418#ifndef U_HIDE_DRAFT_API
2419 /**
2420 * Returns by value, unit of power: megawatt.
2421 * Also see {@link #createMegawatt()}.
2422 * @draft ICU 64
2423 */
2424 static MeasureUnit getMegawatt();
2425#endif /* U_HIDE_DRAFT_API */
2426
2427 /**
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.
2432 * @stable ICU 54
2433 */
2434 static MeasureUnit *createMilliwatt(UErrorCode &status);
2435
2436#ifndef U_HIDE_DRAFT_API
2437 /**
2438 * Returns by value, unit of power: milliwatt.
2439 * Also see {@link #createMilliwatt()}.
2440 * @draft ICU 64
2441 */
2442 static MeasureUnit getMilliwatt();
2443#endif /* U_HIDE_DRAFT_API */
2444
2445 /**
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.
2450 * @stable ICU 53
2451 */
2452 static MeasureUnit *createWatt(UErrorCode &status);
2453
2454#ifndef U_HIDE_DRAFT_API
2455 /**
2456 * Returns by value, unit of power: watt.
2457 * Also see {@link #createWatt()}.
2458 * @draft ICU 64
2459 */
2460 static MeasureUnit getWatt();
2461#endif /* U_HIDE_DRAFT_API */
2462
2463 /**
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.
2468 * @stable ICU 63
2469 */
2470 static MeasureUnit *createAtmosphere(UErrorCode &status);
2471
2472#ifndef U_HIDE_DRAFT_API
2473 /**
2474 * Returns by value, unit of pressure: atmosphere.
2475 * Also see {@link #createAtmosphere()}.
2476 * @draft ICU 64
2477 */
2478 static MeasureUnit getAtmosphere();
2479#endif /* U_HIDE_DRAFT_API */
2480
2481#ifndef U_HIDE_DRAFT_API
2482 /**
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.
2487 * @draft ICU 65
2488 */
2489 static MeasureUnit *createBar(UErrorCode &status);
2490
2491 /**
2492 * Returns by value, unit of pressure: bar.
2493 * Also see {@link #createBar()}.
2494 * @draft ICU 65
2495 */
2496 static MeasureUnit getBar();
2497#endif /* U_HIDE_DRAFT_API */
2498
2499 /**
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.
2504 * @stable ICU 53
2505 */
2506 static MeasureUnit *createHectopascal(UErrorCode &status);
2507
2508#ifndef U_HIDE_DRAFT_API
2509 /**
2510 * Returns by value, unit of pressure: hectopascal.
2511 * Also see {@link #createHectopascal()}.
2512 * @draft ICU 64
2513 */
2514 static MeasureUnit getHectopascal();
2515#endif /* U_HIDE_DRAFT_API */
2516
2517 /**
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.
2522 * @stable ICU 53
2523 */
2524 static MeasureUnit *createInchHg(UErrorCode &status);
2525
2526#ifndef U_HIDE_DRAFT_API
2527 /**
2528 * Returns by value, unit of pressure: inch-hg.
2529 * Also see {@link #createInchHg()}.
2530 * @draft ICU 64
2531 */
2532 static MeasureUnit getInchHg();
2533#endif /* U_HIDE_DRAFT_API */
2534
2535#ifndef U_HIDE_DRAFT_API
2536 /**
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.
2541 * @draft ICU 64
2542 */
2543 static MeasureUnit *createKilopascal(UErrorCode &status);
2544
2545 /**
2546 * Returns by value, unit of pressure: kilopascal.
2547 * Also see {@link #createKilopascal()}.
2548 * @draft ICU 64
2549 */
2550 static MeasureUnit getKilopascal();
2551#endif /* U_HIDE_DRAFT_API */
2552
2553#ifndef U_HIDE_DRAFT_API
2554 /**
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.
2559 * @draft ICU 64
2560 */
2561 static MeasureUnit *createMegapascal(UErrorCode &status);
2562
2563 /**
2564 * Returns by value, unit of pressure: megapascal.
2565 * Also see {@link #createMegapascal()}.
2566 * @draft ICU 64
2567 */
2568 static MeasureUnit getMegapascal();
2569#endif /* U_HIDE_DRAFT_API */
2570
2571 /**
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.
2576 * @stable ICU 53
2577 */
2578 static MeasureUnit *createMillibar(UErrorCode &status);
2579
2580#ifndef U_HIDE_DRAFT_API
2581 /**
2582 * Returns by value, unit of pressure: millibar.
2583 * Also see {@link #createMillibar()}.
2584 * @draft ICU 64
2585 */
2586 static MeasureUnit getMillibar();
2587#endif /* U_HIDE_DRAFT_API */
2588
2589 /**
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.
2594 * @stable ICU 54
2595 */
2596 static MeasureUnit *createMillimeterOfMercury(UErrorCode &status);
2597
2598#ifndef U_HIDE_DRAFT_API
2599 /**
2600 * Returns by value, unit of pressure: millimeter-of-mercury.
2601 * Also see {@link #createMillimeterOfMercury()}.
2602 * @draft ICU 64
2603 */
2604 static MeasureUnit getMillimeterOfMercury();
2605#endif /* U_HIDE_DRAFT_API */
2606
2607#ifndef U_HIDE_DRAFT_API
2608 /**
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.
2613 * @draft ICU 65
2614 */
2615 static MeasureUnit *createPascal(UErrorCode &status);
2616
2617 /**
2618 * Returns by value, unit of pressure: pascal.
2619 * Also see {@link #createPascal()}.
2620 * @draft ICU 65
2621 */
2622 static MeasureUnit getPascal();
2623#endif /* U_HIDE_DRAFT_API */
2624
2625 /**
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.
2630 * @stable ICU 54
2631 */
2632 static MeasureUnit *createPoundPerSquareInch(UErrorCode &status);
2633
2634#ifndef U_HIDE_DRAFT_API
2635 /**
2636 * Returns by value, unit of pressure: pound-per-square-inch.
2637 * Also see {@link #createPoundPerSquareInch()}.
2638 * @draft ICU 64
2639 */
2640 static MeasureUnit getPoundPerSquareInch();
2641#endif /* U_HIDE_DRAFT_API */
2642
2643 /**
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.
2648 * @stable ICU 53
2649 */
2650 static MeasureUnit *createKilometerPerHour(UErrorCode &status);
2651
2652#ifndef U_HIDE_DRAFT_API
2653 /**
2654 * Returns by value, unit of speed: kilometer-per-hour.
2655 * Also see {@link #createKilometerPerHour()}.
2656 * @draft ICU 64
2657 */
2658 static MeasureUnit getKilometerPerHour();
2659#endif /* U_HIDE_DRAFT_API */
2660
2661 /**
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.
2666 * @stable ICU 56
2667 */
2668 static MeasureUnit *createKnot(UErrorCode &status);
2669
2670#ifndef U_HIDE_DRAFT_API
2671 /**
2672 * Returns by value, unit of speed: knot.
2673 * Also see {@link #createKnot()}.
2674 * @draft ICU 64
2675 */
2676 static MeasureUnit getKnot();
2677#endif /* U_HIDE_DRAFT_API */
2678
2679 /**
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.
2684 * @stable ICU 53
2685 */
2686 static MeasureUnit *createMeterPerSecond(UErrorCode &status);
2687
2688#ifndef U_HIDE_DRAFT_API
2689 /**
2690 * Returns by value, unit of speed: meter-per-second.
2691 * Also see {@link #createMeterPerSecond()}.
2692 * @draft ICU 64
2693 */
2694 static MeasureUnit getMeterPerSecond();
2695#endif /* U_HIDE_DRAFT_API */
2696
2697 /**
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.
2702 * @stable ICU 53
2703 */
2704 static MeasureUnit *createMilePerHour(UErrorCode &status);
2705
2706#ifndef U_HIDE_DRAFT_API
2707 /**
2708 * Returns by value, unit of speed: mile-per-hour.
2709 * Also see {@link #createMilePerHour()}.
2710 * @draft ICU 64
2711 */
2712 static MeasureUnit getMilePerHour();
2713#endif /* U_HIDE_DRAFT_API */
2714
2715 /**
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.
2720 * @stable ICU 53
2721 */
2722 static MeasureUnit *createCelsius(UErrorCode &status);
2723
2724#ifndef U_HIDE_DRAFT_API
2725 /**
2726 * Returns by value, unit of temperature: celsius.
2727 * Also see {@link #createCelsius()}.
2728 * @draft ICU 64
2729 */
2730 static MeasureUnit getCelsius();
2731#endif /* U_HIDE_DRAFT_API */
2732
2733 /**
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.
2738 * @stable ICU 53
2739 */
2740 static MeasureUnit *createFahrenheit(UErrorCode &status);
2741
2742#ifndef U_HIDE_DRAFT_API
2743 /**
2744 * Returns by value, unit of temperature: fahrenheit.
2745 * Also see {@link #createFahrenheit()}.
2746 * @draft ICU 64
2747 */
2748 static MeasureUnit getFahrenheit();
2749#endif /* U_HIDE_DRAFT_API */
2750
2751 /**
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.
2756 * @stable ICU 56
2757 */
2758 static MeasureUnit *createGenericTemperature(UErrorCode &status);
2759
2760#ifndef U_HIDE_DRAFT_API
2761 /**
2762 * Returns by value, unit of temperature: generic.
2763 * Also see {@link #createGenericTemperature()}.
2764 * @draft ICU 64
2765 */
2766 static MeasureUnit getGenericTemperature();
2767#endif /* U_HIDE_DRAFT_API */
2768
2769 /**
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.
2774 * @stable ICU 54
2775 */
2776 static MeasureUnit *createKelvin(UErrorCode &status);
2777
2778#ifndef U_HIDE_DRAFT_API
2779 /**
2780 * Returns by value, unit of temperature: kelvin.
2781 * Also see {@link #createKelvin()}.
2782 * @draft ICU 64
2783 */
2784 static MeasureUnit getKelvin();
2785#endif /* U_HIDE_DRAFT_API */
2786
2787#ifndef U_HIDE_DRAFT_API
2788 /**
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.
2793 * @draft ICU 64
2794 */
2795 static MeasureUnit *createNewtonMeter(UErrorCode &status);
2796
2797 /**
2798 * Returns by value, unit of torque: newton-meter.
2799 * Also see {@link #createNewtonMeter()}.
2800 * @draft ICU 64
2801 */
2802 static MeasureUnit getNewtonMeter();
2803#endif /* U_HIDE_DRAFT_API */
2804
2805#ifndef U_HIDE_DRAFT_API
2806 /**
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.
2811 * @draft ICU 64
2812 */
2813 static MeasureUnit *createPoundFoot(UErrorCode &status);
2814
2815 /**
2816 * Returns by value, unit of torque: pound-foot.
2817 * Also see {@link #createPoundFoot()}.
2818 * @draft ICU 64
2819 */
2820 static MeasureUnit getPoundFoot();
2821#endif /* U_HIDE_DRAFT_API */
2822
2823 /**
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.
2828 * @stable ICU 54
2829 */
2830 static MeasureUnit *createAcreFoot(UErrorCode &status);
2831
2832#ifndef U_HIDE_DRAFT_API
2833 /**
2834 * Returns by value, unit of volume: acre-foot.
2835 * Also see {@link #createAcreFoot()}.
2836 * @draft ICU 64
2837 */
2838 static MeasureUnit getAcreFoot();
2839#endif /* U_HIDE_DRAFT_API */
2840
2841#ifndef U_HIDE_DRAFT_API
2842 /**
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.
2847 * @draft ICU 64
2848 */
2849 static MeasureUnit *createBarrel(UErrorCode &status);
2850
2851 /**
2852 * Returns by value, unit of volume: barrel.
2853 * Also see {@link #createBarrel()}.
2854 * @draft ICU 64
2855 */
2856 static MeasureUnit getBarrel();
2857#endif /* U_HIDE_DRAFT_API */
2858
2859 /**
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.
2864 * @stable ICU 54
2865 */
2866 static MeasureUnit *createBushel(UErrorCode &status);
2867
2868#ifndef U_HIDE_DRAFT_API
2869 /**
2870 * Returns by value, unit of volume: bushel.
2871 * Also see {@link #createBushel()}.
2872 * @draft ICU 64
2873 */
2874 static MeasureUnit getBushel();
2875#endif /* U_HIDE_DRAFT_API */
2876
2877 /**
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.
2882 * @stable ICU 54
2883 */
2884 static MeasureUnit *createCentiliter(UErrorCode &status);
2885
2886#ifndef U_HIDE_DRAFT_API
2887 /**
2888 * Returns by value, unit of volume: centiliter.
2889 * Also see {@link #createCentiliter()}.
2890 * @draft ICU 64
2891 */
2892 static MeasureUnit getCentiliter();
2893#endif /* U_HIDE_DRAFT_API */
2894
2895 /**
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.
2900 * @stable ICU 54
2901 */
2902 static MeasureUnit *createCubicCentimeter(UErrorCode &status);
2903
2904#ifndef U_HIDE_DRAFT_API
2905 /**
2906 * Returns by value, unit of volume: cubic-centimeter.
2907 * Also see {@link #createCubicCentimeter()}.
2908 * @draft ICU 64
2909 */
2910 static MeasureUnit getCubicCentimeter();
2911#endif /* U_HIDE_DRAFT_API */
2912
2913 /**
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.
2918 * @stable ICU 54
2919 */
2920 static MeasureUnit *createCubicFoot(UErrorCode &status);
2921
2922#ifndef U_HIDE_DRAFT_API
2923 /**
2924 * Returns by value, unit of volume: cubic-foot.
2925 * Also see {@link #createCubicFoot()}.
2926 * @draft ICU 64
2927 */
2928 static MeasureUnit getCubicFoot();
2929#endif /* U_HIDE_DRAFT_API */
2930
2931 /**
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.
2936 * @stable ICU 54
2937 */
2938 static MeasureUnit *createCubicInch(UErrorCode &status);
2939
2940#ifndef U_HIDE_DRAFT_API
2941 /**
2942 * Returns by value, unit of volume: cubic-inch.
2943 * Also see {@link #createCubicInch()}.
2944 * @draft ICU 64
2945 */
2946 static MeasureUnit getCubicInch();
2947#endif /* U_HIDE_DRAFT_API */
2948
2949 /**
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.
2954 * @stable ICU 53
2955 */
2956 static MeasureUnit *createCubicKilometer(UErrorCode &status);
2957
2958#ifndef U_HIDE_DRAFT_API
2959 /**
2960 * Returns by value, unit of volume: cubic-kilometer.
2961 * Also see {@link #createCubicKilometer()}.
2962 * @draft ICU 64
2963 */
2964 static MeasureUnit getCubicKilometer();
2965#endif /* U_HIDE_DRAFT_API */
2966
2967 /**
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.
2972 * @stable ICU 54
2973 */
2974 static MeasureUnit *createCubicMeter(UErrorCode &status);
2975
2976#ifndef U_HIDE_DRAFT_API
2977 /**
2978 * Returns by value, unit of volume: cubic-meter.
2979 * Also see {@link #createCubicMeter()}.
2980 * @draft ICU 64
2981 */
2982 static MeasureUnit getCubicMeter();
2983#endif /* U_HIDE_DRAFT_API */
2984
2985 /**
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.
2990 * @stable ICU 53
2991 */
2992 static MeasureUnit *createCubicMile(UErrorCode &status);
2993
2994#ifndef U_HIDE_DRAFT_API
2995 /**
2996 * Returns by value, unit of volume: cubic-mile.
2997 * Also see {@link #createCubicMile()}.
2998 * @draft ICU 64
2999 */
3000 static MeasureUnit getCubicMile();
3001#endif /* U_HIDE_DRAFT_API */
3002
3003 /**
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.
3008 * @stable ICU 54
3009 */
3010 static MeasureUnit *createCubicYard(UErrorCode &status);
3011
3012#ifndef U_HIDE_DRAFT_API
3013 /**
3014 * Returns by value, unit of volume: cubic-yard.
3015 * Also see {@link #createCubicYard()}.
3016 * @draft ICU 64
3017 */
3018 static MeasureUnit getCubicYard();
3019#endif /* U_HIDE_DRAFT_API */
3020
3021 /**
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.
3026 * @stable ICU 54
3027 */
3028 static MeasureUnit *createCup(UErrorCode &status);
3029
3030#ifndef U_HIDE_DRAFT_API
3031 /**
3032 * Returns by value, unit of volume: cup.
3033 * Also see {@link #createCup()}.
3034 * @draft ICU 64
3035 */
3036 static MeasureUnit getCup();
3037#endif /* U_HIDE_DRAFT_API */
3038
3039 /**
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.
3044 * @stable ICU 56
3045 */
3046 static MeasureUnit *createCupMetric(UErrorCode &status);
3047
3048#ifndef U_HIDE_DRAFT_API
3049 /**
3050 * Returns by value, unit of volume: cup-metric.
3051 * Also see {@link #createCupMetric()}.
3052 * @draft ICU 64
3053 */
3054 static MeasureUnit getCupMetric();
3055#endif /* U_HIDE_DRAFT_API */
3056
3057 /**
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.
3062 * @stable ICU 54
3063 */
3064 static MeasureUnit *createDeciliter(UErrorCode &status);
3065
3066#ifndef U_HIDE_DRAFT_API
3067 /**
3068 * Returns by value, unit of volume: deciliter.
3069 * Also see {@link #createDeciliter()}.
3070 * @draft ICU 64
3071 */
3072 static MeasureUnit getDeciliter();
3073#endif /* U_HIDE_DRAFT_API */
3074
3075 /**
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.
3080 * @stable ICU 54
3081 */
3082 static MeasureUnit *createFluidOunce(UErrorCode &status);
3083
3084#ifndef U_HIDE_DRAFT_API
3085 /**
3086 * Returns by value, unit of volume: fluid-ounce.
3087 * Also see {@link #createFluidOunce()}.
3088 * @draft ICU 64
3089 */
3090 static MeasureUnit getFluidOunce();
3091#endif /* U_HIDE_DRAFT_API */
3092
3093#ifndef U_HIDE_DRAFT_API
3094 /**
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.
3099 * @draft ICU 64
3100 */
3101 static MeasureUnit *createFluidOunceImperial(UErrorCode &status);
3102
3103 /**
3104 * Returns by value, unit of volume: fluid-ounce-imperial.
3105 * Also see {@link #createFluidOunceImperial()}.
3106 * @draft ICU 64
3107 */
3108 static MeasureUnit getFluidOunceImperial();
3109#endif /* U_HIDE_DRAFT_API */
3110
3111 /**
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.
3116 * @stable ICU 54
3117 */
3118 static MeasureUnit *createGallon(UErrorCode &status);
3119
3120#ifndef U_HIDE_DRAFT_API
3121 /**
3122 * Returns by value, unit of volume: gallon.
3123 * Also see {@link #createGallon()}.
3124 * @draft ICU 64
3125 */
3126 static MeasureUnit getGallon();
3127#endif /* U_HIDE_DRAFT_API */
3128
3129 /**
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.
3134 * @stable ICU 57
3135 */
3136 static MeasureUnit *createGallonImperial(UErrorCode &status);
3137
3138#ifndef U_HIDE_DRAFT_API
3139 /**
3140 * Returns by value, unit of volume: gallon-imperial.
3141 * Also see {@link #createGallonImperial()}.
3142 * @draft ICU 64
3143 */
3144 static MeasureUnit getGallonImperial();
3145#endif /* U_HIDE_DRAFT_API */
3146
3147 /**
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.
3152 * @stable ICU 54
3153 */
3154 static MeasureUnit *createHectoliter(UErrorCode &status);
3155
3156#ifndef U_HIDE_DRAFT_API
3157 /**
3158 * Returns by value, unit of volume: hectoliter.
3159 * Also see {@link #createHectoliter()}.
3160 * @draft ICU 64
3161 */
3162 static MeasureUnit getHectoliter();
3163#endif /* U_HIDE_DRAFT_API */
3164
3165 /**
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.
3170 * @stable ICU 53
3171 */
3172 static MeasureUnit *createLiter(UErrorCode &status);
3173
3174#ifndef U_HIDE_DRAFT_API
3175 /**
3176 * Returns by value, unit of volume: liter.
3177 * Also see {@link #createLiter()}.
3178 * @draft ICU 64
3179 */
3180 static MeasureUnit getLiter();
3181#endif /* U_HIDE_DRAFT_API */
3182
3183 /**
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.
3188 * @stable ICU 54
3189 */
3190 static MeasureUnit *createMegaliter(UErrorCode &status);
3191
3192#ifndef U_HIDE_DRAFT_API
3193 /**
3194 * Returns by value, unit of volume: megaliter.
3195 * Also see {@link #createMegaliter()}.
3196 * @draft ICU 64
3197 */
3198 static MeasureUnit getMegaliter();
3199#endif /* U_HIDE_DRAFT_API */
3200
3201 /**
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.
3206 * @stable ICU 54
3207 */
3208 static MeasureUnit *createMilliliter(UErrorCode &status);
3209
3210#ifndef U_HIDE_DRAFT_API
3211 /**
3212 * Returns by value, unit of volume: milliliter.
3213 * Also see {@link #createMilliliter()}.
3214 * @draft ICU 64
3215 */
3216 static MeasureUnit getMilliliter();
3217#endif /* U_HIDE_DRAFT_API */
3218
3219 /**
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.
3224 * @stable ICU 54
3225 */
3226 static MeasureUnit *createPint(UErrorCode &status);
3227
3228#ifndef U_HIDE_DRAFT_API
3229 /**
3230 * Returns by value, unit of volume: pint.
3231 * Also see {@link #createPint()}.
3232 * @draft ICU 64
3233 */
3234 static MeasureUnit getPint();
3235#endif /* U_HIDE_DRAFT_API */
3236
3237 /**
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.
3242 * @stable ICU 56
3243 */
3244 static MeasureUnit *createPintMetric(UErrorCode &status);
3245
3246#ifndef U_HIDE_DRAFT_API
3247 /**
3248 * Returns by value, unit of volume: pint-metric.
3249 * Also see {@link #createPintMetric()}.
3250 * @draft ICU 64
3251 */
3252 static MeasureUnit getPintMetric();
3253#endif /* U_HIDE_DRAFT_API */
3254
3255 /**
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.
3260 * @stable ICU 54
3261 */
3262 static MeasureUnit *createQuart(UErrorCode &status);
3263
3264#ifndef U_HIDE_DRAFT_API
3265 /**
3266 * Returns by value, unit of volume: quart.
3267 * Also see {@link #createQuart()}.
3268 * @draft ICU 64
3269 */
3270 static MeasureUnit getQuart();
3271#endif /* U_HIDE_DRAFT_API */
3272
3273 /**
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.
3278 * @stable ICU 54
3279 */
3280 static MeasureUnit *createTablespoon(UErrorCode &status);
3281
3282#ifndef U_HIDE_DRAFT_API
3283 /**
3284 * Returns by value, unit of volume: tablespoon.
3285 * Also see {@link #createTablespoon()}.
3286 * @draft ICU 64
3287 */
3288 static MeasureUnit getTablespoon();
3289#endif /* U_HIDE_DRAFT_API */
3290
3291 /**
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.
3296 * @stable ICU 54
3297 */
3298 static MeasureUnit *createTeaspoon(UErrorCode &status);
3299
3300#ifndef U_HIDE_DRAFT_API
3301 /**
3302 * Returns by value, unit of volume: teaspoon.
3303 * Also see {@link #createTeaspoon()}.
3304 * @draft ICU 64
3305 */
3306 static MeasureUnit getTeaspoon();
3307#endif /* U_HIDE_DRAFT_API */
3308
3309
3310// End generated createXXX methods
3311
3312 protected:
3313
3314#ifndef U_HIDE_INTERNAL_API
3315 /**
3316 * For ICU use only.
3317 * @internal
3318 */
3319 void initTime(const char *timeId);
3320
3321 /**
3322 * For ICU use only.
3323 * @internal
3324 */
3325 void initCurrency(const char *isoCurrency);
3326
3327 /**
3328 * For ICU use only.
3329 * @internal
3330 */
3331 void initNoUnit(const char *subtype);
3332
3333#endif /* U_HIDE_INTERNAL_API */
3334
3335private:
3336 int32_t fTypeId;
3337 int32_t fSubTypeId;
3338 char fCurrency[4];
3339
3340 MeasureUnit(int32_t typeId, int32_t subTypeId) : fTypeId(typeId), fSubTypeId(subTypeId) {
3341 fCurrency[0] = 0;
3342 }
3343 void setTo(int32_t typeId, int32_t subTypeId);
3344 int32_t getOffset() const;
3345 static MeasureUnit *create(int typeId, int subTypeId, UErrorCode &status);
3346};
3347
3348U_NAMESPACE_END
3349
3350#endif // !UNCONFIG_NO_FORMATTING
3351
3352#endif /* U_SHOW_CPLUSPLUS_API */
3353
3354#endif // __MEASUREUNIT_H__
3355