MetNoFimex::CDMVariable Class Reference

#include <CDMVariable.h>

List of all members.

Public Member Functions

 CDMVariable (std::string name, CDMDataType datatype, std::vector< std::string > shape)
virtual ~CDMVariable ()
const std::stringgetName () const
CDMDataType getDataType () const
const std::vector< std::string > & getShape () const
void setAsSpatialVector (const std::string &counterpart, const std::string &direction)
bool isSpatialVector () const
const std::stringgetSpatialVectorCounterpart () const
 get the spatial counterpart of this vector
const std::stringgetSpatialVectorDirection () const
 get the possible directions of this spatial vector (comma-separated string)
bool checkDimension (const std::string &dimension) const
void toXMLStream (std::ostream &out) const
 print a xml representation to the stream without attributes
void toXMLStream (std::ostream &out, const std::map< std::string, CDMAttribute > &attrs) const
 print a xml representation to the stream with attributes
void setData (boost::shared_ptr< Data > data)
 add data to the variable
const boost::shared_ptr< DatagetData () const
 retrieve data from this variable
int hasData () const
 check if real data has been set with setData()} (null-pointer reference returns false)


Constructor & Destructor Documentation

MetNoFimex::CDMVariable::CDMVariable std::string  name,
CDMDataType  datatype,
std::vector< std::string shape
[explicit]
 

MetNoFimex::CDMVariable::~CDMVariable  )  [virtual]
 


Member Function Documentation

bool MetNoFimex::CDMVariable::checkDimension const std::string dimension  )  const
 

check the dimension of a variable

Parameters:
dimension the dimension to check for

const boost::shared_ptr<Data> MetNoFimex::CDMVariable::getData  )  const [inline]
 

retrieve data from this variable

retrieve data, but only if it has been set previously by setData() this method will not try to read data from the disk

CDMDataType MetNoFimex::CDMVariable::getDataType  )  const [inline]
 

const std::string& MetNoFimex::CDMVariable::getName  )  const [inline]
 

const std::vector<std::string>& MetNoFimex::CDMVariable::getShape  )  const [inline]
 

const std::string& MetNoFimex::CDMVariable::getSpatialVectorCounterpart  )  const [inline]
 

get the spatial counterpart of this vector

const std::string& MetNoFimex::CDMVariable::getSpatialVectorDirection  )  const [inline]
 

get the possible directions of this spatial vector (comma-separated string)

int MetNoFimex::CDMVariable::hasData  )  const [inline]
 

check if real data has been set with setData()} (null-pointer reference returns false)

bool MetNoFimex::CDMVariable::isSpatialVector  )  const [inline]
 

test if this variable has been declared to be a spatial vector

void MetNoFimex::CDMVariable::setAsSpatialVector const std::string counterpart,
const std::string direction
 

Declare this variable to be part of a spatial vector, e.g. (x-wind, y-wind)

Parameters:
counterpart name of the other variable being part of this vector
direction comma-separated list of possible directions for this vector, e.g. "x,longitude"

void MetNoFimex::CDMVariable::setData boost::shared_ptr< Data data  )  [inline]
 

add data to the variable

void MetNoFimex::CDMVariable::toXMLStream std::ostream out,
const std::map< std::string, CDMAttribute > &  attrs
const
 

print a xml representation to the stream with attributes

void MetNoFimex::CDMVariable::toXMLStream std::ostream out  )  const
 

print a xml representation to the stream without attributes


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