ICU 56.1
56.1
|
Measurement unit for time units. More...
#include <tmunit.h>
Public Types | |
enum | UTimeUnitFields { UTIMEUNIT_YEAR, UTIMEUNIT_MONTH, UTIMEUNIT_DAY, UTIMEUNIT_WEEK, UTIMEUNIT_HOUR, UTIMEUNIT_MINUTE, UTIMEUNIT_SECOND, UTIMEUNIT_FIELD_COUNT } |
Constants for all the time units we supported. More... |
Public Member Functions | |
virtual UObject * | clone () const |
Override clone. | |
TimeUnit (const TimeUnit &other) | |
Copy operator. | |
TimeUnit & | operator= (const TimeUnit &other) |
Assignment operator. | |
virtual UClassID | getDynamicClassID () const |
Returns a unique class ID for this object POLYMORPHICALLY. | |
UTimeUnitFields | getTimeUnitField () const |
Get time unit field. | |
virtual | ~TimeUnit () |
Destructor. | |
![]() | |
MeasureUnit () | |
Default constructor. | |
MeasureUnit (const MeasureUnit &other) | |
Copy constructor. | |
MeasureUnit & | operator= (const MeasureUnit &other) |
Assignment operator. | |
virtual | ~MeasureUnit () |
Destructor. | |
virtual UBool | operator== (const UObject &other) const |
Equality operator. | |
UBool | operator!= (const UObject &other) const |
Inequality operator. | |
const char * | getType () const |
Get the type. | |
const char * | getSubtype () const |
Get the sub type. | |
int32_t | getIndex () const |
ICU use only. | |
![]() | |
virtual | ~UObject () |
Destructor. |
Static Public Member Functions | |
static TimeUnit * | createInstance (UTimeUnitFields timeUnitField, UErrorCode &status) |
Create Instance. | |
static UClassID | getStaticClassID () |
Returns the class ID for this class. | |
![]() | |
static int32_t | getAvailable (MeasureUnit *destArray, int32_t destCapacity, UErrorCode &errorCode) |
getAvailable gets all of the available units. | |
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. | |
static StringEnumeration * | getAvailableTypes (UErrorCode &errorCode) |
getAvailableTypes gets all of the available types. | |
static int32_t | getIndexCount () |
ICU use only. | |
static MeasureUnit * | resolveUnitPerUnit (const MeasureUnit &unit, const MeasureUnit &perUnit) |
ICU use only. | |
static MeasureUnit * | createGForce (UErrorCode &status) |
Returns unit of acceleration: g-force. | |
static MeasureUnit * | createMeterPerSecondSquared (UErrorCode &status) |
Returns unit of acceleration: meter-per-second-squared. | |
static MeasureUnit * | createArcMinute (UErrorCode &status) |
Returns unit of angle: arc-minute. | |
static MeasureUnit * | createArcSecond (UErrorCode &status) |
Returns unit of angle: arc-second. | |
static MeasureUnit * | createDegree (UErrorCode &status) |
Returns unit of angle: degree. | |
static MeasureUnit * | createRadian (UErrorCode &status) |
Returns unit of angle: radian. | |
static MeasureUnit * | createRevolutionAngle (UErrorCode &status) |
Returns unit of angle: revolution. | |
static MeasureUnit * | createAcre (UErrorCode &status) |
Returns unit of area: acre. | |
static MeasureUnit * | createHectare (UErrorCode &status) |
Returns unit of area: hectare. | |
static MeasureUnit * | createSquareCentimeter (UErrorCode &status) |
Returns unit of area: square-centimeter. | |
static MeasureUnit * | createSquareFoot (UErrorCode &status) |
Returns unit of area: square-foot. | |
static MeasureUnit * | createSquareInch (UErrorCode &status) |
Returns unit of area: square-inch. | |
static MeasureUnit * | createSquareKilometer (UErrorCode &status) |
Returns unit of area: square-kilometer. | |
static MeasureUnit * | createSquareMeter (UErrorCode &status) |
Returns unit of area: square-meter. | |
static MeasureUnit * | createSquareMile (UErrorCode &status) |
Returns unit of area: square-mile. | |
static MeasureUnit * | createSquareYard (UErrorCode &status) |
Returns unit of area: square-yard. | |
static MeasureUnit * | createLiterPer100Kilometers (UErrorCode &status) |
Returns unit of consumption: liter-per-100kilometers. | |
static MeasureUnit * | createLiterPerKilometer (UErrorCode &status) |
Returns unit of consumption: liter-per-kilometer. | |
static MeasureUnit * | createMilePerGallon (UErrorCode &status) |
Returns unit of consumption: mile-per-gallon. | |
static MeasureUnit * | createBit (UErrorCode &status) |
Returns unit of digital: bit. | |
static MeasureUnit * | createByte (UErrorCode &status) |
Returns unit of digital: byte. | |
static MeasureUnit * | createGigabit (UErrorCode &status) |
Returns unit of digital: gigabit. | |
static MeasureUnit * | createGigabyte (UErrorCode &status) |
Returns unit of digital: gigabyte. | |
static MeasureUnit * | createKilobit (UErrorCode &status) |
Returns unit of digital: kilobit. | |
static MeasureUnit * | createKilobyte (UErrorCode &status) |
Returns unit of digital: kilobyte. | |
static MeasureUnit * | createMegabit (UErrorCode &status) |
Returns unit of digital: megabit. | |
static MeasureUnit * | createMegabyte (UErrorCode &status) |
Returns unit of digital: megabyte. | |
static MeasureUnit * | createTerabit (UErrorCode &status) |
Returns unit of digital: terabit. | |
static MeasureUnit * | createTerabyte (UErrorCode &status) |
Returns unit of digital: terabyte. | |
static MeasureUnit * | createCentury (UErrorCode &status) |
Returns unit of duration: century. | |
static MeasureUnit * | createDay (UErrorCode &status) |
Returns unit of duration: day. | |
static MeasureUnit * | createHour (UErrorCode &status) |
Returns unit of duration: hour. | |
static MeasureUnit * | createMicrosecond (UErrorCode &status) |
Returns unit of duration: microsecond. | |
static MeasureUnit * | createMillisecond (UErrorCode &status) |
Returns unit of duration: millisecond. | |
static MeasureUnit * | createMinute (UErrorCode &status) |
Returns unit of duration: minute. | |
static MeasureUnit * | createMonth (UErrorCode &status) |
Returns unit of duration: month. | |
static MeasureUnit * | createNanosecond (UErrorCode &status) |
Returns unit of duration: nanosecond. | |
static MeasureUnit * | createSecond (UErrorCode &status) |
Returns unit of duration: second. | |
static MeasureUnit * | createWeek (UErrorCode &status) |
Returns unit of duration: week. | |
static MeasureUnit * | createYear (UErrorCode &status) |
Returns unit of duration: year. | |
static MeasureUnit * | createAmpere (UErrorCode &status) |
Returns unit of electric: ampere. | |
static MeasureUnit * | createMilliampere (UErrorCode &status) |
Returns unit of electric: milliampere. | |
static MeasureUnit * | createOhm (UErrorCode &status) |
Returns unit of electric: ohm. | |
static MeasureUnit * | createVolt (UErrorCode &status) |
Returns unit of electric: volt. | |
static MeasureUnit * | createCalorie (UErrorCode &status) |
Returns unit of energy: calorie. | |
static MeasureUnit * | createFoodcalorie (UErrorCode &status) |
Returns unit of energy: foodcalorie. | |
static MeasureUnit * | createJoule (UErrorCode &status) |
Returns unit of energy: joule. | |
static MeasureUnit * | createKilocalorie (UErrorCode &status) |
Returns unit of energy: kilocalorie. | |
static MeasureUnit * | createKilojoule (UErrorCode &status) |
Returns unit of energy: kilojoule. | |
static MeasureUnit * | createKilowattHour (UErrorCode &status) |
Returns unit of energy: kilowatt-hour. | |
static MeasureUnit * | createGigahertz (UErrorCode &status) |
Returns unit of frequency: gigahertz. | |
static MeasureUnit * | createHertz (UErrorCode &status) |
Returns unit of frequency: hertz. | |
static MeasureUnit * | createKilohertz (UErrorCode &status) |
Returns unit of frequency: kilohertz. | |
static MeasureUnit * | createMegahertz (UErrorCode &status) |
Returns unit of frequency: megahertz. | |
static MeasureUnit * | createAstronomicalUnit (UErrorCode &status) |
Returns unit of length: astronomical-unit. | |
static MeasureUnit * | createCentimeter (UErrorCode &status) |
Returns unit of length: centimeter. | |
static MeasureUnit * | createDecimeter (UErrorCode &status) |
Returns unit of length: decimeter. | |
static MeasureUnit * | createFathom (UErrorCode &status) |
Returns unit of length: fathom. | |
static MeasureUnit * | createFoot (UErrorCode &status) |
Returns unit of length: foot. | |
static MeasureUnit * | createFurlong (UErrorCode &status) |
Returns unit of length: furlong. | |
static MeasureUnit * | createInch (UErrorCode &status) |
Returns unit of length: inch. | |
static MeasureUnit * | createKilometer (UErrorCode &status) |
Returns unit of length: kilometer. | |
static MeasureUnit * | createLightYear (UErrorCode &status) |
Returns unit of length: light-year. | |
static MeasureUnit * | createMeter (UErrorCode &status) |
Returns unit of length: meter. | |
static MeasureUnit * | createMicrometer (UErrorCode &status) |
Returns unit of length: micrometer. | |
static MeasureUnit * | createMile (UErrorCode &status) |
Returns unit of length: mile. | |
static MeasureUnit * | createMileScandinavian (UErrorCode &status) |
Returns unit of length: mile-scandinavian. | |
static MeasureUnit * | createMillimeter (UErrorCode &status) |
Returns unit of length: millimeter. | |
static MeasureUnit * | createNanometer (UErrorCode &status) |
Returns unit of length: nanometer. | |
static MeasureUnit * | createNauticalMile (UErrorCode &status) |
Returns unit of length: nautical-mile. | |
static MeasureUnit * | createParsec (UErrorCode &status) |
Returns unit of length: parsec. | |
static MeasureUnit * | createPicometer (UErrorCode &status) |
Returns unit of length: picometer. | |
static MeasureUnit * | createYard (UErrorCode &status) |
Returns unit of length: yard. | |
static MeasureUnit * | createLux (UErrorCode &status) |
Returns unit of light: lux. | |
static MeasureUnit * | createCarat (UErrorCode &status) |
Returns unit of mass: carat. | |
static MeasureUnit * | createGram (UErrorCode &status) |
Returns unit of mass: gram. | |
static MeasureUnit * | createKilogram (UErrorCode &status) |
Returns unit of mass: kilogram. | |
static MeasureUnit * | createMetricTon (UErrorCode &status) |
Returns unit of mass: metric-ton. | |
static MeasureUnit * | createMicrogram (UErrorCode &status) |
Returns unit of mass: microgram. | |
static MeasureUnit * | createMilligram (UErrorCode &status) |
Returns unit of mass: milligram. | |
static MeasureUnit * | createOunce (UErrorCode &status) |
Returns unit of mass: ounce. | |
static MeasureUnit * | createOunceTroy (UErrorCode &status) |
Returns unit of mass: ounce-troy. | |
static MeasureUnit * | createPound (UErrorCode &status) |
Returns unit of mass: pound. | |
static MeasureUnit * | createStone (UErrorCode &status) |
Returns unit of mass: stone. | |
static MeasureUnit * | createTon (UErrorCode &status) |
Returns unit of mass: ton. | |
static MeasureUnit * | createGigawatt (UErrorCode &status) |
Returns unit of power: gigawatt. | |
static MeasureUnit * | createHorsepower (UErrorCode &status) |
Returns unit of power: horsepower. | |
static MeasureUnit * | createKilowatt (UErrorCode &status) |
Returns unit of power: kilowatt. | |
static MeasureUnit * | createMegawatt (UErrorCode &status) |
Returns unit of power: megawatt. | |
static MeasureUnit * | createMilliwatt (UErrorCode &status) |
Returns unit of power: milliwatt. | |
static MeasureUnit * | createWatt (UErrorCode &status) |
Returns unit of power: watt. | |
static MeasureUnit * | createHectopascal (UErrorCode &status) |
Returns unit of pressure: hectopascal. | |
static MeasureUnit * | createInchHg (UErrorCode &status) |
Returns unit of pressure: inch-hg. | |
static MeasureUnit * | createMillibar (UErrorCode &status) |
Returns unit of pressure: millibar. | |
static MeasureUnit * | createMillimeterOfMercury (UErrorCode &status) |
Returns unit of pressure: millimeter-of-mercury. | |
static MeasureUnit * | createPoundPerSquareInch (UErrorCode &status) |
Returns unit of pressure: pound-per-square-inch. | |
static MeasureUnit * | createKarat (UErrorCode &status) |
Returns unit of proportion: karat. | |
static MeasureUnit * | createKilometerPerHour (UErrorCode &status) |
Returns unit of speed: kilometer-per-hour. | |
static MeasureUnit * | createKnot (UErrorCode &status) |
Returns unit of speed: knot. | |
static MeasureUnit * | createMeterPerSecond (UErrorCode &status) |
Returns unit of speed: meter-per-second. | |
static MeasureUnit * | createMilePerHour (UErrorCode &status) |
Returns unit of speed: mile-per-hour. | |
static MeasureUnit * | createCelsius (UErrorCode &status) |
Returns unit of temperature: celsius. | |
static MeasureUnit * | createFahrenheit (UErrorCode &status) |
Returns unit of temperature: fahrenheit. | |
static MeasureUnit * | createGenericTemperature (UErrorCode &status) |
Returns unit of temperature: generic. | |
static MeasureUnit * | createKelvin (UErrorCode &status) |
Returns unit of temperature: kelvin. | |
static MeasureUnit * | createAcreFoot (UErrorCode &status) |
Returns unit of volume: acre-foot. | |
static MeasureUnit * | createBushel (UErrorCode &status) |
Returns unit of volume: bushel. | |
static MeasureUnit * | createCentiliter (UErrorCode &status) |
Returns unit of volume: centiliter. | |
static MeasureUnit * | createCubicCentimeter (UErrorCode &status) |
Returns unit of volume: cubic-centimeter. | |
static MeasureUnit * | createCubicFoot (UErrorCode &status) |
Returns unit of volume: cubic-foot. | |
static MeasureUnit * | createCubicInch (UErrorCode &status) |
Returns unit of volume: cubic-inch. | |
static MeasureUnit * | createCubicKilometer (UErrorCode &status) |
Returns unit of volume: cubic-kilometer. | |
static MeasureUnit * | createCubicMeter (UErrorCode &status) |
Returns unit of volume: cubic-meter. | |
static MeasureUnit * | createCubicMile (UErrorCode &status) |
Returns unit of volume: cubic-mile. | |
static MeasureUnit * | createCubicYard (UErrorCode &status) |
Returns unit of volume: cubic-yard. | |
static MeasureUnit * | createCup (UErrorCode &status) |
Returns unit of volume: cup. | |
static MeasureUnit * | createCupMetric (UErrorCode &status) |
Returns unit of volume: cup-metric. | |
static MeasureUnit * | createDeciliter (UErrorCode &status) |
Returns unit of volume: deciliter. | |
static MeasureUnit * | createFluidOunce (UErrorCode &status) |
Returns unit of volume: fluid-ounce. | |
static MeasureUnit * | createGallon (UErrorCode &status) |
Returns unit of volume: gallon. | |
static MeasureUnit * | createHectoliter (UErrorCode &status) |
Returns unit of volume: hectoliter. | |
static MeasureUnit * | createLiter (UErrorCode &status) |
Returns unit of volume: liter. | |
static MeasureUnit * | createMegaliter (UErrorCode &status) |
Returns unit of volume: megaliter. | |
static MeasureUnit * | createMilliliter (UErrorCode &status) |
Returns unit of volume: milliliter. | |
static MeasureUnit * | createPint (UErrorCode &status) |
Returns unit of volume: pint. | |
static MeasureUnit * | createPintMetric (UErrorCode &status) |
Returns unit of volume: pint-metric. | |
static MeasureUnit * | createQuart (UErrorCode &status) |
Returns unit of volume: quart. | |
static MeasureUnit * | createTablespoon (UErrorCode &status) |
Returns unit of volume: tablespoon. | |
static MeasureUnit * | createTeaspoon (UErrorCode &status) |
Returns unit of volume: teaspoon. |
Additional Inherited Members | |
![]() | |
void | initTime (const char *timeId) |
For ICU use only. | |
void | initCurrency (const char *isoCurrency) |
For ICU use only. |
|
virtual |
Destructor.
|
virtual |
|
static |
|
virtual |
Returns a unique class ID for this object POLYMORPHICALLY.
This method implements a simple form of RTTI used by ICU.
Reimplemented from icu::MeasureUnit.
|
static |
Returns the class ID for this class.
This is used to compare to the return value of getDynamicClassID().
Reimplemented from icu::MeasureUnit.
UTimeUnitFields icu::TimeUnit::getTimeUnitField | ( | ) | const |