28 #ifndef CASA_QUANTUM_H 29 #define CASA_QUANTUM_H 31 #include <casacore/casa/aips.h> 32 #include <casacore/casa/Quanta/QBase.h> 33 #include <casacore/casa/iosstrfwd.h> 274 friend istream&
operator>> (istream &is, Quantity &ku);
367 void scale(
const Qtype &factor);
420 virtual void print(ostream &os)
const;
441 Bool readQuantity(Quantity &res,
const String &in);
450 #ifndef CASACORE_NO_AUTO_TEMPLATES 451 #include <casacore/casa/Quanta/Quantum.tcc> 452 #endif //# CASACORE_NO_AUTO_TEMPLATES friend istream & operator>>(istream &is, Quantity &ku)
Input, only quantity is supported now.
Base for Quantities (i.e. dimensioned values)
virtual void print(ostream &os) const
Print a Quantum.
Quantum< Qtype > & operator-=(const Quantum< Qtype > &other)
Qtype getBaseValue() const
Get value in canonical base units.
void setValue(const Qtype &val)
Set the value without changing units.
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) const
Quantum< Qtype > & operator*=(const Quantum< Qtype > &other)
Pointed String class to aid analysis of quantity strings.
const Qtype & getValue() const
Get value of quantum in current units (i.e.
void convert()
Convert a Quantum to specified units.
virtual const Unit & getFullUnit() const
Get the unit (as Unit) that is attached to the Quantum.
Quantum< Qtype > operator*(const Quantum< Qtype > &other) const
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.
virtual uInt type() const
Get the type (using QuantumType) of derived Quantum (faster than Strings)
void assure(const UnitVal &uv) const
Assert correct kind.
Quantum()
Default constructor, generates '0'.
virtual QBase * clone() const
Get a copy of Quantum.
bool Bool
Define the standard types used by Casacore.
Quantities (i.e. dimensioned values)
Qtype qVal
Actual quantum value.
Bool check(const UnitVal &uv) const
Check if of specified type.
Quantum< Qtype > & operator/=(const Quantum< Qtype > &other)
const Quantum< Qtype > & operator+() const
Unary operations.
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.
this file contains all the compiler specific defines
Quantum< Qtype > operator-() const