MetNoFimex::Data Class Reference

#include <fimex/Data.h>

Inheritance diagram for MetNoFimex::Data:

MetNoFimex::DataImpl< C >

List of all members.

Public Member Functions

virtual ~Data ()=0
virtual size_t size () const =0
 size of the data
virtual int bytes_for_one () const =0
 sizeof the data-impl datatype
virtual void * getDataPtr ()=0
virtual void toStream (std::ostream &, std::string separator="") const =0
 printing of the current data to ostream, with optional separator
virtual const
boost::shared_array< char > 
asConstChar () const =0
 retrieve data as char
virtual boost::shared_array< char > asChar ()=0
 retrieve data as char
virtual const
boost::shared_array< short > 
asConstShort () const =0
 retrieve data as short
virtual boost::shared_array
< short > 
asShort ()=0
 retrieve data as short
virtual const
boost::shared_array< int > 
asConstInt () const =0
 retrieve data as int
virtual boost::shared_array< int > asInt ()=0
 retrieve data as int
virtual const
boost::shared_array< float > 
asConstFloat () const =0
 retrieve data as float
virtual boost::shared_array
< float > 
asFloat ()=0
 retrieve data as float (eventually copy)
virtual const
boost::shared_array< double > 
asConstDouble () const =0
 retrieve data as double
virtual boost::shared_array
< double > 
asDouble ()=0
 retrieve data as double
virtual std::string asString (std::string separator="") const =0
 retrieve the whole array as a string (with possible separator)
virtual void setValue (long pos, double val)=0
 set a value at the desired position
virtual void setValues (size_t startPos, const Data &data, size_t first=0, size_t end=-1)=0 throw (CDMException)
virtual void setAllValues (double val)=0
virtual boost::shared_ptr< Dataslice (std::vector< size_t > orgDimSize, std::vector< size_t > startDims, std::vector< size_t > outputDimSize)=0 throw (CDMException)
 get a multi-dimensional slice of the data
virtual boost::shared_ptr< DataconvertDataType (double oldFill, double oldScale, double oldOffset, CDMDataType newType, double newFill, double newScale, double newOffset)=0 throw (CDMException)
 convert the datatype from one type,fill,scale,offset to another
virtual CDMDataType getDataType () const =0


Detailed Description

General class for storing different basic array pointers plus length

Constructor & Destructor Documentation

virtual MetNoFimex::Data::~Data (  )  [pure virtual]


Member Function Documentation

virtual size_t MetNoFimex::Data::size (  )  const [pure virtual]

size of the data

Implemented in MetNoFimex::DataImpl< C >.

virtual int MetNoFimex::Data::bytes_for_one (  )  const [pure virtual]

sizeof the data-impl datatype

Implemented in MetNoFimex::DataImpl< C >.

virtual void* MetNoFimex::Data::getDataPtr (  )  [pure virtual]

Implemented in MetNoFimex::DataImpl< C >.

virtual void MetNoFimex::Data::toStream ( std::ostream ,
std::string  separator = "" 
) const [pure virtual]

printing of the current data to ostream, with optional separator

Implemented in MetNoFimex::DataImpl< C >.

virtual const boost::shared_array<char> MetNoFimex::Data::asConstChar (  )  const [pure virtual]

retrieve data as char

Implemented in MetNoFimex::DataImpl< C >.

virtual boost::shared_array<char> MetNoFimex::Data::asChar (  )  [pure virtual]

retrieve data as char

Implemented in MetNoFimex::DataImpl< C >.

virtual const boost::shared_array<short> MetNoFimex::Data::asConstShort (  )  const [pure virtual]

retrieve data as short

Implemented in MetNoFimex::DataImpl< C >.

virtual boost::shared_array<short> MetNoFimex::Data::asShort (  )  [pure virtual]

retrieve data as short

Implemented in MetNoFimex::DataImpl< C >.

virtual const boost::shared_array<int> MetNoFimex::Data::asConstInt (  )  const [pure virtual]

retrieve data as int

Implemented in MetNoFimex::DataImpl< C >.

virtual boost::shared_array<int> MetNoFimex::Data::asInt (  )  [pure virtual]

retrieve data as int

Implemented in MetNoFimex::DataImpl< C >.

virtual const boost::shared_array<float> MetNoFimex::Data::asConstFloat (  )  const [pure virtual]

retrieve data as float

Implemented in MetNoFimex::DataImpl< C >.

virtual boost::shared_array<float> MetNoFimex::Data::asFloat (  )  [pure virtual]

retrieve data as float (eventually copy)

Implemented in MetNoFimex::DataImpl< C >.

virtual const boost::shared_array<double> MetNoFimex::Data::asConstDouble (  )  const [pure virtual]

retrieve data as double

Implemented in MetNoFimex::DataImpl< C >.

virtual boost::shared_array<double> MetNoFimex::Data::asDouble (  )  [pure virtual]

retrieve data as double

Implemented in MetNoFimex::DataImpl< C >.

virtual std::string MetNoFimex::Data::asString ( std::string  separator = ""  )  const [pure virtual]

retrieve the whole array as a string (with possible separator)

Implemented in MetNoFimex::DataImpl< C >.

virtual void MetNoFimex::Data::setValue ( long  pos,
double  val 
) [pure virtual]

set a value at the desired position

Implemented in MetNoFimex::DataImpl< C >.

virtual void MetNoFimex::Data::setValues ( size_t  startPos,
const Data data,
size_t  first = 0,
size_t  end = -1 
) throw (CDMException) [pure virtual]

set the values from another Data implementation

Parameters:
startPos the first position the data should be written to
data the other data-source
first the first data-entry
end the last (excluded) data-entry, defaults to MAX size_t, automatically shrunken to fit size

Implemented in MetNoFimex::DataImpl< C >, MetNoFimex::DataImpl< C >, MetNoFimex::DataImpl< C >, MetNoFimex::DataImpl< C >, MetNoFimex::DataImpl< C >, and MetNoFimex::DataImpl< C >.

virtual void MetNoFimex::Data::setAllValues ( double  val  )  [pure virtual]

set all values to the submitted value

Parameters:
val value to set

Implemented in MetNoFimex::DataImpl< C >.

virtual boost::shared_ptr<Data> MetNoFimex::Data::slice ( std::vector< size_t >  orgDimSize,
std::vector< size_t >  startDims,
std::vector< size_t >  outputDimSize 
) throw (CDMException) [pure virtual]

get a multi-dimensional slice of the data

This slices a multidimensional chunk out of the data. All parameters must be vectors of the same size (dimension of array). The first dimension is the fastest moving index (fortran arrays)

Parameters:
orgDimSize the dimensions of this vector. The product of all orgDimSizes must equal to data.size.
startDims The start-position in the original data to fetch data from
outputDimSize the size of the output data
Returns:
a Data of the size of outputDimSize with the same datatype as the original type
Exceptions:
CDMException on dimension mismatch: (start+size > orgDimSize) or (Product(orgDimSize) != size)

Implemented in MetNoFimex::DataImpl< C >.

virtual boost::shared_ptr<Data> MetNoFimex::Data::convertDataType ( double  oldFill,
double  oldScale,
double  oldOffset,
CDMDataType  newType,
double  newFill,
double  newScale,
double  newOffset 
) throw (CDMException) [pure virtual]

convert the datatype from one type,fill,scale,offset to another

Implemented in MetNoFimex::DataImpl< C >.

virtual CDMDataType MetNoFimex::Data::getDataType (  )  const [pure virtual]

return the CDMDataType of this data

Implemented in MetNoFimex::DataImpl< C >.


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

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