Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.atnf.csiro.au/computing/software/casacore/casacore-1.2.0/doc/html/classcasa_1_1QBase.html
Дата изменения: Unknown
Дата индексирования: Mon Feb 14 20:10:01 2011
Кодировка:

Поисковые слова: m 2
casacore: casa::QBase Class Reference
Public Member Functions | Protected Attributes

casa::QBase Class Reference
[Quanta_module]

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

#include <QBase.h>

Inheritance diagram for casa::QBase:
casa::Quantum< Qtype >

List of all members.

Public Member Functions

 QBase ()
 Default constructor, generates "".
 QBase (const QBase &other)
 Copy constructor.
 QBase (const Unit &s)
 Construct dimensioned QBase (e.g.
virtual ~QBase ()
 Destructor.
QBaseoperator= (const QBase &other)
 Assignment (copy).
virtual QBaseclone () const =0
 Get a copy of Quantum.
virtual const UnitgetFullUnit () const =0
 Get the unit attached to the Quantum (use getUnit() if only interested in the String part of the unit).
virtual void print (ostream &os) const =0
 Print a Quantum.
virtual uInt type () const =0
 Get the type (== Register() of derived Quantum (faster than Strings) All should have: static uInt myType();.

const StringgetUnit () const
 Get units of QBase.

void setUnit (const Unit &s)
 Re-specify parts of a QBase.
void setUnit (const QBase &other)
 Set new unit, copied from specified QBase, without changing value.

Bool isConform (const Unit &s) const
 Check for conformal matching units (e.g.
Bool isConform (const QBase &other) const
 Using units specified in QBase.

Protected Attributes

Unit qUnit

Detailed Description

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

Intended use:

Internal

Review Status

Reviewed By:
UNKNOWN
Date Reviewed:
before2004/08/25
Test programs:
tQuantum

Prerequisite

Etymology

QBase is the base class for Quantum .

Synopsis

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.

Motivation

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

To Do

Definition at line 78 of file QBase.h.


Constructor & Destructor Documentation

casa::QBase::QBase (  ) 

Default constructor, generates "".

casa::QBase::QBase ( const QBase other  ) 

Copy constructor.

casa::QBase::QBase ( const Unit s  ) 

Construct dimensioned QBase (e.g.

'km/Mpc')

Thrown Exceptions

virtual casa::QBase::~QBase (  )  [virtual]

Destructor.


Member Function Documentation

virtual QBase* casa::QBase::clone (  )  const [pure virtual]
virtual const Unit& casa::QBase::getFullUnit (  )  const [pure virtual]

Get the unit attached to the Quantum (use getUnit() if only interested in the String part of the unit).

Implemented in casa::Quantum< Qtype >, casa::Quantum< Double >, casa::Quantum< Vector< Double > >, and casa::Quantum< Vector< Float > >.

const String& casa::QBase::getUnit (  )  const

Get units of QBase.

Return the string representation of the current units attached to QBase

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

Check for conformal matching units (e.g.

dam and Mpc) Using specified units

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

Using units specified in QBase.

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

Assignment (copy).

virtual void casa::QBase::print ( ostream &  os  )  const [pure virtual]
void casa::QBase::setUnit ( const QBase other  ) 

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

void casa::QBase::setUnit ( const Unit s  ) 

Re-specify parts of a QBase.

Set new unit, without changing value

virtual uInt casa::QBase::type (  )  const [pure virtual]

Get the type (== Register() of derived Quantum (faster than Strings) All should have: static uInt myType();.

Implemented in casa::Quantum< Qtype >, casa::Quantum< Double >, casa::Quantum< Vector< Double > >, and casa::Quantum< Vector< Float > >.


Member Data Documentation

Unit casa::QBase::qUnit [protected]

Definition at line 139 of file QBase.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines