WXP C++ Library Version 6.74.6
Loading...
Searching...
No Matches
Public Types | Static Public Member Functions | Friends | List of all members
WXP::Wxp Class Reference

This class defines basic information and methods used by WXP. More...

#include "../include/Wxp.h"

Inheritance diagram for WXP::Wxp:
WXP::Const WXP::Convert

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 , NORUN , MISC , NOMEMORY ,
  NOGRAPH , NOINIT , NOFILE , NODBASE ,
  NOWRITE , NOINPUT , NODATA , BADPARAM
}
 

Static Public Member Functions

static bool isDebug ()
 
static bool isDebug (int level)
 
static int setError (int val)
 
static bool getError ()
 
static int setMessageLevel (int val)
 
static int setMessageLevel (const char *str)
 
static int getMessageLevel ()
 
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 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 bool getResrcBool (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)
 
- Static Public Member Functions inherited from WXP::Convert
static float CtoF (float t)
 
static float KtoF (float t)
 
static float CtoK (float t)
 
static float FtoK (float t)
 
static float FtoC (float t)
 
static float KtoC (float t)
 
static float INtoMB (float p)
 
static float MBtoIN (float p)
 
static float KTtoMPS (float w)
 
static float MPStoKT (float w)
 
static float KTtoKMH (float l)
 
static float KMHtoKT (float l)
 
static float KTtoMPH (float l)
 
static float MPHtoKT (float l)
 
static float MPHtoMPS (float l)
 
static float MPStoMPH (float l)
 
static float FTtoM (float l)
 
static float MtoFT (float l)
 
static float MtoMI (float l)
 
static float INtoMM (float l)
 
static float MMtoIN (float l)
 
static float INtoCM (float l)
 
static float CMtoIN (float l)
 
static float SMtoKM (float l)
 
static float KMtoSM (float l)
 
static float SMtoNM (float l)
 
static float NMtoSM (float l)
 
static float NMtoKM (float l)
 
static float KMtoNM (float l)
 
static float NMtoFT (float l)
 

Friends

class ResrcDB
 
class Prog
 

Additional Inherited Members

- Static Public Attributes inherited from WXP::Const
static const int MISS = -9999
 
static const double PI = 3.1415926535898
 
static const double EARTH = 63.7122
 
static const double TWO_PI = 6.283185307
 
static const double DRC = .017453293
 
static const double RDC = 57.29577951
 
static const float R = 287.05
 
static const float G = 9.8
 
static const float CP = 1004
 
static const float CV = 717
 

Detailed Description

This class defines basic information and methods used by WXP.

Author
Dan Vietor

Member Enumeration Documentation

◆ Error

Enumerator
NOERR 

Exit error values No error

NORUN 

Unable to run program or invalid license

MISC 

Miscellaneous error

NOMEMORY 

Not enough memory

NOGRAPH 

Unable to open graphics

NOINIT 

Cannot initialize program parameters

NOFILE 

Data file not found

NODBASE 

Database file not found

NOWRITE 

Unable to write to output file

NOINPUT 

Missing input data

NODATA 

No data found

BADPARAM 

Bad parameter specified

Member Function Documentation

◆ checkMessage()

bool Wxp::checkMessage ( int  level)
static

◆ exit()

int Wxp::exit ( Error  val)
static

◆ getComputerName()

const char * Wxp::getComputerName ( )
static

Gets the computer name

Returns
The name of the computer as a string

Referenced by WXP::License::valid().

◆ getDatabasePath()

const char * Wxp::getDatabasePath ( )
static

◆ getLicenseVersion()

const char * Wxp::getLicenseVersion ( )
static

Gets the version number for licensing

Returns
Version number as a string

◆ getProgramName()

const char * Wxp::getProgramName ( )
static

Gets the program name

Returns
The program name

◆ getTime()

double Wxp::getTime ( )
static

Get current time in seconds

Returns
Seconds (fractional)

◆ getVersion()

const char * Wxp::getVersion ( )
static

Gets the WXP version number

Returns
A string representing the current version

Referenced by WXP::ResrcDB::printHelp(), WXP::Prog::printProg(), and WXP::Message::printProgramInfo().

◆ isDebug() [1/2]

bool Wxp::isDebug ( )
static

◆ isDebug() [2/2]

bool Wxp::isDebug ( int  level)
static

Gets the debug mode (any level is true)

Returns
The debug mode (true=debug)

◆ outDebug() [1/2]

int Wxp::outDebug ( const char *  mess,
  ... 
)
static

Prints debug message

Parameters
messMessage format/string
...Additional parameters to use in format (see printf)

Referenced by WXP::ParcelParams::calc(), WXP::AreaFile::calcDomain(), WXP::Figure::callback(), WXP::SfcWmoFile::checkHeader(), WXP::Parse::compare(), WXP::WmoParse::compare(), WXP::SfcData::compare(), WXP::XWindow::copyFrame(), WXP::NameConv::decode(), WXP::RcmDecode::decode(), WXP::ClimatTool::decode(), WXP::Variable::decode(), WXP::RcmFile::decode(), WXP::MetarTool::decode(), WXP::SaoTool::decode(), WXP::SynopTool::decode(), WXP::MosUFile::decodeETA(), WXP::XWindow::deleteFrame(), WXP::XWindow::displayFrame(), WXP::FrontPlot::draw(), WXP::GridPlot::draw(), WXP::MosPlot::draw(), WXP::RedbookPlot::draw(), WXP::SfcPlot::draw(), WXP::UpaPlot::draw(), WXP::UpaXSectPlot::draw(), WXP::MapPlot::draw(), WXP::VectPlot::draw(), WXP::NameConv::encode(), WXP::FileTool::exist(), WXP::RcmDecode::filterOverlap(), WXP::RadMask::getGrids(), WXP::LritFile::getHeader(), WXP::GribFile::getHeader(), WXP::File::getLine(), WXP::Parse::getLine(), WXP::WmoParse::getLine(), WXP::RadMask::getSiteFilter(), WXP::FileTool::getSize(), WXP::XWindow::loopRate(), WXP::UpaCalc::meanValue(), WXP::XWindow::message(), WXP::GribFile::next(), WXP::BufrFile::nextDataset(), WXP::File::open(), WXP::ShapeFile::open(), WXP::KmlFile::open(), WXP::WmoParse::open(), WXP::RedbookFile::plotParam(), WXP::WmoIngest::process(), WXP::XWindow::processEvent(), WXP::GribFile::read(), WXP::GifFile::read(), WXP::KavradFile::read(), WXP::LritFile::read(), WXP::LZWComp::read(), WXP::PngFile::read(), WXP::TiffFile::read(), WXP::KmlFile::read(), WXP::MosUFile::read(), WXP::ShapeFile::read(), WXP::UpaWmoFile::read(), WXP::WarnFile::read(), WXP::WatchFile::read(), WXP::GribFile::readBDB(), WXP::GribFile::readBMB(), WXP::GribFile::readBMS(), WXP::NidsFile::readBytes(), WXP::BufrFile::readData(), WXP::GiniFile::readData(), WXP::GribFile::readData(), WXP::BufrFile::readDDS(), WXP::GribFile::readDRS(), WXP::GribFile::readDS(), WXP::GribFile::readGDB(), WXP::GribFile::readGDS(), WXP::AreaFile::readHeader(), WXP::BufrFile::readHeader(), WXP::GribFile::readHeader(), WXP::RedbookFile::readHeader(), WXP::GiniFile::readHeader(), WXP::SatCdfFile::readHeader(), WXP::GribFile::readIDS(), WXP::BufrFile::readIS(), WXP::GribFile::readPDB(), WXP::GribFile::readPDS(), WXP::NidsFile::readRadial(), WXP::GribFile::readSection(), WXP::XWindow::resize(), WXP::Scanp::scan(), WXP::GribFile::searchGRIB(), WXP::GribFile::seekData(), WXP::WmoIngest::sendPAN(), WXP::NameConv::set(), WXP::NameConv::setFile(), WXP::XWindow::setFont(), WXP::Graph::setFontSpec(), WXP::NameConv::setLatest(), WXP::Filename::setNumFiles(), WXP::NidsImage::setThres(), WXP::RedbookFile::text(), WXP::SfcData::update(), WXP::License::valid(), WXP::RedbookFile::vector(), WXP::GifFile::write(), WXP::LZWComp::write(), and WXP::PngFile::write().

◆ outDebug() [2/2]

int Wxp::outDebug ( int  level,
const char *  mess,
  ... 
)
static

Prints debug message

Parameters
levelDebug level
messMessage format/string
...Additional parameters to use in format (see printf)

◆ outError()

int Wxp::outError ( const char *  mess,
  ... 
)
static

Prints error message

Parameters
messMessage format/string
...Additional parameters to use in format (see printf)

Referenced by WXP::SatCdfFile::readHeader().

◆ outMessage() [1/2]

int Wxp::outMessage ( const char *  mess,
  ... 
)
static

Prints string using message level print

Parameters
messMessage format/string
...Additional parameters to use in format (see printf)

Referenced by WXP::WmoIngest::action(), WXP::ImagePiece::add(), WXP::AreaFile::calcDomain(), WXP::ObjectAnal::compute(), WXP::MosRaw::compute(), WXP::SfcRaw::compute(), WXP::UpaRaw::compute(), WXP::RcmDecode::decode(), WXP::UpaDecode::decode(), WXP::FrontPlot::draw(), WXP::GridCont::draw(), WXP::GridPlot::draw(), WXP::GridVect::draw(), WXP::HodoPlot::draw(), WXP::HurPlot::draw(), WXP::ImagePlot::draw(), WXP::Lev2Plot::draw(), WXP::LightPlot::draw(), WXP::MosPlot::draw(), WXP::NidsPlot::draw(), WXP::ProfPlot::draw(), WXP::RadPlot::draw(), WXP::RawPlot::draw(), WXP::RcmPlot::draw(), WXP::RedbookPlot::draw(), WXP::SatPlot::draw(), WXP::SfcPlot::draw(), WXP::SoundPlot::draw(), WXP::UpaXSectCont::draw(), WXP::UpaXSectPlot::draw(), WXP::WarnPlot::draw(), WXP::WatchPlot::draw(), WXP::NidsPlot::drawData(), WXP::RedbookPlot::getDomain(), WXP::RadMask::getGrids(), WXP::Filename::listFile(), WXP::Parse::open(), WXP::ResrcDB::printHelp(), WXP::Prog::printHelp(), WXP::Prog::printProg(), WXP::WmoIngest::process(), WXP::BufrFile::readDDS(), WXP::WarnPlot::readFile(), WXP::WatchPlot::readFile(), WXP::RedbookFile::readHeader(), WXP::BufrFile::readIS(), WXP::BufrFile::readOS(), WXP::WmoIngest::readProdFile(), WXP::NidsImage::readSite(), WXP::CityTool::search(), WXP::HodoPlot::setFilename(), WXP::NidsImage::setImage(), WXP::CityHash::setup(), WXP::UpaRawinHash::setup(), WXP::GifFile::write(), and WXP::LZWComp::write().

◆ outMessage() [2/2]

int Wxp::outMessage ( int  level,
const char *  mess,
  ... 
)
static

Prints string depending on whether its message level is to be displayed

Parameters
typeStrings message level
messMessage format/string
...Additional parameters to use in format (see printf)

◆ outWarning()

int Wxp::outWarning ( const char *  mess,
  ... 
)
static

◆ pause()

int Wxp::pause ( )
static

General read from terminal

Referenced by WXP::Message::hold().

◆ print()

int Wxp::print ( const char *  mess)
static

Prints string

Parameters
messMessage format/string

◆ setDatabasePath()

int Wxp::setDatabasePath ( const char *  path)
static

Sets the database path

Parameters
pathThe path

Referenced by WXP::ResrcDB::create(), and WXP::Prog::readResrcFile().

◆ setMessageLevel()

int Wxp::setMessageLevel ( int  val)
static

Sets the message level

Parameters
valThe level

Referenced by WXP::ResrcDB::create(), and WXP::Prog::readResrcFile().

◆ setProgramName()

int Wxp::setProgramName ( const char *  str)
static

Sets the program name

Parameters
pathThe program name

Referenced by WXP::ResrcDB::create().

◆ sleep()

int Wxp::sleep ( float  secs)
static

General sleep utility

Parameters
secsTime to sleep in seconds

Referenced by WXP::Socket::open().

◆ validLicense() [1/2]

bool Wxp::validLicense ( )
static

Gets the default license validity

Returns
The general license validity

Referenced by WXP::File::open(), WXP::NetCdfFile::open(), and WXP::LightFile::open().

◆ validLicense() [2/2]

bool Wxp::validLicense ( const char *  type)
static

Gets the license validity for a particular data type

Returns
The validity for a particular type

References WXP::StrLib::equal().


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