This class defines basic information and methods used by WXP. More...
#include "../include/Wxp.h"
Public Types | |
| enum | MessLevel { NONE, PRINT, ERROR, WARN, MESS, OUT1, OUT2, OUT3, OUT4, OUT5, OUT6, OUT7, OUT8, DEBUG1, DEBUG2, DEBUG3, DEBUG4, DEBUG5, DEBUG6, DEBUG7, DEBUG8 } |
| enum | Error { NOERR, MISC, NORUN, NOMEMORY, NOGRAPH, NOINIT, NOFILE, NODBASE, ENDFILE, NOWRITE, NOINPUT, NODATA } |
Static Public Member Functions | |
| static int | setVerbose (bool val) |
| static bool | getVerbose () |
| static int | setDebug (int val) |
| static bool | isDebug () |
| static bool | isDebug (int level) |
| static int | getDebug () |
| static int | setError (int val) |
| static bool | getError () |
| static int | setMessage (int val) |
| static int | setMessage (const char *str) |
| static int | setProgramName (const char *str) |
| static const char * | getProgramName () |
| static int | setDatabasePath (const char *str) |
| static const char * | getDatabasePath () |
| static bool | validLicense () |
| static bool | validLicense (const char *type) |
| static int | pause () |
| static int | sleep (float secs) |
| static bool | getMessage (int level) |
| static bool | checkMessage (int level) |
| static int | outMessage (const char *mess,...) |
| static int | print (const char *mess) |
| static int | outMessage (int level, const char *mess,...) |
| static int | outWarning (const char *mess,...) |
| static int | outError (const char *mess,...) |
| static int | outDebug (const char *mess,...) |
| static int | outDebug (int level, const char *mess,...) |
| static double | getTime () |
| static int | getVirtMem () |
| static int | exit (Error val) |
| static const char * | getVersion () |
| static const char * | getLicenseVersion () |
| static const char * | getComputerName () |
| static int | setInitTime (int val) |
| static int | getInitTime () |
| static const char * | getResrc (const char *name) |
| static const char * | getResrc (const char *name, const char *def) |
| static float | getResrc (const char *name, float val) |
| static int | getResrc (const char *name, int val) |
| static int | addResrc (const char *name, const char *data, int type) |
| static int | putResrc (const char *name, const char *data) |
| static int | setResrc (const char *name, const char *data) |
| static int | appendResrc (const char *name, const char *data) |
| static int | printAllResrc () |
| static const char * | nextResrc () |
| static int | rewindResrc () |
| static int | getResrcType (const char *name) |
Friends | |
| class | ResrcDB |
| class | Prog |
This class defines basic information and methods used by WXP.
| enum WXP::Wxp::Error |
| NOERR |
Exit error values No error |
| MISC |
Miscellaneous error |
| NORUN |
Unable to run program |
| NOMEMORY |
Not enough memory |
| NOGRAPH |
Unable to open graphics |
| NOINIT |
Cannot initialize program parameters |
| NOFILE |
Data file not found |
| NODBASE |
Database file not found |
| ENDFILE |
End of file |
| NOWRITE |
Unable to write to output file |
| NOINPUT |
Missing input data |
| NODATA |
No data found |
| int Wxp::exit | ( | Error | val | ) | [static] |
Exit routine
| val | Exit value |
Referenced by WXP::Filename::checkFile(), WXP::ResrcDB::create(), WXP::File::open(), WXP::Cdf::open(), WXP::Prog::readResrcFile(), and WXP::Filename::setFilePrompt().
| const char * Wxp::getComputerName | ( | ) | [static] |
Gets the computer name
| const char * Wxp::getDatabasePath | ( | ) | [static] |
Gets the database path
Referenced by WXP::RedbookPlot::draw(), WXP::MapPlot::draw(), WXP::Region::get(), WXP::ModelName::get(), WXP::CityTool::getFilename(), WXP::Graph::open(), WXP::BufrFile::open(), WXP::ColorFile::read(), WXP::Unit::readFile(), WXP::ModelSpec::set(), WXP::CityHash::set(), WXP::CityPlot::setFilename(), WXP::Graph::setFont(), WXP::Graph::setSymbol(), and WXP::RcmDecode::setup().
| int Wxp::getDebug | ( | ) | [static] |
Gets the debug mode based on debug level The debug leve
| const char * Wxp::getLicenseVersion | ( | ) | [static] |
Gets the version number for licensing
| bool Wxp::getMessage | ( | int | level | ) | [static] |
Checks the message level
| level | The message level |
| const char * Wxp::getProgramName | ( | ) | [static] |
Gets the program name
| double Wxp::getTime | ( | ) | [static] |
Get current time in seconds
| bool Wxp::getVerbose | ( | ) | [static] |
Gets the print mode
| const char * Wxp::getVersion | ( | ) | [static] |
Gets the WXP version number
Referenced by WXP::ResrcDB::printHelp(), and WXP::Message::printProgramInfo().
| bool Wxp::isDebug | ( | int | level | ) | [static] |
Gets the debug mode (any level is true)
| bool Wxp::isDebug | ( | ) | [static] |
Gets the debug mode (any level is true)
Referenced by WXP::UpaRaw::compute(), WXP::SfcRaw::compute(), WXP::MosRaw::compute(), WXP::Unit::convert(), WXP::UpaDecode::decode(), WXP::RcmDecode::decode(), WXP::UpaPlot::draw(), WXP::SfcPlot::draw(), WXP::SatPlot::draw(), WXP::RcmPlot::draw(), WXP::RawPlot::draw(), WXP::MosPlot::draw(), WXP::Lev2Plot::draw(), WXP::GridPlot::draw(), WXP::FrontPlot::draw(), WXP::NameConv::encode(), WXP::Figure::endPlot(), WXP::NidsFile::getRadial(), WXP::SfcWmoFile::read(), WXP::GribFile::read(), WXP::NidsFile::readBytes(), WXP::GiniFile::readData(), WXP::GribFile::readDRS(), WXP::GiniFile::readHeader(), WXP::AreaFile::readHeader(), WXP::BufrFile::readPDB(), WXP::GribFile::readPDS(), WXP::NameConv::setLatest(), WXP::Graph::setViewportAspect(), and WXP::DataMath::uniqueId().
| int Wxp::outDebug | ( | int | level, | |
| const char * | mess, | |||
| ... | ||||
| ) | [static] |
Prints debug message
| level | Debug level | |
| mess | Message format/string | |
| ... | Additional parameters to use in format (see printf) |
| int Wxp::outDebug | ( | const char * | mess, | |
| ... | ||||
| ) | [static] |
Prints debug message
| mess | Message format/string | |
| ... | Additional parameters to use in format (see printf) |
Referenced by WXP::ColorMap::add(), WXP::Figure::callback(), WXP::SfcWmoFile::checkHeader(), WXP::SfcData::compare(), WXP::Parse::compare(), WXP::SynopTool::decode(), WXP::SaoTool::decode(), WXP::RcmFile::decode(), WXP::RcmDecode::decode(), WXP::NameConv::decode(), WXP::MetarTool::decode(), WXP::ClimatTool::decode(), WXP::MosUFile::decodeETA(), WXP::XWindow::deleteFrame(), WXP::XWindow::displayFrame(), WXP::UpaPlot::draw(), WXP::SfcPlot::draw(), WXP::RedbookPlot::draw(), WXP::MosPlot::draw(), WXP::MapPlot::draw(), WXP::GridPlot::draw(), WXP::NameConv::encode(), WXP::RcmDecode::filterOverlap(), WXP::RadMask::getGrids(), WXP::GribFile::getHeader(), WXP::Parse::getLine(), WXP::XWindow::message(), WXP::GribFile::next(), WXP::XWindow::processEvent(), WXP::UpaWmoFile::read(), WXP::TiffFile::read(), WXP::MosUFile::read(), WXP::KavradFile::read(), WXP::GribFile::read(), WXP::GifFile::read(), WXP::GribFile::readBDB(), WXP::GribFile::readBits(), WXP::GribFile::readBMB(), WXP::GribFile::readBMS(), WXP::NidsFile::readBytes(), WXP::GribFile::readData(), WXP::BufrFile::readData(), WXP::GribFile::readDRS(), WXP::GribFile::readDS(), WXP::GribFile::readGDB(), WXP::GribFile::readGDS(), WXP::GribFile::readHeader(), WXP::GiniFile::readHeader(), WXP::BufrFile::readHeader(), WXP::AreaFile::readHeader(), WXP::GribFile::readIDS(), WXP::GribFile::readPDB(), WXP::BufrFile::readPDB(), WXP::GribFile::readPDS(), WXP::GribFile::readSection(), WXP::Scanp::scan(), WXP::GribFile::searchGRIB(), WXP::GribFile::seekData(), WXP::NameConv::set(), WXP::NameConv::setFile(), WXP::Graph::setFontSpec(), WXP::NameConv::setLatest(), WXP::Filename::setNumFiles(), WXP::SfcData::update(), WXP::PngFile::write(), and WXP::GifFile::write().
| int Wxp::outError | ( | const char * | mess, | |
| ... | ||||
| ) | [static] |
Prints error message
| mess | Message format/string | |
| ... | Additional parameters to use in format (see printf) |
| int Wxp::outMessage | ( | int | level, | |
| const char * | mess, | |||
| ... | ||||
| ) | [static] |
| int Wxp::outMessage | ( | const char * | mess, | |
| ... | ||||
| ) | [static] |
Prints string using message level print
| mess | Message format/string | |
| ... | Additional parameters to use in format (see printf) |
Referenced by WXP::AreaFile::calcDomain(), WXP::UpaRaw::compute(), WXP::SfcRaw::compute(), WXP::ObjectAnal::compute(), WXP::MosRaw::compute(), WXP::UpaDecode::decode(), WXP::RcmDecode::decode(), WXP::WatchPlot::draw(), WXP::UpaXSectPlot::draw(), WXP::UpaXSectCont::draw(), WXP::ThermPlot::draw(), WXP::SfcPlot::draw(), WXP::SatPlot::draw(), WXP::RedbookPlot::draw(), WXP::RcmPlot::draw(), WXP::RawPlot::draw(), WXP::NidsPlot::draw(), WXP::MosPlot::draw(), WXP::LightPlot::draw(), WXP::Lev2Plot::draw(), WXP::HodoPlot::draw(), WXP::GridPlot::draw(), WXP::GridCont::draw(), WXP::FrontPlot::draw(), WXP::NidsPlot::drawData(), WXP::RedbookPlot::getDomain(), WXP::Filename::listFile(), WXP::XWindow::loopRate(), WXP::Parse::open(), WXP::ResrcDB::printHelp(), WXP::BufrFile::readPDB(), WXP::CityTool::search(), WXP::CityHash::set(), WXP::MeteoPlot::setFilename(), WXP::HodoPlot::setFilename(), and WXP::NidsImage::setImage().
| int Wxp::outWarning | ( | const char * | mess, | |
| ... | ||||
| ) | [static] |
Prints warning message
| mess | Message format/string | |
| ... | Additional parameters to use in format (see printf) |
Referenced by WXP::ColorMap::add(), WXP::UpaDecode::decode(), WXP::RcmDecode::decode(), WXP::DomainTool::decode(), WXP::ClimatTool::decode(), WXP::UpaPlot::draw(), WXP::ThermPlot::draw(), WXP::SatPlot::draw(), WXP::RcmPlot::draw(), WXP::RadPlot::draw(), WXP::NidsPlot::draw(), WXP::MiscPlot::draw(), WXP::MetaPlot::draw(), WXP::MdrPlot::draw(), WXP::MapPlot::draw(), WXP::Lev2Plot::draw(), WXP::ImagePlot::draw(), WXP::HodoPlot::draw(), WXP::ResrcFile::get(), WXP::Region::get(), WXP::ModelName::get(), WXP::XWindow::open(), WXP::Socket::open(), WXP::TiffFile::read(), WXP::GribFile::read(), WXP::GribFile::readData(), WXP::GribFile::readDRS(), WXP::GribFile::readDS(), WXP::GribFile::readGDS(), WXP::SatUniFile::readHeader(), WXP::GiniFile::readHeader(), WXP::GribFile::readPDS(), WXP::GribFile::readSection(), WXP::GribFile::searchGRIB(), WXP::NameConv::set(), WXP::XWindow::setFont(), and WXP::NidsImage::setImage().
| int Wxp::pause | ( | ) | [static] |
General read from terminal
Referenced by WXP::Message::hold().
| int Wxp::print | ( | const char * | mess | ) | [static] |
Prints string
| mess | Message format/string |
| int Wxp::setDatabasePath | ( | const char * | path | ) | [static] |
Sets the database path
| path | The path |
Referenced by WXP::ResrcDB::create(), and WXP::Prog::readResrcFile().
| int Wxp::setDebug | ( | int | val | ) | [static] |
Sets the debug mode
| val | The mode (true=debug) |
| int Wxp::setMessage | ( | int | val | ) | [static] |
Sets the message level
| val | The level |
Referenced by WXP::ResrcDB::create(), and WXP::Prog::readResrcFile().
| int Wxp::setProgramName | ( | const char * | str | ) | [static] |
| int Wxp::setVerbose | ( | bool | val | ) | [static] |
Sets the verbose print mode
| val | Sets the print mode (true=verbose) |
| int Wxp::sleep | ( | float | secs | ) | [static] |
| bool Wxp::validLicense | ( | const char * | type | ) | [static] |
Gets the license validity for a particular data type
References WXP::StrLib::equal().
| bool Wxp::validLicense | ( | ) | [static] |
Gets the default license validity
Referenced by WXP::File::open(), and WXP::Cdf::open().
1.6.1