casacore
|
#include <QBase.h>
Public Member Functions | |
QBase () | |
Default constructor, generates "". More... | |
QBase (const Unit &s) | |
Construct dimensioned QBase (e.g. More... | |
virtual | ~QBase () |
Destructor. More... | |
const String & | getUnit () const |
Get units of QBase More... | |
void | setUnit (const Unit &s) |
Re-specify parts of a QBase More... | |
void | setUnit (const QBase &other) |
Set new unit, copied from specified QBase, without changing value. More... | |
Bool | isConform (const Unit &s) const |
Check for conformal matching units (e.g. More... | |
Bool | isConform (const QBase &other) const |
Using units specified in QBase. More... | |
virtual QBase * | clone () const =0 |
Get a copy of Quantum. More... | |
virtual const Unit & | getFullUnit () const =0 |
Get the unit attached to the Quantum (use getUnit() if only interested in the String part of the unit) More... | |
virtual void | print (ostream &os) const =0 |
Print a Quantum. More... | |
virtual uInt | type () const =0 |
Get the type of derived Quantum (using QuantumType). More... | |
Protected Attributes | |
Unit | qUnit |
Base for Quantities (i.e. dimensioned values)
Internal
QBase is the base class for Quantum.
Quantities are values with a unit. Their basic specification can be one of two forms:
See Quantum for details.
To provide the possibilty of mixing units from different Quantum<T1>
, Quantum<T2>
casacore::QBase::QBase | ( | ) |
Default constructor, generates "".
casacore::QBase::QBase | ( | const Unit & | s | ) |
|
virtual |
Destructor.
|
pure virtual |
Get a copy of Quantum.
Implemented in casacore::Quantum< Qtype >, casacore::Quantum< Double >, casacore::Quantum< casacore::Vector< Double > >, and casacore::Quantum< Vector< T > >.
|
pure virtual |
Get the unit attached to the Quantum (use getUnit() if only interested in the String part of the unit)
Implemented in casacore::Quantum< Qtype >, casacore::Quantum< Double >, casacore::Quantum< casacore::Vector< Double > >, and casacore::Quantum< Vector< T > >.
const String& casacore::QBase::getUnit | ( | ) | const |
|
pure virtual |
Print a Quantum.
Implemented in casacore::Quantum< Qtype >, casacore::Quantum< Double >, casacore::Quantum< casacore::Vector< Double > >, and casacore::Quantum< Vector< T > >.
void casacore::QBase::setUnit | ( | const QBase & | other | ) |
Set new unit, copied from specified QBase, without changing value.
void casacore::QBase::setUnit | ( | const Unit & | s | ) |
Re-specify parts of a QBase
Set new unit, without changing value
|
pure virtual |
Get the type of derived Quantum (using QuantumType).
All should have: static uInt myType();
Implemented in casacore::Quantum< Qtype >, casacore::Quantum< Double >, casacore::Quantum< casacore::Vector< Double > >, and casacore::Quantum< Vector< T > >.