WXP C++ Library Version 6.74.9
|
This class plots severe weather watch boxes. More...
#include "../include/WatchPlot.h"
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 () |
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 |
This class plots severe weather watch boxes.
WatchPlot::WatchPlot | ( | ) |
Constructor
References init().
WatchPlot::WatchPlot | ( | const char * | param | ) |
|
virtual |
Sets the callback for processing data from display
ev_str | The event type |
ev_data | The event data such as cursor location |
data | The user defined data attached to event |
Implements WXP::Listener.
|
virtual |
Plots the watch data
plot | Plot object |
Implements WXP::Drawing.
References WXP::Points::add(), WXP::Plot::addLabel(), WXP::WatchData::CANCELLED, WXP::Wxp::checkMessage(), WXP::Points::clear(), WXP::DateTool::createLabel(), WXP::MapPlot::draw(), WXP::Plot::drawFill(), WXP::Plot::drawLine(), WXP::Plot::drawText(), WXP::WatchData::ENDED, WXP::String::get(), WXP::Points::getCenter(), WXP::Date::getSeconds(), WXP::Strings::getString(), WXP::Date::isSet(), WXP::Const::MISS, WXP::Point::offset(), WXP::Wxp::outMessage(), WXP::WatchData::PENDING, WXP::Date::print(), WXP::WatchData::print(), WXP::ColorFile::read(), readFile(), WXP::WatchData::REPLACED, WXP::Plot::setColorMap(), WXP::Plot::setFill(), WXP::Plot::setFillStyle(), WXP::Plot::setLine(), WXP::Plot::setText(), WXP::Plot::setTextColor(), WXP::WatchData::SEVERE, WXP::WatchData::TEST, WXP::WatchData::TORNADO, WXP::Date::toText(), and WXP::String::valid().
|
virtual |
Gets the date information from the input file
date | The file date |
Implements WXP::Drawing.
References WXP::Filename::getDate().
|
virtual |
Gets the date offset from name convention for loops
Implements WXP::Drawing.
|
virtual |
Gets the default domain
domain | The domain |
Implements WXP::Drawing.
References WXP::DomainTool::set().
|
virtual |
Gets the date of the initial file (in loops)
date | The file date |
Implements WXP::Drawing.
References WXP::Filename::getDate(), and WXP::Filename::setFile().
|
virtual |
Returns the default loop type
Implements WXP::Drawing.
References WXP::Drawing::LOOP_DATE.
|
virtual |
Gets the possible number of frames in a loop
Implements WXP::Drawing.
References WXP::Filename::getNumFiles().
|
inlinevirtual |
Specifies whether object is a time sync
Implements WXP::Drawing.
|
virtual |
Initializes the object
Implements WXP::Drawing.
References WXP::Date::init(), setColor(), setFile(), setInput(), setNameConv(), setParam(), setScale(), and setTimezone().
Referenced by WatchPlot(), and WatchPlot().
|
virtual |
Print object parameters
Implements WXP::Drawing.
int WatchPlot::readFile | ( | Filename & | filename | ) |
Reads the watch file and saves watch data
filename | Filename to decode |
References WXP::WatchData::CANCELLED, WXP::WatchFile::close(), WXP::WatchData::ENDED, WXP::Date::getSeconds(), WXP::WatchFile::isOpen(), WXP::Const::MISS, WXP::WatchData::num, WXP::Wxp::outMessage(), WXP::WatchData::PENDING, WXP::WatchFile::read(), and WXP::WatchData::REPLACED.
Referenced by draw().
int WatchPlot::setColor | ( | const char * | str | ) |
Sets the color for line contours
str | Color string |
References WXP::String::set().
Referenced by init(), and setParam().
int WatchPlot::setColorTable | ( | const char * | str | ) |
Sets the color table parameters
str | Color table parameter |
References WXP::String::set().
Referenced by setParam().
|
virtual |
Sets up the file parameters
Implements WXP::Drawing.
References setHour(), setInput(), setNameConv(), and WXP::Filename::setNumFiles().
Referenced by init().
|
virtual |
|
virtual |
Sets a specific file name
str | The filename to use |
Implements WXP::Drawing.
References WXP::Filename::setFile().
|
virtual |
Sets the input file date. The file name is derived using name convention
date | The file date |
Implements WXP::Drawing.
References WXP::Filename::setFile().
|
virtual |
Sets the input file date with parameters. This is passed to the name convention to set file name
date | The file date |
param | The name convention parameters |
Implements WXP::Drawing.
References WXP::Filename::setFile().
|
inlinevirtual |
Sets the forecast time (ignored)
Implements WXP::Drawing.
int WatchPlot::setHour | ( | const char * | str | ) |
Sets the specific file time
str | The file time (hour) |
References WXP::Filename::setFixDate().
Referenced by setFile().
|
virtual |
|
inline |
Sets whether object is to draw map or not
|
virtual |
Sets the file name convention
name | The name convention |
Implements WXP::Drawing.
References WXP::Filename::setNameConv(), and WXP::Filename::setNumFiles().
|
virtual |
Sets the class parameters
str | The 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().
int WatchPlot::setScale | ( | float | val | ) |
int WatchPlot::setShadow | ( | int | val | ) |
int WatchPlot::setTimezone | ( | const char * | str | ) |
Sets the timezone for date labels
str | Timezone |
References WXP::Timezone::set().
Referenced by init(), and setParam().
int WatchPlot::setValidDate | ( | const char * | str | ) |
Sets the valid date for which watches will be displayed
str | Date (yyyymmddhhnn) |
References WXP::Date::set().
Referenced by setParam().
int WatchPlot::setValidDate | ( | Date & | rdate | ) |
Sets the valid date for which watches will be displayed
rdate | Date |