WXP C++ Library Version 6.74.9
Loading...
Searching...
No Matches
Public Member Functions | List of all members
WXP::WarnPlot Class Reference

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

#include "../include/WarnPlot.h"

Inheritance diagram for WXP::WarnPlot:
WXP::Drawing WXP::Listener

Public Member Functions

 WarnPlot ()
 
 WarnPlot (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 ()
 
virtual int init ()=0
 
virtual int getDomain (Domain &domain)=0
 
virtual int setFile ()=0
 
virtual int setInput (const char *type)=0
 
virtual int setNameConv (const char *name)=0
 
virtual int setFilename ()=0
 
virtual int setFilename (const char *file)=0
 
virtual int setFilename (Date &date)=0
 
virtual int setFilename (Date &date, const char *param)=0
 
virtual int setForeTime (const char *fore)=0
 
virtual int setParam (const char *str)=0
 
virtual int getDate (Date &date)=0
 
virtual int getLoopType ()=0
 
virtual int getInitDate (Date &date)=0
 
virtual int getDateOffset ()=0
 
virtual int getNumFrames ()=0
 
virtual int getSync ()=0
 
virtual int draw (Plot &plot)=0
 
virtual int print ()=0
 
virtual void callback (const char *ev_str, const char *ev_data, const void *data)=0
 

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

◆ WarnPlot() [1/2]

WarnPlot::WarnPlot ( )

Constructor

References init().

◆ WarnPlot() [2/2]

WarnPlot::WarnPlot ( const char *  param)

Constructor. Sets parameters

Parameters
paramParameters

References init(), and setParam().

Member Function Documentation

◆ callback()

void WarnPlot::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()

int WarnPlot::draw ( Plot plot)
virtual

◆ getDate()

int WarnPlot::getDate ( Date date)
virtual

Gets the date information from the input file

Return values
dateThe file date

Implements WXP::Drawing.

References WXP::Filename::getDate().

◆ getDateOffset()

int WarnPlot::getDateOffset ( )
virtual

Gets the date offset from name convention for loops

Returns
The offset in seconds

Implements WXP::Drawing.

◆ getDomain()

int WarnPlot::getDomain ( Domain domain)
virtual

Gets the default domain

Return values
domainThe domain

Implements WXP::Drawing.

References WXP::DomainTool::set().

◆ getInitDate()

int WarnPlot::getInitDate ( Date date)
virtual

Gets the date of the initial file (in loops)

Parameters
dateThe file date

Implements WXP::Drawing.

References WXP::Filename::getDate(), and WXP::Filename::setFile().

◆ getLoopType()

int WarnPlot::getLoopType ( )
virtual

Returns the default loop type

Returns
The loop type (date)

Implements WXP::Drawing.

References WXP::Drawing::LOOP_DATE.

◆ getNumFrames()

int WarnPlot::getNumFrames ( )
virtual

Gets the possible number of frames in a loop

Returns
Number of frames

Implements WXP::Drawing.

References WXP::Filename::getNumFiles().

◆ getSync()

int WXP::WarnPlot::getSync ( )
inlinevirtual

Specifies whether object is a time sync

Implements WXP::Drawing.

◆ init()

int WarnPlot::init ( )
virtual

Initializes the object

Implements WXP::Drawing.

References WXP::Date::init(), setColor(), setFile(), setNameConv(), setParam(), setScale(), and setTimezone().

Referenced by WarnPlot(), and WarnPlot().

◆ print()

int WarnPlot::print ( )
virtual

Print object parameters

Implements WXP::Drawing.

References WXP::Filename::getName().

◆ readFile()

int WarnPlot::readFile ( const char *  filename)

◆ setColor()

int WarnPlot::setColor ( const char *  str)

Sets the color for line contours

  • Parameters
    strColor string

References WXP::String::set().

Referenced by init(), and setParam().

◆ setColorTable()

int WarnPlot::setColorTable ( const char *  str)

Sets the color table parameters

Parameters
strColor table parameter

References WXP::String::set().

Referenced by setParam().

◆ setFile()

int WarnPlot::setFile ( )
virtual

Sets up the file parameters

Implements WXP::Drawing.

References setHour(), setInput(), setNameConv(), and WXP::Filename::setNumFiles().

Referenced by init().

◆ setFilename() [1/4]

int WarnPlot::setFilename ( )
virtual

Sets the input file name

Implements WXP::Drawing.

References WXP::Filename::setFile().

◆ setFilename() [2/4]

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

Sets a specific file name

Parameters
strThe filename to use

Implements WXP::Drawing.

References WXP::Filename::setFile().

◆ setFilename() [3/4]

int WarnPlot::setFilename ( Date date)
virtual

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

Parameters
dateThe file date

Implements WXP::Drawing.

References WXP::Date::isSet(), and WXP::Filename::setFile().

◆ setFilename() [4/4]

int WarnPlot::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.

References WXP::Filename::setFile().

◆ setForeTime()

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

Sets the forecast time (ignored)

Implements WXP::Drawing.

◆ setHour()

int WarnPlot::setHour ( const char *  str)

Sets the specific file time

Parameters
strThe file time (hour)

References WXP::Filename::setFixDate().

Referenced by setFile().

◆ setInput()

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

Sets the input file type

Parameters
strThe file type

Implements WXP::Drawing.

Referenced by setFile().

◆ setMap()

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

Sets whether object is to draw map or not

◆ setNameConv()

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

Sets the file name convention

Parameters
nameThe name convention

Implements WXP::Drawing.

References WXP::Filename::setNameConv(), and WXP::Filename::setNumFiles().

Referenced by init(), and setFile().

◆ setParam()

int WarnPlot::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 init(), and WarnPlot().

◆ setScale()

int WarnPlot::setScale ( float  val)

Set the scale factor of the text

Parameters
valScale factor

Referenced by init(), and setParam().

◆ setShadow()

int WarnPlot::setShadow ( int  val)

Sets shadow width

Parameters
valShadow width

Referenced by setParam().

◆ setTimezone()

int WarnPlot::setTimezone ( const char *  str)

Sets the timezone for date labels

Parameters
strTimezone

References WXP::Timezone::set().

Referenced by init(), and setParam().

◆ setValidDate() [1/2]

int WarnPlot::setValidDate ( const char *  str)

Sets the valid date for which warning will be displayed

Parameters
strDate (yyyymmddhhnn)

References WXP::Date::set().

Referenced by setParam().

◆ setValidDate() [2/2]

int WarnPlot::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: