MI - Fimex
DataTypeChanger.h
Go to the documentation of this file.
1 /*
2  * Fimex
3  *
4  * (C) Copyright 2008, 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 
24 #ifndef DATATYPECHANGER_H_
25 #define DATATYPECHANGER_H_
26 #include "fimex/DataDecl.h"
27 #include "fimex/CDMDataType.h"
28 #include "boost/shared_ptr.hpp"
29 #include "fimex/CDMException.h"
30 
31 namespace MetNoFimex
32 {
33 
39 {
40  CDMDataType oldType;
41  CDMDataType newType;
42  double oldFill;
43  double newFill;
44  double oldScale;
45  double newScale;
46  double oldOffset;
47  double newOffset;
48 public:
53  explicit DataTypeChanger(CDMDataType oldType);
68  explicit DataTypeChanger(CDMDataType oldType, double oldFill, double oldScale, double oldOffset, CDMDataType newType, double newFill, double newScale, double newOffset, double unitScale = 1., double unitOffset = 0.);
69  virtual ~DataTypeChanger();
77  CDMDataType getDataType() const;
78 
79 };
80 
81 }
82 
83 #endif /*DATATYPECHANGER_H_*/
boost::shared_ptr< Data > DataPtr
Definition: DataDecl.h:39
Definition: DataTypeChanger.h:38
Definition: CDMException.h:36
Definition: C_CDMReader.h:35
DataTypeChanger(CDMDataType oldType)
DataPtr convertData(DataPtr) const
CDMDataType getDataType() const
CDMDataType
Definition: CDMDataType.h:35