#include <fimex/Data.h>
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< Data > | slice (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< Data > | convertDataType (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 |
virtual MetNoFimex::Data::~Data | ( | ) | [pure virtual] |
virtual size_t MetNoFimex::Data::size | ( | ) | const [pure virtual] |
virtual int MetNoFimex::Data::bytes_for_one | ( | ) | const [pure virtual] |
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] |
virtual boost::shared_array<char> MetNoFimex::Data::asChar | ( | ) | [pure virtual] |
virtual const boost::shared_array<short> MetNoFimex::Data::asConstShort | ( | ) | const [pure virtual] |
virtual boost::shared_array<short> MetNoFimex::Data::asShort | ( | ) | [pure virtual] |
virtual const boost::shared_array<int> MetNoFimex::Data::asConstInt | ( | ) | const [pure virtual] |
virtual boost::shared_array<int> MetNoFimex::Data::asInt | ( | ) | [pure virtual] |
virtual const boost::shared_array<float> MetNoFimex::Data::asConstFloat | ( | ) | const [pure virtual] |
virtual boost::shared_array<float> MetNoFimex::Data::asFloat | ( | ) | [pure virtual] |
virtual const boost::shared_array<double> MetNoFimex::Data::asConstDouble | ( | ) | const [pure virtual] |
virtual boost::shared_array<double> MetNoFimex::Data::asDouble | ( | ) | [pure virtual] |
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] |
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
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
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)
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 |
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 >.