# MI - Fimex: MetNoFimex::DataTypeChanger Class Reference

# MetNoFimex::DataTypeChanger Class Reference

`#include <DataTypeChanger.h>`

List of all members.

## Public Member Functions

| DataTypeChanger (CDMDataType oldType)
| DataTypeChanger (CDMDataType oldType, double oldFill, double oldScale, double oldOffset, CDMDataType newType, double newFill, double newScale, double newOffset, double unitScale=1., double unitOffset=0.)
virtual | ~DataTypeChanger ()
boost::shared_ptr< Data > | convertData (boost::shared_ptr< Data >) const throw (CDMException)
CDMDataType | getDataType () const

## Detailed Description

brief wrapper class around data->convertType

## Constructor & Destructor Documentation

MetNoFimex::DataTypeChanger::DataTypeChanger | ( | CDMDataType | oldType | ) | `[explicit]`

initialize data with the oldType convertData will do nothing in this case

MetNoFimex::DataTypeChanger::DataTypeChanger | ( | CDMDataType | oldType,
|  | double | oldFill,
|  | double | oldScale,
|  | double | oldOffset,
|  | CDMDataType | newType,
|  | double | newFill,
|  | double | newScale,
|  | double | newOffset,
|  | double | unitScale = `1.`,
|  | double | unitOffset = `0.` |
| ) |  |  | `[explicit]`

initialize with the old and new settings

Parameters:

  | oldType | datatype of original data
  | oldFill | fill value of the original data
  | oldScale | scale_factor of the original data
  | oldOffset | scale_factor of the original data
  | newType | datatype of converted data
  | newFill | fill value of converted data
  | newScale | scale_factor of the converted data
  | newOffset | add_offset of the converted data
  | unitScale | scale_factor for the unpacked data, i.e. for unit changes, default 1.
  | unitOffset | offset for the unpacked data, i.e. for unit changes, default 0.

virtual MetNoFimex::DataTypeChanger::~DataTypeChanger | ( |  | ) | `[virtual]`

## Member Function Documentation

boost::shared_ptr<Data> MetNoFimex::DataTypeChanger::convertData | ( | boost::shared_ptr< Data > |  | ) | const throw (CDMException)

convert the data to the new scale/fill/offset

CDMDataType MetNoFimex::DataTypeChanger::getDataType | ( |  | ) | const

return the datatype of the converted data

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

- include/fimex/DataTypeChanger.h