# MI - Fimex: MetNoFimex::C_CDMReader Class Reference

# MetNoFimex::C_CDMReader Class Reference

`#include <C_CDMReader.h>`

Inheritance diagram for MetNoFimex::C_CDMReader:

List of all members.

## Public Member Functions

| C_CDMReader (boost::shared_ptr< CDMReader > dataReader)
virtual | ~C_CDMReader ()
virtual boost::shared_ptr< Data > | getDataSlice (const std::string &varName, size_t unLimDimPos) throw (CDMException)
| data-reading function to be called from the CDMWriter
virtual void | setDoubleCallbackFunction (const std::string &varName, doubleDatasliceCallbackPtr callback)

## Detailed Description

This class should be used by people who want write an implementation of a CDMReader in C. They should set a callback-function to retrieve a variable with the getDataSlice functions.

## Constructor & Destructor Documentation

MetNoFimex::C_CDMReader::C_CDMReader | ( | boost::shared_ptr< CDMReader > | dataReader | ) |

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

## Member Function Documentation

virtual boost::shared_ptr<Data> MetNoFimex::C_CDMReader::getDataSlice | ( | const std::string & | varName,
|  | size_t | unLimDimPos |
| ) |  |  | throw (CDMException)`[virtual]`

data-reading function to be called from the CDMWriter

This methods needs to be implemented by the CDMReader. It should provide the data for each variable, either by reading from disk, converting from another CDMReader or reading from an in-memory data-section.

This function should retrieve the whole data for a dataset without unlimited dimension if the unLimDimPos == 0.

Parameters:

  | varName | name of the variable to read
  | unLimDimPos | (optional) if the variable contains a unlimited dimension (max one allowed) an slice of this position is returned

Implements MetNoFimex::CDMReader.

virtual void MetNoFimex::C_CDMReader::setDoubleCallbackFunction | ( | const std::string & | varName,
|  | doubleDatasliceCallbackPtr | callback |
| ) |  |  | `[virtual]`

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

- include/fimex/C_CDMReader.h