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

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

#include "../include/WatchPlot.h"

Inheritance diagram for WXP::WatchPlot:
WXP::Drawing WXP::Listener

Public Member Functions

 WatchPlot ()
 WatchPlot (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 (Filename &filename)
int readFile (const char *filename, Date &date)
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 watch boxes.

Author
Dan Vietor

Constructor & Destructor Documentation

◆ WatchPlot() [1/2]

WatchPlot::WatchPlot ( )

Constructor

References init().

◆ WatchPlot() [2/2]

WatchPlot::WatchPlot ( const char * param)

Constructor. Sets parameters

Parameters
paramParameters

References init(), and setParam().

Member Function Documentation

◆ callback()

void WatchPlot::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 WatchPlot::getDate ( Date & date)
virtual

Gets the date information from the input file

Return values
dateThe file date

Implements WXP::Drawing.

◆ getDateOffset()

int WatchPlot::getDateOffset ( )
virtual

Gets the date offset from name convention for loops

Returns
The offset in seconds

Implements WXP::Drawing.

◆ getDomain()

int WatchPlot::getDomain ( Domain & domain)
virtual

Gets the default domain

Return values
domainThe domain

Implements WXP::Drawing.

References WXP::DomainTool::set().

◆ getInitDate()

int WatchPlot::getInitDate ( Date & date)
virtual

Gets the date of the initial file (in loops)

Parameters
dateThe file date

Implements WXP::Drawing.

◆ getLoopType()

int WatchPlot::getLoopType ( )
virtual

Returns the default loop type

Returns
The loop type (date)

Implements WXP::Drawing.

References WXP::Drawing::LOOP_DATE.

◆ getNumFrames()

int WatchPlot::getNumFrames ( )
virtual

Gets the possible number of frames in a loop

Returns
Number of frames

Implements WXP::Drawing.

◆ getSync()

int WXP::WatchPlot::getSync ( )
inlinevirtual

Specifies whether object is a time sync

Implements WXP::Drawing.

◆ init()

int WatchPlot::init ( )
virtual

Initializes the object

Implements WXP::Drawing.

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

Referenced by WatchPlot(), and WatchPlot().

◆ print()

int WatchPlot::print ( )
virtual

Print object parameters

Implements WXP::Drawing.

◆ readFile()

◆ setColor()

int WatchPlot::setColor ( const char * str)

Sets the color for line contours

  • Parameters
    strColor string

Referenced by init(), and setParam().

◆ setColorTable()

int WatchPlot::setColorTable ( const char * str)

Sets the color table parameters

Parameters
strColor table parameter

Referenced by setParam().

◆ setFile()

int WatchPlot::setFile ( )
virtual

Sets up the file parameters

Implements WXP::Drawing.

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

Referenced by init().

◆ setFilename() [1/4]

int WatchPlot::setFilename ( )
virtual

Sets the input file name

Implements WXP::Drawing.

◆ setFilename() [2/4]

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

Sets a specific file name

Parameters
strThe filename to use

Implements WXP::Drawing.

◆ setFilename() [3/4]

int WatchPlot::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 WatchPlot::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::WatchPlot::setForeTime ( const char * fore)
inlinevirtual

Sets the forecast time (ignored)

Implements WXP::Drawing.

◆ setHour()

int WatchPlot::setHour ( const char * str)

Sets the specific file time

Parameters
strThe file time (hour)

Referenced by setFile().

◆ setInput()

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

Sets the input file type

Parameters
strThe file type

Implements WXP::Drawing.

Referenced by init(), and setFile().

◆ setMap()

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

Sets whether object is to draw map or not

◆ setNameConv()

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

Sets the file name convention

Parameters
nameThe name convention

Implements WXP::Drawing.

Referenced by init(), and setFile().

◆ setParam()

int WatchPlot::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 watch boxes
slabel - Simple watch 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 init(), and WatchPlot().

◆ setScale()

int WatchPlot::setScale ( float val)

Set the scale factor of the text

Parameters
valScale factor

Referenced by init(), and setParam().

◆ setShadow()

int WatchPlot::setShadow ( int val)

Sets shadow width

Parameters
valShadow width

Referenced by setParam().

◆ setTimezone()

int WatchPlot::setTimezone ( const char * str)

Sets the timezone for date labels

Parameters
strTimezone

Referenced by init(), and setParam().

◆ setValidDate() [1/2]

int WatchPlot::setValidDate ( const char * str)

Sets the valid date for which watches will be displayed

Parameters
strDate (yyyymmddhhnn)

Referenced by setParam().

◆ setValidDate() [2/2]

int WatchPlot::setValidDate ( Date & rdate)

Sets the valid date for which watches will be displayed

Parameters
rdateDate

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