This class specifies variable information. More...
#include "../include/Variable.h"
Public Types | |
| enum | Type { REG, PROB_LT, PROB_GT, PROB_LTH, PROB_GTL, PROB_BET, ENS_MEMBER, ENS_MEAN, ENS_STDEV, ENS_PROB_LT, ENS_PROB_GT, ENS_PROB_BET } |
Public Member Functions | |
| Variable () | |
| Variable (const char *ab) | |
| Variable (const char *ab, const char *unit) | |
| int | init () |
| int | set (const char *ab) |
| int | set (const char *ab, const char *unit) |
| int | setType (int t) |
| int | getType () |
| int | setInd (int t) |
| int | getInd () |
| int | setVal1 (float val) |
| float | getVal1 () |
| int | setVal2 (float val) |
| float | getVal2 () |
| int | setName (const char *str) |
| const char * | getName () |
| int | setAbbr (const char *str) |
| const char * | getAbbr () |
| int | setUnits (const char *str) |
| const char * | getUnits () |
| int | toLabel (String &str) |
| int | toIndCode () |
| int | toAbbrCode (String &str) |
| int | toString (String &str) |
| int | decode (const char *str) |
| int | print () |
Static Public Attributes | |
| static const int | max_abbr = 40 |
| static const int | max_name = 40 |
| static const int | max_units = 20 |
This class specifies variable information.
| Variable::Variable | ( | ) |
Constructor. Initializes values
References init().
| Variable::Variable | ( | const char * | ab | ) |
Constructor. Sets abbreviation
| ab | Abbreviation of variable |
| Variable::Variable | ( | const char * | ab, | |
| const char * | unit | |||
| ) |
Constructor. Sets abbreviation and units
| ab | Abbreviation of variable | |
| unit | String describing units of variable |
| const char* WXP::Variable::getAbbr | ( | ) | [inline] |
Gets the variable abbreviation
| int WXP::Variable::getInd | ( | ) | [inline] |
Gets the variable index
Referenced by WXP::GribFile::readPDB(), and WXP::GribFile::readPDS().
| const char* WXP::Variable::getName | ( | ) | [inline] |
Gets the variable long name
| int WXP::Variable::getType | ( | ) | [inline] |
Gets the variable type
Referenced by WXP::GribFile::readPDB(), and WXP::GribFile::readPDS().
| const char* WXP::Variable::getUnits | ( | ) | [inline] |
Gets the variable units
| int Variable::init | ( | ) |
Initializes the class values
References WXP::Const::MISS.
Referenced by WXP::VarSpec::init(), and Variable().
| int Variable::print | ( | ) |
Prints class data to standard output
Referenced by WXP::VarSpec::printDetails(), and WXP::Grid::setVar().
| int Variable::set | ( | const char * | ab, | |
| const char * | unit | |||
| ) |
Sets abbreviation and units
| ab | Abbreviation of variable | |
| unit | String describing units of variable |
References WXP::StrLib::copy().
| int Variable::set | ( | const char * | ab | ) |
Sets abbreviation
| ab | Abbreviation of variable |
References WXP::StrLib::copy().
Referenced by WXP::Grid::setVar().
| int Variable::setAbbr | ( | const char * | str | ) |
Sets the variable name abbreviation
| str | Variable abbreviation |
References WXP::StrLib::copy().
Referenced by WXP::GribFile::readPDB(), and WXP::GribFile::readPDS().
| int Variable::setInd | ( | int | rind | ) |
Sets the index of variable
| rind | The index of variable |
Referenced by WXP::GribFile::readPDB(), and WXP::GribFile::readPDS().
| int Variable::setName | ( | const char * | str | ) |
Sets the long name of variable
| str | String describing variable |
References WXP::StrLib::copy().
Referenced by WXP::GribFile::readPDB(), and WXP::GribFile::readPDS().
| int Variable::setType | ( | int | rtype | ) |
Sets the type of variable
| rtype | The type of variable |
Referenced by WXP::GribFile::readPDB(), and WXP::GribFile::readPDS().
| int Variable::setUnits | ( | const char * | str | ) |
Sets a string describing the units of the variable.
| str | Variable units |
References WXP::StrLib::copy().
Referenced by WXP::GribFile::readPDB(), and WXP::GribFile::readPDS().
| int Variable::toLabel | ( | String & | str | ) |
Converts class data to a string
| str | Output String class |
References WXP::String::append(), WXP::String::clear(), WXP::String::get(), toString(), and WXP::StrLib::valid().
Referenced by WXP::GribFile::makeInfo(), and WXP::VarSpec::toInfoLabel().
| int Variable::toString | ( | String & | str | ) |
Converts class data to a string
| str | Output String class |
References WXP::String::append(), WXP::String::clear(), and WXP::String::get().
Referenced by WXP::VarSpec::print(), and toLabel().
1.6.1