|
WXP C++ Library Version 6.74.9
|
This class specifies variable information. More...
#include "../include/Variable.h"
Public Types | |
| enum | Type { REG , ACCUM , MEAN , MAX , MIN , 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 , PERC } |
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 | ) |
| Variable::Variable | ( | const char * | ab, |
| const char * | unit | ||
| ) |
| int Variable::decode | ( | const char * | str | ) |
Decodes abbreviation code to set parameters
| str | Abbreviation code |
References WXP::StrLib::equal(), init(), WXP::Wxp::outDebug(), and WXP::StrLib::valid().
|
inline |
Gets the variable abbreviation
Referenced by WXP::VarName::get().
|
inline |
Gets the variable index
Referenced by WXP::GribFile::readPDB(), and WXP::GribFile::readPDS().
|
inline |
Gets the variable long name
|
inline |
Gets the variable type
Referenced by WXP::GribFile::readPDB(), and WXP::GribFile::readPDS().
|
inline |
Gets the variable units
|
inline |
Gets the first value
Referenced by WXP::GribFile::readPDB(), and WXP::GribFile::readPDS().
|
inline |
Gets the second value
Referenced by WXP::GribFile::readPDB(), and WXP::GribFile::readPDS().
| int Variable::init | ( | ) |
Initializes the class values
References WXP::Const::MISS.
Referenced by decode(), WXP::VarName::get(), WXP::VarSpec::init(), and Variable().
| int Variable::print | ( | ) |
Prints class data
References toIndCode().
Referenced by WXP::VarSpec::printDetails(), and WXP::Grid::setVar().
| int Variable::set | ( | const char * | ab | ) |
Sets abbreviation
| ab | Abbreviation of variable |
References WXP::StrLib::copy().
Referenced by WXP::Grid::setVar(), Variable(), and Variable().
| 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::setAbbr | ( | const char * | str | ) |
Sets the variable name abbreviation
| str | Variable abbreviation |
References WXP::StrLib::copy().
Referenced by WXP::VarName::get(), WXP::VarName::get(), 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::VarName::get(), WXP::VarName::get(), WXP::VarName::get(), 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::VarName::get(), WXP::VarName::get(), WXP::VarName::get(), 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::VectPlot::drawLabels(), WXP::GribFile::readPDB(), and WXP::GribFile::readPDS().
|
inline |
Sets the first value
Referenced by WXP::GribFile::readPDB(), and WXP::GribFile::readPDS().
|
inline |
Sets the second value
Referenced by WXP::GribFile::readPDB(), and WXP::GribFile::readPDS().
| int Variable::toAbbrCode | ( | String & | str | ) |
Creates abbreviation code. Can be passed to decode to set object
| str | Abbreviation code |
References WXP::String::append(), WXP::String::clear(), and WXP::String::get().
| int Variable::toIndCode | ( | ) |
Creates index code
Referenced by print(), WXP::VarSpec::print(), and WXP::WmoIngest::process().
| 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(), and WXP::StrLib::valid().
Referenced by WXP::VectPlot::drawLabels(), 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().