VAPoR  0.1
Public Member Functions | Friends | List of all members
VAPoR::NetCDFSimple::Variable Class Reference

NetCDFSimple API interface. More...

#include <NetCDFSimple.h>

Public Member Functions

 Variable ()
 
 Variable (string varname, std::vector< string > dimnames, int varid, int type)
 
string GetName () const
 Return the variable's name. More...
 
std::vector< string > GetAttNames () const
 
std::vector< string > GetDimNames () const
 
int GetAttType (string name) const
 
int GetXType () const
 
int GetVarID () const
 Return the netCDF variable ID for this variable. More...
 
void GetAtt (string name, std::vector< double > &values) const
 
void GetAtt (string name, std::vector< long > &values) const
 
void GetAtt (string name, string &values) const
 
void SetAtt (string name, const std::vector< double > &values)
 
void SetAtt (string name, const std::vector< long > &values)
 
void SetAtt (string name, const string &values)
 

Friends

VDF_API friend std::ostream & operator<< (std::ostream &o, const Variable &var)
 
VDF_API friend bool operator== (const Variable &v1, const Variable &v2)
 

Detailed Description

NetCDFSimple API interface.

A NetCDFSimple data variable

Definition at line 43 of file NetCDFSimple.h.

Constructor & Destructor Documentation

VAPoR::NetCDFSimple::Variable::Variable ( )
VAPoR::NetCDFSimple::Variable::Variable ( string  varname,
std::vector< string >  dimnames,
int  varid,
int  type 
)

Constructor for NetCDFSimple::Variable class

Parameters
[in]varnameName of the netCDF variable
[in]dimnamesA vector dimension names, ordered from slowest-varying to fastest.
[in]varidThe netCDF variable ID
[in]typeThe netCDF external data type for the variable

Member Function Documentation

void VAPoR::NetCDFSimple::Variable::GetAtt ( string  name,
std::vector< double > &  values 
) const

Return attribute values for attribute of type float

Return the values of the named attribute converted to type float.

Note
Attributes of type int are cast to float
All attributes with floating point representation of any precision are returned by this method. Attributes that do not have floating point internal representations can not be returned
Parameters
[in]nameName of the attribute
[out]valuesA vector of attribute values
void VAPoR::NetCDFSimple::Variable::GetAtt ( string  name,
std::vector< long > &  values 
) const
void VAPoR::NetCDFSimple::Variable::GetAtt ( string  name,
string &  values 
) const
std::vector<string> VAPoR::NetCDFSimple::Variable::GetAttNames ( ) const

Return variable's attribute names

This method returns a vector containing the names of all of the attributes associated with this variable

int VAPoR::NetCDFSimple::Variable::GetAttType ( string  name) const

Return the netCDF external data type for an attribute

Returns the nc_type of the named variable attribute.

Parameters
[in]nameName of the attribute
Return values
Ifan attribute named by name does not exist, a negative value is returned.
std::vector<string> VAPoR::NetCDFSimple::Variable::GetDimNames ( ) const
inline

Return variable's dimension names

Returns an ordered list of the variable's netCDF dimension names.

Definition at line 74 of file NetCDFSimple.h.

string VAPoR::NetCDFSimple::Variable::GetName ( ) const
inline

Return the variable's name.

Definition at line 61 of file NetCDFSimple.h.

int VAPoR::NetCDFSimple::Variable::GetVarID ( ) const
inline

Return the netCDF variable ID for this variable.

Definition at line 92 of file NetCDFSimple.h.

int VAPoR::NetCDFSimple::Variable::GetXType ( ) const
inline

Return the netCDF external data type for the variable

Definition at line 88 of file NetCDFSimple.h.

void VAPoR::NetCDFSimple::Variable::SetAtt ( string  name,
const std::vector< double > &  values 
)
inline

Set an attribute

Set the floating point attribute, name, to the values given by values

Definition at line 117 of file NetCDFSimple.h.

void VAPoR::NetCDFSimple::Variable::SetAtt ( string  name,
const std::vector< long > &  values 
)
inline

Definition at line 120 of file NetCDFSimple.h.

void VAPoR::NetCDFSimple::Variable::SetAtt ( string  name,
const string &  values 
)
inline

Definition at line 123 of file NetCDFSimple.h.

Friends And Related Function Documentation

VDF_API friend std::ostream& operator<< ( std::ostream &  o,
const Variable var 
)
friend
VDF_API friend bool operator== ( const Variable v1,
const Variable v2 
)
friend

Definition at line 128 of file NetCDFSimple.h.


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