casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Static Public Member Functions | Protected Types | Protected Attributes | Static Protected Attributes | Static Private Member Functions
casa::Converter Class Reference

#include <Converter.h>

Inheritance diagram for casa::Converter:
casa::ConverterChannel casa::ConverterFrequency casa::ConverterVelocity casa::ConverterWavelength casa::ConverterFrequencyVelocity casa::ConverterFrequencyWavelength casa::ConverterVelocityFrequency casa::ConverterVelocityWavelength casa::ConverterWavelengthFrequency casa::ConverterWavelengthVelocity

List of all members.

Public Member Functions

 Converter (const QString &oldUnits, const QString &newUnits)
bool setVelocityUnits (const QString &units)
bool setWavelengthUnits (const QString &units)
QString getNewUnits () const
virtual double toPixel (double value)=0
 Abstract methods to be implemented by subclasses.
virtual Vector< double > convert (const Vector< double > &oldValues)=0
virtual double convert (double oldValue)
virtual ~Converter ()

Static Public Member Functions

static ConvertergetConverter (const QString &oldUnits, const QString &newUnits)
 Factory for producing the appropriate converter.
static void setSpectralCoordinate (SpectralCoordinate coordinate)
static void setRestFrequency (double restFrequency)
static void convert (Vector< double > &resultValues, int sourceIndex, int destIndex)

Protected Types

enum  UnitType {
  FREQUENCY_UNIT,
  VELOCITY_UNIT,
  WAVELENGTH_UNIT,
  CHANNEL_UNIT,
  UNRECOGNIZED
}

Protected Attributes

QString oldUnits
QString newUnits

Static Protected Attributes

static const QList< QString > FREQUENCY_UNITS
static const QList< QString > WAVELENGTH_UNITS
static const QList< QString > VELOCITY_UNITS
static SpectralCoordinate spectralCoordinate

Static Private Member Functions

static UnitType getUnitType (const QString &unit)

Detailed Description

Definition at line 35 of file Converter.h.


Member Enumeration Documentation

enum casa::Converter::UnitType [protected]
Enumerator:
FREQUENCY_UNIT 
VELOCITY_UNIT 
WAVELENGTH_UNIT 
CHANNEL_UNIT 
UNRECOGNIZED 

Definition at line 67 of file Converter.h.


Constructor & Destructor Documentation

casa::Converter::Converter ( const QString &  oldUnits,
const QString &  newUnits 
)
virtual casa::Converter::~Converter ( ) [virtual]

Member Function Documentation

static void casa::Converter::convert ( Vector< double > &  resultValues,
int  sourceIndex,
int  destIndex 
) [static]
virtual Vector<double> casa::Converter::convert ( const Vector< double > &  oldValues) [pure virtual]
virtual double casa::Converter::convert ( double  oldValue) [virtual]

Reimplemented in casa::ConverterChannel.

static Converter* casa::Converter::getConverter ( const QString &  oldUnits,
const QString &  newUnits 
) [static]

Factory for producing the appropriate converter.

Note: user is responsible for deleting the converter.

QString casa::Converter::getNewUnits ( ) const
static UnitType casa::Converter::getUnitType ( const QString &  unit) [static, private]
static void casa::Converter::setRestFrequency ( double  restFrequency) [static]
static void casa::Converter::setSpectralCoordinate ( SpectralCoordinate  coordinate) [static]
bool casa::Converter::setVelocityUnits ( const QString &  units)
bool casa::Converter::setWavelengthUnits ( const QString &  units)
virtual double casa::Converter::toPixel ( double  value) [pure virtual]

Abstract methods to be implemented by subclasses.

virtual float convert( float oldValue ) const = 0;

Implemented in casa::ConverterChannel, casa::ConverterFrequency, casa::ConverterVelocity, and casa::ConverterWavelength.


Member Data Documentation

const QList<QString> casa::Converter::FREQUENCY_UNITS [static, protected]

Definition at line 60 of file Converter.h.

QString casa::Converter::newUnits [protected]

Definition at line 65 of file Converter.h.

QString casa::Converter::oldUnits [protected]

Definition at line 64 of file Converter.h.

Definition at line 66 of file Converter.h.

const QList<QString> casa::Converter::VELOCITY_UNITS [static, protected]

Definition at line 62 of file Converter.h.

const QList<QString> casa::Converter::WAVELENGTH_UNITS [static, protected]

Definition at line 61 of file Converter.h.


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