|
WXP C++ Library Version 6.74.9
|
This class processes variable information from variable.lup file. More...
#include "../include/VarName.h"
Public Member Functions | |
| VarName () | |
| int | init () |
| int | get (int rind, String &str) |
| int | get (int rind, Variable &var) |
| int | get (const char *str, Variable &var) |
| int | get (Variable &var) |
| int | get (const char *str, VarNameItem &var) |
| int | get (int rind, VarNameItem &var) |
| const char * | get (int rind) |
| const char * | getAbbr (int rind) |
| int | get (const char *str) |
| int | searchFile (int rind, const char *str) |
Static Public Member Functions | |
| static VarNameItem | searchFile (const char *var) |
| static int | makeLabel (const char *var, const char *units, String &fullname) |
Static Public Attributes | |
| static const int | max_vname = 40 |
This class processes variable information from variable.lup file.
| VarName::VarName | ( | ) |
Constructor. Initializes class values
References init().
| int VarName::get | ( | const char * | str | ) |
Gets the variable index
| str | Variable abbreviation |
References WXP::StrLib::iequal(), WXP::Const::MISS, and searchFile().
| int VarName::get | ( | const char * | str, |
| Variable & | var | ||
| ) |
Gets the variable information from abbreviation
| str | Variable abbreviation |
| var | Variable information |
References WXP::StrLib::equal(), WXP::Const::MISS, searchFile(), WXP::Variable::setAbbr(), WXP::Variable::setInd(), and WXP::Variable::setName().
| int VarName::get | ( | const char * | str, |
| VarNameItem & | var | ||
| ) |
Gets the variable information from abbreviation
| str | Variable abbreviation |
| var | Variable information |
References WXP::StrLib::copy(), WXP::StrLib::equal(), WXP::StrLib::index(), WXP::VarNameItem::init(), WXP::Const::MISS, and searchFile().
| const char * VarName::get | ( | int | rind | ) |
Gets the variable abbreviation from index
| rind | Index |
References searchFile().
| int VarName::get | ( | int | rind, |
| String & | str | ||
| ) |
Gets the variable abbreviation from index
| rind | Index |
| str | Output abbreviation |
References get(), WXP::String::length(), and WXP::String::set().
Referenced by WXP::GridPlot::draw(), WXP::VectPlot::drawLabels(), and get().
| int VarName::get | ( | int | rind, |
| Variable & | var | ||
| ) |
Gets the variable information from index
| rind | Index |
| var | Output variable information |
References WXP::Variable::init(), searchFile(), WXP::Variable::setAbbr(), WXP::Variable::setInd(), and WXP::Variable::setName().
| int VarName::get | ( | int | rind, |
| VarNameItem & | var | ||
| ) |
Gets the variable information from index
| rind | Index |
| var | Output variable information |
References WXP::VarNameItem::init(), and searchFile().
| int VarName::get | ( | Variable & | var | ) |
Gets the variable index and name given abbreviation
| var | Variable information, uses abbreviation in var and sets rest |
References WXP::Variable::getAbbr(), WXP::Const::MISS, searchFile(), WXP::Variable::setInd(), and WXP::Variable::setName().
| const char * VarName::getAbbr | ( | int | rind | ) |
Returns the variable abbreviation
| rind | Index |
References searchFile().
| int VarName::init | ( | ) |
Initializes class values
Referenced by VarName().
|
static |
Makes a simple label
| var | Variable abbrievation |
| units | Units string |
| fullname | Output full name with units |
References WXP::String::append(), searchFile(), and WXP::String::set().
Referenced by WXP::ProfPlot::draw(), WXP::UpaXSectCont::draw(), and WXP::UpaXSectPlot::draw().
|
static |
Searches the variable.lup file for variable information
| var | Variable abbreviation |
References WXP::FileTool::addPath(), WXP::File::close(), WXP::StrLib::equal(), WXP::String::get(), WXP::Wxp::getDatabasePath(), WXP::File::getLine(), WXP::VarNameItem::init(), WXP::File::isOpen(), WXP::Wxp::outWarning(), and WXP::StrLib::trimWS().
| int VarName::searchFile | ( | int | rind, |
| const char * | str | ||
| ) |
Searchs the variable.lup file for variable information. Uses abbreviation and then index
| rind | Index |
| str | Abbreviation |
References WXP::FileTool::addPath(), WXP::StrLib::equal(), WXP::String::get(), WXP::Wxp::getDatabasePath(), WXP::File::getLine(), WXP::VarNameItem::init(), WXP::File::isOpen(), WXP::Const::MISS, WXP::Wxp::outWarning(), WXP::StrLib::trimWS(), and WXP::StrLib::valid().
Referenced by get(), get(), get(), get(), get(), get(), get(), getAbbr(), and makeLabel().