28 #ifndef CASA_UNITVAL_H
29 #define CASA_UNITVAL_H
UnitVal(Double factor, Int pos)
Construct a value with a single unit at position specified.
Static initialisation of UnitVal constants.
describes a unit in basic SI unit dimensions
describes any valid unit as a factor and a dimenion of SI units
UnitVal & operator*=(const UnitVal &other)
Manipulate units.
UnitVal & operator=(const UnitVal &other)
Assignment (copy semantics)
static Int power(MUString &str)
Determine exponent of unit symbol.
ostream & operator<<(ostream &os, const IComplex &)
Show on ostream.
Pointed String class to aid analysis of quantity strings.
friend UnitVal operator*(const UnitVal &in, const UnitVal &other)
Multiply.
Bool operator!=(const UnitVal &other) const
Double getFac() const
Get the factor of the unit (as compared to pure SI units)
static Int psign(MUString &str)
Determine sign of unit power (i.e.
static class casacore::UnitVal_static_initializer unitval_static_initializer
UnitVal()
Construct an non-dimensioned value of 1.
const UnitDim & getDim() const
Get the data parts of the unit value definition.
static UnitVal SOLIDANGLE
Define a struct containing the static data members.
UnitVal_static_initializer()
static Bool check(const String &s)
Convert a unit string to a proper unit value and cache the result.
Double kindFactor
The factor necessary to express the specified unit in the defining SI units.
void init(Double factor)
alternate initialization
bool Bool
Define the standard types used by Casacore.
friend UnitVal operator/(const UnitVal &in, const UnitVal &other)
Divide.
UnitVal pow(Int p)
Raise a unit to an integer power.
static UnitVal TEMPERATURE
UnitVal & operator/=(const UnitVal &other)
Divide different units.
friend ostream & operator<<(ostream &os, const UnitVal &ku)
Output a unit as a value and a string of SI defining units.
String: the storage and methods of handling collections of characters.
static Bool field(MUString &str, UnitVal &res, UMaps *)
Determine symbol name in unit string.
UnitVal root(Int p) const
Take integer root.
UnitDim kindDim
The dimensions of the unit in the defining SI units.
UnitVal(Double factor)
Construct an non-dimensioned value.
static Bool create(const String &s, UnitVal &res, UMaps *=0)
Convert (and check) a unit string to an SI value representation.
Bool operator==(const UnitVal &other) const
Compare the dimensionality of different units.
static UnitVal NODIM
Some constants to check type of units.