WXP::Wxp Class Reference
[Base objects]

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

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

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

List of all members.

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

Detailed Description

This class defines basic information and methods used by WXP.

Author:
Dan Vietor

Member Enumeration Documentation

Enumerator:
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


Member Function Documentation

int Wxp::exit ( Error  val  )  [static]
const char * Wxp::getComputerName (  )  [static]

Gets the computer name

Returns:
The name of the computer as a string
const char * Wxp::getDatabasePath (  )  [static]
int Wxp::getDebug (  )  [static]

Gets the debug mode based on debug level The debug leve

Returns:
The debug mode (true=debug)
const char * Wxp::getLicenseVersion (  )  [static]

Gets the version number for licensing

Returns:
Version number as a string
bool Wxp::getMessage ( int  level  )  [static]

Checks the message level

Parameters:
level The message level
Returns:
The message mode (true=debug)
const char * Wxp::getProgramName (  )  [static]

Gets the program name

Returns:
The program name
double Wxp::getTime (  )  [static]

Get current time in seconds

Returns:
Seconds (fractional)
bool Wxp::getVerbose (  )  [static]

Gets the print mode

Returns:
The mode (true=verbose)
const char * Wxp::getVersion (  )  [static]

Gets the WXP version number

Returns:
A string representing the current version

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

bool Wxp::isDebug ( int  level  )  [static]

Gets the debug mode (any level is true)

Returns:
The debug mode (true=debug)
bool Wxp::isDebug (  )  [static]
int Wxp::outDebug ( int  level,
const char *  mess,
  ... 
) [static]

Prints debug message

Parameters:
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

Parameters:
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

Parameters:
mess Message format/string
... Additional parameters to use in format (see printf)
int Wxp::outMessage ( int  level,
const char *  mess,
  ... 
) [static]

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

Parameters:
type Strings message level
mess Message format/string
... Additional parameters to use in format (see printf)
int Wxp::outMessage ( const char *  mess,
  ... 
) [static]
int Wxp::outWarning ( const char *  mess,
  ... 
) [static]
int Wxp::pause (  )  [static]

General read from terminal

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

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

Prints string

Parameters:
mess Message format/string
int Wxp::setDatabasePath ( const char *  path  )  [static]

Sets the database path

Parameters:
path The path

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

int Wxp::setDebug ( int  val  )  [static]

Sets the debug mode

Parameters:
val The mode (true=debug)
int Wxp::setMessage ( int  val  )  [static]

Sets the message level

Parameters:
val The level

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

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

Sets the program name

Parameters:
path The program name

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

int Wxp::setVerbose ( bool  val  )  [static]

Sets the verbose print mode

Parameters:
val Sets the print mode (true=verbose)
int Wxp::sleep ( float  secs  )  [static]

General sleep utility

Parameters:
secs Time to sleep in seconds

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

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().

bool Wxp::validLicense (  )  [static]

Gets the default license validity

Returns:
The general license validity

Referenced by WXP::File::open(), and WXP::Cdf::open().


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

Generated on 8 Jan 2010 for WXP C++ Library by  doxygen 1.6.1