# Poco::Util

# namespace Units

## Overview

Namespaces: Constants, Internal, Values

Classes: OutputUnit, Prefix, Value, atto, centi, deca, deci, exa, femto, giga, hecto, kilo, mega, micro, milli, nano, peta, pico, tera, yocto, yotta, zepto, zetta

Types: Bq, C, Celsius, F, Fahrenheit, Gy, H, Hz, J, N, Ohm, Pa, S, Sv, T, Unit, Unit, V, W, Wb, acre, are, bakers_dozen, century, cl, cm, cm3, day, degree, degree_minute, degree_second, dl, dozen, foot, g, grad, hectare, hour, inch, inch2, kPa, kat, km, knot, kph, lb, liter, lm, lx, m2, m3, mach, meters_per_second, mg, mile, millennium, millibar, minute, ml, mm, mm2, mph, ms, nautical_mile, oz, percent, psi, rad, rpm, sr, tonne, week, yard, year

Functions: cos, cube, operator *, operator /, operator <<, raise, sin, sqrt, square, streamOp, tan

## Namespaces

### namespace Constants

### namespace Internal

### namespace Values

## Classes

### struct OutputUnit

Functor to write Unit text to stream.

### class Prefix

Parent class for unit prefixes.

### class Value

A Value with a unit.

### struct atto

### struct centi

### struct deca

### struct deci

### struct exa

### struct femto

### struct giga

### struct hecto

### struct kilo

### struct mega

### struct micro

### struct milli

### struct nano

### struct peta

### struct pico

### struct tera

### struct yocto

### struct yotta

### struct zepto

### struct zetta

## Types

### Bq

typedef Power < s, - 1 > Bq;

### C

typedef Compose < s, A > C;

### Celsius

typedef Translate < K, - 27315, 100 > Celsius;

### F

typedef Compose < C, Power < V, - 1 > > F;

### Fahrenheit

typedef Translate < Scale < Celsius, 9, 5 >, 32 > Fahrenheit;

### Gy

typedef Compose < J, Power < kg, - 1 > > Gy;

### H

typedef Compose < Wb, Power < A, - 1 > > H;

### Hz

typedef Power < s, - 1 > Hz;

### J

typedef Compose < N, m > J;

### N

typedef Compose < m, Compose < kg, Power < s, - 2 > > > N;

### Ohm

typedef Compose < V, Power < A, - 1 > > Ohm;

### Pa

typedef Compose < N, Power < m, - 2 > > Pa;

### S

typedef Compose < A, Power < V, - 1 > > S;

### Sv

typedef Gy Sv;

### T

typedef Compose < Wb, Power < m, - 2 > > T;

### Unit

typedef Power < Internal::None, 0 > Unit;

Construct a unit equivalent to Unit1*Unit2 Constructs a unit equivalent to U*Num/Den Constructs a Unit equivalent to U+Num/Den Constructs a Unit equivalent to U^(Num/Den) A unit which is effectively no units at all.

### Unit

typedef Poco::Util::Units::Unit Unit;

### V

typedef Compose < W, Power < A, - 1 > > V;

### W

typedef Compose < J, Power < s, - 1 > > W;

### Wb

typedef Compose < V, s > Wb;

### acre

typedef Scale < hectare, 24710538, 10000000 > acre;

### are

typedef Scale < m2, 1, 100 > are;

### bakers_dozen

typedef Scale < Unit, 1, 13 > bakers_dozen;

### century

typedef Scale < year, 1, 100 > century;

### cl

typedef Scale < liter, 100 > cl;

### cm

typedef centi < m >::type cm;

### cm3

typedef Power < cm, 3 > cm3;

### day

typedef Scale < hour, 1, 24 > day;

### degree

typedef Scale < rad, 180000000, 3141593 > degree;

### degree_minute

typedef Scale < degree, 60 > degree_minute;

### degree_second

typedef Scale < degree_minute, 60 > degree_second;

### dl

typedef Scale < liter, 10 > dl;

### dozen

typedef Scale < Unit, 1, 12 > dozen;

### foot

typedef Scale < inch, 1, 12 > foot;

### g

typedef milli < kg >::type g;

### grad

typedef Scale < rad, 200000000, 3141593 > grad;

### hectare

typedef Scale < m2, 1, 10000 > hectare;

### hour

typedef Scale < minute, 1, 60 > hour;

### inch

typedef Scale < cm, 100, 254 > inch;

### inch2

typedef Power < inch, 2 > inch2;

### kPa

typedef Scale < Pa, 1, 1000 > kPa;

### kat

typedef Compose < Power < s, - 1 >, mol > kat;

### km

typedef kilo < m >::type km;

### knot

typedef Compose < nautical_mile, Power < hour, - 1 > > knot;

### kph

typedef Compose < km, Power < hour, - 1 > > kph;

### lb

typedef Scale < kg, 22046223, 10000000 > lb;

### liter

typedef Scale < ml, 1, 1000 > liter;

### lm

typedef cd lm;

### lx

typedef Compose < lm, Power < m, - 2 > > lx;

### m2

typedef Power < m, 2 > m2;

### m3

typedef Power < m, 3 > m3;

### mach

typedef Scale < meters_per_second, 100, 34029 > mach;

### meters_per_second

typedef Compose < m, Power < s, - 1 > > meters_per_second;

### mg

typedef milli < g >::type mg;

### mile

typedef Scale < yard, 1, 1760 > mile;

### millennium

typedef Scale < year, 1, 1000 > millennium;

### millibar

typedef Scale < kPa, 10 > millibar;

### minute

typedef Scale < s, 1, 60 > minute;

### ml

typedef cm3 ml;

### mm

typedef milli < m >::type mm;

### mm2

typedef Power < mm, 2 > mm2;

### mph

typedef Compose < mile, Power < hour, - 1 > > mph;

### ms

typedef milli < s >::type ms;

### nautical_mile

typedef Scale < m, 1, 1852 > nautical_mile;

### oz

typedef Scale < lb, 16 > oz;

### percent

typedef Scale < Unit, 100 > percent;

### psi

typedef Scale < kPa, 1450377, 10000000 > psi;

### rad

typedef Compose < m, Power < m, - 1 > > rad;

### rpm

typedef Scale < Hz, 60 > rpm;

### sr

typedef Compose < Power < m, 2 >, Power < m, - 2 > > sr;

### tonne

typedef Scale < kg, 1, 1000 > tonne;

### week

typedef Scale < day, 1, 7 > week;

### yard

typedef Scale < inch, 1, 36 > yard;

### year

typedef Scale < month, 1, 12 > year;

## Functions

### cos

template < typename V, typename U > V cos(
const Value < V, U > & angle
);

### cube

template < typename V, typename U > Value < V, Power < U, 3, 1 > > cube(
const Value < V, U > & a
);

### operator *

template < typename V, typename U > Value < V, U > operator * (
const V & a,
const Value < V, U > & b
);

### operator /

template < typename V, typename U > Value < V, Power < U, - 1 > > operator / (
const V & a,
const Value < V, U > & b
);

### operator <<

template < typename Str, typename V, typename U > Str & operator << (
Str & os,
const Value < V, U > & value
);

Additional Units

### operator <<

template < typename Str > Str & operator << (
Str & os,
const Units::Prefix & val
);

Streaming operator for prefixed values.

### raise

template < int Num, int Den, typename V, typename U > Value < V, Power < U, Num, Den > > raise(
const Value < V, U > & a
);

### sin

template < typename V, typename U > V sin(
const Value < V, U > & angle
);

### sqrt

template < typename V, typename U > Value < V, Power < U, 1, 2 > > sqrt(
const Value < V, U > & a
);

### square

template < typename V, typename U > Value < V, Power < U, 2, 1 > > square(
const Value < V, U > & a
);

### streamOp

template < typename Str > Str & streamOp(
Str & os,
const Units::Prefix & val
);

### tan

template < typename V, typename U > V tan(
const Value < V, U > & angle
);