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> 309 if ( ! initialized ) {
325 static int initialized;
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.
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
static Bool create(const String &s, UnitVal &res)
Convert (and check) a unit string to an SI value representation.
UnitVal()
Construct an non-dimensioned value of 1.
const UnitDim & getDim() const
Get the data parts of the unit value definition.
static UnitVal SOLIDANGLE
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)
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.
friend class UnitVal_static_initializer
ensure that statics are initialized
UnitVal(Double factor)
Construct an non-dimensioned value.
this file contains all the compiler specific defines
Bool operator==(const UnitVal &other) const
Compare the dimensionality of different units.
static UnitVal NODIM
Some constants to check type of units.