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> 310 if ( ! initialized ) {
326 static int initialized;
const UnitDim & getDim() const
Get the data parts of the unit value definition.
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
Bool operator!=(const UnitVal &other) const
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.
Double getFac() const
Get the factor of the unit (as compared to pure SI units)
Pointed String class to aid analysis of quantity strings.
UnitVal root(Int p) const
Take integer root.
friend UnitVal operator*(const UnitVal &in, const UnitVal &other)
Multiply.
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.
static UnitVal SOLIDANGLE
Define a struct containing the static data members.
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
Bool operator==(const UnitVal &other) const
Compare the dimensionality of different units.
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.
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.
static Bool create(const String &s, UnitVal &res, UMaps *=0)
Convert (and check) a unit string to an SI value representation.
this file contains all the compiler specific defines
static UnitVal NODIM
Some constants to check type of units.