WXP C++ Library Version 6.74.9
Loading...
Searching...
No Matches
WXP::HurPlot Class Reference

This class plots severe weather warn boxes. More...

#include "../include/HurPlot.h"

Inheritance diagram for WXP::HurPlot:
WXP::Drawing WXP::Listener

Public Member Functions

 HurPlot ()
 HurPlot (const char *param)
int init ()
int setParam (const char *str)
int setFile ()
int setInput (const char *type)
int setHour (const char *str)
int setNameConv (const char *type)
int setFilename ()
int setFilename (const char *str)
int setFilename (Date &date)
int setFilename (Date &date, const char *param)
int setForeTime (const char *fore)
int getDate (Date &date)
int getInitDate (Date &date)
int getDateOffset ()
int getLoopType ()
int getNumFrames ()
int getDomain (Domain &domain)
int setScale (float val)
int setTimezone (const char *str)
int setShadow (int val)
int setValidDate (const char *str)
int setValidDate (Date &date)
int setColorTable (const char *str)
int setColor (const char *str)
int setMap (bool val)
int getSync ()
int readFile (const char *filename)
int draw (Plot &plot)
void callback (const char *ev_str, const char *ev_data, const void *data)
int print ()

Additional Inherited Members

Static Public Attributes inherited from WXP::Drawing
static const int LOOP_NONE = 0
static const int LOOP_DATE = 1
static const int LOOP_FORE = 2

Detailed Description

This class plots severe weather warn boxes.

Author
Dan Vietor

Constructor & Destructor Documentation

◆ HurPlot() [1/2]

HurPlot::HurPlot ( )

Constructor

References init().

◆ HurPlot() [2/2]

HurPlot::HurPlot ( const char * param)

Constructor. Sets parameters

Parameters
paramParameters

References init(), and setParam().

Member Function Documentation

◆ callback()

void HurPlot::callback ( const char * ev_str,
const char * ev_data,
const void * data )
virtual

Sets the callback for processing data from display

Parameters
ev_strThe event type
ev_dataThe event data such as cursor location
dataThe user defined data attached to event

Implements WXP::Listener.

◆ draw()

◆ getDate()

int HurPlot::getDate ( Date & date)
virtual

Gets the date information from the input file

Return values
dateThe file date

Implements WXP::Drawing.

◆ getDateOffset()

int HurPlot::getDateOffset ( )
virtual

Gets the date offset from name convention for loops

Returns
The offset in seconds

Implements WXP::Drawing.

◆ getDomain()

int HurPlot::getDomain ( Domain & domain)
virtual

Gets the default domain

Return values
domainThe domain

Implements WXP::Drawing.

References WXP::DomainTool::set().

◆ getInitDate()

int HurPlot::getInitDate ( Date & date)
virtual

Gets the date of the initial file (in loops)

Parameters
dateThe file date

Implements WXP::Drawing.

◆ getLoopType()

int HurPlot::getLoopType ( )
virtual

Returns the default loop type

Returns
The loop type (date)

Implements WXP::Drawing.

References WXP::Drawing::LOOP_DATE.

◆ getNumFrames()

int HurPlot::getNumFrames ( )
virtual

Gets the possible number of frames in a loop

Returns
Number of frames

Implements WXP::Drawing.

◆ getSync()

int WXP::HurPlot::getSync ( )
inlinevirtual

Specifies whether object is a time sync

Implements WXP::Drawing.

◆ init()

int HurPlot::init ( )
virtual

Initializes the object

Implements WXP::Drawing.

References setColor(), setFile(), setNameConv(), setParam(), setScale(), and setTimezone().

Referenced by HurPlot(), and HurPlot().

◆ print()

int HurPlot::print ( )
virtual

Print object parameters

Implements WXP::Drawing.

◆ readFile()

int HurPlot::readFile ( const char * filename)

Reads the warn file and saves warn data

Parameters
filenameFilename to decode

References WXP::Wxp::isDebug(), and WXP::HurData::print().

Referenced by draw().

◆ setColor()

int HurPlot::setColor ( const char * str)

Sets the color for line contours

  • Parameters
    strColor string

Referenced by init(), and setParam().

◆ setColorTable()

int HurPlot::setColorTable ( const char * str)

Sets the color table parameters

Parameters
strColor table parameter

Referenced by setParam().

◆ setFile()

int HurPlot::setFile ( )
virtual

Sets up the file parameters

Implements WXP::Drawing.

References setHour(), setInput(), and setNameConv().

Referenced by init().

◆ setFilename() [1/4]

int HurPlot::setFilename ( )
virtual

Sets the input file name

Implements WXP::Drawing.

◆ setFilename() [2/4]

int HurPlot::setFilename ( const char * str)
virtual

Sets a specific file name

Parameters
strThe filename to use

Implements WXP::Drawing.

◆ setFilename() [3/4]

int HurPlot::setFilename ( Date & date)
virtual

Sets the input file date. The file name is derived using name convention

Parameters
dateThe file date

Implements WXP::Drawing.

◆ setFilename() [4/4]

int HurPlot::setFilename ( Date & date,
const char * param )
virtual

Sets the input file date with parameters. This is passed to the name convention to set file name

Parameters
dateThe file date
paramThe name convention parameters

Implements WXP::Drawing.

◆ setForeTime()

int WXP::HurPlot::setForeTime ( const char * fore)
inlinevirtual

Sets the forecast time (ignored)

Implements WXP::Drawing.

◆ setHour()

int HurPlot::setHour ( const char * str)

Sets the specific file time

Parameters
strThe file time (hour)

Referenced by setFile().

◆ setInput()

int HurPlot::setInput ( const char * str)
virtual

Sets the input file type

Parameters
strThe file type

Implements WXP::Drawing.

Referenced by setFile().

◆ setMap()

int WXP::HurPlot::setMap ( bool val)
inline

Sets whether object is to draw map or not

◆ setNameConv()

int HurPlot::setNameConv ( const char * type)
virtual

Sets the file name convention

Parameters
nameThe name convention

Implements WXP::Drawing.

Referenced by init(), and setFile().

◆ setParam()

int HurPlot::setParam ( const char * str)
virtual

Sets the class parameters

Parameters
strThe parameters ct=file - Color table file
co=cs,ct,cl - Colors for severe, tornado and text labeling
nolabel - Don't label warn boxes
slabel - Simple warn labels
sh=## - Drop shadow width
vdate=date - Valid date
tz=zone - Time zone for labels
sc=scale - Scale factor for text
fill=pat - Fill pattern

Implements WXP::Drawing.

References WXP::Strings::equal(), WXP::Strings::getFloat(), WXP::Strings::getInt(), WXP::Strings::getNum(), WXP::Strings::getString(), WXP::Strings::getStringAfter(), setColor(), setColorTable(), setScale(), setShadow(), setTimezone(), and setValidDate().

Referenced by HurPlot(), and init().

◆ setScale()

int HurPlot::setScale ( float val)

Set the scale factor of the text

Parameters
valScale factor

Referenced by init(), and setParam().

◆ setShadow()

int HurPlot::setShadow ( int val)

Sets shadow width

Parameters
valShadow width

Referenced by setParam().

◆ setTimezone()

int HurPlot::setTimezone ( const char * str)

Sets the timezone for date labels

Parameters
strTimezone

Referenced by init(), and setParam().

◆ setValidDate() [1/2]

int HurPlot::setValidDate ( const char * str)

Sets the valid date for which warning will be displayed

Parameters
strDate (yyyymmddhhnn)

Referenced by setParam().

◆ setValidDate() [2/2]

int HurPlot::setValidDate ( Date & rdate)

Sets the valid date for which warning will be displayed

Parameters
rdateDate

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