MetNoFimex::CDMExtractor Class Reference

#include <CDMExtractor.h>

Inheritance diagram for MetNoFimex::CDMExtractor:

MetNoFimex::CDMReader List of all members.

Public Member Functions

 CDMExtractor (boost::shared_ptr< CDMReader > dataReader)
virtual ~CDMExtractor ()
virtual const boost::shared_ptr<
Data
getDataSlice (const std::string &varName, size_t unLimDimPos=0) throw (CDMException)
 data-reading function to be called from the CDMWriter
virtual void removeVariable (std::string variable) throw (CDMException)
 Remove a variable from the CDM.
virtual void reduceDimension (std::string dimName, size_t start, size_t length) throw (CDMException)
 Reduce a dimension of the file.
virtual void reduceDimensionStartEnd (std::string dimName, size_t start=0, long end=0) throw (CDMException)
 Reduce a dimension of the file.
virtual void changeDataType (std::string variable, CDMDataType datatype) throw (CDMException)
 change the datatype of the variable

Constructor & Destructor Documentation

MetNoFimex::CDMExtractor::CDMExtractor boost::shared_ptr< CDMReader dataReader  ) 
 

MetNoFimex::CDMExtractor::~CDMExtractor  )  [virtual]
 


Member Function Documentation

void MetNoFimex::CDMExtractor::changeDataType std::string  variable,
CDMDataType  datatype
throw (CDMException) [virtual]
 

change the datatype of the variable

a change of the variable will also change the datatype of the _FillValue attribute

Parameters:
variable name of the variable
datatype new datatype
Exceptions:
CDMException if variable doesn't exist or conversion to datatype is not supported

const boost::shared_ptr< Data > MetNoFimex::CDMExtractor::getDataSlice const std::string varName,
size_t  unLimDimPos = 0
throw (CDMException) [virtual]
 

data-reading function to be called from the CDMWriter

This function 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.

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.

void MetNoFimex::CDMExtractor::reduceDimension std::string  dimName,
size_t  start,
size_t  length
throw (CDMException) [virtual]
 

Reduce a dimension of the file.

Parameters:
name dimension to change
start start-position corresponding to the original dimension
size size of the new dimension
Exceptions:
CDMException if dimension doesn't exist or start+size outside range of the original dimension

void MetNoFimex::CDMExtractor::reduceDimensionStartEnd std::string  dimName,
size_t  start = 0,
long  end = 0
throw (CDMException) [virtual]
 

Reduce a dimension of the file.

Parameters:
name dimension to change
start start-position corresponding to the original dimension, defaults to 0
end end-position of dimension, 0 means full size, negative values start from end
Exceptions:
CDMException if dimension doesn't exist or start+size outside range of the original dimension

void MetNoFimex::CDMExtractor::removeVariable std::string  variable  )  throw (CDMException) [virtual]
 

Remove a variable from the CDM.

Parameters:
name of the variable
Exceptions:
CDMException if variable doesn't exist


The documentation for this class was generated from the following files:
Generated on Thu Jun 5 14:58:24 2008 for MI - Fimex by  doxygen 1.4.6