casa
$Rev:20696$
|
#include <Converter.h>
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 Converter * | getConverter (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) |
Definition at line 35 of file Converter.h.
enum casa::Converter::UnitType [protected] |
Definition at line 67 of file Converter.h.
casa::Converter::Converter | ( | const QString & | oldUnits, |
const QString & | newUnits | ||
) |
virtual casa::Converter::~Converter | ( | ) | [virtual] |
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] |
Implemented in casa::ConverterChannel, casa::ConverterFrequency, casa::ConverterVelocity, casa::ConverterWavelength, casa::ConverterFrequencyWavelength, casa::ConverterVelocityWavelength, casa::ConverterWavelengthFrequency, casa::ConverterFrequencyVelocity, casa::ConverterVelocityFrequency, and casa::ConverterWavelengthVelocity.
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.
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.
SpectralCoordinate casa::Converter::spectralCoordinate [static, protected] |
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.