28 #ifndef CASA_UNITVAL_H
29 #define CASA_UNITVAL_H
33 #include <casacore/casa/aips.h>
34 #include <casacore/casa/Quanta/UnitDim.h>
35 #include <casacore/casa/iosfwd.h>
String: the storage and methods of handling collections of characters.
Define a struct containing the static data members.
Static initialisation of UnitVal constants
UnitVal_static_initializer()
friend UnitVal operator/(const UnitVal &in, const UnitVal &other)
Divide.
void init(Double factor, Int pos)
static UnitVal TEMPERATURE
void init(Double factor)
alternate initialization
UnitDim kindDim
The dimensions of the unit in the defining SI units.
UnitVal & operator=(const UnitVal &other)
Assignment (copy semantics)
UnitVal(Double factor)
Construct an non-dimensioned value.
static UnitVal NODIM
Some constants to check type of units
UnitVal(Double factor, const String &s, UMaps *=0)
Construct a fully dimensioned value.
friend UnitVal operator*(const UnitVal &in, const UnitVal &other)
Multiply.
UnitVal pow(Int p)
Raise a unit to an integer power.
friend ostream & operator<<(ostream &os, const UnitVal &ku)
Output a unit as a value and a string of SI defining units.
static Int power(MUString &str)
Determine exponent of unit symbol.
UnitVal()
Construct an non-dimensioned value of 1.
static UnitVal SOLIDANGLE
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.
UnitVal & operator*=(const UnitVal &other)
Manipulate units
Double kindFactor
The factor necessary to express the specified unit in the defining SI units.
Bool operator==(const UnitVal &other) const
Compare the dimensionality of different units.
static Bool create(MUString &str, UnitVal &res, UMaps *=0)
UnitVal(const UnitVal &other)
Copy constructor.
static Bool check(const String &s)
Convert a unit string to a proper unit value and cache the result.
Bool operator!=(const UnitVal &other) const
static Bool check(const String &s, UnitVal &loc)
Convert a unit string to a proper unit value, cache the result and compare the dimension with the spe...
UnitVal & operator/=(const UnitVal &other)
Divide different units.
UnitVal root(Int p) const
Take integer root.
UnitVal(Double factor, Int pos)
Construct a value with a single unit at position specified.
static Bool create(const String &s, UnitVal &res, UMaps *=0)
Convert (and check) a unit string to an SI value representation.
const UnitDim & getDim() const
Get the data parts of the unit value definition
static Bool field(MUString &str, UnitVal &res, UMaps *)
Determine symbol name in unit string.
static class casacore::UnitVal_static_initializer unitval_static_initializer
this file contains all the compiler specific defines
bool Bool
Define the standard types used by Casacore.
ostream & operator<<(ostream &os, const IComplex &)
Show on ostream.