#include <Converter.h>
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, SpectralCoordinate coordinate)=0 |
| Abstract methods to be implemented by subclasses. | |
| virtual Vector< double > | convert (const Vector< double > &oldValues, SpectralCoordinate coordinate)=0 |
| virtual double | convert (double oldValue, SpectralCoordinate coordinate) |
| virtual | ~Converter () |
Static Public Member Functions | |
| static Converter * | getConverter (const QString &oldUnits, const QString &newUnits) |
| Factory for producing the appropriate converter. | |
| static void | convert (Vector< double > &resultValues, int sourceIndex, int destIndex, 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 |
Definition at line 35 of file Converter.h.
Definition at line 51 of file Converter.h.
| casa::Converter::Converter | ( | const QString & | oldUnits, | |
| const QString & | newUnits | |||
| ) |
| virtual casa::Converter::~Converter | ( | ) | [virtual] |
| virtual double casa::Converter::convert | ( | double | oldValue, | |
| SpectralCoordinate | coordinate | |||
| ) | [virtual] |
Reimplemented in casa::ConverterChannel.
| virtual Vector<double> casa::Converter::convert | ( | const Vector< double > & | oldValues, | |
| SpectralCoordinate | coordinate | |||
| ) | [pure virtual] |
Implemented in casa::ConverterChannel, casa::ConverterFrequency, casa::ConverterFrequencyVelocity, casa::ConverterFrequencyWavelength, casa::ConverterVelocity, casa::ConverterVelocityFrequency, casa::ConverterVelocityWavelength, casa::ConverterWavelength, casa::ConverterWavelengthFrequency, and casa::ConverterWavelengthVelocity.
| static void casa::Converter::convert | ( | Vector< double > & | resultValues, | |
| int | sourceIndex, | |||
| int | destIndex, | |||
| SpectralCoordinate | coordinate | |||
| ) | [static] |
| 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, | |
| SpectralCoordinate | coordinate | |||
| ) | [pure virtual] |
Abstract methods to be implemented by subclasses.
Implemented in casa::ConverterChannel, casa::ConverterFrequency, casa::ConverterVelocity, and casa::ConverterWavelength.
const QList<QString> casa::Converter::FREQUENCY_UNITS [static, protected] |
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 [static, protected] |
Definition at line 58 of file Converter.h.
const QList<QString> casa::Converter::WAVELENGTH_UNITS [static, protected] |
Definition at line 57 of file Converter.h.
1.6.1