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 boost::shared_ptr< DatagetDataSlice (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  ) 

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


Member Function Documentation

virtual 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 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::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

virtual 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

virtual 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

virtual 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


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

Generated on Fri May 7 15:50:12 2010 for MI - Fimex by  doxygen 1.5.5