00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef __MEASUREUNIT_H__
00014 #define __MEASUREUNIT_H__
00015
00016 #include "unicode/utypes.h"
00017
00018 #if !UCONFIG_NO_FORMATTING
00019
00020 #include "unicode/unistr.h"
00021
00027 U_NAMESPACE_BEGIN
00028
00029 class StringEnumeration;
00030
00038 class U_I18N_API MeasureUnit: public UObject {
00039 public:
00040
00046 MeasureUnit();
00047
00052 MeasureUnit(const MeasureUnit &other);
00053
00058 MeasureUnit &operator=(const MeasureUnit &other);
00059
00065 virtual UObject* clone() const;
00066
00071 virtual ~MeasureUnit();
00072
00078 virtual UBool operator==(const UObject& other) const;
00079
00085 UBool operator!=(const UObject& other) const {
00086 return !(*this == other);
00087 }
00088
00093 const char *getType() const;
00094
00099 const char *getSubtype() const;
00100
00112 static int32_t getAvailable(
00113 MeasureUnit *destArray,
00114 int32_t destCapacity,
00115 UErrorCode &errorCode);
00116
00129 static int32_t getAvailable(
00130 const char *type,
00131 MeasureUnit *destArray,
00132 int32_t destCapacity,
00133 UErrorCode &errorCode);
00134
00143 static StringEnumeration* getAvailableTypes(UErrorCode &errorCode);
00144
00156 static UClassID U_EXPORT2 getStaticClassID(void);
00157
00169 virtual UClassID getDynamicClassID(void) const;
00170
00171 #ifndef U_HIDE_INTERNAL_API
00172
00178 int32_t getIndex() const;
00179
00185 static int32_t getIndexCount();
00186
00193 static int32_t internalGetIndexForTypeAndSubtype(const char *type, const char *subtype);
00194
00199 static MeasureUnit resolveUnitPerUnit(
00200 const MeasureUnit &unit, const MeasureUnit &perUnit, bool* isResolved);
00201 #endif
00202
00203
00204
00205
00206
00207
00208
00209
00210
00218 static MeasureUnit *createGForce(UErrorCode &status);
00219
00220 #ifndef U_HIDE_DRAFT_API
00221
00226 static MeasureUnit getGForce();
00227 #endif
00228
00236 static MeasureUnit *createMeterPerSecondSquared(UErrorCode &status);
00237
00238 #ifndef U_HIDE_DRAFT_API
00239
00244 static MeasureUnit getMeterPerSecondSquared();
00245 #endif
00246
00254 static MeasureUnit *createArcMinute(UErrorCode &status);
00255
00256 #ifndef U_HIDE_DRAFT_API
00257
00262 static MeasureUnit getArcMinute();
00263 #endif
00264
00272 static MeasureUnit *createArcSecond(UErrorCode &status);
00273
00274 #ifndef U_HIDE_DRAFT_API
00275
00280 static MeasureUnit getArcSecond();
00281 #endif
00282
00290 static MeasureUnit *createDegree(UErrorCode &status);
00291
00292 #ifndef U_HIDE_DRAFT_API
00293
00298 static MeasureUnit getDegree();
00299 #endif
00300
00308 static MeasureUnit *createRadian(UErrorCode &status);
00309
00310 #ifndef U_HIDE_DRAFT_API
00311
00316 static MeasureUnit getRadian();
00317 #endif
00318
00326 static MeasureUnit *createRevolutionAngle(UErrorCode &status);
00327
00328 #ifndef U_HIDE_DRAFT_API
00329
00334 static MeasureUnit getRevolutionAngle();
00335 #endif
00336
00344 static MeasureUnit *createAcre(UErrorCode &status);
00345
00346 #ifndef U_HIDE_DRAFT_API
00347
00352 static MeasureUnit getAcre();
00353 #endif
00354
00355 #ifndef U_HIDE_DRAFT_API
00356
00363 static MeasureUnit *createDunam(UErrorCode &status);
00364
00370 static MeasureUnit getDunam();
00371 #endif
00372
00380 static MeasureUnit *createHectare(UErrorCode &status);
00381
00382 #ifndef U_HIDE_DRAFT_API
00383
00388 static MeasureUnit getHectare();
00389 #endif
00390
00398 static MeasureUnit *createSquareCentimeter(UErrorCode &status);
00399
00400 #ifndef U_HIDE_DRAFT_API
00401
00406 static MeasureUnit getSquareCentimeter();
00407 #endif
00408
00416 static MeasureUnit *createSquareFoot(UErrorCode &status);
00417
00418 #ifndef U_HIDE_DRAFT_API
00419
00424 static MeasureUnit getSquareFoot();
00425 #endif
00426
00434 static MeasureUnit *createSquareInch(UErrorCode &status);
00435
00436 #ifndef U_HIDE_DRAFT_API
00437
00442 static MeasureUnit getSquareInch();
00443 #endif
00444
00452 static MeasureUnit *createSquareKilometer(UErrorCode &status);
00453
00454 #ifndef U_HIDE_DRAFT_API
00455
00460 static MeasureUnit getSquareKilometer();
00461 #endif
00462
00470 static MeasureUnit *createSquareMeter(UErrorCode &status);
00471
00472 #ifndef U_HIDE_DRAFT_API
00473
00478 static MeasureUnit getSquareMeter();
00479 #endif
00480
00488 static MeasureUnit *createSquareMile(UErrorCode &status);
00489
00490 #ifndef U_HIDE_DRAFT_API
00491
00496 static MeasureUnit getSquareMile();
00497 #endif
00498
00506 static MeasureUnit *createSquareYard(UErrorCode &status);
00507
00508 #ifndef U_HIDE_DRAFT_API
00509
00514 static MeasureUnit getSquareYard();
00515 #endif
00516
00524 static MeasureUnit *createKarat(UErrorCode &status);
00525
00526 #ifndef U_HIDE_DRAFT_API
00527
00532 static MeasureUnit getKarat();
00533 #endif
00534
00542 static MeasureUnit *createMilligramPerDeciliter(UErrorCode &status);
00543
00544 #ifndef U_HIDE_DRAFT_API
00545
00550 static MeasureUnit getMilligramPerDeciliter();
00551 #endif
00552
00560 static MeasureUnit *createMillimolePerLiter(UErrorCode &status);
00561
00562 #ifndef U_HIDE_DRAFT_API
00563
00568 static MeasureUnit getMillimolePerLiter();
00569 #endif
00570
00571 #ifndef U_HIDE_DRAFT_API
00572
00579 static MeasureUnit *createMole(UErrorCode &status);
00580
00586 static MeasureUnit getMole();
00587 #endif
00588
00596 static MeasureUnit *createPartPerMillion(UErrorCode &status);
00597
00598 #ifndef U_HIDE_DRAFT_API
00599
00604 static MeasureUnit getPartPerMillion();
00605 #endif
00606
00607 #ifndef U_HIDE_DRAFT_API
00608
00615 static MeasureUnit *createPercent(UErrorCode &status);
00616 #endif
00617
00618 #ifndef U_HIDE_DRAFT_API
00619
00624 static MeasureUnit getPercent();
00625 #endif
00626
00627 #ifndef U_HIDE_DRAFT_API
00628
00635 static MeasureUnit *createPermille(UErrorCode &status);
00636 #endif
00637
00638 #ifndef U_HIDE_DRAFT_API
00639
00644 static MeasureUnit getPermille();
00645 #endif
00646
00647 #ifndef U_HIDE_DRAFT_API
00648
00655 static MeasureUnit *createPermyriad(UErrorCode &status);
00656
00662 static MeasureUnit getPermyriad();
00663 #endif
00664
00672 static MeasureUnit *createLiterPer100Kilometers(UErrorCode &status);
00673
00674 #ifndef U_HIDE_DRAFT_API
00675
00680 static MeasureUnit getLiterPer100Kilometers();
00681 #endif
00682
00690 static MeasureUnit *createLiterPerKilometer(UErrorCode &status);
00691
00692 #ifndef U_HIDE_DRAFT_API
00693
00698 static MeasureUnit getLiterPerKilometer();
00699 #endif
00700
00708 static MeasureUnit *createMilePerGallon(UErrorCode &status);
00709
00710 #ifndef U_HIDE_DRAFT_API
00711
00716 static MeasureUnit getMilePerGallon();
00717 #endif
00718
00726 static MeasureUnit *createMilePerGallonImperial(UErrorCode &status);
00727
00728 #ifndef U_HIDE_DRAFT_API
00729
00734 static MeasureUnit getMilePerGallonImperial();
00735 #endif
00736
00744 static MeasureUnit *createBit(UErrorCode &status);
00745
00746 #ifndef U_HIDE_DRAFT_API
00747
00752 static MeasureUnit getBit();
00753 #endif
00754
00762 static MeasureUnit *createByte(UErrorCode &status);
00763
00764 #ifndef U_HIDE_DRAFT_API
00765
00770 static MeasureUnit getByte();
00771 #endif
00772
00780 static MeasureUnit *createGigabit(UErrorCode &status);
00781
00782 #ifndef U_HIDE_DRAFT_API
00783
00788 static MeasureUnit getGigabit();
00789 #endif
00790
00798 static MeasureUnit *createGigabyte(UErrorCode &status);
00799
00800 #ifndef U_HIDE_DRAFT_API
00801
00806 static MeasureUnit getGigabyte();
00807 #endif
00808
00816 static MeasureUnit *createKilobit(UErrorCode &status);
00817
00818 #ifndef U_HIDE_DRAFT_API
00819
00824 static MeasureUnit getKilobit();
00825 #endif
00826
00834 static MeasureUnit *createKilobyte(UErrorCode &status);
00835
00836 #ifndef U_HIDE_DRAFT_API
00837
00842 static MeasureUnit getKilobyte();
00843 #endif
00844
00852 static MeasureUnit *createMegabit(UErrorCode &status);
00853
00854 #ifndef U_HIDE_DRAFT_API
00855
00860 static MeasureUnit getMegabit();
00861 #endif
00862
00870 static MeasureUnit *createMegabyte(UErrorCode &status);
00871
00872 #ifndef U_HIDE_DRAFT_API
00873
00878 static MeasureUnit getMegabyte();
00879 #endif
00880
00881 #ifndef U_HIDE_DRAFT_API
00882
00889 static MeasureUnit *createPetabyte(UErrorCode &status);
00890 #endif
00891
00892 #ifndef U_HIDE_DRAFT_API
00893
00898 static MeasureUnit getPetabyte();
00899 #endif
00900
00908 static MeasureUnit *createTerabit(UErrorCode &status);
00909
00910 #ifndef U_HIDE_DRAFT_API
00911
00916 static MeasureUnit getTerabit();
00917 #endif
00918
00926 static MeasureUnit *createTerabyte(UErrorCode &status);
00927
00928 #ifndef U_HIDE_DRAFT_API
00929
00934 static MeasureUnit getTerabyte();
00935 #endif
00936
00944 static MeasureUnit *createCentury(UErrorCode &status);
00945
00946 #ifndef U_HIDE_DRAFT_API
00947
00952 static MeasureUnit getCentury();
00953 #endif
00954
00962 static MeasureUnit *createDay(UErrorCode &status);
00963
00964 #ifndef U_HIDE_DRAFT_API
00965
00970 static MeasureUnit getDay();
00971 #endif
00972
00973 #ifndef U_HIDE_DRAFT_API
00974
00981 static MeasureUnit *createDayPerson(UErrorCode &status);
00982 #endif
00983
00984 #ifndef U_HIDE_DRAFT_API
00985
00990 static MeasureUnit getDayPerson();
00991 #endif
00992
01000 static MeasureUnit *createHour(UErrorCode &status);
01001
01002 #ifndef U_HIDE_DRAFT_API
01003
01008 static MeasureUnit getHour();
01009 #endif
01010
01018 static MeasureUnit *createMicrosecond(UErrorCode &status);
01019
01020 #ifndef U_HIDE_DRAFT_API
01021
01026 static MeasureUnit getMicrosecond();
01027 #endif
01028
01036 static MeasureUnit *createMillisecond(UErrorCode &status);
01037
01038 #ifndef U_HIDE_DRAFT_API
01039
01044 static MeasureUnit getMillisecond();
01045 #endif
01046
01054 static MeasureUnit *createMinute(UErrorCode &status);
01055
01056 #ifndef U_HIDE_DRAFT_API
01057
01062 static MeasureUnit getMinute();
01063 #endif
01064
01072 static MeasureUnit *createMonth(UErrorCode &status);
01073
01074 #ifndef U_HIDE_DRAFT_API
01075
01080 static MeasureUnit getMonth();
01081 #endif
01082
01083 #ifndef U_HIDE_DRAFT_API
01084
01091 static MeasureUnit *createMonthPerson(UErrorCode &status);
01092 #endif
01093
01094 #ifndef U_HIDE_DRAFT_API
01095
01100 static MeasureUnit getMonthPerson();
01101 #endif
01102
01110 static MeasureUnit *createNanosecond(UErrorCode &status);
01111
01112 #ifndef U_HIDE_DRAFT_API
01113
01118 static MeasureUnit getNanosecond();
01119 #endif
01120
01128 static MeasureUnit *createSecond(UErrorCode &status);
01129
01130 #ifndef U_HIDE_DRAFT_API
01131
01136 static MeasureUnit getSecond();
01137 #endif
01138
01146 static MeasureUnit *createWeek(UErrorCode &status);
01147
01148 #ifndef U_HIDE_DRAFT_API
01149
01154 static MeasureUnit getWeek();
01155 #endif
01156
01157 #ifndef U_HIDE_DRAFT_API
01158
01165 static MeasureUnit *createWeekPerson(UErrorCode &status);
01166 #endif
01167
01168 #ifndef U_HIDE_DRAFT_API
01169
01174 static MeasureUnit getWeekPerson();
01175 #endif
01176
01184 static MeasureUnit *createYear(UErrorCode &status);
01185
01186 #ifndef U_HIDE_DRAFT_API
01187
01192 static MeasureUnit getYear();
01193 #endif
01194
01195 #ifndef U_HIDE_DRAFT_API
01196
01203 static MeasureUnit *createYearPerson(UErrorCode &status);
01204 #endif
01205
01206 #ifndef U_HIDE_DRAFT_API
01207
01212 static MeasureUnit getYearPerson();
01213 #endif
01214
01222 static MeasureUnit *createAmpere(UErrorCode &status);
01223
01224 #ifndef U_HIDE_DRAFT_API
01225
01230 static MeasureUnit getAmpere();
01231 #endif
01232
01240 static MeasureUnit *createMilliampere(UErrorCode &status);
01241
01242 #ifndef U_HIDE_DRAFT_API
01243
01248 static MeasureUnit getMilliampere();
01249 #endif
01250
01258 static MeasureUnit *createOhm(UErrorCode &status);
01259
01260 #ifndef U_HIDE_DRAFT_API
01261
01266 static MeasureUnit getOhm();
01267 #endif
01268
01276 static MeasureUnit *createVolt(UErrorCode &status);
01277
01278 #ifndef U_HIDE_DRAFT_API
01279
01284 static MeasureUnit getVolt();
01285 #endif
01286
01287 #ifndef U_HIDE_DRAFT_API
01288
01295 static MeasureUnit *createBritishThermalUnit(UErrorCode &status);
01296
01302 static MeasureUnit getBritishThermalUnit();
01303 #endif
01304
01312 static MeasureUnit *createCalorie(UErrorCode &status);
01313
01314 #ifndef U_HIDE_DRAFT_API
01315
01320 static MeasureUnit getCalorie();
01321 #endif
01322
01323 #ifndef U_HIDE_DRAFT_API
01324
01331 static MeasureUnit *createElectronvolt(UErrorCode &status);
01332
01338 static MeasureUnit getElectronvolt();
01339 #endif
01340
01348 static MeasureUnit *createFoodcalorie(UErrorCode &status);
01349
01350 #ifndef U_HIDE_DRAFT_API
01351
01356 static MeasureUnit getFoodcalorie();
01357 #endif
01358
01366 static MeasureUnit *createJoule(UErrorCode &status);
01367
01368 #ifndef U_HIDE_DRAFT_API
01369
01374 static MeasureUnit getJoule();
01375 #endif
01376
01384 static MeasureUnit *createKilocalorie(UErrorCode &status);
01385
01386 #ifndef U_HIDE_DRAFT_API
01387
01392 static MeasureUnit getKilocalorie();
01393 #endif
01394
01402 static MeasureUnit *createKilojoule(UErrorCode &status);
01403
01404 #ifndef U_HIDE_DRAFT_API
01405
01410 static MeasureUnit getKilojoule();
01411 #endif
01412
01420 static MeasureUnit *createKilowattHour(UErrorCode &status);
01421
01422 #ifndef U_HIDE_DRAFT_API
01423
01428 static MeasureUnit getKilowattHour();
01429 #endif
01430
01431 #ifndef U_HIDE_DRAFT_API
01432
01439 static MeasureUnit *createNewton(UErrorCode &status);
01440
01446 static MeasureUnit getNewton();
01447 #endif
01448
01449 #ifndef U_HIDE_DRAFT_API
01450
01457 static MeasureUnit *createPoundForce(UErrorCode &status);
01458
01464 static MeasureUnit getPoundForce();
01465 #endif
01466
01474 static MeasureUnit *createGigahertz(UErrorCode &status);
01475
01476 #ifndef U_HIDE_DRAFT_API
01477
01482 static MeasureUnit getGigahertz();
01483 #endif
01484
01492 static MeasureUnit *createHertz(UErrorCode &status);
01493
01494 #ifndef U_HIDE_DRAFT_API
01495
01500 static MeasureUnit getHertz();
01501 #endif
01502
01510 static MeasureUnit *createKilohertz(UErrorCode &status);
01511
01512 #ifndef U_HIDE_DRAFT_API
01513
01518 static MeasureUnit getKilohertz();
01519 #endif
01520
01528 static MeasureUnit *createMegahertz(UErrorCode &status);
01529
01530 #ifndef U_HIDE_DRAFT_API
01531
01536 static MeasureUnit getMegahertz();
01537 #endif
01538
01546 static MeasureUnit *createAstronomicalUnit(UErrorCode &status);
01547
01548 #ifndef U_HIDE_DRAFT_API
01549
01554 static MeasureUnit getAstronomicalUnit();
01555 #endif
01556
01564 static MeasureUnit *createCentimeter(UErrorCode &status);
01565
01566 #ifndef U_HIDE_DRAFT_API
01567
01572 static MeasureUnit getCentimeter();
01573 #endif
01574
01582 static MeasureUnit *createDecimeter(UErrorCode &status);
01583
01584 #ifndef U_HIDE_DRAFT_API
01585
01590 static MeasureUnit getDecimeter();
01591 #endif
01592
01600 static MeasureUnit *createFathom(UErrorCode &status);
01601
01602 #ifndef U_HIDE_DRAFT_API
01603
01608 static MeasureUnit getFathom();
01609 #endif
01610
01618 static MeasureUnit *createFoot(UErrorCode &status);
01619
01620 #ifndef U_HIDE_DRAFT_API
01621
01626 static MeasureUnit getFoot();
01627 #endif
01628
01636 static MeasureUnit *createFurlong(UErrorCode &status);
01637
01638 #ifndef U_HIDE_DRAFT_API
01639
01644 static MeasureUnit getFurlong();
01645 #endif
01646
01654 static MeasureUnit *createInch(UErrorCode &status);
01655
01656 #ifndef U_HIDE_DRAFT_API
01657
01662 static MeasureUnit getInch();
01663 #endif
01664
01672 static MeasureUnit *createKilometer(UErrorCode &status);
01673
01674 #ifndef U_HIDE_DRAFT_API
01675
01680 static MeasureUnit getKilometer();
01681 #endif
01682
01690 static MeasureUnit *createLightYear(UErrorCode &status);
01691
01692 #ifndef U_HIDE_DRAFT_API
01693
01698 static MeasureUnit getLightYear();
01699 #endif
01700
01708 static MeasureUnit *createMeter(UErrorCode &status);
01709
01710 #ifndef U_HIDE_DRAFT_API
01711
01716 static MeasureUnit getMeter();
01717 #endif
01718
01726 static MeasureUnit *createMicrometer(UErrorCode &status);
01727
01728 #ifndef U_HIDE_DRAFT_API
01729
01734 static MeasureUnit getMicrometer();
01735 #endif
01736
01744 static MeasureUnit *createMile(UErrorCode &status);
01745
01746 #ifndef U_HIDE_DRAFT_API
01747
01752 static MeasureUnit getMile();
01753 #endif
01754
01762 static MeasureUnit *createMileScandinavian(UErrorCode &status);
01763
01764 #ifndef U_HIDE_DRAFT_API
01765
01770 static MeasureUnit getMileScandinavian();
01771 #endif
01772
01780 static MeasureUnit *createMillimeter(UErrorCode &status);
01781
01782 #ifndef U_HIDE_DRAFT_API
01783
01788 static MeasureUnit getMillimeter();
01789 #endif
01790
01798 static MeasureUnit *createNanometer(UErrorCode &status);
01799
01800 #ifndef U_HIDE_DRAFT_API
01801
01806 static MeasureUnit getNanometer();
01807 #endif
01808
01816 static MeasureUnit *createNauticalMile(UErrorCode &status);
01817
01818 #ifndef U_HIDE_DRAFT_API
01819
01824 static MeasureUnit getNauticalMile();
01825 #endif
01826
01834 static MeasureUnit *createParsec(UErrorCode &status);
01835
01836 #ifndef U_HIDE_DRAFT_API
01837
01842 static MeasureUnit getParsec();
01843 #endif
01844
01852 static MeasureUnit *createPicometer(UErrorCode &status);
01853
01854 #ifndef U_HIDE_DRAFT_API
01855
01860 static MeasureUnit getPicometer();
01861 #endif
01862
01870 static MeasureUnit *createPoint(UErrorCode &status);
01871
01872 #ifndef U_HIDE_DRAFT_API
01873
01878 static MeasureUnit getPoint();
01879 #endif
01880
01881 #ifndef U_HIDE_DRAFT_API
01882
01889 static MeasureUnit *createSolarRadius(UErrorCode &status);
01890
01896 static MeasureUnit getSolarRadius();
01897 #endif
01898
01906 static MeasureUnit *createYard(UErrorCode &status);
01907
01908 #ifndef U_HIDE_DRAFT_API
01909
01914 static MeasureUnit getYard();
01915 #endif
01916
01924 static MeasureUnit *createLux(UErrorCode &status);
01925
01926 #ifndef U_HIDE_DRAFT_API
01927
01932 static MeasureUnit getLux();
01933 #endif
01934
01935 #ifndef U_HIDE_DRAFT_API
01936
01943 static MeasureUnit *createSolarLuminosity(UErrorCode &status);
01944
01950 static MeasureUnit getSolarLuminosity();
01951 #endif
01952
01960 static MeasureUnit *createCarat(UErrorCode &status);
01961
01962 #ifndef U_HIDE_DRAFT_API
01963
01968 static MeasureUnit getCarat();
01969 #endif
01970
01971 #ifndef U_HIDE_DRAFT_API
01972
01979 static MeasureUnit *createDalton(UErrorCode &status);
01980
01986 static MeasureUnit getDalton();
01987 #endif
01988
01989 #ifndef U_HIDE_DRAFT_API
01990
01997 static MeasureUnit *createEarthMass(UErrorCode &status);
01998
02004 static MeasureUnit getEarthMass();
02005 #endif
02006
02014 static MeasureUnit *createGram(UErrorCode &status);
02015
02016 #ifndef U_HIDE_DRAFT_API
02017
02022 static MeasureUnit getGram();
02023 #endif
02024
02032 static MeasureUnit *createKilogram(UErrorCode &status);
02033
02034 #ifndef U_HIDE_DRAFT_API
02035
02040 static MeasureUnit getKilogram();
02041 #endif
02042
02050 static MeasureUnit *createMetricTon(UErrorCode &status);
02051
02052 #ifndef U_HIDE_DRAFT_API
02053
02058 static MeasureUnit getMetricTon();
02059 #endif
02060
02068 static MeasureUnit *createMicrogram(UErrorCode &status);
02069
02070 #ifndef U_HIDE_DRAFT_API
02071
02076 static MeasureUnit getMicrogram();
02077 #endif
02078
02086 static MeasureUnit *createMilligram(UErrorCode &status);
02087
02088 #ifndef U_HIDE_DRAFT_API
02089
02094 static MeasureUnit getMilligram();
02095 #endif
02096
02104 static MeasureUnit *createOunce(UErrorCode &status);
02105
02106 #ifndef U_HIDE_DRAFT_API
02107
02112 static MeasureUnit getOunce();
02113 #endif
02114
02122 static MeasureUnit *createOunceTroy(UErrorCode &status);
02123
02124 #ifndef U_HIDE_DRAFT_API
02125
02130 static MeasureUnit getOunceTroy();
02131 #endif
02132
02140 static MeasureUnit *createPound(UErrorCode &status);
02141
02142 #ifndef U_HIDE_DRAFT_API
02143
02148 static MeasureUnit getPound();
02149 #endif
02150
02151 #ifndef U_HIDE_DRAFT_API
02152
02159 static MeasureUnit *createSolarMass(UErrorCode &status);
02160
02166 static MeasureUnit getSolarMass();
02167 #endif
02168
02176 static MeasureUnit *createStone(UErrorCode &status);
02177
02178 #ifndef U_HIDE_DRAFT_API
02179
02184 static MeasureUnit getStone();
02185 #endif
02186
02194 static MeasureUnit *createTon(UErrorCode &status);
02195
02196 #ifndef U_HIDE_DRAFT_API
02197
02202 static MeasureUnit getTon();
02203 #endif
02204
02212 static MeasureUnit *createGigawatt(UErrorCode &status);
02213
02214 #ifndef U_HIDE_DRAFT_API
02215
02220 static MeasureUnit getGigawatt();
02221 #endif
02222
02230 static MeasureUnit *createHorsepower(UErrorCode &status);
02231
02232 #ifndef U_HIDE_DRAFT_API
02233
02238 static MeasureUnit getHorsepower();
02239 #endif
02240
02248 static MeasureUnit *createKilowatt(UErrorCode &status);
02249
02250 #ifndef U_HIDE_DRAFT_API
02251
02256 static MeasureUnit getKilowatt();
02257 #endif
02258
02266 static MeasureUnit *createMegawatt(UErrorCode &status);
02267
02268 #ifndef U_HIDE_DRAFT_API
02269
02274 static MeasureUnit getMegawatt();
02275 #endif
02276
02284 static MeasureUnit *createMilliwatt(UErrorCode &status);
02285
02286 #ifndef U_HIDE_DRAFT_API
02287
02292 static MeasureUnit getMilliwatt();
02293 #endif
02294
02302 static MeasureUnit *createWatt(UErrorCode &status);
02303
02304 #ifndef U_HIDE_DRAFT_API
02305
02310 static MeasureUnit getWatt();
02311 #endif
02312
02313 #ifndef U_HIDE_DRAFT_API
02314
02321 static MeasureUnit *createAtmosphere(UErrorCode &status);
02322 #endif
02323
02324 #ifndef U_HIDE_DRAFT_API
02325
02330 static MeasureUnit getAtmosphere();
02331 #endif
02332
02340 static MeasureUnit *createHectopascal(UErrorCode &status);
02341
02342 #ifndef U_HIDE_DRAFT_API
02343
02348 static MeasureUnit getHectopascal();
02349 #endif
02350
02358 static MeasureUnit *createInchHg(UErrorCode &status);
02359
02360 #ifndef U_HIDE_DRAFT_API
02361
02366 static MeasureUnit getInchHg();
02367 #endif
02368
02369 #ifndef U_HIDE_DRAFT_API
02370
02377 static MeasureUnit *createKilopascal(UErrorCode &status);
02378
02384 static MeasureUnit getKilopascal();
02385 #endif
02386
02387 #ifndef U_HIDE_DRAFT_API
02388
02395 static MeasureUnit *createMegapascal(UErrorCode &status);
02396
02402 static MeasureUnit getMegapascal();
02403 #endif
02404
02412 static MeasureUnit *createMillibar(UErrorCode &status);
02413
02414 #ifndef U_HIDE_DRAFT_API
02415
02420 static MeasureUnit getMillibar();
02421 #endif
02422
02430 static MeasureUnit *createMillimeterOfMercury(UErrorCode &status);
02431
02432 #ifndef U_HIDE_DRAFT_API
02433
02438 static MeasureUnit getMillimeterOfMercury();
02439 #endif
02440
02448 static MeasureUnit *createPoundPerSquareInch(UErrorCode &status);
02449
02450 #ifndef U_HIDE_DRAFT_API
02451
02456 static MeasureUnit getPoundPerSquareInch();
02457 #endif
02458
02466 static MeasureUnit *createKilometerPerHour(UErrorCode &status);
02467
02468 #ifndef U_HIDE_DRAFT_API
02469
02474 static MeasureUnit getKilometerPerHour();
02475 #endif
02476
02484 static MeasureUnit *createKnot(UErrorCode &status);
02485
02486 #ifndef U_HIDE_DRAFT_API
02487
02492 static MeasureUnit getKnot();
02493 #endif
02494
02502 static MeasureUnit *createMeterPerSecond(UErrorCode &status);
02503
02504 #ifndef U_HIDE_DRAFT_API
02505
02510 static MeasureUnit getMeterPerSecond();
02511 #endif
02512
02520 static MeasureUnit *createMilePerHour(UErrorCode &status);
02521
02522 #ifndef U_HIDE_DRAFT_API
02523
02528 static MeasureUnit getMilePerHour();
02529 #endif
02530
02538 static MeasureUnit *createCelsius(UErrorCode &status);
02539
02540 #ifndef U_HIDE_DRAFT_API
02541
02546 static MeasureUnit getCelsius();
02547 #endif
02548
02556 static MeasureUnit *createFahrenheit(UErrorCode &status);
02557
02558 #ifndef U_HIDE_DRAFT_API
02559
02564 static MeasureUnit getFahrenheit();
02565 #endif
02566
02574 static MeasureUnit *createGenericTemperature(UErrorCode &status);
02575
02576 #ifndef U_HIDE_DRAFT_API
02577
02582 static MeasureUnit getGenericTemperature();
02583 #endif
02584
02592 static MeasureUnit *createKelvin(UErrorCode &status);
02593
02594 #ifndef U_HIDE_DRAFT_API
02595
02600 static MeasureUnit getKelvin();
02601 #endif
02602
02603 #ifndef U_HIDE_DRAFT_API
02604
02611 static MeasureUnit *createNewtonMeter(UErrorCode &status);
02612
02618 static MeasureUnit getNewtonMeter();
02619 #endif
02620
02621 #ifndef U_HIDE_DRAFT_API
02622
02629 static MeasureUnit *createPoundFoot(UErrorCode &status);
02630
02636 static MeasureUnit getPoundFoot();
02637 #endif
02638
02646 static MeasureUnit *createAcreFoot(UErrorCode &status);
02647
02648 #ifndef U_HIDE_DRAFT_API
02649
02654 static MeasureUnit getAcreFoot();
02655 #endif
02656
02657 #ifndef U_HIDE_DRAFT_API
02658
02665 static MeasureUnit *createBarrel(UErrorCode &status);
02666
02672 static MeasureUnit getBarrel();
02673 #endif
02674
02682 static MeasureUnit *createBushel(UErrorCode &status);
02683
02684 #ifndef U_HIDE_DRAFT_API
02685
02690 static MeasureUnit getBushel();
02691 #endif
02692
02700 static MeasureUnit *createCentiliter(UErrorCode &status);
02701
02702 #ifndef U_HIDE_DRAFT_API
02703
02708 static MeasureUnit getCentiliter();
02709 #endif
02710
02718 static MeasureUnit *createCubicCentimeter(UErrorCode &status);
02719
02720 #ifndef U_HIDE_DRAFT_API
02721
02726 static MeasureUnit getCubicCentimeter();
02727 #endif
02728
02736 static MeasureUnit *createCubicFoot(UErrorCode &status);
02737
02738 #ifndef U_HIDE_DRAFT_API
02739
02744 static MeasureUnit getCubicFoot();
02745 #endif
02746
02754 static MeasureUnit *createCubicInch(UErrorCode &status);
02755
02756 #ifndef U_HIDE_DRAFT_API
02757
02762 static MeasureUnit getCubicInch();
02763 #endif
02764
02772 static MeasureUnit *createCubicKilometer(UErrorCode &status);
02773
02774 #ifndef U_HIDE_DRAFT_API
02775
02780 static MeasureUnit getCubicKilometer();
02781 #endif
02782
02790 static MeasureUnit *createCubicMeter(UErrorCode &status);
02791
02792 #ifndef U_HIDE_DRAFT_API
02793
02798 static MeasureUnit getCubicMeter();
02799 #endif
02800
02808 static MeasureUnit *createCubicMile(UErrorCode &status);
02809
02810 #ifndef U_HIDE_DRAFT_API
02811
02816 static MeasureUnit getCubicMile();
02817 #endif
02818
02826 static MeasureUnit *createCubicYard(UErrorCode &status);
02827
02828 #ifndef U_HIDE_DRAFT_API
02829
02834 static MeasureUnit getCubicYard();
02835 #endif
02836
02844 static MeasureUnit *createCup(UErrorCode &status);
02845
02846 #ifndef U_HIDE_DRAFT_API
02847
02852 static MeasureUnit getCup();
02853 #endif
02854
02862 static MeasureUnit *createCupMetric(UErrorCode &status);
02863
02864 #ifndef U_HIDE_DRAFT_API
02865
02870 static MeasureUnit getCupMetric();
02871 #endif
02872
02880 static MeasureUnit *createDeciliter(UErrorCode &status);
02881
02882 #ifndef U_HIDE_DRAFT_API
02883
02888 static MeasureUnit getDeciliter();
02889 #endif
02890
02898 static MeasureUnit *createFluidOunce(UErrorCode &status);
02899
02900 #ifndef U_HIDE_DRAFT_API
02901
02906 static MeasureUnit getFluidOunce();
02907 #endif
02908
02909 #ifndef U_HIDE_DRAFT_API
02910
02917 static MeasureUnit *createFluidOunceImperial(UErrorCode &status);
02918
02924 static MeasureUnit getFluidOunceImperial();
02925 #endif
02926
02934 static MeasureUnit *createGallon(UErrorCode &status);
02935
02936 #ifndef U_HIDE_DRAFT_API
02937
02942 static MeasureUnit getGallon();
02943 #endif
02944
02952 static MeasureUnit *createGallonImperial(UErrorCode &status);
02953
02954 #ifndef U_HIDE_DRAFT_API
02955
02960 static MeasureUnit getGallonImperial();
02961 #endif
02962
02970 static MeasureUnit *createHectoliter(UErrorCode &status);
02971
02972 #ifndef U_HIDE_DRAFT_API
02973
02978 static MeasureUnit getHectoliter();
02979 #endif
02980
02988 static MeasureUnit *createLiter(UErrorCode &status);
02989
02990 #ifndef U_HIDE_DRAFT_API
02991
02996 static MeasureUnit getLiter();
02997 #endif
02998
03006 static MeasureUnit *createMegaliter(UErrorCode &status);
03007
03008 #ifndef U_HIDE_DRAFT_API
03009
03014 static MeasureUnit getMegaliter();
03015 #endif
03016
03024 static MeasureUnit *createMilliliter(UErrorCode &status);
03025
03026 #ifndef U_HIDE_DRAFT_API
03027
03032 static MeasureUnit getMilliliter();
03033 #endif
03034
03042 static MeasureUnit *createPint(UErrorCode &status);
03043
03044 #ifndef U_HIDE_DRAFT_API
03045
03050 static MeasureUnit getPint();
03051 #endif
03052
03060 static MeasureUnit *createPintMetric(UErrorCode &status);
03061
03062 #ifndef U_HIDE_DRAFT_API
03063
03068 static MeasureUnit getPintMetric();
03069 #endif
03070
03078 static MeasureUnit *createQuart(UErrorCode &status);
03079
03080 #ifndef U_HIDE_DRAFT_API
03081
03086 static MeasureUnit getQuart();
03087 #endif
03088
03096 static MeasureUnit *createTablespoon(UErrorCode &status);
03097
03098 #ifndef U_HIDE_DRAFT_API
03099
03104 static MeasureUnit getTablespoon();
03105 #endif
03106
03114 static MeasureUnit *createTeaspoon(UErrorCode &status);
03115
03116 #ifndef U_HIDE_DRAFT_API
03117
03122 static MeasureUnit getTeaspoon();
03123 #endif
03124
03125
03126
03127
03128 protected:
03129
03130 #ifndef U_HIDE_INTERNAL_API
03131
03135 void initTime(const char *timeId);
03136
03141 void initCurrency(const char *isoCurrency);
03142
03147 void initNoUnit(const char *subtype);
03148
03149 #endif
03150
03151 private:
03152 int32_t fTypeId;
03153 int32_t fSubTypeId;
03154 char fCurrency[4];
03155
03156 MeasureUnit(int32_t typeId, int32_t subTypeId) : fTypeId(typeId), fSubTypeId(subTypeId) {
03157 fCurrency[0] = 0;
03158 }
03159 void setTo(int32_t typeId, int32_t subTypeId);
03160 int32_t getOffset() const;
03161 static MeasureUnit *create(int typeId, int subTypeId, UErrorCode &status);
03162 };
03163
03164 U_NAMESPACE_END
03165
03166 #endif // !UNCONFIG_NO_FORMATTING
03167 #endif // __MEASUREUNIT_H__