ICU 63.1 63.1

Public Member Functions | Static Public Member Functions | Protected Member Functions
icu::MeasureUnit Class Reference

A unit such as length, mass, volume, currency, etc. More...

`#include <measunit.h>`

Inheritance diagram for icu::MeasureUnit:

## Public Member Functions
| MeasureUnit ()
| Default constructor. More...
| MeasureUnit (const MeasureUnit &other)
| Copy constructor. More...
MeasureUnit & | operator= (const MeasureUnit &other)
| Assignment operator. More...
virtual UObject * | clone () const
| Returns a polymorphic clone of this object. More...
virtual | ~MeasureUnit ()
| Destructor. More...
virtual UBool | operator== (const UObject &other) const
| Equality operator. More...
UBool | operator!= (const UObject &other) const
| Inequality operator. More...
const char * | getType () const
| Get the type. More...
const char * | getSubtype () const
| Get the sub type. More...
virtual UClassID | getDynamicClassID (void) const
| Returns a unique class ID POLYMORPHICALLY. More...
int32_t | getIndex () const
| ICU use only. More...
Public Member Functions inherited from icu::UObject
virtual | ~UObject ()
| Destructor. More...

## Static Public Member Functions
static int32_t | getAvailable (MeasureUnit *destArray, int32_t destCapacity, UErrorCode &errorCode)
| getAvailable gets all of the available units. More...
static int32_t | getAvailable (const char *type, MeasureUnit *destArray, int32_t destCapacity, UErrorCode &errorCode)
| getAvailable gets all of the available units for a specific type. More...
static StringEnumeration * | getAvailableTypes (UErrorCode &errorCode)
| getAvailableTypes gets all of the available types. More...
static UClassID | getStaticClassID (void)
| Return the class ID for this class. More...
static int32_t | getIndexCount ()
| ICU use only. More...
static int32_t | internalGetIndexForTypeAndSubtype (const char *type, const char *subtype)
| ICU use only. More...
static MeasureUnit | resolveUnitPerUnit (const MeasureUnit &unit, const MeasureUnit &perUnit, bool *isResolved)
| ICU use only. More...
static MeasureUnit * | createGForce (UErrorCode &status)
| Returns unit of acceleration: g-force. More...
static MeasureUnit * | createMeterPerSecondSquared (UErrorCode &status)
| Returns unit of acceleration: meter-per-second-squared. More...
static MeasureUnit * | createArcMinute (UErrorCode &status)
| Returns unit of angle: arc-minute. More...
static MeasureUnit * | createArcSecond (UErrorCode &status)
| Returns unit of angle: arc-second. More...
static MeasureUnit * | createDegree (UErrorCode &status)
| Returns unit of angle: degree. More...
static MeasureUnit * | createRadian (UErrorCode &status)
| Returns unit of angle: radian. More...
static MeasureUnit * | createRevolutionAngle (UErrorCode &status)
| Returns unit of angle: revolution. More...
static MeasureUnit * | createAcre (UErrorCode &status)
| Returns unit of area: acre. More...
static MeasureUnit * | createHectare (UErrorCode &status)
| Returns unit of area: hectare. More...
static MeasureUnit * | createSquareCentimeter (UErrorCode &status)
| Returns unit of area: square-centimeter. More...
static MeasureUnit * | createSquareFoot (UErrorCode &status)
| Returns unit of area: square-foot. More...
static MeasureUnit * | createSquareInch (UErrorCode &status)
| Returns unit of area: square-inch. More...
static MeasureUnit * | createSquareKilometer (UErrorCode &status)
| Returns unit of area: square-kilometer. More...
static MeasureUnit * | createSquareMeter (UErrorCode &status)
| Returns unit of area: square-meter. More...
static MeasureUnit * | createSquareMile (UErrorCode &status)
| Returns unit of area: square-mile. More...
static MeasureUnit * | createSquareYard (UErrorCode &status)
| Returns unit of area: square-yard. More...
static MeasureUnit * | createKarat (UErrorCode &status)
| Returns unit of concentr: karat. More...
static MeasureUnit * | createMilligramPerDeciliter (UErrorCode &status)
| Returns unit of concentr: milligram-per-deciliter. More...
static MeasureUnit * | createMillimolePerLiter (UErrorCode &status)
| Returns unit of concentr: millimole-per-liter. More...
static MeasureUnit * | createPartPerMillion (UErrorCode &status)
| Returns unit of concentr: part-per-million. More...
static MeasureUnit * | createPercent (UErrorCode &status)
| Returns unit of concentr: percent. More...
static MeasureUnit * | createPermille (UErrorCode &status)
| Returns unit of concentr: permille. More...
static MeasureUnit * | createLiterPer100Kilometers (UErrorCode &status)
| Returns unit of consumption: liter-per-100kilometers. More...
static MeasureUnit * | createLiterPerKilometer (UErrorCode &status)
| Returns unit of consumption: liter-per-kilometer. More...
static MeasureUnit * | createMilePerGallon (UErrorCode &status)
| Returns unit of consumption: mile-per-gallon. More...
static MeasureUnit * | createMilePerGallonImperial (UErrorCode &status)
| Returns unit of consumption: mile-per-gallon-imperial. More...
static MeasureUnit * | createBit (UErrorCode &status)
| Returns unit of digital: bit. More...
static MeasureUnit * | createByte (UErrorCode &status)
| Returns unit of digital: byte. More...
static MeasureUnit * | createGigabit (UErrorCode &status)
| Returns unit of digital: gigabit. More...
static MeasureUnit * | createGigabyte (UErrorCode &status)
| Returns unit of digital: gigabyte. More...
static MeasureUnit * | createKilobit (UErrorCode &status)
| Returns unit of digital: kilobit. More...
static MeasureUnit * | createKilobyte (UErrorCode &status)
| Returns unit of digital: kilobyte. More...
static MeasureUnit * | createMegabit (UErrorCode &status)
| Returns unit of digital: megabit. More...
static MeasureUnit * | createMegabyte (UErrorCode &status)
| Returns unit of digital: megabyte. More...
static MeasureUnit * | createPetabyte (UErrorCode &status)
| Returns unit of digital: petabyte. More...
static MeasureUnit * | createTerabit (UErrorCode &status)
| Returns unit of digital: terabit. More...
static MeasureUnit * | createTerabyte (UErrorCode &status)
| Returns unit of digital: terabyte. More...
static MeasureUnit * | createCentury (UErrorCode &status)
| Returns unit of duration: century. More...
static MeasureUnit * | createDay (UErrorCode &status)
| Returns unit of duration: day. More...
static MeasureUnit * | createHour (UErrorCode &status)
| Returns unit of duration: hour. More...
static MeasureUnit * | createMicrosecond (UErrorCode &status)
| Returns unit of duration: microsecond. More...
static MeasureUnit * | createMillisecond (UErrorCode &status)
| Returns unit of duration: millisecond. More...
static MeasureUnit * | createMinute (UErrorCode &status)
| Returns unit of duration: minute. More...
static MeasureUnit * | createMonth (UErrorCode &status)
| Returns unit of duration: month. More...
static MeasureUnit * | createNanosecond (UErrorCode &status)
| Returns unit of duration: nanosecond. More...
static MeasureUnit * | createSecond (UErrorCode &status)
| Returns unit of duration: second. More...
static MeasureUnit * | createWeek (UErrorCode &status)
| Returns unit of duration: week. More...
static MeasureUnit * | createYear (UErrorCode &status)
| Returns unit of duration: year. More...
static MeasureUnit * | createAmpere (UErrorCode &status)
| Returns unit of electric: ampere. More...
static MeasureUnit * | createMilliampere (UErrorCode &status)
| Returns unit of electric: milliampere. More...
static MeasureUnit * | createOhm (UErrorCode &status)
| Returns unit of electric: ohm. More...
static MeasureUnit * | createVolt (UErrorCode &status)
| Returns unit of electric: volt. More...
static MeasureUnit * | createCalorie (UErrorCode &status)
| Returns unit of energy: calorie. More...
static MeasureUnit * | createFoodcalorie (UErrorCode &status)
| Returns unit of energy: foodcalorie. More...
static MeasureUnit * | createJoule (UErrorCode &status)
| Returns unit of energy: joule. More...
static MeasureUnit * | createKilocalorie (UErrorCode &status)
| Returns unit of energy: kilocalorie. More...
static MeasureUnit * | createKilojoule (UErrorCode &status)
| Returns unit of energy: kilojoule. More...
static MeasureUnit * | createKilowattHour (UErrorCode &status)
| Returns unit of energy: kilowatt-hour. More...
static MeasureUnit * | createGigahertz (UErrorCode &status)
| Returns unit of frequency: gigahertz. More...
static MeasureUnit * | createHertz (UErrorCode &status)
| Returns unit of frequency: hertz. More...
static MeasureUnit * | createKilohertz (UErrorCode &status)
| Returns unit of frequency: kilohertz. More...
static MeasureUnit * | createMegahertz (UErrorCode &status)
| Returns unit of frequency: megahertz. More...
static MeasureUnit * | createAstronomicalUnit (UErrorCode &status)
| Returns unit of length: astronomical-unit. More...
static MeasureUnit * | createCentimeter (UErrorCode &status)
| Returns unit of length: centimeter. More...
static MeasureUnit * | createDecimeter (UErrorCode &status)
| Returns unit of length: decimeter. More...
static MeasureUnit * | createFathom (UErrorCode &status)
| Returns unit of length: fathom. More...
static MeasureUnit * | createFoot (UErrorCode &status)
| Returns unit of length: foot. More...
static MeasureUnit * | createFurlong (UErrorCode &status)
| Returns unit of length: furlong. More...
static MeasureUnit * | createInch (UErrorCode &status)
| Returns unit of length: inch. More...
static MeasureUnit * | createKilometer (UErrorCode &status)
| Returns unit of length: kilometer. More...
static MeasureUnit * | createLightYear (UErrorCode &status)
| Returns unit of length: light-year. More...
static MeasureUnit * | createMeter (UErrorCode &status)
| Returns unit of length: meter. More...
static MeasureUnit * | createMicrometer (UErrorCode &status)
| Returns unit of length: micrometer. More...
static MeasureUnit * | createMile (UErrorCode &status)
| Returns unit of length: mile. More...
static MeasureUnit * | createMileScandinavian (UErrorCode &status)
| Returns unit of length: mile-scandinavian. More...
static MeasureUnit * | createMillimeter (UErrorCode &status)
| Returns unit of length: millimeter. More...
static MeasureUnit * | createNanometer (UErrorCode &status)
| Returns unit of length: nanometer. More...
static MeasureUnit * | createNauticalMile (UErrorCode &status)
| Returns unit of length: nautical-mile. More...
static MeasureUnit * | createParsec (UErrorCode &status)
| Returns unit of length: parsec. More...
static MeasureUnit * | createPicometer (UErrorCode &status)
| Returns unit of length: picometer. More...
static MeasureUnit * | createPoint (UErrorCode &status)
| Returns unit of length: point. More...
static MeasureUnit * | createYard (UErrorCode &status)
| Returns unit of length: yard. More...
static MeasureUnit * | createLux (UErrorCode &status)
| Returns unit of light: lux. More...
static MeasureUnit * | createCarat (UErrorCode &status)
| Returns unit of mass: carat. More...
static MeasureUnit * | createGram (UErrorCode &status)
| Returns unit of mass: gram. More...
static MeasureUnit * | createKilogram (UErrorCode &status)
| Returns unit of mass: kilogram. More...
static MeasureUnit * | createMetricTon (UErrorCode &status)
| Returns unit of mass: metric-ton. More...
static MeasureUnit * | createMicrogram (UErrorCode &status)
| Returns unit of mass: microgram. More...
static MeasureUnit * | createMilligram (UErrorCode &status)
| Returns unit of mass: milligram. More...
static MeasureUnit * | createOunce (UErrorCode &status)
| Returns unit of mass: ounce. More...
static MeasureUnit * | createOunceTroy (UErrorCode &status)
| Returns unit of mass: ounce-troy. More...
static MeasureUnit * | createPound (UErrorCode &status)
| Returns unit of mass: pound. More...
static MeasureUnit * | createStone (UErrorCode &status)
| Returns unit of mass: stone. More...
static MeasureUnit * | createTon (UErrorCode &status)
| Returns unit of mass: ton. More...
static MeasureUnit * | createGigawatt (UErrorCode &status)
| Returns unit of power: gigawatt. More...
static MeasureUnit * | createHorsepower (UErrorCode &status)
| Returns unit of power: horsepower. More...
static MeasureUnit * | createKilowatt (UErrorCode &status)
| Returns unit of power: kilowatt. More...
static MeasureUnit * | createMegawatt (UErrorCode &status)
| Returns unit of power: megawatt. More...
static MeasureUnit * | createMilliwatt (UErrorCode &status)
| Returns unit of power: milliwatt. More...
static MeasureUnit * | createWatt (UErrorCode &status)
| Returns unit of power: watt. More...
static MeasureUnit * | createAtmosphere (UErrorCode &status)
| Returns unit of pressure: atmosphere. More...
static MeasureUnit * | createHectopascal (UErrorCode &status)
| Returns unit of pressure: hectopascal. More...
static MeasureUnit * | createInchHg (UErrorCode &status)
| Returns unit of pressure: inch-hg. More...
static MeasureUnit * | createMillibar (UErrorCode &status)
| Returns unit of pressure: millibar. More...
static MeasureUnit * | createMillimeterOfMercury (UErrorCode &status)
| Returns unit of pressure: millimeter-of-mercury. More...
static MeasureUnit * | createPoundPerSquareInch (UErrorCode &status)
| Returns unit of pressure: pound-per-square-inch. More...
static MeasureUnit * | createKilometerPerHour (UErrorCode &status)
| Returns unit of speed: kilometer-per-hour. More...
static MeasureUnit * | createKnot (UErrorCode &status)
| Returns unit of speed: knot. More...
static MeasureUnit * | createMeterPerSecond (UErrorCode &status)
| Returns unit of speed: meter-per-second. More...
static MeasureUnit * | createMilePerHour (UErrorCode &status)
| Returns unit of speed: mile-per-hour. More...
static MeasureUnit * | createCelsius (UErrorCode &status)
| Returns unit of temperature: celsius. More...
static MeasureUnit * | createFahrenheit (UErrorCode &status)
| Returns unit of temperature: fahrenheit. More...
static MeasureUnit * | createGenericTemperature (UErrorCode &status)
| Returns unit of temperature: generic. More...
static MeasureUnit * | createKelvin (UErrorCode &status)
| Returns unit of temperature: kelvin. More...
static MeasureUnit * | createAcreFoot (UErrorCode &status)
| Returns unit of volume: acre-foot. More...
static MeasureUnit * | createBushel (UErrorCode &status)
| Returns unit of volume: bushel. More...
static MeasureUnit * | createCentiliter (UErrorCode &status)
| Returns unit of volume: centiliter. More...
static MeasureUnit * | createCubicCentimeter (UErrorCode &status)
| Returns unit of volume: cubic-centimeter. More...
static MeasureUnit * | createCubicFoot (UErrorCode &status)
| Returns unit of volume: cubic-foot. More...
static MeasureUnit * | createCubicInch (UErrorCode &status)
| Returns unit of volume: cubic-inch. More...
static MeasureUnit * | createCubicKilometer (UErrorCode &status)
| Returns unit of volume: cubic-kilometer. More...
static MeasureUnit * | createCubicMeter (UErrorCode &status)
| Returns unit of volume: cubic-meter. More...
static MeasureUnit * | createCubicMile (UErrorCode &status)
| Returns unit of volume: cubic-mile. More...
static MeasureUnit * | createCubicYard (UErrorCode &status)
| Returns unit of volume: cubic-yard. More...
static MeasureUnit * | createCup (UErrorCode &status)
| Returns unit of volume: cup. More...
static MeasureUnit * | createCupMetric (UErrorCode &status)
| Returns unit of volume: cup-metric. More...
static MeasureUnit * | createDeciliter (UErrorCode &status)
| Returns unit of volume: deciliter. More...
static MeasureUnit * | createFluidOunce (UErrorCode &status)
| Returns unit of volume: fluid-ounce. More...
static MeasureUnit * | createGallon (UErrorCode &status)
| Returns unit of volume: gallon. More...
static MeasureUnit * | createGallonImperial (UErrorCode &status)
| Returns unit of volume: gallon-imperial. More...
static MeasureUnit * | createHectoliter (UErrorCode &status)
| Returns unit of volume: hectoliter. More...
static MeasureUnit * | createLiter (UErrorCode &status)
| Returns unit of volume: liter. More...
static MeasureUnit * | createMegaliter (UErrorCode &status)
| Returns unit of volume: megaliter. More...
static MeasureUnit * | createMilliliter (UErrorCode &status)
| Returns unit of volume: milliliter. More...
static MeasureUnit * | createPint (UErrorCode &status)
| Returns unit of volume: pint. More...
static MeasureUnit * | createPintMetric (UErrorCode &status)
| Returns unit of volume: pint-metric. More...
static MeasureUnit * | createQuart (UErrorCode &status)
| Returns unit of volume: quart. More...
static MeasureUnit * | createTablespoon (UErrorCode &status)
| Returns unit of volume: tablespoon. More...
static MeasureUnit * | createTeaspoon (UErrorCode &status)
| Returns unit of volume: teaspoon. More...

## Protected Member Functions
void | initTime (const char *timeId)
| For ICU use only. More...
void | initCurrency (const char *isoCurrency)
| For ICU use only. More...
void | initNoUnit (const char *subtype)
| For ICU use only. More...

## Detailed Description

A unit such as length, mass, volume, currency, etc.

A unit is coupled with a numeric amount to produce a Measure.

Author
  Alan Liu

Stable:
  ICU 3.0

Definition at line 38 of file measunit.h.

## Constructor & Destructor Documentation

## ◆ MeasureUnit() [1/2]

icu::MeasureUnit::MeasureUnit | ( |  | ) |

Default constructor.

Populates the instance with the base dimensionless unit.

Stable:
  ICU 3.0

## ◆ MeasureUnit() [2/2]

icu::MeasureUnit::MeasureUnit | ( | const MeasureUnit & | other | ) |

Copy constructor.

Stable:
  ICU 3.0

## ◆ ~MeasureUnit()

virtual icu::MeasureUnit::~MeasureUnit | ( |  | ) |
| virtual

Destructor.

Stable:
  ICU 3.0

## Member Function Documentation

## ◆ clone()

virtual UObject* icu::MeasureUnit::clone | ( |  | ) | const
| virtual

Returns a polymorphic clone of this object.

The result will have the same class as returned by getDynamicClassID().

Stable:
  ICU 3.0

Reimplemented in icu::CurrencyUnit, icu::NoUnit, and icu::TimeUnit.

## ◆ createAcre()

static MeasureUnit* icu::MeasureUnit::createAcre | ( | UErrorCode & | status | ) |
| static

Returns unit of area: acre.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 53

## ◆ createAcreFoot()

static MeasureUnit* icu::MeasureUnit::createAcreFoot | ( | UErrorCode & | status | ) |
| static

Returns unit of volume: acre-foot.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createAmpere()

static MeasureUnit* icu::MeasureUnit::createAmpere | ( | UErrorCode & | status | ) |
| static

Returns unit of electric: ampere.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createArcMinute()

static MeasureUnit* icu::MeasureUnit::createArcMinute | ( | UErrorCode & | status | ) |
| static

Returns unit of angle: arc-minute.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 53

## ◆ createArcSecond()

static MeasureUnit* icu::MeasureUnit::createArcSecond | ( | UErrorCode & | status | ) |
| static

Returns unit of angle: arc-second.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 53

## ◆ createAstronomicalUnit()

static MeasureUnit* icu::MeasureUnit::createAstronomicalUnit | ( | UErrorCode & | status | ) |
| static

Returns unit of length: astronomical-unit.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createAtmosphere()

static MeasureUnit* icu::MeasureUnit::createAtmosphere | ( | UErrorCode & | status | ) |
| static

Returns unit of pressure: atmosphere.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Draft:
  This API may be changed in the future versions and was introduced in ICU 63

## ◆ createBit()

static MeasureUnit* icu::MeasureUnit::createBit | ( | UErrorCode & | status | ) |
| static

Returns unit of digital: bit.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createBushel()

static MeasureUnit* icu::MeasureUnit::createBushel | ( | UErrorCode & | status | ) |
| static

Returns unit of volume: bushel.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createByte()

static MeasureUnit* icu::MeasureUnit::createByte | ( | UErrorCode & | status | ) |
| static

Returns unit of digital: byte.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createCalorie()

static MeasureUnit* icu::MeasureUnit::createCalorie | ( | UErrorCode & | status | ) |
| static

Returns unit of energy: calorie.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createCarat()

static MeasureUnit* icu::MeasureUnit::createCarat | ( | UErrorCode & | status | ) |
| static

Returns unit of mass: carat.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createCelsius()

static MeasureUnit* icu::MeasureUnit::createCelsius | ( | UErrorCode & | status | ) |
| static

Returns unit of temperature: celsius.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 53

## ◆ createCentiliter()

static MeasureUnit* icu::MeasureUnit::createCentiliter | ( | UErrorCode & | status | ) |
| static

Returns unit of volume: centiliter.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createCentimeter()

static MeasureUnit* icu::MeasureUnit::createCentimeter | ( | UErrorCode & | status | ) |
| static

Returns unit of length: centimeter.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 53

## ◆ createCentury()

static MeasureUnit* icu::MeasureUnit::createCentury | ( | UErrorCode & | status | ) |
| static

Returns unit of duration: century.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 56

## ◆ createCubicCentimeter()

static MeasureUnit* icu::MeasureUnit::createCubicCentimeter | ( | UErrorCode & | status | ) |
| static

Returns unit of volume: cubic-centimeter.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createCubicFoot()

static MeasureUnit* icu::MeasureUnit::createCubicFoot | ( | UErrorCode & | status | ) |
| static

Returns unit of volume: cubic-foot.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createCubicInch()

static MeasureUnit* icu::MeasureUnit::createCubicInch | ( | UErrorCode & | status | ) |
| static

Returns unit of volume: cubic-inch.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createCubicKilometer()

static MeasureUnit* icu::MeasureUnit::createCubicKilometer | ( | UErrorCode & | status | ) |
| static

Returns unit of volume: cubic-kilometer.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 53

## ◆ createCubicMeter()

static MeasureUnit* icu::MeasureUnit::createCubicMeter | ( | UErrorCode & | status | ) |
| static

Returns unit of volume: cubic-meter.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createCubicMile()

static MeasureUnit* icu::MeasureUnit::createCubicMile | ( | UErrorCode & | status | ) |
| static

Returns unit of volume: cubic-mile.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 53

## ◆ createCubicYard()

static MeasureUnit* icu::MeasureUnit::createCubicYard | ( | UErrorCode & | status | ) |
| static

Returns unit of volume: cubic-yard.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createCup()

static MeasureUnit* icu::MeasureUnit::createCup | ( | UErrorCode & | status | ) |
| static

Returns unit of volume: cup.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createCupMetric()

static MeasureUnit* icu::MeasureUnit::createCupMetric | ( | UErrorCode & | status | ) |
| static

Returns unit of volume: cup-metric.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 56

## ◆ createDay()

static MeasureUnit* icu::MeasureUnit::createDay | ( | UErrorCode & | status | ) |
| static

Returns unit of duration: day.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 53

## ◆ createDeciliter()

static MeasureUnit* icu::MeasureUnit::createDeciliter | ( | UErrorCode & | status | ) |
| static

Returns unit of volume: deciliter.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createDecimeter()

static MeasureUnit* icu::MeasureUnit::createDecimeter | ( | UErrorCode & | status | ) |
| static

Returns unit of length: decimeter.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createDegree()

static MeasureUnit* icu::MeasureUnit::createDegree | ( | UErrorCode & | status | ) |
| static

Returns unit of angle: degree.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 53

## ◆ createFahrenheit()

static MeasureUnit* icu::MeasureUnit::createFahrenheit | ( | UErrorCode & | status | ) |
| static

Returns unit of temperature: fahrenheit.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 53

## ◆ createFathom()

static MeasureUnit* icu::MeasureUnit::createFathom | ( | UErrorCode & | status | ) |
| static

Returns unit of length: fathom.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createFluidOunce()

static MeasureUnit* icu::MeasureUnit::createFluidOunce | ( | UErrorCode & | status | ) |
| static

Returns unit of volume: fluid-ounce.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createFoodcalorie()

static MeasureUnit* icu::MeasureUnit::createFoodcalorie | ( | UErrorCode & | status | ) |
| static

Returns unit of energy: foodcalorie.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createFoot()

static MeasureUnit* icu::MeasureUnit::createFoot | ( | UErrorCode & | status | ) |
| static

Returns unit of length: foot.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 53

## ◆ createFurlong()

static MeasureUnit* icu::MeasureUnit::createFurlong | ( | UErrorCode & | status | ) |
| static

Returns unit of length: furlong.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createGallon()

static MeasureUnit* icu::MeasureUnit::createGallon | ( | UErrorCode & | status | ) |
| static

Returns unit of volume: gallon.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createGallonImperial()

static MeasureUnit* icu::MeasureUnit::createGallonImperial | ( | UErrorCode & | status | ) |
| static

Returns unit of volume: gallon-imperial.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 57

## ◆ createGenericTemperature()

static MeasureUnit* icu::MeasureUnit::createGenericTemperature | ( | UErrorCode & | status | ) |
| static

Returns unit of temperature: generic.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 56

## ◆ createGForce()

static MeasureUnit* icu::MeasureUnit::createGForce | ( | UErrorCode & | status | ) |
| static

Returns unit of acceleration: g-force.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 53

## ◆ createGigabit()

static MeasureUnit* icu::MeasureUnit::createGigabit | ( | UErrorCode & | status | ) |
| static

Returns unit of digital: gigabit.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createGigabyte()

static MeasureUnit* icu::MeasureUnit::createGigabyte | ( | UErrorCode & | status | ) |
| static

Returns unit of digital: gigabyte.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createGigahertz()

static MeasureUnit* icu::MeasureUnit::createGigahertz | ( | UErrorCode & | status | ) |
| static

Returns unit of frequency: gigahertz.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createGigawatt()

static MeasureUnit* icu::MeasureUnit::createGigawatt | ( | UErrorCode & | status | ) |
| static

Returns unit of power: gigawatt.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createGram()

static MeasureUnit* icu::MeasureUnit::createGram | ( | UErrorCode & | status | ) |
| static

Returns unit of mass: gram.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 53

## ◆ createHectare()

static MeasureUnit* icu::MeasureUnit::createHectare | ( | UErrorCode & | status | ) |
| static

Returns unit of area: hectare.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 53

## ◆ createHectoliter()

static MeasureUnit* icu::MeasureUnit::createHectoliter | ( | UErrorCode & | status | ) |
| static

Returns unit of volume: hectoliter.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createHectopascal()

static MeasureUnit* icu::MeasureUnit::createHectopascal | ( | UErrorCode & | status | ) |
| static

Returns unit of pressure: hectopascal.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 53

## ◆ createHertz()

static MeasureUnit* icu::MeasureUnit::createHertz | ( | UErrorCode & | status | ) |
| static

Returns unit of frequency: hertz.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createHorsepower()

static MeasureUnit* icu::MeasureUnit::createHorsepower | ( | UErrorCode & | status | ) |
| static

Returns unit of power: horsepower.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 53

## ◆ createHour()

static MeasureUnit* icu::MeasureUnit::createHour | ( | UErrorCode & | status | ) |
| static

Returns unit of duration: hour.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 53

## ◆ createInch()

static MeasureUnit* icu::MeasureUnit::createInch | ( | UErrorCode & | status | ) |
| static

Returns unit of length: inch.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 53

## ◆ createInchHg()

static MeasureUnit* icu::MeasureUnit::createInchHg | ( | UErrorCode & | status | ) |
| static

Returns unit of pressure: inch-hg.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 53

## ◆ createJoule()

static MeasureUnit* icu::MeasureUnit::createJoule | ( | UErrorCode & | status | ) |
| static

Returns unit of energy: joule.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createKarat()

static MeasureUnit* icu::MeasureUnit::createKarat | ( | UErrorCode & | status | ) |
| static

Returns unit of concentr: karat.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createKelvin()

static MeasureUnit* icu::MeasureUnit::createKelvin | ( | UErrorCode & | status | ) |
| static

Returns unit of temperature: kelvin.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createKilobit()

static MeasureUnit* icu::MeasureUnit::createKilobit | ( | UErrorCode & | status | ) |
| static

Returns unit of digital: kilobit.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createKilobyte()

static MeasureUnit* icu::MeasureUnit::createKilobyte | ( | UErrorCode & | status | ) |
| static

Returns unit of digital: kilobyte.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createKilocalorie()

static MeasureUnit* icu::MeasureUnit::createKilocalorie | ( | UErrorCode & | status | ) |
| static

Returns unit of energy: kilocalorie.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createKilogram()

static MeasureUnit* icu::MeasureUnit::createKilogram | ( | UErrorCode & | status | ) |
| static

Returns unit of mass: kilogram.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 53

## ◆ createKilohertz()

static MeasureUnit* icu::MeasureUnit::createKilohertz | ( | UErrorCode & | status | ) |
| static

Returns unit of frequency: kilohertz.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createKilojoule()

static MeasureUnit* icu::MeasureUnit::createKilojoule | ( | UErrorCode & | status | ) |
| static

Returns unit of energy: kilojoule.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createKilometer()

static MeasureUnit* icu::MeasureUnit::createKilometer | ( | UErrorCode & | status | ) |
| static

Returns unit of length: kilometer.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 53

## ◆ createKilometerPerHour()

static MeasureUnit* icu::MeasureUnit::createKilometerPerHour | ( | UErrorCode & | status | ) |
| static

Returns unit of speed: kilometer-per-hour.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 53

## ◆ createKilowatt()

static MeasureUnit* icu::MeasureUnit::createKilowatt | ( | UErrorCode & | status | ) |
| static

Returns unit of power: kilowatt.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 53

## ◆ createKilowattHour()

static MeasureUnit* icu::MeasureUnit::createKilowattHour | ( | UErrorCode & | status | ) |
| static

Returns unit of energy: kilowatt-hour.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createKnot()

static MeasureUnit* icu::MeasureUnit::createKnot | ( | UErrorCode & | status | ) |
| static

Returns unit of speed: knot.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 56

## ◆ createLightYear()

static MeasureUnit* icu::MeasureUnit::createLightYear | ( | UErrorCode & | status | ) |
| static

Returns unit of length: light-year.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 53

## ◆ createLiter()

static MeasureUnit* icu::MeasureUnit::createLiter | ( | UErrorCode & | status | ) |
| static

Returns unit of volume: liter.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 53

## ◆ createLiterPer100Kilometers()

static MeasureUnit* icu::MeasureUnit::createLiterPer100Kilometers | ( | UErrorCode & | status | ) |
| static

Returns unit of consumption: liter-per-100kilometers.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 56

## ◆ createLiterPerKilometer()

static MeasureUnit* icu::MeasureUnit::createLiterPerKilometer | ( | UErrorCode & | status | ) |
| static

Returns unit of consumption: liter-per-kilometer.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createLux()

static MeasureUnit* icu::MeasureUnit::createLux | ( | UErrorCode & | status | ) |
| static

Returns unit of light: lux.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createMegabit()

static MeasureUnit* icu::MeasureUnit::createMegabit | ( | UErrorCode & | status | ) |
| static

Returns unit of digital: megabit.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createMegabyte()

static MeasureUnit* icu::MeasureUnit::createMegabyte | ( | UErrorCode & | status | ) |
| static

Returns unit of digital: megabyte.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createMegahertz()

static MeasureUnit* icu::MeasureUnit::createMegahertz | ( | UErrorCode & | status | ) |
| static

Returns unit of frequency: megahertz.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createMegaliter()

static MeasureUnit* icu::MeasureUnit::createMegaliter | ( | UErrorCode & | status | ) |
| static

Returns unit of volume: megaliter.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createMegawatt()

static MeasureUnit* icu::MeasureUnit::createMegawatt | ( | UErrorCode & | status | ) |
| static

Returns unit of power: megawatt.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createMeter()

static MeasureUnit* icu::MeasureUnit::createMeter | ( | UErrorCode & | status | ) |
| static

Returns unit of length: meter.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 53

## ◆ createMeterPerSecond()

static MeasureUnit* icu::MeasureUnit::createMeterPerSecond | ( | UErrorCode & | status | ) |
| static

Returns unit of speed: meter-per-second.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 53

## ◆ createMeterPerSecondSquared()

static MeasureUnit* icu::MeasureUnit::createMeterPerSecondSquared | ( | UErrorCode & | status | ) |
| static

Returns unit of acceleration: meter-per-second-squared.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createMetricTon()

static MeasureUnit* icu::MeasureUnit::createMetricTon | ( | UErrorCode & | status | ) |
| static

Returns unit of mass: metric-ton.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createMicrogram()

static MeasureUnit* icu::MeasureUnit::createMicrogram | ( | UErrorCode & | status | ) |
| static

Returns unit of mass: microgram.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createMicrometer()

static MeasureUnit* icu::MeasureUnit::createMicrometer | ( | UErrorCode & | status | ) |
| static

Returns unit of length: micrometer.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createMicrosecond()

static MeasureUnit* icu::MeasureUnit::createMicrosecond | ( | UErrorCode & | status | ) |
| static

Returns unit of duration: microsecond.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createMile()

static MeasureUnit* icu::MeasureUnit::createMile | ( | UErrorCode & | status | ) |
| static

Returns unit of length: mile.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 53

## ◆ createMilePerGallon()

static MeasureUnit* icu::MeasureUnit::createMilePerGallon | ( | UErrorCode & | status | ) |
| static

Returns unit of consumption: mile-per-gallon.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createMilePerGallonImperial()

static MeasureUnit* icu::MeasureUnit::createMilePerGallonImperial | ( | UErrorCode & | status | ) |
| static

Returns unit of consumption: mile-per-gallon-imperial.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 57

## ◆ createMilePerHour()

static MeasureUnit* icu::MeasureUnit::createMilePerHour | ( | UErrorCode & | status | ) |
| static

Returns unit of speed: mile-per-hour.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 53

## ◆ createMileScandinavian()

static MeasureUnit* icu::MeasureUnit::createMileScandinavian | ( | UErrorCode & | status | ) |
| static

Returns unit of length: mile-scandinavian.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 56

## ◆ createMilliampere()

static MeasureUnit* icu::MeasureUnit::createMilliampere | ( | UErrorCode & | status | ) |
| static

Returns unit of electric: milliampere.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createMillibar()

static MeasureUnit* icu::MeasureUnit::createMillibar | ( | UErrorCode & | status | ) |
| static

Returns unit of pressure: millibar.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 53

## ◆ createMilligram()

static MeasureUnit* icu::MeasureUnit::createMilligram | ( | UErrorCode & | status | ) |
| static

Returns unit of mass: milligram.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createMilligramPerDeciliter()

static MeasureUnit* icu::MeasureUnit::createMilligramPerDeciliter | ( | UErrorCode & | status | ) |
| static

Returns unit of concentr: milligram-per-deciliter.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 57

## ◆ createMilliliter()

static MeasureUnit* icu::MeasureUnit::createMilliliter | ( | UErrorCode & | status | ) |
| static

Returns unit of volume: milliliter.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createMillimeter()

static MeasureUnit* icu::MeasureUnit::createMillimeter | ( | UErrorCode & | status | ) |
| static

Returns unit of length: millimeter.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 53

## ◆ createMillimeterOfMercury()

static MeasureUnit* icu::MeasureUnit::createMillimeterOfMercury | ( | UErrorCode & | status | ) |
| static

Returns unit of pressure: millimeter-of-mercury.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createMillimolePerLiter()

static MeasureUnit* icu::MeasureUnit::createMillimolePerLiter | ( | UErrorCode & | status | ) |
| static

Returns unit of concentr: millimole-per-liter.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 57

## ◆ createMillisecond()

static MeasureUnit* icu::MeasureUnit::createMillisecond | ( | UErrorCode & | status | ) |
| static

Returns unit of duration: millisecond.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 53

## ◆ createMilliwatt()

static MeasureUnit* icu::MeasureUnit::createMilliwatt | ( | UErrorCode & | status | ) |
| static

Returns unit of power: milliwatt.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createMinute()

static MeasureUnit* icu::MeasureUnit::createMinute | ( | UErrorCode & | status | ) |
| static

Returns unit of duration: minute.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 53

## ◆ createMonth()

static MeasureUnit* icu::MeasureUnit::createMonth | ( | UErrorCode & | status | ) |
| static

Returns unit of duration: month.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 53

## ◆ createNanometer()

static MeasureUnit* icu::MeasureUnit::createNanometer | ( | UErrorCode & | status | ) |
| static

Returns unit of length: nanometer.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createNanosecond()

static MeasureUnit* icu::MeasureUnit::createNanosecond | ( | UErrorCode & | status | ) |
| static

Returns unit of duration: nanosecond.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createNauticalMile()

static MeasureUnit* icu::MeasureUnit::createNauticalMile | ( | UErrorCode & | status | ) |
| static

Returns unit of length: nautical-mile.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createOhm()

static MeasureUnit* icu::MeasureUnit::createOhm | ( | UErrorCode & | status | ) |
| static

Returns unit of electric: ohm.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createOunce()

static MeasureUnit* icu::MeasureUnit::createOunce | ( | UErrorCode & | status | ) |
| static

Returns unit of mass: ounce.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 53

## ◆ createOunceTroy()

static MeasureUnit* icu::MeasureUnit::createOunceTroy | ( | UErrorCode & | status | ) |
| static

Returns unit of mass: ounce-troy.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createParsec()

static MeasureUnit* icu::MeasureUnit::createParsec | ( | UErrorCode & | status | ) |
| static

Returns unit of length: parsec.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createPartPerMillion()

static MeasureUnit* icu::MeasureUnit::createPartPerMillion | ( | UErrorCode & | status | ) |
| static

Returns unit of concentr: part-per-million.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 57

## ◆ createPercent()

static MeasureUnit* icu::MeasureUnit::createPercent | ( | UErrorCode & | status | ) |
| static

Returns unit of concentr: percent.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Draft:
  This API may be changed in the future versions and was introduced in ICU 63

## ◆ createPermille()

static MeasureUnit* icu::MeasureUnit::createPermille | ( | UErrorCode & | status | ) |
| static

Returns unit of concentr: permille.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Draft:
  This API may be changed in the future versions and was introduced in ICU 63

## ◆ createPetabyte()

static MeasureUnit* icu::MeasureUnit::createPetabyte | ( | UErrorCode & | status | ) |
| static

Returns unit of digital: petabyte.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Draft:
  This API may be changed in the future versions and was introduced in ICU 63

## ◆ createPicometer()

static MeasureUnit* icu::MeasureUnit::createPicometer | ( | UErrorCode & | status | ) |
| static

Returns unit of length: picometer.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 53

## ◆ createPint()

static MeasureUnit* icu::MeasureUnit::createPint | ( | UErrorCode & | status | ) |
| static

Returns unit of volume: pint.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createPintMetric()

static MeasureUnit* icu::MeasureUnit::createPintMetric | ( | UErrorCode & | status | ) |
| static

Returns unit of volume: pint-metric.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 56

## ◆ createPoint()

static MeasureUnit* icu::MeasureUnit::createPoint | ( | UErrorCode & | status | ) |
| static

Returns unit of length: point.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 59

## ◆ createPound()

static MeasureUnit* icu::MeasureUnit::createPound | ( | UErrorCode & | status | ) |
| static

Returns unit of mass: pound.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 53

## ◆ createPoundPerSquareInch()

static MeasureUnit* icu::MeasureUnit::createPoundPerSquareInch | ( | UErrorCode & | status | ) |
| static

Returns unit of pressure: pound-per-square-inch.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createQuart()

static MeasureUnit* icu::MeasureUnit::createQuart | ( | UErrorCode & | status | ) |
| static

Returns unit of volume: quart.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createRadian()

static MeasureUnit* icu::MeasureUnit::createRadian | ( | UErrorCode & | status | ) |
| static

Returns unit of angle: radian.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createRevolutionAngle()

static MeasureUnit* icu::MeasureUnit::createRevolutionAngle | ( | UErrorCode & | status | ) |
| static

Returns unit of angle: revolution.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 56

## ◆ createSecond()

static MeasureUnit* icu::MeasureUnit::createSecond | ( | UErrorCode & | status | ) |
| static

Returns unit of duration: second.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 53

## ◆ createSquareCentimeter()

static MeasureUnit* icu::MeasureUnit::createSquareCentimeter | ( | UErrorCode & | status | ) |
| static

Returns unit of area: square-centimeter.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createSquareFoot()

static MeasureUnit* icu::MeasureUnit::createSquareFoot | ( | UErrorCode & | status | ) |
| static

Returns unit of area: square-foot.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 53

## ◆ createSquareInch()

static MeasureUnit* icu::MeasureUnit::createSquareInch | ( | UErrorCode & | status | ) |
| static

Returns unit of area: square-inch.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createSquareKilometer()

static MeasureUnit* icu::MeasureUnit::createSquareKilometer | ( | UErrorCode & | status | ) |
| static

Returns unit of area: square-kilometer.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 53

## ◆ createSquareMeter()

static MeasureUnit* icu::MeasureUnit::createSquareMeter | ( | UErrorCode & | status | ) |
| static

Returns unit of area: square-meter.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 53

## ◆ createSquareMile()

static MeasureUnit* icu::MeasureUnit::createSquareMile | ( | UErrorCode & | status | ) |
| static

Returns unit of area: square-mile.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 53

## ◆ createSquareYard()

static MeasureUnit* icu::MeasureUnit::createSquareYard | ( | UErrorCode & | status | ) |
| static

Returns unit of area: square-yard.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createStone()

static MeasureUnit* icu::MeasureUnit::createStone | ( | UErrorCode & | status | ) |
| static

Returns unit of mass: stone.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createTablespoon()

static MeasureUnit* icu::MeasureUnit::createTablespoon | ( | UErrorCode & | status | ) |
| static

Returns unit of volume: tablespoon.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createTeaspoon()

static MeasureUnit* icu::MeasureUnit::createTeaspoon | ( | UErrorCode & | status | ) |
| static

Returns unit of volume: teaspoon.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createTerabit()

static MeasureUnit* icu::MeasureUnit::createTerabit | ( | UErrorCode & | status | ) |
| static

Returns unit of digital: terabit.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createTerabyte()

static MeasureUnit* icu::MeasureUnit::createTerabyte | ( | UErrorCode & | status | ) |
| static

Returns unit of digital: terabyte.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createTon()

static MeasureUnit* icu::MeasureUnit::createTon | ( | UErrorCode & | status | ) |
| static

Returns unit of mass: ton.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createVolt()

static MeasureUnit* icu::MeasureUnit::createVolt | ( | UErrorCode & | status | ) |
| static

Returns unit of electric: volt.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 54

## ◆ createWatt()

static MeasureUnit* icu::MeasureUnit::createWatt | ( | UErrorCode & | status | ) |
| static

Returns unit of power: watt.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 53

## ◆ createWeek()

static MeasureUnit* icu::MeasureUnit::createWeek | ( | UErrorCode & | status | ) |
| static

Returns unit of duration: week.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 53

## ◆ createYard()

static MeasureUnit* icu::MeasureUnit::createYard | ( | UErrorCode & | status | ) |
| static

Returns unit of length: yard.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 53

## ◆ createYear()

static MeasureUnit* icu::MeasureUnit::createYear | ( | UErrorCode & | status | ) |
| static

Returns unit of duration: year.

Caller owns returned value and must free it.

Parameters

  status | ICU error code.

Stable:
  ICU 53

## ◆ getAvailable() [1/2]

static int32_t icu::MeasureUnit::getAvailable | ( | MeasureUnit * | destArray,
|  | int32_t | destCapacity,
|  | UErrorCode & | errorCode
| ) |  |
| static

getAvailable gets all of the available units.

If there are too many units to fit into destCapacity then the error code is set to U_BUFFER_OVERFLOW_ERROR.

Parameters

  destArray | destination buffer.
  destCapacity | number of MeasureUnit instances available at dest.
  errorCode | ICU error code.

Returns
  number of available units.

Stable:
  ICU 53

## ◆ getAvailable() [2/2]

static int32_t icu::MeasureUnit::getAvailable | ( | const char * | type,
|  | MeasureUnit * | destArray,
|  | int32_t | destCapacity,
|  | UErrorCode & | errorCode
| ) |  |
| static

getAvailable gets all of the available units for a specific type.

If there are too many units to fit into destCapacity then the error code is set to U_BUFFER_OVERFLOW_ERROR.

Parameters

  type | the type
  destArray | destination buffer.
  destCapacity | number of MeasureUnit instances available at dest.
  errorCode | ICU error code.

Returns
  number of available units for type.

Stable:
  ICU 53

## ◆ getAvailableTypes()

static StringEnumeration* icu::MeasureUnit::getAvailableTypes | ( | UErrorCode & | errorCode | ) |
| static

getAvailableTypes gets all of the available types.

Caller owns the returned StringEnumeration and must delete it when finished using it.

Parameters

  errorCode | ICU error code.

Returns
  the types.

Stable:
  ICU 53

## ◆ getDynamicClassID()

virtual UClassID icu::MeasureUnit::getDynamicClassID | ( | void |  | ) | const
| virtual

Returns a unique class ID POLYMORPHICALLY.

Pure virtual override. This method is to implement a simple version of RTTI, since not all C++ compilers support genuine RTTI. Polymorphic operator==() and clone() methods call this method.

Returns
  The class ID for this object. All objects of a given class have the same class ID. Objects of other classes have different class IDs.

Stable:
  ICU 53

Reimplemented from icu::UObject.

Reimplemented in icu::CurrencyUnit, icu::TimeUnit, and icu::NoUnit.

## ◆ getIndex()

int32_t icu::MeasureUnit::getIndex | ( |  | ) | const

ICU use only.

Returns associated array index for this measure unit. Only valid for non-currency measure units.

Internal:
  Do not use. This API is for internal use only.

## ◆ getIndexCount()

static int32_t icu::MeasureUnit::getIndexCount | ( |  | ) |
| static

ICU use only.

Returns maximum value from getIndex plus 1.

Internal:
  Do not use. This API is for internal use only.

## ◆ getStaticClassID()

static UClassID icu::MeasureUnit::getStaticClassID | ( | void |  | ) |
| static

Return the class ID for this class.

This is useful only for comparing to a return value from getDynamicClassID(). For example:

    .   Base* polymorphic_pointer = createPolymorphicObject();
    .   if (polymorphic_pointer->getDynamicClassID() ==
    .       Derived::getStaticClassID()) ...

Returns
  The class ID for all objects of this class.

Stable:
  ICU 53

## ◆ getSubtype()

const char* icu::MeasureUnit::getSubtype | ( |  | ) | const

Get the sub type.

Stable:
  ICU 53

## ◆ getType()

const char* icu::MeasureUnit::getType | ( |  | ) | const

Get the type.

Stable:
  ICU 53

## ◆ initCurrency()

void icu::MeasureUnit::initCurrency | ( | const char * | isoCurrency | ) |
| protected

For ICU use only.

Internal:
  Do not use. This API is for internal use only.

## ◆ initNoUnit()

void icu::MeasureUnit::initNoUnit | ( | const char * | subtype | ) |
| protected

For ICU use only.

Internal:
  Do not use. This API is for internal use only.

## ◆ initTime()

void icu::MeasureUnit::initTime | ( | const char * | timeId | ) |
| protected

For ICU use only.

Internal:
  Do not use. This API is for internal use only.

## ◆ internalGetIndexForTypeAndSubtype()

static int32_t icu::MeasureUnit::internalGetIndexForTypeAndSubtype | ( | const char * | type,
|  | const char * | subtype
| ) |  |
| static

ICU use only.

Returns
  the unit.getIndex() of the unit which has this unit.getType() and unit.getSubtype(), or a negative value if there is no such unit

Internal:
  Do not use. This API is for internal use only.

## ◆ operator!=()

UBool icu::MeasureUnit::operator!= | ( | const UObject & | other | ) | const
| inline

Inequality operator.

Return true if this object is not equal to the given object.

Stable:
  ICU 53

Definition at line 85 of file measunit.h.

## ◆ operator=()

MeasureUnit& icu::MeasureUnit::operator= | ( | const MeasureUnit & | other | ) |

Assignment operator.

Stable:
  ICU 3.0

## ◆ operator==()

virtual UBool icu::MeasureUnit::operator== | ( | const UObject & | other | ) | const
| virtual

Equality operator.

Return true if this object is equal to the given object.

Stable:
  ICU 3.0

## ◆ resolveUnitPerUnit()

static MeasureUnit icu::MeasureUnit::resolveUnitPerUnit | ( | const MeasureUnit & | unit,
|  | const MeasureUnit & | perUnit,
|  | bool * | isResolved
| ) |  |
| static

ICU use only.

Internal:
  Do not use. This API is for internal use only.

The documentation for this class was generated from the following file:

- measunit.h