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