VAPOR3 3.9.4
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 type)
 
string GetName () const
 Return the variable's name.
 
std::vector< string > GetAttNames () const
 
std::vector< string > GetDimNames () const
 
void SetDimNames (const std::vector< string > dimnames)
 
int GetAttType (string name) const
 
int GetXType () const
 
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

◆ Variable() [1/2]

VAPoR::NetCDFSimple::Variable::Variable ( )

◆ Variable() [2/2]

VAPoR::NetCDFSimple::Variable::Variable ( string  varname,
std::vector< string >  dimnames,
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]typeThe netCDF external data type for the variable

Member Function Documentation

◆ GetAtt() [1/3]

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

◆ GetAtt() [2/3]

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

◆ GetAtt() [3/3]

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

◆ GetAttNames()

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

◆ GetAttType()

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.

◆ GetDimNames()

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 70 of file NetCDFSimple.h.

◆ GetName()

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

Return the variable's name.

Definition at line 57 of file NetCDFSimple.h.

◆ GetXType()

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

Return the netCDF external data type for the variable

Definition at line 85 of file NetCDFSimple.h.

◆ SetAtt() [1/3]

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 110 of file NetCDFSimple.h.

◆ SetAtt() [2/3]

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

Definition at line 111 of file NetCDFSimple.h.

◆ SetAtt() [3/3]

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

Definition at line 112 of file NetCDFSimple.h.

◆ SetDimNames()

void VAPoR::NetCDFSimple::Variable::SetDimNames ( const std::vector< string >  dimnames)
inline

Definition at line 71 of file NetCDFSimple.h.

Friends And Related Function Documentation

◆ operator<<

VDF_API friend std::ostream & operator<< ( std::ostream &  o,
const Variable var 
)
friend

◆ operator==

VDF_API friend bool operator== ( const Variable v1,
const Variable v2 
)
friend

Definition at line 115 of file NetCDFSimple.h.


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