casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Attributes | List of all members
casacore::QBase Class Referenceabstract

Base for Quantities (i.e. dimensioned values) More...

#include <QBase.h>

Inheritance diagram for casacore::QBase:
casacore::Quantum< Qtype > casacore::Quantum< casacore::casacore::Vector< casacore::Double > > casacore::Quantum< casacore::Double > casacore::Quantum< casacore::Vector< Double > > casacore::Quantum< Double > casacore::Quantum< double > casacore::Quantum< Vector< casa::DisplayPoint3 > > casacore::Quantum< Vector< double > > casacore::Quantum< Vector< Double > > casacore::Quantum< Vector< int > > casacore::Quantum< Vector< T > >

Public Member Functions

 QBase ()
 Default constructor, generates "". More...
 QBase (const QBase &other)
 Copy constructor. More...
 QBase (const Unit &s)
 Construct dimensioned QBase (e.g. More...
virtual ~QBase ()
 Destructor. More...
QBaseoperator= (const QBase &other)
 Assignment (copy) More...
virtual QBaseclone () const =0
 Get a copy of Quantum. More...
virtual const UnitgetFullUnit () 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...
const StringgetUnit () 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...

Protected Attributes

Unit qUnit

Detailed Description

Base for Quantities (i.e. dimensioned values)

Intended use:


Review Status

Reviewed By:
Date Reviewed:
Test programs:



QBase is the base class for Quantum.


Quantities are values with a unit. Their basic specification can be one of two forms:

Quantity(Double value, String unit); // or: Unit unit
Quantum<Type> (Type value, String unit) // or: Unit unit

See Quantum for details.


To provide the possibilty of mixing units from different Quantum<T1>, Quantum<T2>

To Do

Definition at line 80 of file QBase.h.

Constructor & Destructor Documentation

casacore::QBase::QBase ( )

Default constructor, generates "".

casacore::QBase::QBase ( const QBase other)

Copy constructor.

casacore::QBase::QBase ( const Unit s)

Construct dimensioned QBase (e.g.


Thrown Exceptions

virtual casacore::QBase::~QBase ( )


Member Function Documentation

virtual QBase* casacore::QBase::clone ( ) const
pure virtual
virtual const Unit& casacore::QBase::getFullUnit ( ) const
pure virtual
const String& casacore::QBase::getUnit ( ) const

Get units of QBase.

Return the string representation of the current units attached to QBase

Bool casacore::QBase::isConform ( const Unit s) const

Check for conformal matching units (e.g.

dam and Mpc) Using specified units

Bool casacore::QBase::isConform ( const QBase other) const

Using units specified in QBase.

QBase& casacore::QBase::operator= ( const QBase other)

Assignment (copy)

virtual void casacore::QBase::print ( ostream &  os) const
pure virtual
void casacore::QBase::setUnit ( const Unit s)

Re-specify parts of a QBase.

Set new unit, without changing value

void casacore::QBase::setUnit ( const QBase other)

Set new unit, copied from specified QBase, without changing value.

virtual uInt casacore::QBase::type ( ) const
pure virtual

Member Data Documentation

Unit casacore::QBase::qUnit

Definition at line 141 of file QBase.h.

The documentation for this class was generated from the following file: