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

#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

Public Types

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

Public Member Functions

 Converter (const QString &oldUnits, const QString &newUnits)
 
QString getNewUnits () const
 
virtual double toPixel (double value, casacore::SpectralCoordinate coordinate)=0
 Abstract methods to be implemented by subclasses. More...
 
virtual casacore::Vector< double > convert (const casacore::Vector< double > &oldValues, casacore::SpectralCoordinate coordinate)=0
 
virtual double convert (double oldValue, casacore::SpectralCoordinate coordinate)
 
virtual ~Converter ()
 

Static Public Member Functions

static ConvertergetConverter (const QString &oldUnits, const QString &newUnits)
 Factory for producing the appropriate converter. More...
 
static void convert (casacore::Vector< double > &resultValues, int sourceIndex, int destIndex, casacore::SpectralCoordinate coordinate)
 
static UnitType getUnitType (const QString &unit)
 

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
 

Detailed Description

Definition at line 35 of file Converter.h.

Member Enumeration Documentation

Enumerator
FREQUENCY_UNIT 
VELOCITY_UNIT 
WAVELENGTH_UNIT 
CHANNEL_UNIT 
UNRECOGNIZED 

Definition at line 51 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 ( casacore::Vector< double > &  resultValues,
int  sourceIndex,
int  destIndex,
casacore::SpectralCoordinate  coordinate 
)
static
virtual casacore::Vector<double> casa::Converter::convert ( const casacore::Vector< double > &  oldValues,
casacore::SpectralCoordinate  coordinate 
)
pure virtual
virtual double casa::Converter::convert ( double  oldValue,
casacore::SpectralCoordinate  coordinate 
)
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
virtual double casa::Converter::toPixel ( double  value,
casacore::SpectralCoordinate  coordinate 
)
pure virtual

Abstract methods to be implemented by subclasses.

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

Member Data Documentation

const QList<QString> casa::Converter::FREQUENCY_UNITS
staticprotected

Definition at line 56 of file Converter.h.

QString casa::Converter::newUnits
protected

Definition at line 61 of file Converter.h.

QString casa::Converter::oldUnits
protected

Definition at line 60 of file Converter.h.

const QList<QString> casa::Converter::VELOCITY_UNITS
staticprotected

Definition at line 58 of file Converter.h.

const QList<QString> casa::Converter::WAVELENGTH_UNITS
staticprotected

Definition at line 57 of file Converter.h.


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