ICU 77.1 77.1

Data Structures | Namespaces | Typedefs | Enumerations | Functions
measunit.h File Reference

C++ API: A unit for measuring a quantity. More...

`#include "unicode/utypes.h"`
`#include <utility>`
`#include "unicode/unistr.h"`
`#include "unicode/localpointer.h"`

Go to the source code of this file.

## Data Structures
class | icu::MeasureUnit
| A unit such as length, mass, volume, currency, etc. More...

## Namespaces
| icu
| File coll.h.

## Typedefs
typedef enum icu::UMeasurePrefix | icu::UMeasurePrefix
| Enumeration for SI and binary prefixes, e.g. More...

## Enumerations
enum | icu::UMeasureUnitComplexity { icu::UMEASURE_UNIT_SINGLE , icu::UMEASURE_UNIT_COMPOUND , icu::UMEASURE_UNIT_MIXED }
| Enumeration for unit complexity. More...
enum | icu::UMeasurePrefix { icu::UMEASURE_PREFIX_ONE = 30 + 0 , icu::UMEASURE_PREFIX_YOTTA = UMEASURE_PREFIX_ONE + 24 , icu::UMEASURE_PREFIX_RONNA = UMEASURE_PREFIX_ONE + 27 , icu::UMEASURE_PREFIX_QUETTA = UMEASURE_PREFIX_ONE + 30 , icu::UMEASURE_PREFIX_INTERNAL_MAX_SI = UMEASURE_PREFIX_QUETTA , icu::UMEASURE_PREFIX_ZETTA = UMEASURE_PREFIX_ONE + 21 , icu::UMEASURE_PREFIX_EXA = UMEASURE_PREFIX_ONE + 18 , icu::UMEASURE_PREFIX_PETA = UMEASURE_PREFIX_ONE + 15 , icu::UMEASURE_PREFIX_TERA = UMEASURE_PREFIX_ONE + 12 , icu::UMEASURE_PREFIX_GIGA = UMEASURE_PREFIX_ONE + 9 , icu::UMEASURE_PREFIX_MEGA = UMEASURE_PREFIX_ONE + 6 , icu::UMEASURE_PREFIX_KILO = UMEASURE_PREFIX_ONE + 3 , icu::UMEASURE_PREFIX_HECTO = UMEASURE_PREFIX_ONE + 2 , icu::UMEASURE_PREFIX_DEKA = UMEASURE_PREFIX_ONE + 1 , icu::UMEASURE_PREFIX_DECI = UMEASURE_PREFIX_ONE + -1 , icu::UMEASURE_PREFIX_CENTI = UMEASURE_PREFIX_ONE + -2 , icu::UMEASURE_PREFIX_MILLI = UMEASURE_PREFIX_ONE + -3 , icu::UMEASURE_PREFIX_MICRO = UMEASURE_PREFIX_ONE + -6 , icu::UMEASURE_PREFIX_NANO = UMEASURE_PREFIX_ONE + -9 , icu::UMEASURE_PREFIX_PICO = UMEASURE_PREFIX_ONE + -12 , icu::UMEASURE_PREFIX_FEMTO = UMEASURE_PREFIX_ONE + -15 , icu::UMEASURE_PREFIX_ATTO = UMEASURE_PREFIX_ONE + -18 , icu::UMEASURE_PREFIX_ZEPTO = UMEASURE_PREFIX_ONE + -21 , icu::UMEASURE_PREFIX_YOCTO = UMEASURE_PREFIX_ONE + -24 , icu::UMEASURE_PREFIX_RONTO = UMEASURE_PREFIX_ONE + -27 , icu::UMEASURE_PREFIX_QUECTO = UMEASURE_PREFIX_ONE + -30 , icu::UMEASURE_PREFIX_INTERNAL_MIN_SI = UMEASURE_PREFIX_QUECTO , icu::UMEASURE_PREFIX_INTERNAL_ONE_BIN = -60 , icu::UMEASURE_PREFIX_KIBI = UMEASURE_PREFIX_INTERNAL_ONE_BIN + 1 , icu::UMEASURE_PREFIX_INTERNAL_MIN_BIN = UMEASURE_PREFIX_KIBI , icu::UMEASURE_PREFIX_MEBI = UMEASURE_PREFIX_INTERNAL_ONE_BIN + 2 , icu::UMEASURE_PREFIX_GIBI = UMEASURE_PREFIX_INTERNAL_ONE_BIN + 3 , icu::UMEASURE_PREFIX_TEBI = UMEASURE_PREFIX_INTERNAL_ONE_BIN + 4 , icu::UMEASURE_PREFIX_PEBI = UMEASURE_PREFIX_INTERNAL_ONE_BIN + 5 , icu::UMEASURE_PREFIX_EXBI = UMEASURE_PREFIX_INTERNAL_ONE_BIN + 6 , icu::UMEASURE_PREFIX_ZEBI = UMEASURE_PREFIX_INTERNAL_ONE_BIN + 7 , icu::UMEASURE_PREFIX_YOBI = UMEASURE_PREFIX_INTERNAL_ONE_BIN + 8 , icu::UMEASURE_PREFIX_INTERNAL_MAX_BIN = UMEASURE_PREFIX_YOBI }
| Enumeration for SI and binary prefixes, e.g. More...

## Functions
U_CAPI int32_t | icu::umeas_getPrefixBase (UMeasurePrefix unitPrefix)
| Returns the base of the factor associated with the given unit prefix: the base is 10 for SI prefixes (kilo, micro) and 1024 for binary prefixes (kibi, mebi). More...
U_CAPI int32_t | icu::umeas_getPrefixPower (UMeasurePrefix unitPrefix)
| Returns the exponent of the factor associated with the given unit prefix, for example 3 for kilo, -6 for micro, 1 for kibi, 2 for mebi, 3 for gibi. More...

## Detailed Description

C++ API: A unit for measuring a quantity.

Definition in file measunit.h.