]> git.saurik.com Git - apple/icu.git/blob - icuSources/i18n/unicode/measunit.h
ICU-64232.0.1.tar.gz
[apple/icu.git] / icuSources / i18n / unicode / measunit.h
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 !UCONFIG_NO_FORMATTING
19
20 #include "unicode/unistr.h"
21
22 /**
23 * \file
24 * \brief C++ API: A unit for measuring a quantity.
25 */
26
27 #if U_SHOW_CPLUSPLUS_API
28 U_NAMESPACE_BEGIN
29
30 class StringEnumeration;
31
32 /**
33 * A unit such as length, mass, volume, currency, etc. A unit is
34 * coupled with a numeric amount to produce a Measure.
35 *
36 * @author Alan Liu
37 * @stable ICU 3.0
38 */
39 class U_I18N_API MeasureUnit: public UObject {
40 public:
41
42 /**
43 * Default constructor.
44 * Populates the instance with the base dimensionless unit.
45 * @stable ICU 3.0
46 */
47 MeasureUnit();
48
49 /**
50 * Copy constructor.
51 * @stable ICU 3.0
52 */
53 MeasureUnit(const MeasureUnit &other);
54
55 /**
56 * Assignment operator.
57 * @stable ICU 3.0
58 */
59 MeasureUnit &operator=(const MeasureUnit &other);
60
61 /**
62 * Returns a polymorphic clone of this object. The result will
63 * have the same class as returned by getDynamicClassID().
64 * @stable ICU 3.0
65 */
66 virtual UObject* clone() const;
67
68 /**
69 * Destructor
70 * @stable ICU 3.0
71 */
72 virtual ~MeasureUnit();
73
74 /**
75 * Equality operator. Return true if this object is equal
76 * to the given object.
77 * @stable ICU 3.0
78 */
79 virtual UBool operator==(const UObject& other) const;
80
81 /**
82 * Inequality operator. Return true if this object is not equal
83 * to the given object.
84 * @stable ICU 53
85 */
86 UBool operator!=(const UObject& other) const {
87 return !(*this == other);
88 }
89
90 /**
91 * Get the type.
92 * @stable ICU 53
93 */
94 const char *getType() const;
95
96 /**
97 * Get the sub type.
98 * @stable ICU 53
99 */
100 const char *getSubtype() const;
101
102 /**
103 * getAvailable gets all of the available units.
104 * If there are too many units to fit into destCapacity then the
105 * error code is set to U_BUFFER_OVERFLOW_ERROR.
106 *
107 * @param destArray destination buffer.
108 * @param destCapacity number of MeasureUnit instances available at dest.
109 * @param errorCode ICU error code.
110 * @return number of available units.
111 * @stable ICU 53
112 */
113 static int32_t getAvailable(
114 MeasureUnit *destArray,
115 int32_t destCapacity,
116 UErrorCode &errorCode);
117
118 /**
119 * getAvailable gets all of the available units for a specific type.
120 * If there are too many units to fit into destCapacity then the
121 * error code is set to U_BUFFER_OVERFLOW_ERROR.
122 *
123 * @param type the type
124 * @param destArray destination buffer.
125 * @param destCapacity number of MeasureUnit instances available at dest.
126 * @param errorCode ICU error code.
127 * @return number of available units for type.
128 * @stable ICU 53
129 */
130 static int32_t getAvailable(
131 const char *type,
132 MeasureUnit *destArray,
133 int32_t destCapacity,
134 UErrorCode &errorCode);
135
136 /**
137 * getAvailableTypes gets all of the available types. Caller owns the
138 * returned StringEnumeration and must delete it when finished using it.
139 *
140 * @param errorCode ICU error code.
141 * @return the types.
142 * @stable ICU 53
143 */
144 static StringEnumeration* getAvailableTypes(UErrorCode &errorCode);
145
146 /**
147 * Return the class ID for this class. This is useful only for comparing to
148 * a return value from getDynamicClassID(). For example:
149 * <pre>
150 * . Base* polymorphic_pointer = createPolymorphicObject();
151 * . if (polymorphic_pointer->getDynamicClassID() ==
152 * . Derived::getStaticClassID()) ...
153 * </pre>
154 * @return The class ID for all objects of this class.
155 * @stable ICU 53
156 */
157 static UClassID U_EXPORT2 getStaticClassID(void);
158
159 /**
160 * Returns a unique class ID POLYMORPHICALLY. Pure virtual override. This
161 * method is to implement a simple version of RTTI, since not all C++
162 * compilers support genuine RTTI. Polymorphic operator==() and clone()
163 * methods call this method.
164 *
165 * @return The class ID for this object. All objects of a
166 * given class have the same class ID. Objects of
167 * other classes have different class IDs.
168 * @stable ICU 53
169 */
170 virtual UClassID getDynamicClassID(void) const;
171
172 #ifndef U_HIDE_INTERNAL_API
173 /**
174 * ICU use only.
175 * Returns associated array index for this measure unit. Only valid for
176 * non-currency measure units.
177 * @internal
178 */
179 int32_t getIndex() const;
180
181 /**
182 * ICU use only.
183 * Returns maximum value from getIndex plus 1.
184 * @internal
185 */
186 static int32_t getIndexCount();
187
188 /**
189 * ICU use only.
190 * @return the unit.getIndex() of the unit which has this unit.getType() and unit.getSubtype(),
191 * or a negative value if there is no such unit
192 * @internal
193 */
194 static int32_t internalGetIndexForTypeAndSubtype(const char *type, const char *subtype);
195
196 /**
197 * ICU use only.
198 * @internal
199 */
200 static MeasureUnit resolveUnitPerUnit(
201 const MeasureUnit &unit, const MeasureUnit &perUnit, bool* isResolved);
202 #endif /* U_HIDE_INTERNAL_API */
203
204 // All code between the "Start generated createXXX methods" comment and
205 // the "End generated createXXX methods" comment is auto generated code
206 // and must not be edited manually. For instructions on how to correctly
207 // update this code, refer to:
208 // http://site.icu-project.org/design/formatting/measureformat/updating-measure-unit
209 //
210 // Start generated createXXX methods
211
212 /**
213 * Returns by pointer, unit of acceleration: g-force.
214 * Caller owns returned value and must free it.
215 * Also see {@link #getGForce()}.
216 * @param status ICU error code.
217 * @stable ICU 53
218 */
219 static MeasureUnit *createGForce(UErrorCode &status);
220
221 #ifndef U_HIDE_DRAFT_API
222 /**
223 * Returns by value, unit of acceleration: g-force.
224 * Also see {@link #createGForce()}.
225 * @draft ICU 64
226 */
227 static MeasureUnit getGForce();
228 #endif /* U_HIDE_DRAFT_API */
229
230 /**
231 * Returns by pointer, unit of acceleration: meter-per-second-squared.
232 * Caller owns returned value and must free it.
233 * Also see {@link #getMeterPerSecondSquared()}.
234 * @param status ICU error code.
235 * @stable ICU 54
236 */
237 static MeasureUnit *createMeterPerSecondSquared(UErrorCode &status);
238
239 #ifndef U_HIDE_DRAFT_API
240 /**
241 * Returns by value, unit of acceleration: meter-per-second-squared.
242 * Also see {@link #createMeterPerSecondSquared()}.
243 * @draft ICU 64
244 */
245 static MeasureUnit getMeterPerSecondSquared();
246 #endif /* U_HIDE_DRAFT_API */
247
248 /**
249 * Returns by pointer, unit of angle: arc-minute.
250 * Caller owns returned value and must free it.
251 * Also see {@link #getArcMinute()}.
252 * @param status ICU error code.
253 * @stable ICU 53
254 */
255 static MeasureUnit *createArcMinute(UErrorCode &status);
256
257 #ifndef U_HIDE_DRAFT_API
258 /**
259 * Returns by value, unit of angle: arc-minute.
260 * Also see {@link #createArcMinute()}.
261 * @draft ICU 64
262 */
263 static MeasureUnit getArcMinute();
264 #endif /* U_HIDE_DRAFT_API */
265
266 /**
267 * Returns by pointer, unit of angle: arc-second.
268 * Caller owns returned value and must free it.
269 * Also see {@link #getArcSecond()}.
270 * @param status ICU error code.
271 * @stable ICU 53
272 */
273 static MeasureUnit *createArcSecond(UErrorCode &status);
274
275 #ifndef U_HIDE_DRAFT_API
276 /**
277 * Returns by value, unit of angle: arc-second.
278 * Also see {@link #createArcSecond()}.
279 * @draft ICU 64
280 */
281 static MeasureUnit getArcSecond();
282 #endif /* U_HIDE_DRAFT_API */
283
284 /**
285 * Returns by pointer, unit of angle: degree.
286 * Caller owns returned value and must free it.
287 * Also see {@link #getDegree()}.
288 * @param status ICU error code.
289 * @stable ICU 53
290 */
291 static MeasureUnit *createDegree(UErrorCode &status);
292
293 #ifndef U_HIDE_DRAFT_API
294 /**
295 * Returns by value, unit of angle: degree.
296 * Also see {@link #createDegree()}.
297 * @draft ICU 64
298 */
299 static MeasureUnit getDegree();
300 #endif /* U_HIDE_DRAFT_API */
301
302 /**
303 * Returns by pointer, unit of angle: radian.
304 * Caller owns returned value and must free it.
305 * Also see {@link #getRadian()}.
306 * @param status ICU error code.
307 * @stable ICU 54
308 */
309 static MeasureUnit *createRadian(UErrorCode &status);
310
311 #ifndef U_HIDE_DRAFT_API
312 /**
313 * Returns by value, unit of angle: radian.
314 * Also see {@link #createRadian()}.
315 * @draft ICU 64
316 */
317 static MeasureUnit getRadian();
318 #endif /* U_HIDE_DRAFT_API */
319
320 /**
321 * Returns by pointer, unit of angle: revolution.
322 * Caller owns returned value and must free it.
323 * Also see {@link #getRevolutionAngle()}.
324 * @param status ICU error code.
325 * @stable ICU 56
326 */
327 static MeasureUnit *createRevolutionAngle(UErrorCode &status);
328
329 #ifndef U_HIDE_DRAFT_API
330 /**
331 * Returns by value, unit of angle: revolution.
332 * Also see {@link #createRevolutionAngle()}.
333 * @draft ICU 64
334 */
335 static MeasureUnit getRevolutionAngle();
336 #endif /* U_HIDE_DRAFT_API */
337
338 /**
339 * Returns by pointer, unit of area: acre.
340 * Caller owns returned value and must free it.
341 * Also see {@link #getAcre()}.
342 * @param status ICU error code.
343 * @stable ICU 53
344 */
345 static MeasureUnit *createAcre(UErrorCode &status);
346
347 #ifndef U_HIDE_DRAFT_API
348 /**
349 * Returns by value, unit of area: acre.
350 * Also see {@link #createAcre()}.
351 * @draft ICU 64
352 */
353 static MeasureUnit getAcre();
354 #endif /* U_HIDE_DRAFT_API */
355
356 #ifndef U_HIDE_DRAFT_API
357 /**
358 * Returns by pointer, unit of area: dunam.
359 * Caller owns returned value and must free it.
360 * Also see {@link #getDunam()}.
361 * @param status ICU error code.
362 * @draft ICU 64
363 */
364 static MeasureUnit *createDunam(UErrorCode &status);
365
366 /**
367 * Returns by value, unit of area: dunam.
368 * Also see {@link #createDunam()}.
369 * @draft ICU 64
370 */
371 static MeasureUnit getDunam();
372 #endif /* U_HIDE_DRAFT_API */
373
374 /**
375 * Returns by pointer, unit of area: hectare.
376 * Caller owns returned value and must free it.
377 * Also see {@link #getHectare()}.
378 * @param status ICU error code.
379 * @stable ICU 53
380 */
381 static MeasureUnit *createHectare(UErrorCode &status);
382
383 #ifndef U_HIDE_DRAFT_API
384 /**
385 * Returns by value, unit of area: hectare.
386 * Also see {@link #createHectare()}.
387 * @draft ICU 64
388 */
389 static MeasureUnit getHectare();
390 #endif /* U_HIDE_DRAFT_API */
391
392 /**
393 * Returns by pointer, unit of area: square-centimeter.
394 * Caller owns returned value and must free it.
395 * Also see {@link #getSquareCentimeter()}.
396 * @param status ICU error code.
397 * @stable ICU 54
398 */
399 static MeasureUnit *createSquareCentimeter(UErrorCode &status);
400
401 #ifndef U_HIDE_DRAFT_API
402 /**
403 * Returns by value, unit of area: square-centimeter.
404 * Also see {@link #createSquareCentimeter()}.
405 * @draft ICU 64
406 */
407 static MeasureUnit getSquareCentimeter();
408 #endif /* U_HIDE_DRAFT_API */
409
410 /**
411 * Returns by pointer, unit of area: square-foot.
412 * Caller owns returned value and must free it.
413 * Also see {@link #getSquareFoot()}.
414 * @param status ICU error code.
415 * @stable ICU 53
416 */
417 static MeasureUnit *createSquareFoot(UErrorCode &status);
418
419 #ifndef U_HIDE_DRAFT_API
420 /**
421 * Returns by value, unit of area: square-foot.
422 * Also see {@link #createSquareFoot()}.
423 * @draft ICU 64
424 */
425 static MeasureUnit getSquareFoot();
426 #endif /* U_HIDE_DRAFT_API */
427
428 /**
429 * Returns by pointer, unit of area: square-inch.
430 * Caller owns returned value and must free it.
431 * Also see {@link #getSquareInch()}.
432 * @param status ICU error code.
433 * @stable ICU 54
434 */
435 static MeasureUnit *createSquareInch(UErrorCode &status);
436
437 #ifndef U_HIDE_DRAFT_API
438 /**
439 * Returns by value, unit of area: square-inch.
440 * Also see {@link #createSquareInch()}.
441 * @draft ICU 64
442 */
443 static MeasureUnit getSquareInch();
444 #endif /* U_HIDE_DRAFT_API */
445
446 /**
447 * Returns by pointer, unit of area: square-kilometer.
448 * Caller owns returned value and must free it.
449 * Also see {@link #getSquareKilometer()}.
450 * @param status ICU error code.
451 * @stable ICU 53
452 */
453 static MeasureUnit *createSquareKilometer(UErrorCode &status);
454
455 #ifndef U_HIDE_DRAFT_API
456 /**
457 * Returns by value, unit of area: square-kilometer.
458 * Also see {@link #createSquareKilometer()}.
459 * @draft ICU 64
460 */
461 static MeasureUnit getSquareKilometer();
462 #endif /* U_HIDE_DRAFT_API */
463
464 /**
465 * Returns by pointer, unit of area: square-meter.
466 * Caller owns returned value and must free it.
467 * Also see {@link #getSquareMeter()}.
468 * @param status ICU error code.
469 * @stable ICU 53
470 */
471 static MeasureUnit *createSquareMeter(UErrorCode &status);
472
473 #ifndef U_HIDE_DRAFT_API
474 /**
475 * Returns by value, unit of area: square-meter.
476 * Also see {@link #createSquareMeter()}.
477 * @draft ICU 64
478 */
479 static MeasureUnit getSquareMeter();
480 #endif /* U_HIDE_DRAFT_API */
481
482 /**
483 * Returns by pointer, unit of area: square-mile.
484 * Caller owns returned value and must free it.
485 * Also see {@link #getSquareMile()}.
486 * @param status ICU error code.
487 * @stable ICU 53
488 */
489 static MeasureUnit *createSquareMile(UErrorCode &status);
490
491 #ifndef U_HIDE_DRAFT_API
492 /**
493 * Returns by value, unit of area: square-mile.
494 * Also see {@link #createSquareMile()}.
495 * @draft ICU 64
496 */
497 static MeasureUnit getSquareMile();
498 #endif /* U_HIDE_DRAFT_API */
499
500 /**
501 * Returns by pointer, unit of area: square-yard.
502 * Caller owns returned value and must free it.
503 * Also see {@link #getSquareYard()}.
504 * @param status ICU error code.
505 * @stable ICU 54
506 */
507 static MeasureUnit *createSquareYard(UErrorCode &status);
508
509 #ifndef U_HIDE_DRAFT_API
510 /**
511 * Returns by value, unit of area: square-yard.
512 * Also see {@link #createSquareYard()}.
513 * @draft ICU 64
514 */
515 static MeasureUnit getSquareYard();
516 #endif /* U_HIDE_DRAFT_API */
517
518 /**
519 * Returns by pointer, unit of concentr: karat.
520 * Caller owns returned value and must free it.
521 * Also see {@link #getKarat()}.
522 * @param status ICU error code.
523 * @stable ICU 54
524 */
525 static MeasureUnit *createKarat(UErrorCode &status);
526
527 #ifndef U_HIDE_DRAFT_API
528 /**
529 * Returns by value, unit of concentr: karat.
530 * Also see {@link #createKarat()}.
531 * @draft ICU 64
532 */
533 static MeasureUnit getKarat();
534 #endif /* U_HIDE_DRAFT_API */
535
536 /**
537 * Returns by pointer, unit of concentr: milligram-per-deciliter.
538 * Caller owns returned value and must free it.
539 * Also see {@link #getMilligramPerDeciliter()}.
540 * @param status ICU error code.
541 * @stable ICU 57
542 */
543 static MeasureUnit *createMilligramPerDeciliter(UErrorCode &status);
544
545 #ifndef U_HIDE_DRAFT_API
546 /**
547 * Returns by value, unit of concentr: milligram-per-deciliter.
548 * Also see {@link #createMilligramPerDeciliter()}.
549 * @draft ICU 64
550 */
551 static MeasureUnit getMilligramPerDeciliter();
552 #endif /* U_HIDE_DRAFT_API */
553
554 /**
555 * Returns by pointer, unit of concentr: millimole-per-liter.
556 * Caller owns returned value and must free it.
557 * Also see {@link #getMillimolePerLiter()}.
558 * @param status ICU error code.
559 * @stable ICU 57
560 */
561 static MeasureUnit *createMillimolePerLiter(UErrorCode &status);
562
563 #ifndef U_HIDE_DRAFT_API
564 /**
565 * Returns by value, unit of concentr: millimole-per-liter.
566 * Also see {@link #createMillimolePerLiter()}.
567 * @draft ICU 64
568 */
569 static MeasureUnit getMillimolePerLiter();
570 #endif /* U_HIDE_DRAFT_API */
571
572 #ifndef U_HIDE_DRAFT_API
573 /**
574 * Returns by pointer, unit of concentr: mole.
575 * Caller owns returned value and must free it.
576 * Also see {@link #getMole()}.
577 * @param status ICU error code.
578 * @draft ICU 64
579 */
580 static MeasureUnit *createMole(UErrorCode &status);
581
582 /**
583 * Returns by value, unit of concentr: mole.
584 * Also see {@link #createMole()}.
585 * @draft ICU 64
586 */
587 static MeasureUnit getMole();
588 #endif /* U_HIDE_DRAFT_API */
589
590 /**
591 * Returns by pointer, unit of concentr: part-per-million.
592 * Caller owns returned value and must free it.
593 * Also see {@link #getPartPerMillion()}.
594 * @param status ICU error code.
595 * @stable ICU 57
596 */
597 static MeasureUnit *createPartPerMillion(UErrorCode &status);
598
599 #ifndef U_HIDE_DRAFT_API
600 /**
601 * Returns by value, unit of concentr: part-per-million.
602 * Also see {@link #createPartPerMillion()}.
603 * @draft ICU 64
604 */
605 static MeasureUnit getPartPerMillion();
606 #endif /* U_HIDE_DRAFT_API */
607
608 #ifndef U_HIDE_DRAFT_API
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 * @draft ICU 63
615 */
616 static MeasureUnit *createPercent(UErrorCode &status);
617 #endif /* U_HIDE_DRAFT_API */
618
619 #ifndef U_HIDE_DRAFT_API
620 /**
621 * Returns by value, unit of concentr: percent.
622 * Also see {@link #createPercent()}.
623 * @draft ICU 64
624 */
625 static MeasureUnit getPercent();
626 #endif /* U_HIDE_DRAFT_API */
627
628 #ifndef U_HIDE_DRAFT_API
629 /**
630 * Returns by pointer, unit of concentr: permille.
631 * Caller owns returned value and must free it.
632 * Also see {@link #getPermille()}.
633 * @param status ICU error code.
634 * @draft ICU 63
635 */
636 static MeasureUnit *createPermille(UErrorCode &status);
637 #endif /* U_HIDE_DRAFT_API */
638
639 #ifndef U_HIDE_DRAFT_API
640 /**
641 * Returns by value, unit of concentr: permille.
642 * Also see {@link #createPermille()}.
643 * @draft ICU 64
644 */
645 static MeasureUnit getPermille();
646 #endif /* U_HIDE_DRAFT_API */
647
648 #ifndef U_HIDE_DRAFT_API
649 /**
650 * Returns by pointer, unit of concentr: permyriad.
651 * Caller owns returned value and must free it.
652 * Also see {@link #getPermyriad()}.
653 * @param status ICU error code.
654 * @draft ICU 64
655 */
656 static MeasureUnit *createPermyriad(UErrorCode &status);
657
658 /**
659 * Returns by value, unit of concentr: permyriad.
660 * Also see {@link #createPermyriad()}.
661 * @draft ICU 64
662 */
663 static MeasureUnit getPermyriad();
664 #endif /* U_HIDE_DRAFT_API */
665
666 /**
667 * Returns by pointer, unit of consumption: liter-per-100kilometers.
668 * Caller owns returned value and must free it.
669 * Also see {@link #getLiterPer100Kilometers()}.
670 * @param status ICU error code.
671 * @stable ICU 56
672 */
673 static MeasureUnit *createLiterPer100Kilometers(UErrorCode &status);
674
675 #ifndef U_HIDE_DRAFT_API
676 /**
677 * Returns by value, unit of consumption: liter-per-100kilometers.
678 * Also see {@link #createLiterPer100Kilometers()}.
679 * @draft ICU 64
680 */
681 static MeasureUnit getLiterPer100Kilometers();
682 #endif /* U_HIDE_DRAFT_API */
683
684 /**
685 * Returns by pointer, unit of consumption: liter-per-kilometer.
686 * Caller owns returned value and must free it.
687 * Also see {@link #getLiterPerKilometer()}.
688 * @param status ICU error code.
689 * @stable ICU 54
690 */
691 static MeasureUnit *createLiterPerKilometer(UErrorCode &status);
692
693 #ifndef U_HIDE_DRAFT_API
694 /**
695 * Returns by value, unit of consumption: liter-per-kilometer.
696 * Also see {@link #createLiterPerKilometer()}.
697 * @draft ICU 64
698 */
699 static MeasureUnit getLiterPerKilometer();
700 #endif /* U_HIDE_DRAFT_API */
701
702 /**
703 * Returns by pointer, unit of consumption: mile-per-gallon.
704 * Caller owns returned value and must free it.
705 * Also see {@link #getMilePerGallon()}.
706 * @param status ICU error code.
707 * @stable ICU 54
708 */
709 static MeasureUnit *createMilePerGallon(UErrorCode &status);
710
711 #ifndef U_HIDE_DRAFT_API
712 /**
713 * Returns by value, unit of consumption: mile-per-gallon.
714 * Also see {@link #createMilePerGallon()}.
715 * @draft ICU 64
716 */
717 static MeasureUnit getMilePerGallon();
718 #endif /* U_HIDE_DRAFT_API */
719
720 /**
721 * Returns by pointer, unit of consumption: mile-per-gallon-imperial.
722 * Caller owns returned value and must free it.
723 * Also see {@link #getMilePerGallonImperial()}.
724 * @param status ICU error code.
725 * @stable ICU 57
726 */
727 static MeasureUnit *createMilePerGallonImperial(UErrorCode &status);
728
729 #ifndef U_HIDE_DRAFT_API
730 /**
731 * Returns by value, unit of consumption: mile-per-gallon-imperial.
732 * Also see {@link #createMilePerGallonImperial()}.
733 * @draft ICU 64
734 */
735 static MeasureUnit getMilePerGallonImperial();
736 #endif /* U_HIDE_DRAFT_API */
737
738 /**
739 * Returns by pointer, unit of digital: bit.
740 * Caller owns returned value and must free it.
741 * Also see {@link #getBit()}.
742 * @param status ICU error code.
743 * @stable ICU 54
744 */
745 static MeasureUnit *createBit(UErrorCode &status);
746
747 #ifndef U_HIDE_DRAFT_API
748 /**
749 * Returns by value, unit of digital: bit.
750 * Also see {@link #createBit()}.
751 * @draft ICU 64
752 */
753 static MeasureUnit getBit();
754 #endif /* U_HIDE_DRAFT_API */
755
756 /**
757 * Returns by pointer, unit of digital: byte.
758 * Caller owns returned value and must free it.
759 * Also see {@link #getByte()}.
760 * @param status ICU error code.
761 * @stable ICU 54
762 */
763 static MeasureUnit *createByte(UErrorCode &status);
764
765 #ifndef U_HIDE_DRAFT_API
766 /**
767 * Returns by value, unit of digital: byte.
768 * Also see {@link #createByte()}.
769 * @draft ICU 64
770 */
771 static MeasureUnit getByte();
772 #endif /* U_HIDE_DRAFT_API */
773
774 /**
775 * Returns by pointer, unit of digital: gigabit.
776 * Caller owns returned value and must free it.
777 * Also see {@link #getGigabit()}.
778 * @param status ICU error code.
779 * @stable ICU 54
780 */
781 static MeasureUnit *createGigabit(UErrorCode &status);
782
783 #ifndef U_HIDE_DRAFT_API
784 /**
785 * Returns by value, unit of digital: gigabit.
786 * Also see {@link #createGigabit()}.
787 * @draft ICU 64
788 */
789 static MeasureUnit getGigabit();
790 #endif /* U_HIDE_DRAFT_API */
791
792 /**
793 * Returns by pointer, unit of digital: gigabyte.
794 * Caller owns returned value and must free it.
795 * Also see {@link #getGigabyte()}.
796 * @param status ICU error code.
797 * @stable ICU 54
798 */
799 static MeasureUnit *createGigabyte(UErrorCode &status);
800
801 #ifndef U_HIDE_DRAFT_API
802 /**
803 * Returns by value, unit of digital: gigabyte.
804 * Also see {@link #createGigabyte()}.
805 * @draft ICU 64
806 */
807 static MeasureUnit getGigabyte();
808 #endif /* U_HIDE_DRAFT_API */
809
810 /**
811 * Returns by pointer, unit of digital: kilobit.
812 * Caller owns returned value and must free it.
813 * Also see {@link #getKilobit()}.
814 * @param status ICU error code.
815 * @stable ICU 54
816 */
817 static MeasureUnit *createKilobit(UErrorCode &status);
818
819 #ifndef U_HIDE_DRAFT_API
820 /**
821 * Returns by value, unit of digital: kilobit.
822 * Also see {@link #createKilobit()}.
823 * @draft ICU 64
824 */
825 static MeasureUnit getKilobit();
826 #endif /* U_HIDE_DRAFT_API */
827
828 /**
829 * Returns by pointer, unit of digital: kilobyte.
830 * Caller owns returned value and must free it.
831 * Also see {@link #getKilobyte()}.
832 * @param status ICU error code.
833 * @stable ICU 54
834 */
835 static MeasureUnit *createKilobyte(UErrorCode &status);
836
837 #ifndef U_HIDE_DRAFT_API
838 /**
839 * Returns by value, unit of digital: kilobyte.
840 * Also see {@link #createKilobyte()}.
841 * @draft ICU 64
842 */
843 static MeasureUnit getKilobyte();
844 #endif /* U_HIDE_DRAFT_API */
845
846 /**
847 * Returns by pointer, unit of digital: megabit.
848 * Caller owns returned value and must free it.
849 * Also see {@link #getMegabit()}.
850 * @param status ICU error code.
851 * @stable ICU 54
852 */
853 static MeasureUnit *createMegabit(UErrorCode &status);
854
855 #ifndef U_HIDE_DRAFT_API
856 /**
857 * Returns by value, unit of digital: megabit.
858 * Also see {@link #createMegabit()}.
859 * @draft ICU 64
860 */
861 static MeasureUnit getMegabit();
862 #endif /* U_HIDE_DRAFT_API */
863
864 /**
865 * Returns by pointer, unit of digital: megabyte.
866 * Caller owns returned value and must free it.
867 * Also see {@link #getMegabyte()}.
868 * @param status ICU error code.
869 * @stable ICU 54
870 */
871 static MeasureUnit *createMegabyte(UErrorCode &status);
872
873 #ifndef U_HIDE_DRAFT_API
874 /**
875 * Returns by value, unit of digital: megabyte.
876 * Also see {@link #createMegabyte()}.
877 * @draft ICU 64
878 */
879 static MeasureUnit getMegabyte();
880 #endif /* U_HIDE_DRAFT_API */
881
882 #ifndef U_HIDE_DRAFT_API
883 /**
884 * Returns by pointer, unit of digital: petabyte.
885 * Caller owns returned value and must free it.
886 * Also see {@link #getPetabyte()}.
887 * @param status ICU error code.
888 * @draft ICU 63
889 */
890 static MeasureUnit *createPetabyte(UErrorCode &status);
891 #endif /* U_HIDE_DRAFT_API */
892
893 #ifndef U_HIDE_DRAFT_API
894 /**
895 * Returns by value, unit of digital: petabyte.
896 * Also see {@link #createPetabyte()}.
897 * @draft ICU 64
898 */
899 static MeasureUnit getPetabyte();
900 #endif /* U_HIDE_DRAFT_API */
901
902 /**
903 * Returns by pointer, unit of digital: terabit.
904 * Caller owns returned value and must free it.
905 * Also see {@link #getTerabit()}.
906 * @param status ICU error code.
907 * @stable ICU 54
908 */
909 static MeasureUnit *createTerabit(UErrorCode &status);
910
911 #ifndef U_HIDE_DRAFT_API
912 /**
913 * Returns by value, unit of digital: terabit.
914 * Also see {@link #createTerabit()}.
915 * @draft ICU 64
916 */
917 static MeasureUnit getTerabit();
918 #endif /* U_HIDE_DRAFT_API */
919
920 /**
921 * Returns by pointer, unit of digital: terabyte.
922 * Caller owns returned value and must free it.
923 * Also see {@link #getTerabyte()}.
924 * @param status ICU error code.
925 * @stable ICU 54
926 */
927 static MeasureUnit *createTerabyte(UErrorCode &status);
928
929 #ifndef U_HIDE_DRAFT_API
930 /**
931 * Returns by value, unit of digital: terabyte.
932 * Also see {@link #createTerabyte()}.
933 * @draft ICU 64
934 */
935 static MeasureUnit getTerabyte();
936 #endif /* U_HIDE_DRAFT_API */
937
938 /**
939 * Returns by pointer, unit of duration: century.
940 * Caller owns returned value and must free it.
941 * Also see {@link #getCentury()}.
942 * @param status ICU error code.
943 * @stable ICU 56
944 */
945 static MeasureUnit *createCentury(UErrorCode &status);
946
947 #ifndef U_HIDE_DRAFT_API
948 /**
949 * Returns by value, unit of duration: century.
950 * Also see {@link #createCentury()}.
951 * @draft ICU 64
952 */
953 static MeasureUnit getCentury();
954 #endif /* U_HIDE_DRAFT_API */
955
956 /**
957 * Returns by pointer, unit of duration: day.
958 * Caller owns returned value and must free it.
959 * Also see {@link #getDay()}.
960 * @param status ICU error code.
961 * @stable ICU 53
962 */
963 static MeasureUnit *createDay(UErrorCode &status);
964
965 #ifndef U_HIDE_DRAFT_API
966 /**
967 * Returns by value, unit of duration: day.
968 * Also see {@link #createDay()}.
969 * @draft ICU 64
970 */
971 static MeasureUnit getDay();
972 #endif /* U_HIDE_DRAFT_API */
973
974 #ifndef U_HIDE_DRAFT_API
975 /**
976 * Returns by pointer, unit of duration: day-person.
977 * Caller owns returned value and must free it.
978 * Also see {@link #getDayPerson()}.
979 * @param status ICU error code.
980 * @draft ICU 64
981 */
982 static MeasureUnit *createDayPerson(UErrorCode &status);
983 #endif /* U_HIDE_DRAFT_API */
984
985 #ifndef U_HIDE_DRAFT_API
986 /**
987 * Returns by value, unit of duration: day-person.
988 * Also see {@link #createDayPerson()}.
989 * @draft ICU 64
990 */
991 static MeasureUnit getDayPerson();
992 #endif /* U_HIDE_DRAFT_API */
993
994 /**
995 * Returns by pointer, unit of duration: hour.
996 * Caller owns returned value and must free it.
997 * Also see {@link #getHour()}.
998 * @param status ICU error code.
999 * @stable ICU 53
1000 */
1001 static MeasureUnit *createHour(UErrorCode &status);
1002
1003 #ifndef U_HIDE_DRAFT_API
1004 /**
1005 * Returns by value, unit of duration: hour.
1006 * Also see {@link #createHour()}.
1007 * @draft ICU 64
1008 */
1009 static MeasureUnit getHour();
1010 #endif /* U_HIDE_DRAFT_API */
1011
1012 /**
1013 * Returns by pointer, unit of duration: microsecond.
1014 * Caller owns returned value and must free it.
1015 * Also see {@link #getMicrosecond()}.
1016 * @param status ICU error code.
1017 * @stable ICU 54
1018 */
1019 static MeasureUnit *createMicrosecond(UErrorCode &status);
1020
1021 #ifndef U_HIDE_DRAFT_API
1022 /**
1023 * Returns by value, unit of duration: microsecond.
1024 * Also see {@link #createMicrosecond()}.
1025 * @draft ICU 64
1026 */
1027 static MeasureUnit getMicrosecond();
1028 #endif /* U_HIDE_DRAFT_API */
1029
1030 /**
1031 * Returns by pointer, unit of duration: millisecond.
1032 * Caller owns returned value and must free it.
1033 * Also see {@link #getMillisecond()}.
1034 * @param status ICU error code.
1035 * @stable ICU 53
1036 */
1037 static MeasureUnit *createMillisecond(UErrorCode &status);
1038
1039 #ifndef U_HIDE_DRAFT_API
1040 /**
1041 * Returns by value, unit of duration: millisecond.
1042 * Also see {@link #createMillisecond()}.
1043 * @draft ICU 64
1044 */
1045 static MeasureUnit getMillisecond();
1046 #endif /* U_HIDE_DRAFT_API */
1047
1048 /**
1049 * Returns by pointer, unit of duration: minute.
1050 * Caller owns returned value and must free it.
1051 * Also see {@link #getMinute()}.
1052 * @param status ICU error code.
1053 * @stable ICU 53
1054 */
1055 static MeasureUnit *createMinute(UErrorCode &status);
1056
1057 #ifndef U_HIDE_DRAFT_API
1058 /**
1059 * Returns by value, unit of duration: minute.
1060 * Also see {@link #createMinute()}.
1061 * @draft ICU 64
1062 */
1063 static MeasureUnit getMinute();
1064 #endif /* U_HIDE_DRAFT_API */
1065
1066 /**
1067 * Returns by pointer, unit of duration: month.
1068 * Caller owns returned value and must free it.
1069 * Also see {@link #getMonth()}.
1070 * @param status ICU error code.
1071 * @stable ICU 53
1072 */
1073 static MeasureUnit *createMonth(UErrorCode &status);
1074
1075 #ifndef U_HIDE_DRAFT_API
1076 /**
1077 * Returns by value, unit of duration: month.
1078 * Also see {@link #createMonth()}.
1079 * @draft ICU 64
1080 */
1081 static MeasureUnit getMonth();
1082 #endif /* U_HIDE_DRAFT_API */
1083
1084 #ifndef U_HIDE_DRAFT_API
1085 /**
1086 * Returns by pointer, unit of duration: month-person.
1087 * Caller owns returned value and must free it.
1088 * Also see {@link #getMonthPerson()}.
1089 * @param status ICU error code.
1090 * @draft ICU 64
1091 */
1092 static MeasureUnit *createMonthPerson(UErrorCode &status);
1093 #endif /* U_HIDE_DRAFT_API */
1094
1095 #ifndef U_HIDE_DRAFT_API
1096 /**
1097 * Returns by value, unit of duration: month-person.
1098 * Also see {@link #createMonthPerson()}.
1099 * @draft ICU 64
1100 */
1101 static MeasureUnit getMonthPerson();
1102 #endif /* U_HIDE_DRAFT_API */
1103
1104 /**
1105 * Returns by pointer, unit of duration: nanosecond.
1106 * Caller owns returned value and must free it.
1107 * Also see {@link #getNanosecond()}.
1108 * @param status ICU error code.
1109 * @stable ICU 54
1110 */
1111 static MeasureUnit *createNanosecond(UErrorCode &status);
1112
1113 #ifndef U_HIDE_DRAFT_API
1114 /**
1115 * Returns by value, unit of duration: nanosecond.
1116 * Also see {@link #createNanosecond()}.
1117 * @draft ICU 64
1118 */
1119 static MeasureUnit getNanosecond();
1120 #endif /* U_HIDE_DRAFT_API */
1121
1122 /**
1123 * Returns by pointer, unit of duration: second.
1124 * Caller owns returned value and must free it.
1125 * Also see {@link #getSecond()}.
1126 * @param status ICU error code.
1127 * @stable ICU 53
1128 */
1129 static MeasureUnit *createSecond(UErrorCode &status);
1130
1131 #ifndef U_HIDE_DRAFT_API
1132 /**
1133 * Returns by value, unit of duration: second.
1134 * Also see {@link #createSecond()}.
1135 * @draft ICU 64
1136 */
1137 static MeasureUnit getSecond();
1138 #endif /* U_HIDE_DRAFT_API */
1139
1140 /**
1141 * Returns by pointer, unit of duration: week.
1142 * Caller owns returned value and must free it.
1143 * Also see {@link #getWeek()}.
1144 * @param status ICU error code.
1145 * @stable ICU 53
1146 */
1147 static MeasureUnit *createWeek(UErrorCode &status);
1148
1149 #ifndef U_HIDE_DRAFT_API
1150 /**
1151 * Returns by value, unit of duration: week.
1152 * Also see {@link #createWeek()}.
1153 * @draft ICU 64
1154 */
1155 static MeasureUnit getWeek();
1156 #endif /* U_HIDE_DRAFT_API */
1157
1158 #ifndef U_HIDE_DRAFT_API
1159 /**
1160 * Returns by pointer, unit of duration: week-person.
1161 * Caller owns returned value and must free it.
1162 * Also see {@link #getWeekPerson()}.
1163 * @param status ICU error code.
1164 * @draft ICU 64
1165 */
1166 static MeasureUnit *createWeekPerson(UErrorCode &status);
1167 #endif /* U_HIDE_DRAFT_API */
1168
1169 #ifndef U_HIDE_DRAFT_API
1170 /**
1171 * Returns by value, unit of duration: week-person.
1172 * Also see {@link #createWeekPerson()}.
1173 * @draft ICU 64
1174 */
1175 static MeasureUnit getWeekPerson();
1176 #endif /* U_HIDE_DRAFT_API */
1177
1178 /**
1179 * Returns by pointer, unit of duration: year.
1180 * Caller owns returned value and must free it.
1181 * Also see {@link #getYear()}.
1182 * @param status ICU error code.
1183 * @stable ICU 53
1184 */
1185 static MeasureUnit *createYear(UErrorCode &status);
1186
1187 #ifndef U_HIDE_DRAFT_API
1188 /**
1189 * Returns by value, unit of duration: year.
1190 * Also see {@link #createYear()}.
1191 * @draft ICU 64
1192 */
1193 static MeasureUnit getYear();
1194 #endif /* U_HIDE_DRAFT_API */
1195
1196 #ifndef U_HIDE_DRAFT_API
1197 /**
1198 * Returns by pointer, unit of duration: year-person.
1199 * Caller owns returned value and must free it.
1200 * Also see {@link #getYearPerson()}.
1201 * @param status ICU error code.
1202 * @draft ICU 64
1203 */
1204 static MeasureUnit *createYearPerson(UErrorCode &status);
1205 #endif /* U_HIDE_DRAFT_API */
1206
1207 #ifndef U_HIDE_DRAFT_API
1208 /**
1209 * Returns by value, unit of duration: year-person.
1210 * Also see {@link #createYearPerson()}.
1211 * @draft ICU 64
1212 */
1213 static MeasureUnit getYearPerson();
1214 #endif /* U_HIDE_DRAFT_API */
1215
1216 /**
1217 * Returns by pointer, unit of electric: ampere.
1218 * Caller owns returned value and must free it.
1219 * Also see {@link #getAmpere()}.
1220 * @param status ICU error code.
1221 * @stable ICU 54
1222 */
1223 static MeasureUnit *createAmpere(UErrorCode &status);
1224
1225 #ifndef U_HIDE_DRAFT_API
1226 /**
1227 * Returns by value, unit of electric: ampere.
1228 * Also see {@link #createAmpere()}.
1229 * @draft ICU 64
1230 */
1231 static MeasureUnit getAmpere();
1232 #endif /* U_HIDE_DRAFT_API */
1233
1234 /**
1235 * Returns by pointer, unit of electric: milliampere.
1236 * Caller owns returned value and must free it.
1237 * Also see {@link #getMilliampere()}.
1238 * @param status ICU error code.
1239 * @stable ICU 54
1240 */
1241 static MeasureUnit *createMilliampere(UErrorCode &status);
1242
1243 #ifndef U_HIDE_DRAFT_API
1244 /**
1245 * Returns by value, unit of electric: milliampere.
1246 * Also see {@link #createMilliampere()}.
1247 * @draft ICU 64
1248 */
1249 static MeasureUnit getMilliampere();
1250 #endif /* U_HIDE_DRAFT_API */
1251
1252 /**
1253 * Returns by pointer, unit of electric: ohm.
1254 * Caller owns returned value and must free it.
1255 * Also see {@link #getOhm()}.
1256 * @param status ICU error code.
1257 * @stable ICU 54
1258 */
1259 static MeasureUnit *createOhm(UErrorCode &status);
1260
1261 #ifndef U_HIDE_DRAFT_API
1262 /**
1263 * Returns by value, unit of electric: ohm.
1264 * Also see {@link #createOhm()}.
1265 * @draft ICU 64
1266 */
1267 static MeasureUnit getOhm();
1268 #endif /* U_HIDE_DRAFT_API */
1269
1270 /**
1271 * Returns by pointer, unit of electric: volt.
1272 * Caller owns returned value and must free it.
1273 * Also see {@link #getVolt()}.
1274 * @param status ICU error code.
1275 * @stable ICU 54
1276 */
1277 static MeasureUnit *createVolt(UErrorCode &status);
1278
1279 #ifndef U_HIDE_DRAFT_API
1280 /**
1281 * Returns by value, unit of electric: volt.
1282 * Also see {@link #createVolt()}.
1283 * @draft ICU 64
1284 */
1285 static MeasureUnit getVolt();
1286 #endif /* U_HIDE_DRAFT_API */
1287
1288 #ifndef U_HIDE_DRAFT_API
1289 /**
1290 * Returns by pointer, unit of energy: british-thermal-unit.
1291 * Caller owns returned value and must free it.
1292 * Also see {@link #getBritishThermalUnit()}.
1293 * @param status ICU error code.
1294 * @draft ICU 64
1295 */
1296 static MeasureUnit *createBritishThermalUnit(UErrorCode &status);
1297
1298 /**
1299 * Returns by value, unit of energy: british-thermal-unit.
1300 * Also see {@link #createBritishThermalUnit()}.
1301 * @draft ICU 64
1302 */
1303 static MeasureUnit getBritishThermalUnit();
1304 #endif /* U_HIDE_DRAFT_API */
1305
1306 /**
1307 * Returns by pointer, unit of energy: calorie.
1308 * Caller owns returned value and must free it.
1309 * Also see {@link #getCalorie()}.
1310 * @param status ICU error code.
1311 * @stable ICU 54
1312 */
1313 static MeasureUnit *createCalorie(UErrorCode &status);
1314
1315 #ifndef U_HIDE_DRAFT_API
1316 /**
1317 * Returns by value, unit of energy: calorie.
1318 * Also see {@link #createCalorie()}.
1319 * @draft ICU 64
1320 */
1321 static MeasureUnit getCalorie();
1322 #endif /* U_HIDE_DRAFT_API */
1323
1324 #ifndef U_HIDE_DRAFT_API
1325 /**
1326 * Returns by pointer, unit of energy: electronvolt.
1327 * Caller owns returned value and must free it.
1328 * Also see {@link #getElectronvolt()}.
1329 * @param status ICU error code.
1330 * @draft ICU 64
1331 */
1332 static MeasureUnit *createElectronvolt(UErrorCode &status);
1333
1334 /**
1335 * Returns by value, unit of energy: electronvolt.
1336 * Also see {@link #createElectronvolt()}.
1337 * @draft ICU 64
1338 */
1339 static MeasureUnit getElectronvolt();
1340 #endif /* U_HIDE_DRAFT_API */
1341
1342 /**
1343 * Returns by pointer, unit of energy: foodcalorie.
1344 * Caller owns returned value and must free it.
1345 * Also see {@link #getFoodcalorie()}.
1346 * @param status ICU error code.
1347 * @stable ICU 54
1348 */
1349 static MeasureUnit *createFoodcalorie(UErrorCode &status);
1350
1351 #ifndef U_HIDE_DRAFT_API
1352 /**
1353 * Returns by value, unit of energy: foodcalorie.
1354 * Also see {@link #createFoodcalorie()}.
1355 * @draft ICU 64
1356 */
1357 static MeasureUnit getFoodcalorie();
1358 #endif /* U_HIDE_DRAFT_API */
1359
1360 /**
1361 * Returns by pointer, unit of energy: joule.
1362 * Caller owns returned value and must free it.
1363 * Also see {@link #getJoule()}.
1364 * @param status ICU error code.
1365 * @stable ICU 54
1366 */
1367 static MeasureUnit *createJoule(UErrorCode &status);
1368
1369 #ifndef U_HIDE_DRAFT_API
1370 /**
1371 * Returns by value, unit of energy: joule.
1372 * Also see {@link #createJoule()}.
1373 * @draft ICU 64
1374 */
1375 static MeasureUnit getJoule();
1376 #endif /* U_HIDE_DRAFT_API */
1377
1378 /**
1379 * Returns by pointer, unit of energy: kilocalorie.
1380 * Caller owns returned value and must free it.
1381 * Also see {@link #getKilocalorie()}.
1382 * @param status ICU error code.
1383 * @stable ICU 54
1384 */
1385 static MeasureUnit *createKilocalorie(UErrorCode &status);
1386
1387 #ifndef U_HIDE_DRAFT_API
1388 /**
1389 * Returns by value, unit of energy: kilocalorie.
1390 * Also see {@link #createKilocalorie()}.
1391 * @draft ICU 64
1392 */
1393 static MeasureUnit getKilocalorie();
1394 #endif /* U_HIDE_DRAFT_API */
1395
1396 /**
1397 * Returns by pointer, unit of energy: kilojoule.
1398 * Caller owns returned value and must free it.
1399 * Also see {@link #getKilojoule()}.
1400 * @param status ICU error code.
1401 * @stable ICU 54
1402 */
1403 static MeasureUnit *createKilojoule(UErrorCode &status);
1404
1405 #ifndef U_HIDE_DRAFT_API
1406 /**
1407 * Returns by value, unit of energy: kilojoule.
1408 * Also see {@link #createKilojoule()}.
1409 * @draft ICU 64
1410 */
1411 static MeasureUnit getKilojoule();
1412 #endif /* U_HIDE_DRAFT_API */
1413
1414 /**
1415 * Returns by pointer, unit of energy: kilowatt-hour.
1416 * Caller owns returned value and must free it.
1417 * Also see {@link #getKilowattHour()}.
1418 * @param status ICU error code.
1419 * @stable ICU 54
1420 */
1421 static MeasureUnit *createKilowattHour(UErrorCode &status);
1422
1423 #ifndef U_HIDE_DRAFT_API
1424 /**
1425 * Returns by value, unit of energy: kilowatt-hour.
1426 * Also see {@link #createKilowattHour()}.
1427 * @draft ICU 64
1428 */
1429 static MeasureUnit getKilowattHour();
1430 #endif /* U_HIDE_DRAFT_API */
1431
1432 #ifndef U_HIDE_DRAFT_API
1433 /**
1434 * Returns by pointer, unit of force: newton.
1435 * Caller owns returned value and must free it.
1436 * Also see {@link #getNewton()}.
1437 * @param status ICU error code.
1438 * @draft ICU 64
1439 */
1440 static MeasureUnit *createNewton(UErrorCode &status);
1441
1442 /**
1443 * Returns by value, unit of force: newton.
1444 * Also see {@link #createNewton()}.
1445 * @draft ICU 64
1446 */
1447 static MeasureUnit getNewton();
1448 #endif /* U_HIDE_DRAFT_API */
1449
1450 #ifndef U_HIDE_DRAFT_API
1451 /**
1452 * Returns by pointer, unit of force: pound-force.
1453 * Caller owns returned value and must free it.
1454 * Also see {@link #getPoundForce()}.
1455 * @param status ICU error code.
1456 * @draft ICU 64
1457 */
1458 static MeasureUnit *createPoundForce(UErrorCode &status);
1459
1460 /**
1461 * Returns by value, unit of force: pound-force.
1462 * Also see {@link #createPoundForce()}.
1463 * @draft ICU 64
1464 */
1465 static MeasureUnit getPoundForce();
1466 #endif /* U_HIDE_DRAFT_API */
1467
1468 /**
1469 * Returns by pointer, unit of frequency: gigahertz.
1470 * Caller owns returned value and must free it.
1471 * Also see {@link #getGigahertz()}.
1472 * @param status ICU error code.
1473 * @stable ICU 54
1474 */
1475 static MeasureUnit *createGigahertz(UErrorCode &status);
1476
1477 #ifndef U_HIDE_DRAFT_API
1478 /**
1479 * Returns by value, unit of frequency: gigahertz.
1480 * Also see {@link #createGigahertz()}.
1481 * @draft ICU 64
1482 */
1483 static MeasureUnit getGigahertz();
1484 #endif /* U_HIDE_DRAFT_API */
1485
1486 /**
1487 * Returns by pointer, unit of frequency: hertz.
1488 * Caller owns returned value and must free it.
1489 * Also see {@link #getHertz()}.
1490 * @param status ICU error code.
1491 * @stable ICU 54
1492 */
1493 static MeasureUnit *createHertz(UErrorCode &status);
1494
1495 #ifndef U_HIDE_DRAFT_API
1496 /**
1497 * Returns by value, unit of frequency: hertz.
1498 * Also see {@link #createHertz()}.
1499 * @draft ICU 64
1500 */
1501 static MeasureUnit getHertz();
1502 #endif /* U_HIDE_DRAFT_API */
1503
1504 /**
1505 * Returns by pointer, unit of frequency: kilohertz.
1506 * Caller owns returned value and must free it.
1507 * Also see {@link #getKilohertz()}.
1508 * @param status ICU error code.
1509 * @stable ICU 54
1510 */
1511 static MeasureUnit *createKilohertz(UErrorCode &status);
1512
1513 #ifndef U_HIDE_DRAFT_API
1514 /**
1515 * Returns by value, unit of frequency: kilohertz.
1516 * Also see {@link #createKilohertz()}.
1517 * @draft ICU 64
1518 */
1519 static MeasureUnit getKilohertz();
1520 #endif /* U_HIDE_DRAFT_API */
1521
1522 /**
1523 * Returns by pointer, unit of frequency: megahertz.
1524 * Caller owns returned value and must free it.
1525 * Also see {@link #getMegahertz()}.
1526 * @param status ICU error code.
1527 * @stable ICU 54
1528 */
1529 static MeasureUnit *createMegahertz(UErrorCode &status);
1530
1531 #ifndef U_HIDE_DRAFT_API
1532 /**
1533 * Returns by value, unit of frequency: megahertz.
1534 * Also see {@link #createMegahertz()}.
1535 * @draft ICU 64
1536 */
1537 static MeasureUnit getMegahertz();
1538 #endif /* U_HIDE_DRAFT_API */
1539
1540 /**
1541 * Returns by pointer, unit of length: astronomical-unit.
1542 * Caller owns returned value and must free it.
1543 * Also see {@link #getAstronomicalUnit()}.
1544 * @param status ICU error code.
1545 * @stable ICU 54
1546 */
1547 static MeasureUnit *createAstronomicalUnit(UErrorCode &status);
1548
1549 #ifndef U_HIDE_DRAFT_API
1550 /**
1551 * Returns by value, unit of length: astronomical-unit.
1552 * Also see {@link #createAstronomicalUnit()}.
1553 * @draft ICU 64
1554 */
1555 static MeasureUnit getAstronomicalUnit();
1556 #endif /* U_HIDE_DRAFT_API */
1557
1558 /**
1559 * Returns by pointer, unit of length: centimeter.
1560 * Caller owns returned value and must free it.
1561 * Also see {@link #getCentimeter()}.
1562 * @param status ICU error code.
1563 * @stable ICU 53
1564 */
1565 static MeasureUnit *createCentimeter(UErrorCode &status);
1566
1567 #ifndef U_HIDE_DRAFT_API
1568 /**
1569 * Returns by value, unit of length: centimeter.
1570 * Also see {@link #createCentimeter()}.
1571 * @draft ICU 64
1572 */
1573 static MeasureUnit getCentimeter();
1574 #endif /* U_HIDE_DRAFT_API */
1575
1576 /**
1577 * Returns by pointer, unit of length: decimeter.
1578 * Caller owns returned value and must free it.
1579 * Also see {@link #getDecimeter()}.
1580 * @param status ICU error code.
1581 * @stable ICU 54
1582 */
1583 static MeasureUnit *createDecimeter(UErrorCode &status);
1584
1585 #ifndef U_HIDE_DRAFT_API
1586 /**
1587 * Returns by value, unit of length: decimeter.
1588 * Also see {@link #createDecimeter()}.
1589 * @draft ICU 64
1590 */
1591 static MeasureUnit getDecimeter();
1592 #endif /* U_HIDE_DRAFT_API */
1593
1594 /**
1595 * Returns by pointer, unit of length: fathom.
1596 * Caller owns returned value and must free it.
1597 * Also see {@link #getFathom()}.
1598 * @param status ICU error code.
1599 * @stable ICU 54
1600 */
1601 static MeasureUnit *createFathom(UErrorCode &status);
1602
1603 #ifndef U_HIDE_DRAFT_API
1604 /**
1605 * Returns by value, unit of length: fathom.
1606 * Also see {@link #createFathom()}.
1607 * @draft ICU 64
1608 */
1609 static MeasureUnit getFathom();
1610 #endif /* U_HIDE_DRAFT_API */
1611
1612 /**
1613 * Returns by pointer, unit of length: foot.
1614 * Caller owns returned value and must free it.
1615 * Also see {@link #getFoot()}.
1616 * @param status ICU error code.
1617 * @stable ICU 53
1618 */
1619 static MeasureUnit *createFoot(UErrorCode &status);
1620
1621 #ifndef U_HIDE_DRAFT_API
1622 /**
1623 * Returns by value, unit of length: foot.
1624 * Also see {@link #createFoot()}.
1625 * @draft ICU 64
1626 */
1627 static MeasureUnit getFoot();
1628 #endif /* U_HIDE_DRAFT_API */
1629
1630 /**
1631 * Returns by pointer, unit of length: furlong.
1632 * Caller owns returned value and must free it.
1633 * Also see {@link #getFurlong()}.
1634 * @param status ICU error code.
1635 * @stable ICU 54
1636 */
1637 static MeasureUnit *createFurlong(UErrorCode &status);
1638
1639 #ifndef U_HIDE_DRAFT_API
1640 /**
1641 * Returns by value, unit of length: furlong.
1642 * Also see {@link #createFurlong()}.
1643 * @draft ICU 64
1644 */
1645 static MeasureUnit getFurlong();
1646 #endif /* U_HIDE_DRAFT_API */
1647
1648 /**
1649 * Returns by pointer, unit of length: inch.
1650 * Caller owns returned value and must free it.
1651 * Also see {@link #getInch()}.
1652 * @param status ICU error code.
1653 * @stable ICU 53
1654 */
1655 static MeasureUnit *createInch(UErrorCode &status);
1656
1657 #ifndef U_HIDE_DRAFT_API
1658 /**
1659 * Returns by value, unit of length: inch.
1660 * Also see {@link #createInch()}.
1661 * @draft ICU 64
1662 */
1663 static MeasureUnit getInch();
1664 #endif /* U_HIDE_DRAFT_API */
1665
1666 /**
1667 * Returns by pointer, unit of length: kilometer.
1668 * Caller owns returned value and must free it.
1669 * Also see {@link #getKilometer()}.
1670 * @param status ICU error code.
1671 * @stable ICU 53
1672 */
1673 static MeasureUnit *createKilometer(UErrorCode &status);
1674
1675 #ifndef U_HIDE_DRAFT_API
1676 /**
1677 * Returns by value, unit of length: kilometer.
1678 * Also see {@link #createKilometer()}.
1679 * @draft ICU 64
1680 */
1681 static MeasureUnit getKilometer();
1682 #endif /* U_HIDE_DRAFT_API */
1683
1684 /**
1685 * Returns by pointer, unit of length: light-year.
1686 * Caller owns returned value and must free it.
1687 * Also see {@link #getLightYear()}.
1688 * @param status ICU error code.
1689 * @stable ICU 53
1690 */
1691 static MeasureUnit *createLightYear(UErrorCode &status);
1692
1693 #ifndef U_HIDE_DRAFT_API
1694 /**
1695 * Returns by value, unit of length: light-year.
1696 * Also see {@link #createLightYear()}.
1697 * @draft ICU 64
1698 */
1699 static MeasureUnit getLightYear();
1700 #endif /* U_HIDE_DRAFT_API */
1701
1702 /**
1703 * Returns by pointer, unit of length: meter.
1704 * Caller owns returned value and must free it.
1705 * Also see {@link #getMeter()}.
1706 * @param status ICU error code.
1707 * @stable ICU 53
1708 */
1709 static MeasureUnit *createMeter(UErrorCode &status);
1710
1711 #ifndef U_HIDE_DRAFT_API
1712 /**
1713 * Returns by value, unit of length: meter.
1714 * Also see {@link #createMeter()}.
1715 * @draft ICU 64
1716 */
1717 static MeasureUnit getMeter();
1718 #endif /* U_HIDE_DRAFT_API */
1719
1720 /**
1721 * Returns by pointer, unit of length: micrometer.
1722 * Caller owns returned value and must free it.
1723 * Also see {@link #getMicrometer()}.
1724 * @param status ICU error code.
1725 * @stable ICU 54
1726 */
1727 static MeasureUnit *createMicrometer(UErrorCode &status);
1728
1729 #ifndef U_HIDE_DRAFT_API
1730 /**
1731 * Returns by value, unit of length: micrometer.
1732 * Also see {@link #createMicrometer()}.
1733 * @draft ICU 64
1734 */
1735 static MeasureUnit getMicrometer();
1736 #endif /* U_HIDE_DRAFT_API */
1737
1738 /**
1739 * Returns by pointer, unit of length: mile.
1740 * Caller owns returned value and must free it.
1741 * Also see {@link #getMile()}.
1742 * @param status ICU error code.
1743 * @stable ICU 53
1744 */
1745 static MeasureUnit *createMile(UErrorCode &status);
1746
1747 #ifndef U_HIDE_DRAFT_API
1748 /**
1749 * Returns by value, unit of length: mile.
1750 * Also see {@link #createMile()}.
1751 * @draft ICU 64
1752 */
1753 static MeasureUnit getMile();
1754 #endif /* U_HIDE_DRAFT_API */
1755
1756 /**
1757 * Returns by pointer, unit of length: mile-scandinavian.
1758 * Caller owns returned value and must free it.
1759 * Also see {@link #getMileScandinavian()}.
1760 * @param status ICU error code.
1761 * @stable ICU 56
1762 */
1763 static MeasureUnit *createMileScandinavian(UErrorCode &status);
1764
1765 #ifndef U_HIDE_DRAFT_API
1766 /**
1767 * Returns by value, unit of length: mile-scandinavian.
1768 * Also see {@link #createMileScandinavian()}.
1769 * @draft ICU 64
1770 */
1771 static MeasureUnit getMileScandinavian();
1772 #endif /* U_HIDE_DRAFT_API */
1773
1774 /**
1775 * Returns by pointer, unit of length: millimeter.
1776 * Caller owns returned value and must free it.
1777 * Also see {@link #getMillimeter()}.
1778 * @param status ICU error code.
1779 * @stable ICU 53
1780 */
1781 static MeasureUnit *createMillimeter(UErrorCode &status);
1782
1783 #ifndef U_HIDE_DRAFT_API
1784 /**
1785 * Returns by value, unit of length: millimeter.
1786 * Also see {@link #createMillimeter()}.
1787 * @draft ICU 64
1788 */
1789 static MeasureUnit getMillimeter();
1790 #endif /* U_HIDE_DRAFT_API */
1791
1792 /**
1793 * Returns by pointer, unit of length: nanometer.
1794 * Caller owns returned value and must free it.
1795 * Also see {@link #getNanometer()}.
1796 * @param status ICU error code.
1797 * @stable ICU 54
1798 */
1799 static MeasureUnit *createNanometer(UErrorCode &status);
1800
1801 #ifndef U_HIDE_DRAFT_API
1802 /**
1803 * Returns by value, unit of length: nanometer.
1804 * Also see {@link #createNanometer()}.
1805 * @draft ICU 64
1806 */
1807 static MeasureUnit getNanometer();
1808 #endif /* U_HIDE_DRAFT_API */
1809
1810 /**
1811 * Returns by pointer, unit of length: nautical-mile.
1812 * Caller owns returned value and must free it.
1813 * Also see {@link #getNauticalMile()}.
1814 * @param status ICU error code.
1815 * @stable ICU 54
1816 */
1817 static MeasureUnit *createNauticalMile(UErrorCode &status);
1818
1819 #ifndef U_HIDE_DRAFT_API
1820 /**
1821 * Returns by value, unit of length: nautical-mile.
1822 * Also see {@link #createNauticalMile()}.
1823 * @draft ICU 64
1824 */
1825 static MeasureUnit getNauticalMile();
1826 #endif /* U_HIDE_DRAFT_API */
1827
1828 /**
1829 * Returns by pointer, unit of length: parsec.
1830 * Caller owns returned value and must free it.
1831 * Also see {@link #getParsec()}.
1832 * @param status ICU error code.
1833 * @stable ICU 54
1834 */
1835 static MeasureUnit *createParsec(UErrorCode &status);
1836
1837 #ifndef U_HIDE_DRAFT_API
1838 /**
1839 * Returns by value, unit of length: parsec.
1840 * Also see {@link #createParsec()}.
1841 * @draft ICU 64
1842 */
1843 static MeasureUnit getParsec();
1844 #endif /* U_HIDE_DRAFT_API */
1845
1846 /**
1847 * Returns by pointer, unit of length: picometer.
1848 * Caller owns returned value and must free it.
1849 * Also see {@link #getPicometer()}.
1850 * @param status ICU error code.
1851 * @stable ICU 53
1852 */
1853 static MeasureUnit *createPicometer(UErrorCode &status);
1854
1855 #ifndef U_HIDE_DRAFT_API
1856 /**
1857 * Returns by value, unit of length: picometer.
1858 * Also see {@link #createPicometer()}.
1859 * @draft ICU 64
1860 */
1861 static MeasureUnit getPicometer();
1862 #endif /* U_HIDE_DRAFT_API */
1863
1864 /**
1865 * Returns by pointer, unit of length: point.
1866 * Caller owns returned value and must free it.
1867 * Also see {@link #getPoint()}.
1868 * @param status ICU error code.
1869 * @stable ICU 59
1870 */
1871 static MeasureUnit *createPoint(UErrorCode &status);
1872
1873 #ifndef U_HIDE_DRAFT_API
1874 /**
1875 * Returns by value, unit of length: point.
1876 * Also see {@link #createPoint()}.
1877 * @draft ICU 64
1878 */
1879 static MeasureUnit getPoint();
1880 #endif /* U_HIDE_DRAFT_API */
1881
1882 #ifndef U_HIDE_DRAFT_API
1883 /**
1884 * Returns by pointer, unit of length: solar-radius.
1885 * Caller owns returned value and must free it.
1886 * Also see {@link #getSolarRadius()}.
1887 * @param status ICU error code.
1888 * @draft ICU 64
1889 */
1890 static MeasureUnit *createSolarRadius(UErrorCode &status);
1891
1892 /**
1893 * Returns by value, unit of length: solar-radius.
1894 * Also see {@link #createSolarRadius()}.
1895 * @draft ICU 64
1896 */
1897 static MeasureUnit getSolarRadius();
1898 #endif /* U_HIDE_DRAFT_API */
1899
1900 /**
1901 * Returns by pointer, unit of length: yard.
1902 * Caller owns returned value and must free it.
1903 * Also see {@link #getYard()}.
1904 * @param status ICU error code.
1905 * @stable ICU 53
1906 */
1907 static MeasureUnit *createYard(UErrorCode &status);
1908
1909 #ifndef U_HIDE_DRAFT_API
1910 /**
1911 * Returns by value, unit of length: yard.
1912 * Also see {@link #createYard()}.
1913 * @draft ICU 64
1914 */
1915 static MeasureUnit getYard();
1916 #endif /* U_HIDE_DRAFT_API */
1917
1918 /**
1919 * Returns by pointer, unit of light: lux.
1920 * Caller owns returned value and must free it.
1921 * Also see {@link #getLux()}.
1922 * @param status ICU error code.
1923 * @stable ICU 54
1924 */
1925 static MeasureUnit *createLux(UErrorCode &status);
1926
1927 #ifndef U_HIDE_DRAFT_API
1928 /**
1929 * Returns by value, unit of light: lux.
1930 * Also see {@link #createLux()}.
1931 * @draft ICU 64
1932 */
1933 static MeasureUnit getLux();
1934 #endif /* U_HIDE_DRAFT_API */
1935
1936 #ifndef U_HIDE_DRAFT_API
1937 /**
1938 * Returns by pointer, unit of light: solar-luminosity.
1939 * Caller owns returned value and must free it.
1940 * Also see {@link #getSolarLuminosity()}.
1941 * @param status ICU error code.
1942 * @draft ICU 64
1943 */
1944 static MeasureUnit *createSolarLuminosity(UErrorCode &status);
1945
1946 /**
1947 * Returns by value, unit of light: solar-luminosity.
1948 * Also see {@link #createSolarLuminosity()}.
1949 * @draft ICU 64
1950 */
1951 static MeasureUnit getSolarLuminosity();
1952 #endif /* U_HIDE_DRAFT_API */
1953
1954 /**
1955 * Returns by pointer, unit of mass: carat.
1956 * Caller owns returned value and must free it.
1957 * Also see {@link #getCarat()}.
1958 * @param status ICU error code.
1959 * @stable ICU 54
1960 */
1961 static MeasureUnit *createCarat(UErrorCode &status);
1962
1963 #ifndef U_HIDE_DRAFT_API
1964 /**
1965 * Returns by value, unit of mass: carat.
1966 * Also see {@link #createCarat()}.
1967 * @draft ICU 64
1968 */
1969 static MeasureUnit getCarat();
1970 #endif /* U_HIDE_DRAFT_API */
1971
1972 #ifndef U_HIDE_DRAFT_API
1973 /**
1974 * Returns by pointer, unit of mass: dalton.
1975 * Caller owns returned value and must free it.
1976 * Also see {@link #getDalton()}.
1977 * @param status ICU error code.
1978 * @draft ICU 64
1979 */
1980 static MeasureUnit *createDalton(UErrorCode &status);
1981
1982 /**
1983 * Returns by value, unit of mass: dalton.
1984 * Also see {@link #createDalton()}.
1985 * @draft ICU 64
1986 */
1987 static MeasureUnit getDalton();
1988 #endif /* U_HIDE_DRAFT_API */
1989
1990 #ifndef U_HIDE_DRAFT_API
1991 /**
1992 * Returns by pointer, unit of mass: earth-mass.
1993 * Caller owns returned value and must free it.
1994 * Also see {@link #getEarthMass()}.
1995 * @param status ICU error code.
1996 * @draft ICU 64
1997 */
1998 static MeasureUnit *createEarthMass(UErrorCode &status);
1999
2000 /**
2001 * Returns by value, unit of mass: earth-mass.
2002 * Also see {@link #createEarthMass()}.
2003 * @draft ICU 64
2004 */
2005 static MeasureUnit getEarthMass();
2006 #endif /* U_HIDE_DRAFT_API */
2007
2008 /**
2009 * Returns by pointer, unit of mass: gram.
2010 * Caller owns returned value and must free it.
2011 * Also see {@link #getGram()}.
2012 * @param status ICU error code.
2013 * @stable ICU 53
2014 */
2015 static MeasureUnit *createGram(UErrorCode &status);
2016
2017 #ifndef U_HIDE_DRAFT_API
2018 /**
2019 * Returns by value, unit of mass: gram.
2020 * Also see {@link #createGram()}.
2021 * @draft ICU 64
2022 */
2023 static MeasureUnit getGram();
2024 #endif /* U_HIDE_DRAFT_API */
2025
2026 /**
2027 * Returns by pointer, unit of mass: kilogram.
2028 * Caller owns returned value and must free it.
2029 * Also see {@link #getKilogram()}.
2030 * @param status ICU error code.
2031 * @stable ICU 53
2032 */
2033 static MeasureUnit *createKilogram(UErrorCode &status);
2034
2035 #ifndef U_HIDE_DRAFT_API
2036 /**
2037 * Returns by value, unit of mass: kilogram.
2038 * Also see {@link #createKilogram()}.
2039 * @draft ICU 64
2040 */
2041 static MeasureUnit getKilogram();
2042 #endif /* U_HIDE_DRAFT_API */
2043
2044 /**
2045 * Returns by pointer, unit of mass: metric-ton.
2046 * Caller owns returned value and must free it.
2047 * Also see {@link #getMetricTon()}.
2048 * @param status ICU error code.
2049 * @stable ICU 54
2050 */
2051 static MeasureUnit *createMetricTon(UErrorCode &status);
2052
2053 #ifndef U_HIDE_DRAFT_API
2054 /**
2055 * Returns by value, unit of mass: metric-ton.
2056 * Also see {@link #createMetricTon()}.
2057 * @draft ICU 64
2058 */
2059 static MeasureUnit getMetricTon();
2060 #endif /* U_HIDE_DRAFT_API */
2061
2062 /**
2063 * Returns by pointer, unit of mass: microgram.
2064 * Caller owns returned value and must free it.
2065 * Also see {@link #getMicrogram()}.
2066 * @param status ICU error code.
2067 * @stable ICU 54
2068 */
2069 static MeasureUnit *createMicrogram(UErrorCode &status);
2070
2071 #ifndef U_HIDE_DRAFT_API
2072 /**
2073 * Returns by value, unit of mass: microgram.
2074 * Also see {@link #createMicrogram()}.
2075 * @draft ICU 64
2076 */
2077 static MeasureUnit getMicrogram();
2078 #endif /* U_HIDE_DRAFT_API */
2079
2080 /**
2081 * Returns by pointer, unit of mass: milligram.
2082 * Caller owns returned value and must free it.
2083 * Also see {@link #getMilligram()}.
2084 * @param status ICU error code.
2085 * @stable ICU 54
2086 */
2087 static MeasureUnit *createMilligram(UErrorCode &status);
2088
2089 #ifndef U_HIDE_DRAFT_API
2090 /**
2091 * Returns by value, unit of mass: milligram.
2092 * Also see {@link #createMilligram()}.
2093 * @draft ICU 64
2094 */
2095 static MeasureUnit getMilligram();
2096 #endif /* U_HIDE_DRAFT_API */
2097
2098 /**
2099 * Returns by pointer, unit of mass: ounce.
2100 * Caller owns returned value and must free it.
2101 * Also see {@link #getOunce()}.
2102 * @param status ICU error code.
2103 * @stable ICU 53
2104 */
2105 static MeasureUnit *createOunce(UErrorCode &status);
2106
2107 #ifndef U_HIDE_DRAFT_API
2108 /**
2109 * Returns by value, unit of mass: ounce.
2110 * Also see {@link #createOunce()}.
2111 * @draft ICU 64
2112 */
2113 static MeasureUnit getOunce();
2114 #endif /* U_HIDE_DRAFT_API */
2115
2116 /**
2117 * Returns by pointer, unit of mass: ounce-troy.
2118 * Caller owns returned value and must free it.
2119 * Also see {@link #getOunceTroy()}.
2120 * @param status ICU error code.
2121 * @stable ICU 54
2122 */
2123 static MeasureUnit *createOunceTroy(UErrorCode &status);
2124
2125 #ifndef U_HIDE_DRAFT_API
2126 /**
2127 * Returns by value, unit of mass: ounce-troy.
2128 * Also see {@link #createOunceTroy()}.
2129 * @draft ICU 64
2130 */
2131 static MeasureUnit getOunceTroy();
2132 #endif /* U_HIDE_DRAFT_API */
2133
2134 /**
2135 * Returns by pointer, unit of mass: pound.
2136 * Caller owns returned value and must free it.
2137 * Also see {@link #getPound()}.
2138 * @param status ICU error code.
2139 * @stable ICU 53
2140 */
2141 static MeasureUnit *createPound(UErrorCode &status);
2142
2143 #ifndef U_HIDE_DRAFT_API
2144 /**
2145 * Returns by value, unit of mass: pound.
2146 * Also see {@link #createPound()}.
2147 * @draft ICU 64
2148 */
2149 static MeasureUnit getPound();
2150 #endif /* U_HIDE_DRAFT_API */
2151
2152 #ifndef U_HIDE_DRAFT_API
2153 /**
2154 * Returns by pointer, unit of mass: solar-mass.
2155 * Caller owns returned value and must free it.
2156 * Also see {@link #getSolarMass()}.
2157 * @param status ICU error code.
2158 * @draft ICU 64
2159 */
2160 static MeasureUnit *createSolarMass(UErrorCode &status);
2161
2162 /**
2163 * Returns by value, unit of mass: solar-mass.
2164 * Also see {@link #createSolarMass()}.
2165 * @draft ICU 64
2166 */
2167 static MeasureUnit getSolarMass();
2168 #endif /* U_HIDE_DRAFT_API */
2169
2170 /**
2171 * Returns by pointer, unit of mass: stone.
2172 * Caller owns returned value and must free it.
2173 * Also see {@link #getStone()}.
2174 * @param status ICU error code.
2175 * @stable ICU 54
2176 */
2177 static MeasureUnit *createStone(UErrorCode &status);
2178
2179 #ifndef U_HIDE_DRAFT_API
2180 /**
2181 * Returns by value, unit of mass: stone.
2182 * Also see {@link #createStone()}.
2183 * @draft ICU 64
2184 */
2185 static MeasureUnit getStone();
2186 #endif /* U_HIDE_DRAFT_API */
2187
2188 /**
2189 * Returns by pointer, unit of mass: ton.
2190 * Caller owns returned value and must free it.
2191 * Also see {@link #getTon()}.
2192 * @param status ICU error code.
2193 * @stable ICU 54
2194 */
2195 static MeasureUnit *createTon(UErrorCode &status);
2196
2197 #ifndef U_HIDE_DRAFT_API
2198 /**
2199 * Returns by value, unit of mass: ton.
2200 * Also see {@link #createTon()}.
2201 * @draft ICU 64
2202 */
2203 static MeasureUnit getTon();
2204 #endif /* U_HIDE_DRAFT_API */
2205
2206 /**
2207 * Returns by pointer, unit of power: gigawatt.
2208 * Caller owns returned value and must free it.
2209 * Also see {@link #getGigawatt()}.
2210 * @param status ICU error code.
2211 * @stable ICU 54
2212 */
2213 static MeasureUnit *createGigawatt(UErrorCode &status);
2214
2215 #ifndef U_HIDE_DRAFT_API
2216 /**
2217 * Returns by value, unit of power: gigawatt.
2218 * Also see {@link #createGigawatt()}.
2219 * @draft ICU 64
2220 */
2221 static MeasureUnit getGigawatt();
2222 #endif /* U_HIDE_DRAFT_API */
2223
2224 /**
2225 * Returns by pointer, unit of power: horsepower.
2226 * Caller owns returned value and must free it.
2227 * Also see {@link #getHorsepower()}.
2228 * @param status ICU error code.
2229 * @stable ICU 53
2230 */
2231 static MeasureUnit *createHorsepower(UErrorCode &status);
2232
2233 #ifndef U_HIDE_DRAFT_API
2234 /**
2235 * Returns by value, unit of power: horsepower.
2236 * Also see {@link #createHorsepower()}.
2237 * @draft ICU 64
2238 */
2239 static MeasureUnit getHorsepower();
2240 #endif /* U_HIDE_DRAFT_API */
2241
2242 /**
2243 * Returns by pointer, unit of power: kilowatt.
2244 * Caller owns returned value and must free it.
2245 * Also see {@link #getKilowatt()}.
2246 * @param status ICU error code.
2247 * @stable ICU 53
2248 */
2249 static MeasureUnit *createKilowatt(UErrorCode &status);
2250
2251 #ifndef U_HIDE_DRAFT_API
2252 /**
2253 * Returns by value, unit of power: kilowatt.
2254 * Also see {@link #createKilowatt()}.
2255 * @draft ICU 64
2256 */
2257 static MeasureUnit getKilowatt();
2258 #endif /* U_HIDE_DRAFT_API */
2259
2260 /**
2261 * Returns by pointer, unit of power: megawatt.
2262 * Caller owns returned value and must free it.
2263 * Also see {@link #getMegawatt()}.
2264 * @param status ICU error code.
2265 * @stable ICU 54
2266 */
2267 static MeasureUnit *createMegawatt(UErrorCode &status);
2268
2269 #ifndef U_HIDE_DRAFT_API
2270 /**
2271 * Returns by value, unit of power: megawatt.
2272 * Also see {@link #createMegawatt()}.
2273 * @draft ICU 64
2274 */
2275 static MeasureUnit getMegawatt();
2276 #endif /* U_HIDE_DRAFT_API */
2277
2278 /**
2279 * Returns by pointer, unit of power: milliwatt.
2280 * Caller owns returned value and must free it.
2281 * Also see {@link #getMilliwatt()}.
2282 * @param status ICU error code.
2283 * @stable ICU 54
2284 */
2285 static MeasureUnit *createMilliwatt(UErrorCode &status);
2286
2287 #ifndef U_HIDE_DRAFT_API
2288 /**
2289 * Returns by value, unit of power: milliwatt.
2290 * Also see {@link #createMilliwatt()}.
2291 * @draft ICU 64
2292 */
2293 static MeasureUnit getMilliwatt();
2294 #endif /* U_HIDE_DRAFT_API */
2295
2296 /**
2297 * Returns by pointer, unit of power: watt.
2298 * Caller owns returned value and must free it.
2299 * Also see {@link #getWatt()}.
2300 * @param status ICU error code.
2301 * @stable ICU 53
2302 */
2303 static MeasureUnit *createWatt(UErrorCode &status);
2304
2305 #ifndef U_HIDE_DRAFT_API
2306 /**
2307 * Returns by value, unit of power: watt.
2308 * Also see {@link #createWatt()}.
2309 * @draft ICU 64
2310 */
2311 static MeasureUnit getWatt();
2312 #endif /* U_HIDE_DRAFT_API */
2313
2314 #ifndef U_HIDE_DRAFT_API
2315 /**
2316 * Returns by pointer, unit of pressure: atmosphere.
2317 * Caller owns returned value and must free it.
2318 * Also see {@link #getAtmosphere()}.
2319 * @param status ICU error code.
2320 * @draft ICU 63
2321 */
2322 static MeasureUnit *createAtmosphere(UErrorCode &status);
2323 #endif /* U_HIDE_DRAFT_API */
2324
2325 #ifndef U_HIDE_DRAFT_API
2326 /**
2327 * Returns by value, unit of pressure: atmosphere.
2328 * Also see {@link #createAtmosphere()}.
2329 * @draft ICU 64
2330 */
2331 static MeasureUnit getAtmosphere();
2332 #endif /* U_HIDE_DRAFT_API */
2333
2334 /**
2335 * Returns by pointer, unit of pressure: hectopascal.
2336 * Caller owns returned value and must free it.
2337 * Also see {@link #getHectopascal()}.
2338 * @param status ICU error code.
2339 * @stable ICU 53
2340 */
2341 static MeasureUnit *createHectopascal(UErrorCode &status);
2342
2343 #ifndef U_HIDE_DRAFT_API
2344 /**
2345 * Returns by value, unit of pressure: hectopascal.
2346 * Also see {@link #createHectopascal()}.
2347 * @draft ICU 64
2348 */
2349 static MeasureUnit getHectopascal();
2350 #endif /* U_HIDE_DRAFT_API */
2351
2352 /**
2353 * Returns by pointer, unit of pressure: inch-hg.
2354 * Caller owns returned value and must free it.
2355 * Also see {@link #getInchHg()}.
2356 * @param status ICU error code.
2357 * @stable ICU 53
2358 */
2359 static MeasureUnit *createInchHg(UErrorCode &status);
2360
2361 #ifndef U_HIDE_DRAFT_API
2362 /**
2363 * Returns by value, unit of pressure: inch-hg.
2364 * Also see {@link #createInchHg()}.
2365 * @draft ICU 64
2366 */
2367 static MeasureUnit getInchHg();
2368 #endif /* U_HIDE_DRAFT_API */
2369
2370 #ifndef U_HIDE_DRAFT_API
2371 /**
2372 * Returns by pointer, unit of pressure: kilopascal.
2373 * Caller owns returned value and must free it.
2374 * Also see {@link #getKilopascal()}.
2375 * @param status ICU error code.
2376 * @draft ICU 64
2377 */
2378 static MeasureUnit *createKilopascal(UErrorCode &status);
2379
2380 /**
2381 * Returns by value, unit of pressure: kilopascal.
2382 * Also see {@link #createKilopascal()}.
2383 * @draft ICU 64
2384 */
2385 static MeasureUnit getKilopascal();
2386 #endif /* U_HIDE_DRAFT_API */
2387
2388 #ifndef U_HIDE_DRAFT_API
2389 /**
2390 * Returns by pointer, unit of pressure: megapascal.
2391 * Caller owns returned value and must free it.
2392 * Also see {@link #getMegapascal()}.
2393 * @param status ICU error code.
2394 * @draft ICU 64
2395 */
2396 static MeasureUnit *createMegapascal(UErrorCode &status);
2397
2398 /**
2399 * Returns by value, unit of pressure: megapascal.
2400 * Also see {@link #createMegapascal()}.
2401 * @draft ICU 64
2402 */
2403 static MeasureUnit getMegapascal();
2404 #endif /* U_HIDE_DRAFT_API */
2405
2406 /**
2407 * Returns by pointer, unit of pressure: millibar.
2408 * Caller owns returned value and must free it.
2409 * Also see {@link #getMillibar()}.
2410 * @param status ICU error code.
2411 * @stable ICU 53
2412 */
2413 static MeasureUnit *createMillibar(UErrorCode &status);
2414
2415 #ifndef U_HIDE_DRAFT_API
2416 /**
2417 * Returns by value, unit of pressure: millibar.
2418 * Also see {@link #createMillibar()}.
2419 * @draft ICU 64
2420 */
2421 static MeasureUnit getMillibar();
2422 #endif /* U_HIDE_DRAFT_API */
2423
2424 /**
2425 * Returns by pointer, unit of pressure: millimeter-of-mercury.
2426 * Caller owns returned value and must free it.
2427 * Also see {@link #getMillimeterOfMercury()}.
2428 * @param status ICU error code.
2429 * @stable ICU 54
2430 */
2431 static MeasureUnit *createMillimeterOfMercury(UErrorCode &status);
2432
2433 #ifndef U_HIDE_DRAFT_API
2434 /**
2435 * Returns by value, unit of pressure: millimeter-of-mercury.
2436 * Also see {@link #createMillimeterOfMercury()}.
2437 * @draft ICU 64
2438 */
2439 static MeasureUnit getMillimeterOfMercury();
2440 #endif /* U_HIDE_DRAFT_API */
2441
2442 /**
2443 * Returns by pointer, unit of pressure: pound-per-square-inch.
2444 * Caller owns returned value and must free it.
2445 * Also see {@link #getPoundPerSquareInch()}.
2446 * @param status ICU error code.
2447 * @stable ICU 54
2448 */
2449 static MeasureUnit *createPoundPerSquareInch(UErrorCode &status);
2450
2451 #ifndef U_HIDE_DRAFT_API
2452 /**
2453 * Returns by value, unit of pressure: pound-per-square-inch.
2454 * Also see {@link #createPoundPerSquareInch()}.
2455 * @draft ICU 64
2456 */
2457 static MeasureUnit getPoundPerSquareInch();
2458 #endif /* U_HIDE_DRAFT_API */
2459
2460 /**
2461 * Returns by pointer, unit of speed: kilometer-per-hour.
2462 * Caller owns returned value and must free it.
2463 * Also see {@link #getKilometerPerHour()}.
2464 * @param status ICU error code.
2465 * @stable ICU 53
2466 */
2467 static MeasureUnit *createKilometerPerHour(UErrorCode &status);
2468
2469 #ifndef U_HIDE_DRAFT_API
2470 /**
2471 * Returns by value, unit of speed: kilometer-per-hour.
2472 * Also see {@link #createKilometerPerHour()}.
2473 * @draft ICU 64
2474 */
2475 static MeasureUnit getKilometerPerHour();
2476 #endif /* U_HIDE_DRAFT_API */
2477
2478 /**
2479 * Returns by pointer, unit of speed: knot.
2480 * Caller owns returned value and must free it.
2481 * Also see {@link #getKnot()}.
2482 * @param status ICU error code.
2483 * @stable ICU 56
2484 */
2485 static MeasureUnit *createKnot(UErrorCode &status);
2486
2487 #ifndef U_HIDE_DRAFT_API
2488 /**
2489 * Returns by value, unit of speed: knot.
2490 * Also see {@link #createKnot()}.
2491 * @draft ICU 64
2492 */
2493 static MeasureUnit getKnot();
2494 #endif /* U_HIDE_DRAFT_API */
2495
2496 /**
2497 * Returns by pointer, unit of speed: meter-per-second.
2498 * Caller owns returned value and must free it.
2499 * Also see {@link #getMeterPerSecond()}.
2500 * @param status ICU error code.
2501 * @stable ICU 53
2502 */
2503 static MeasureUnit *createMeterPerSecond(UErrorCode &status);
2504
2505 #ifndef U_HIDE_DRAFT_API
2506 /**
2507 * Returns by value, unit of speed: meter-per-second.
2508 * Also see {@link #createMeterPerSecond()}.
2509 * @draft ICU 64
2510 */
2511 static MeasureUnit getMeterPerSecond();
2512 #endif /* U_HIDE_DRAFT_API */
2513
2514 /**
2515 * Returns by pointer, unit of speed: mile-per-hour.
2516 * Caller owns returned value and must free it.
2517 * Also see {@link #getMilePerHour()}.
2518 * @param status ICU error code.
2519 * @stable ICU 53
2520 */
2521 static MeasureUnit *createMilePerHour(UErrorCode &status);
2522
2523 #ifndef U_HIDE_DRAFT_API
2524 /**
2525 * Returns by value, unit of speed: mile-per-hour.
2526 * Also see {@link #createMilePerHour()}.
2527 * @draft ICU 64
2528 */
2529 static MeasureUnit getMilePerHour();
2530 #endif /* U_HIDE_DRAFT_API */
2531
2532 /**
2533 * Returns by pointer, unit of temperature: celsius.
2534 * Caller owns returned value and must free it.
2535 * Also see {@link #getCelsius()}.
2536 * @param status ICU error code.
2537 * @stable ICU 53
2538 */
2539 static MeasureUnit *createCelsius(UErrorCode &status);
2540
2541 #ifndef U_HIDE_DRAFT_API
2542 /**
2543 * Returns by value, unit of temperature: celsius.
2544 * Also see {@link #createCelsius()}.
2545 * @draft ICU 64
2546 */
2547 static MeasureUnit getCelsius();
2548 #endif /* U_HIDE_DRAFT_API */
2549
2550 /**
2551 * Returns by pointer, unit of temperature: fahrenheit.
2552 * Caller owns returned value and must free it.
2553 * Also see {@link #getFahrenheit()}.
2554 * @param status ICU error code.
2555 * @stable ICU 53
2556 */
2557 static MeasureUnit *createFahrenheit(UErrorCode &status);
2558
2559 #ifndef U_HIDE_DRAFT_API
2560 /**
2561 * Returns by value, unit of temperature: fahrenheit.
2562 * Also see {@link #createFahrenheit()}.
2563 * @draft ICU 64
2564 */
2565 static MeasureUnit getFahrenheit();
2566 #endif /* U_HIDE_DRAFT_API */
2567
2568 /**
2569 * Returns by pointer, unit of temperature: generic.
2570 * Caller owns returned value and must free it.
2571 * Also see {@link #getGenericTemperature()}.
2572 * @param status ICU error code.
2573 * @stable ICU 56
2574 */
2575 static MeasureUnit *createGenericTemperature(UErrorCode &status);
2576
2577 #ifndef U_HIDE_DRAFT_API
2578 /**
2579 * Returns by value, unit of temperature: generic.
2580 * Also see {@link #createGenericTemperature()}.
2581 * @draft ICU 64
2582 */
2583 static MeasureUnit getGenericTemperature();
2584 #endif /* U_HIDE_DRAFT_API */
2585
2586 /**
2587 * Returns by pointer, unit of temperature: kelvin.
2588 * Caller owns returned value and must free it.
2589 * Also see {@link #getKelvin()}.
2590 * @param status ICU error code.
2591 * @stable ICU 54
2592 */
2593 static MeasureUnit *createKelvin(UErrorCode &status);
2594
2595 #ifndef U_HIDE_DRAFT_API
2596 /**
2597 * Returns by value, unit of temperature: kelvin.
2598 * Also see {@link #createKelvin()}.
2599 * @draft ICU 64
2600 */
2601 static MeasureUnit getKelvin();
2602 #endif /* U_HIDE_DRAFT_API */
2603
2604 #ifndef U_HIDE_DRAFT_API
2605 /**
2606 * Returns by pointer, unit of torque: newton-meter.
2607 * Caller owns returned value and must free it.
2608 * Also see {@link #getNewtonMeter()}.
2609 * @param status ICU error code.
2610 * @draft ICU 64
2611 */
2612 static MeasureUnit *createNewtonMeter(UErrorCode &status);
2613
2614 /**
2615 * Returns by value, unit of torque: newton-meter.
2616 * Also see {@link #createNewtonMeter()}.
2617 * @draft ICU 64
2618 */
2619 static MeasureUnit getNewtonMeter();
2620 #endif /* U_HIDE_DRAFT_API */
2621
2622 #ifndef U_HIDE_DRAFT_API
2623 /**
2624 * Returns by pointer, unit of torque: pound-foot.
2625 * Caller owns returned value and must free it.
2626 * Also see {@link #getPoundFoot()}.
2627 * @param status ICU error code.
2628 * @draft ICU 64
2629 */
2630 static MeasureUnit *createPoundFoot(UErrorCode &status);
2631
2632 /**
2633 * Returns by value, unit of torque: pound-foot.
2634 * Also see {@link #createPoundFoot()}.
2635 * @draft ICU 64
2636 */
2637 static MeasureUnit getPoundFoot();
2638 #endif /* U_HIDE_DRAFT_API */
2639
2640 /**
2641 * Returns by pointer, unit of volume: acre-foot.
2642 * Caller owns returned value and must free it.
2643 * Also see {@link #getAcreFoot()}.
2644 * @param status ICU error code.
2645 * @stable ICU 54
2646 */
2647 static MeasureUnit *createAcreFoot(UErrorCode &status);
2648
2649 #ifndef U_HIDE_DRAFT_API
2650 /**
2651 * Returns by value, unit of volume: acre-foot.
2652 * Also see {@link #createAcreFoot()}.
2653 * @draft ICU 64
2654 */
2655 static MeasureUnit getAcreFoot();
2656 #endif /* U_HIDE_DRAFT_API */
2657
2658 #ifndef U_HIDE_DRAFT_API
2659 /**
2660 * Returns by pointer, unit of volume: barrel.
2661 * Caller owns returned value and must free it.
2662 * Also see {@link #getBarrel()}.
2663 * @param status ICU error code.
2664 * @draft ICU 64
2665 */
2666 static MeasureUnit *createBarrel(UErrorCode &status);
2667
2668 /**
2669 * Returns by value, unit of volume: barrel.
2670 * Also see {@link #createBarrel()}.
2671 * @draft ICU 64
2672 */
2673 static MeasureUnit getBarrel();
2674 #endif /* U_HIDE_DRAFT_API */
2675
2676 /**
2677 * Returns by pointer, unit of volume: bushel.
2678 * Caller owns returned value and must free it.
2679 * Also see {@link #getBushel()}.
2680 * @param status ICU error code.
2681 * @stable ICU 54
2682 */
2683 static MeasureUnit *createBushel(UErrorCode &status);
2684
2685 #ifndef U_HIDE_DRAFT_API
2686 /**
2687 * Returns by value, unit of volume: bushel.
2688 * Also see {@link #createBushel()}.
2689 * @draft ICU 64
2690 */
2691 static MeasureUnit getBushel();
2692 #endif /* U_HIDE_DRAFT_API */
2693
2694 /**
2695 * Returns by pointer, unit of volume: centiliter.
2696 * Caller owns returned value and must free it.
2697 * Also see {@link #getCentiliter()}.
2698 * @param status ICU error code.
2699 * @stable ICU 54
2700 */
2701 static MeasureUnit *createCentiliter(UErrorCode &status);
2702
2703 #ifndef U_HIDE_DRAFT_API
2704 /**
2705 * Returns by value, unit of volume: centiliter.
2706 * Also see {@link #createCentiliter()}.
2707 * @draft ICU 64
2708 */
2709 static MeasureUnit getCentiliter();
2710 #endif /* U_HIDE_DRAFT_API */
2711
2712 /**
2713 * Returns by pointer, unit of volume: cubic-centimeter.
2714 * Caller owns returned value and must free it.
2715 * Also see {@link #getCubicCentimeter()}.
2716 * @param status ICU error code.
2717 * @stable ICU 54
2718 */
2719 static MeasureUnit *createCubicCentimeter(UErrorCode &status);
2720
2721 #ifndef U_HIDE_DRAFT_API
2722 /**
2723 * Returns by value, unit of volume: cubic-centimeter.
2724 * Also see {@link #createCubicCentimeter()}.
2725 * @draft ICU 64
2726 */
2727 static MeasureUnit getCubicCentimeter();
2728 #endif /* U_HIDE_DRAFT_API */
2729
2730 /**
2731 * Returns by pointer, unit of volume: cubic-foot.
2732 * Caller owns returned value and must free it.
2733 * Also see {@link #getCubicFoot()}.
2734 * @param status ICU error code.
2735 * @stable ICU 54
2736 */
2737 static MeasureUnit *createCubicFoot(UErrorCode &status);
2738
2739 #ifndef U_HIDE_DRAFT_API
2740 /**
2741 * Returns by value, unit of volume: cubic-foot.
2742 * Also see {@link #createCubicFoot()}.
2743 * @draft ICU 64
2744 */
2745 static MeasureUnit getCubicFoot();
2746 #endif /* U_HIDE_DRAFT_API */
2747
2748 /**
2749 * Returns by pointer, unit of volume: cubic-inch.
2750 * Caller owns returned value and must free it.
2751 * Also see {@link #getCubicInch()}.
2752 * @param status ICU error code.
2753 * @stable ICU 54
2754 */
2755 static MeasureUnit *createCubicInch(UErrorCode &status);
2756
2757 #ifndef U_HIDE_DRAFT_API
2758 /**
2759 * Returns by value, unit of volume: cubic-inch.
2760 * Also see {@link #createCubicInch()}.
2761 * @draft ICU 64
2762 */
2763 static MeasureUnit getCubicInch();
2764 #endif /* U_HIDE_DRAFT_API */
2765
2766 /**
2767 * Returns by pointer, unit of volume: cubic-kilometer.
2768 * Caller owns returned value and must free it.
2769 * Also see {@link #getCubicKilometer()}.
2770 * @param status ICU error code.
2771 * @stable ICU 53
2772 */
2773 static MeasureUnit *createCubicKilometer(UErrorCode &status);
2774
2775 #ifndef U_HIDE_DRAFT_API
2776 /**
2777 * Returns by value, unit of volume: cubic-kilometer.
2778 * Also see {@link #createCubicKilometer()}.
2779 * @draft ICU 64
2780 */
2781 static MeasureUnit getCubicKilometer();
2782 #endif /* U_HIDE_DRAFT_API */
2783
2784 /**
2785 * Returns by pointer, unit of volume: cubic-meter.
2786 * Caller owns returned value and must free it.
2787 * Also see {@link #getCubicMeter()}.
2788 * @param status ICU error code.
2789 * @stable ICU 54
2790 */
2791 static MeasureUnit *createCubicMeter(UErrorCode &status);
2792
2793 #ifndef U_HIDE_DRAFT_API
2794 /**
2795 * Returns by value, unit of volume: cubic-meter.
2796 * Also see {@link #createCubicMeter()}.
2797 * @draft ICU 64
2798 */
2799 static MeasureUnit getCubicMeter();
2800 #endif /* U_HIDE_DRAFT_API */
2801
2802 /**
2803 * Returns by pointer, unit of volume: cubic-mile.
2804 * Caller owns returned value and must free it.
2805 * Also see {@link #getCubicMile()}.
2806 * @param status ICU error code.
2807 * @stable ICU 53
2808 */
2809 static MeasureUnit *createCubicMile(UErrorCode &status);
2810
2811 #ifndef U_HIDE_DRAFT_API
2812 /**
2813 * Returns by value, unit of volume: cubic-mile.
2814 * Also see {@link #createCubicMile()}.
2815 * @draft ICU 64
2816 */
2817 static MeasureUnit getCubicMile();
2818 #endif /* U_HIDE_DRAFT_API */
2819
2820 /**
2821 * Returns by pointer, unit of volume: cubic-yard.
2822 * Caller owns returned value and must free it.
2823 * Also see {@link #getCubicYard()}.
2824 * @param status ICU error code.
2825 * @stable ICU 54
2826 */
2827 static MeasureUnit *createCubicYard(UErrorCode &status);
2828
2829 #ifndef U_HIDE_DRAFT_API
2830 /**
2831 * Returns by value, unit of volume: cubic-yard.
2832 * Also see {@link #createCubicYard()}.
2833 * @draft ICU 64
2834 */
2835 static MeasureUnit getCubicYard();
2836 #endif /* U_HIDE_DRAFT_API */
2837
2838 /**
2839 * Returns by pointer, unit of volume: cup.
2840 * Caller owns returned value and must free it.
2841 * Also see {@link #getCup()}.
2842 * @param status ICU error code.
2843 * @stable ICU 54
2844 */
2845 static MeasureUnit *createCup(UErrorCode &status);
2846
2847 #ifndef U_HIDE_DRAFT_API
2848 /**
2849 * Returns by value, unit of volume: cup.
2850 * Also see {@link #createCup()}.
2851 * @draft ICU 64
2852 */
2853 static MeasureUnit getCup();
2854 #endif /* U_HIDE_DRAFT_API */
2855
2856 /**
2857 * Returns by pointer, unit of volume: cup-metric.
2858 * Caller owns returned value and must free it.
2859 * Also see {@link #getCupMetric()}.
2860 * @param status ICU error code.
2861 * @stable ICU 56
2862 */
2863 static MeasureUnit *createCupMetric(UErrorCode &status);
2864
2865 #ifndef U_HIDE_DRAFT_API
2866 /**
2867 * Returns by value, unit of volume: cup-metric.
2868 * Also see {@link #createCupMetric()}.
2869 * @draft ICU 64
2870 */
2871 static MeasureUnit getCupMetric();
2872 #endif /* U_HIDE_DRAFT_API */
2873
2874 /**
2875 * Returns by pointer, unit of volume: deciliter.
2876 * Caller owns returned value and must free it.
2877 * Also see {@link #getDeciliter()}.
2878 * @param status ICU error code.
2879 * @stable ICU 54
2880 */
2881 static MeasureUnit *createDeciliter(UErrorCode &status);
2882
2883 #ifndef U_HIDE_DRAFT_API
2884 /**
2885 * Returns by value, unit of volume: deciliter.
2886 * Also see {@link #createDeciliter()}.
2887 * @draft ICU 64
2888 */
2889 static MeasureUnit getDeciliter();
2890 #endif /* U_HIDE_DRAFT_API */
2891
2892 /**
2893 * Returns by pointer, unit of volume: fluid-ounce.
2894 * Caller owns returned value and must free it.
2895 * Also see {@link #getFluidOunce()}.
2896 * @param status ICU error code.
2897 * @stable ICU 54
2898 */
2899 static MeasureUnit *createFluidOunce(UErrorCode &status);
2900
2901 #ifndef U_HIDE_DRAFT_API
2902 /**
2903 * Returns by value, unit of volume: fluid-ounce.
2904 * Also see {@link #createFluidOunce()}.
2905 * @draft ICU 64
2906 */
2907 static MeasureUnit getFluidOunce();
2908 #endif /* U_HIDE_DRAFT_API */
2909
2910 #ifndef U_HIDE_DRAFT_API
2911 /**
2912 * Returns by pointer, unit of volume: fluid-ounce-imperial.
2913 * Caller owns returned value and must free it.
2914 * Also see {@link #getFluidOunceImperial()}.
2915 * @param status ICU error code.
2916 * @draft ICU 64
2917 */
2918 static MeasureUnit *createFluidOunceImperial(UErrorCode &status);
2919
2920 /**
2921 * Returns by value, unit of volume: fluid-ounce-imperial.
2922 * Also see {@link #createFluidOunceImperial()}.
2923 * @draft ICU 64
2924 */
2925 static MeasureUnit getFluidOunceImperial();
2926 #endif /* U_HIDE_DRAFT_API */
2927
2928 /**
2929 * Returns by pointer, unit of volume: gallon.
2930 * Caller owns returned value and must free it.
2931 * Also see {@link #getGallon()}.
2932 * @param status ICU error code.
2933 * @stable ICU 54
2934 */
2935 static MeasureUnit *createGallon(UErrorCode &status);
2936
2937 #ifndef U_HIDE_DRAFT_API
2938 /**
2939 * Returns by value, unit of volume: gallon.
2940 * Also see {@link #createGallon()}.
2941 * @draft ICU 64
2942 */
2943 static MeasureUnit getGallon();
2944 #endif /* U_HIDE_DRAFT_API */
2945
2946 /**
2947 * Returns by pointer, unit of volume: gallon-imperial.
2948 * Caller owns returned value and must free it.
2949 * Also see {@link #getGallonImperial()}.
2950 * @param status ICU error code.
2951 * @stable ICU 57
2952 */
2953 static MeasureUnit *createGallonImperial(UErrorCode &status);
2954
2955 #ifndef U_HIDE_DRAFT_API
2956 /**
2957 * Returns by value, unit of volume: gallon-imperial.
2958 * Also see {@link #createGallonImperial()}.
2959 * @draft ICU 64
2960 */
2961 static MeasureUnit getGallonImperial();
2962 #endif /* U_HIDE_DRAFT_API */
2963
2964 /**
2965 * Returns by pointer, unit of volume: hectoliter.
2966 * Caller owns returned value and must free it.
2967 * Also see {@link #getHectoliter()}.
2968 * @param status ICU error code.
2969 * @stable ICU 54
2970 */
2971 static MeasureUnit *createHectoliter(UErrorCode &status);
2972
2973 #ifndef U_HIDE_DRAFT_API
2974 /**
2975 * Returns by value, unit of volume: hectoliter.
2976 * Also see {@link #createHectoliter()}.
2977 * @draft ICU 64
2978 */
2979 static MeasureUnit getHectoliter();
2980 #endif /* U_HIDE_DRAFT_API */
2981
2982 /**
2983 * Returns by pointer, unit of volume: liter.
2984 * Caller owns returned value and must free it.
2985 * Also see {@link #getLiter()}.
2986 * @param status ICU error code.
2987 * @stable ICU 53
2988 */
2989 static MeasureUnit *createLiter(UErrorCode &status);
2990
2991 #ifndef U_HIDE_DRAFT_API
2992 /**
2993 * Returns by value, unit of volume: liter.
2994 * Also see {@link #createLiter()}.
2995 * @draft ICU 64
2996 */
2997 static MeasureUnit getLiter();
2998 #endif /* U_HIDE_DRAFT_API */
2999
3000 /**
3001 * Returns by pointer, unit of volume: megaliter.
3002 * Caller owns returned value and must free it.
3003 * Also see {@link #getMegaliter()}.
3004 * @param status ICU error code.
3005 * @stable ICU 54
3006 */
3007 static MeasureUnit *createMegaliter(UErrorCode &status);
3008
3009 #ifndef U_HIDE_DRAFT_API
3010 /**
3011 * Returns by value, unit of volume: megaliter.
3012 * Also see {@link #createMegaliter()}.
3013 * @draft ICU 64
3014 */
3015 static MeasureUnit getMegaliter();
3016 #endif /* U_HIDE_DRAFT_API */
3017
3018 /**
3019 * Returns by pointer, unit of volume: milliliter.
3020 * Caller owns returned value and must free it.
3021 * Also see {@link #getMilliliter()}.
3022 * @param status ICU error code.
3023 * @stable ICU 54
3024 */
3025 static MeasureUnit *createMilliliter(UErrorCode &status);
3026
3027 #ifndef U_HIDE_DRAFT_API
3028 /**
3029 * Returns by value, unit of volume: milliliter.
3030 * Also see {@link #createMilliliter()}.
3031 * @draft ICU 64
3032 */
3033 static MeasureUnit getMilliliter();
3034 #endif /* U_HIDE_DRAFT_API */
3035
3036 /**
3037 * Returns by pointer, unit of volume: pint.
3038 * Caller owns returned value and must free it.
3039 * Also see {@link #getPint()}.
3040 * @param status ICU error code.
3041 * @stable ICU 54
3042 */
3043 static MeasureUnit *createPint(UErrorCode &status);
3044
3045 #ifndef U_HIDE_DRAFT_API
3046 /**
3047 * Returns by value, unit of volume: pint.
3048 * Also see {@link #createPint()}.
3049 * @draft ICU 64
3050 */
3051 static MeasureUnit getPint();
3052 #endif /* U_HIDE_DRAFT_API */
3053
3054 /**
3055 * Returns by pointer, unit of volume: pint-metric.
3056 * Caller owns returned value and must free it.
3057 * Also see {@link #getPintMetric()}.
3058 * @param status ICU error code.
3059 * @stable ICU 56
3060 */
3061 static MeasureUnit *createPintMetric(UErrorCode &status);
3062
3063 #ifndef U_HIDE_DRAFT_API
3064 /**
3065 * Returns by value, unit of volume: pint-metric.
3066 * Also see {@link #createPintMetric()}.
3067 * @draft ICU 64
3068 */
3069 static MeasureUnit getPintMetric();
3070 #endif /* U_HIDE_DRAFT_API */
3071
3072 /**
3073 * Returns by pointer, unit of volume: quart.
3074 * Caller owns returned value and must free it.
3075 * Also see {@link #getQuart()}.
3076 * @param status ICU error code.
3077 * @stable ICU 54
3078 */
3079 static MeasureUnit *createQuart(UErrorCode &status);
3080
3081 #ifndef U_HIDE_DRAFT_API
3082 /**
3083 * Returns by value, unit of volume: quart.
3084 * Also see {@link #createQuart()}.
3085 * @draft ICU 64
3086 */
3087 static MeasureUnit getQuart();
3088 #endif /* U_HIDE_DRAFT_API */
3089
3090 /**
3091 * Returns by pointer, unit of volume: tablespoon.
3092 * Caller owns returned value and must free it.
3093 * Also see {@link #getTablespoon()}.
3094 * @param status ICU error code.
3095 * @stable ICU 54
3096 */
3097 static MeasureUnit *createTablespoon(UErrorCode &status);
3098
3099 #ifndef U_HIDE_DRAFT_API
3100 /**
3101 * Returns by value, unit of volume: tablespoon.
3102 * Also see {@link #createTablespoon()}.
3103 * @draft ICU 64
3104 */
3105 static MeasureUnit getTablespoon();
3106 #endif /* U_HIDE_DRAFT_API */
3107
3108 /**
3109 * Returns by pointer, unit of volume: teaspoon.
3110 * Caller owns returned value and must free it.
3111 * Also see {@link #getTeaspoon()}.
3112 * @param status ICU error code.
3113 * @stable ICU 54
3114 */
3115 static MeasureUnit *createTeaspoon(UErrorCode &status);
3116
3117 #ifndef U_HIDE_DRAFT_API
3118 /**
3119 * Returns by value, unit of volume: teaspoon.
3120 * Also see {@link #createTeaspoon()}.
3121 * @draft ICU 64
3122 */
3123 static MeasureUnit getTeaspoon();
3124 #endif /* U_HIDE_DRAFT_API */
3125
3126
3127 // End generated createXXX methods
3128
3129 protected:
3130
3131 #ifndef U_HIDE_INTERNAL_API
3132 /**
3133 * For ICU use only.
3134 * @internal
3135 */
3136 void initTime(const char *timeId);
3137
3138 /**
3139 * For ICU use only.
3140 * @internal
3141 */
3142 void initCurrency(const char *isoCurrency);
3143
3144 /**
3145 * For ICU use only.
3146 * @internal
3147 */
3148 void initNoUnit(const char *subtype);
3149
3150 #endif /* U_HIDE_INTERNAL_API */
3151
3152 private:
3153 int32_t fTypeId;
3154 int32_t fSubTypeId;
3155 char fCurrency[4];
3156
3157 MeasureUnit(int32_t typeId, int32_t subTypeId) : fTypeId(typeId), fSubTypeId(subTypeId) {
3158 fCurrency[0] = 0;
3159 }
3160 void setTo(int32_t typeId, int32_t subTypeId);
3161 int32_t getOffset() const;
3162 static MeasureUnit *create(int typeId, int subTypeId, UErrorCode &status);
3163 };
3164
3165 U_NAMESPACE_END
3166 #endif // U_SHOW_CPLUSPLUS_API
3167
3168 #endif // !UNCONFIG_NO_FORMATTING
3169 #endif // __MEASUREUNIT_H__