28 #ifndef CASA_QUANTUM_H
29 #define CASA_QUANTUM_H
363 void scale(
const Qtype &factor);
416 virtual void print(ostream &os)
const;
446 #ifndef CASACORE_NO_AUTO_TEMPLATES
447 #include <casacore/casa/Quanta/Quantum.tcc>
448 #endif //# CASACORE_NO_AUTO_TEMPLATES
void assure(const UnitVal &uv) const
Assert correct kind.
friend istream & operator>>(istream &is, Quantity &ku)
Input, only quantity is supported now.
Base for Quantities (i.e. dimensioned values)
Quantum< Qtype > & operator-=(const Quantum< Qtype > &other)
virtual const Unit & getFullUnit() const
Get the unit (as Unit) that is attached to the Quantum.
void setValue(const Qtype &val)
Set the value without changing units.
const Quantum< Qtype > & operator+() const
Unary operations.
Quantum< Qtype > & operator=(const Quantum< Qtype > &other)
Assignment (deep copy)
describes any valid unit as a factor and a dimenion of SI units
Quantum< Double > Quantity
Quantum< Qtype > & operator*=(const Quantum< Qtype > &other)
virtual uInt type() const
Get the type (using QuantumType) of derived Quantum (faster than Strings)
Pointed String class to aid analysis of quantity strings.
void convert()
Convert a Quantum to specified units.
virtual QBase * clone() const
Get a copy of Quantum.
static Bool read(Quantity &res, const String &in)
Set the value and unit deduced from input string Caution: At the moment the implementation can only ...
void scale(const Qtype &factor)
Re-specify parts of a quantum.
Quantum< Qtype > operator/(const Quantum< Qtype > &other) const
Quantum()
Default constructor, generates '0'.
bool Bool
Define the standard types used by Casacore.
Quantities (i.e. dimensioned values)
Quantum< Qtype > operator-() const
virtual void print(ostream &os) const
Print a Quantum.
Qtype qVal
Actual quantum value.
const Qtype & getValue() const
Get value of quantum in current units (i.e.
Bool check(const UnitVal &uv) const
Check if of specified type.
Qtype getBaseValue() const
Get value in canonical base units.
Quantum< Qtype > & operator/=(const Quantum< Qtype > &other)
String: the storage and methods of handling collections of characters.
Quantum< Qtype > & operator+=(const Quantum< Qtype > &other)
In place arithmetic functions: left hand side changed in place.
AipsIO & operator>>(AipsIO &os, Record &rec)
Quantum< Qtype > operator*(const Quantum< Qtype > &other) const