MI - Fimex
UnitsConverter.h
Go to the documentation of this file.
1 /*
2  * Fimex, UnitsConverter.h
3  *
4  * (C) Copyright 2013, met.no
5  *
6  * Project Info: https://wiki.met.no/fimex/start
7  *
8  * This library is free software; you can redistribute it and/or modify it
9  * under the terms of the GNU Lesser General Public License as published by
10  * the Free Software Foundation; either version 2.1 of the License, or
11  * (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful, but
14  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
16  * License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
21  * USA.
22  *
23  * Created on: Nov 6, 2013
24  * Author: heikok
25  */
26 #ifndef UNITSCONVERTER_H_
27 #define UNITSCONVERTER_H_
28 
29 namespace MetNoFimex
30 {
31 
39 public:
40  virtual ~UnitsConverter() {}
46  virtual double convert(double from) = 0;
50  virtual bool isLinear() = 0;
55  virtual void getScaleOffset(double& scale, double& offset) = 0;
59  double operator()(double from) {return convert(from);};
60 };
61 
62 } /* namespace MetNoFimex */
63 
64 #endif /* UNITSCONVERTER_H_ */
virtual ~UnitsConverter()
Definition: UnitsConverter.h:40
double operator()(double from)
Definition: UnitsConverter.h:59
virtual double convert(double from)=0
Definition: C_CDMReader.h:35
virtual void getScaleOffset(double &scale, double &offset)=0
Definition: UnitsConverter.h:38
virtual bool isLinear()=0