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

This class plots a time series meteogram. This can either be a series of surface observations of data from a MOS report. More...

#include "../include/MeteoPlot.h"

Inheritance diagram for WXP::MeteoPlot:
WXP::Drawing WXP::Listener

Public Types

enum  Type { PLOT , DATA }
 
enum  { SFC , MOS }
 

Public Member Functions

 MeteoPlot (const char *param)
 
int init ()
 
int setType (int rtype)
 
int setType (const char *str)
 
int getType ()
 
int setParam (const char *str)
 
int setFile ()
 
int setInput (const char *type)
 
int setNameConv (const char *name)
 
int setHour (const char *str)
 
int setFilename ()
 
int setFilename (const char *name)
 
int setFilename (Date &date)
 
int setFilename (Date &date, const char *param)
 
int setForeTime (const char *fore)
 
int setModel (const char *str)
 
int setIdent (const char *str)
 
int setAttr (const char *str)
 
int setGridAttr (const char *str)
 
int setLabelAttr (const char *str)
 
int getDate (Date &date)
 
int getInitDate (Date &date)
 
int getDateOffset ()
 
int getLoopType ()
 
int getNumFrames ()
 
int getDomain (Domain &domain)
 
int getSync ()
 
int getSfcStation (const char *id, SfcData sdata[], int &num)
 
int getMosStation (const char *id, SfcData sdata[], int &num)
 
int getRange (SfcData data[], int num, VarSpec &spec, Range &range)
 
float getX (float x)
 
float getY (float y)
 
int setPlotSize (VarSpec &spec, int type)
 
int nextPlot ()
 
int setPlot (VarSpec &spec, Range &range)
 
int drawGrid (Plot &plot, const char *label)
 
int drawData (Plot &plot, SfcData data[], int num, VarSpec &spec)
 
int drawPlot (Plot &plot, SfcData data[], int num, VarSpec &spec)
 
int draw (Plot &plot)
 
int draw (Plot &plot, SfcData data[], int rnum)
 
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 a time series meteogram. This can either be a series of surface observations of data from a MOS report.

Author
Dan Vietor

Member Function Documentation

◆ callback()

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

The event callback

Parameters
ev_strString containing description of event
ev_dataEvent specific data
dataUser specific data

Implements WXP::Listener.

◆ draw()

int MeteoPlot::draw ( Plot plot)
virtual

Method for plotting the actual data

Parameters
plotThe plot class specifying window and parameters for plotting

Implements WXP::Drawing.

References WXP::Plot::addLabel(), WXP::DateTool::createLabel(), draw(), WXP::String::get(), WXP::Filename::getDate(), and WXP::Filename::getNumFiles().

Referenced by draw().

◆ getDate()

int MeteoPlot::getDate ( Date date)
virtual

Gets the current date of the data in the file

Return values
dateDate information

Implements WXP::Drawing.

References WXP::Filename::getDate().

◆ getDateOffset()

int MeteoPlot::getDateOffset ( )
virtual

Gets the offset time between frames in loop

Return values
dateDate information

Implements WXP::Drawing.

◆ getDomain()

int MeteoPlot::getDomain ( Domain domain)
virtual

A method for getting a default domain from the data. This is handy for data types that are for a specific domain like NIDS data.

Return values
domainDefault domain

Implements WXP::Drawing.

References WXP::Domain::set().

◆ getInitDate()

int MeteoPlot::getInitDate ( Date date)
virtual

Gets the initial date for a loop

Return values
dateDate information

Implements WXP::Drawing.

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

◆ getLoopType()

int MeteoPlot::getLoopType ( )
virtual

Gets the available loop types

Returns
Loop type

Implements WXP::Drawing.

References WXP::Drawing::LOOP_DATE.

◆ getNumFrames()

int MeteoPlot::getNumFrames ( )
virtual

Gets the possible number of frames in a loop

Returns
Number of frames

Implements WXP::Drawing.

◆ getSync()

int WXP::MeteoPlot::getSync ( )
inlinevirtual

Tells whether an object should be used to sync other to it

Returns
Number of frames

Implements WXP::Drawing.

◆ init()

int MeteoPlot::init ( )
virtual

◆ print()

int MeteoPlot::print ( )
virtual

Method for printing class info

Implements WXP::Drawing.

◆ setFile()

int MeteoPlot::setFile ( )
virtual

A method for setting basic file parameters

Implements WXP::Drawing.

References WXP::StrLib::copy(), WXP::ModelSpec::getName(), WXP::ModelSpec::set(), setInput(), and setNameConv().

Referenced by init().

◆ setFilename() [1/4]

int MeteoPlot::setFilename ( )
virtual

A method for setting the default file for plotting

Implements WXP::Drawing.

References WXP::Filename::setFile().

◆ setFilename() [2/4]

int MeteoPlot::setFilename ( const char *  file)
virtual

A method for setting the default file for plotting

Parameters
fileFilename to use

Implements WXP::Drawing.

References WXP::Filename::setFile().

◆ setFilename() [3/4]

int MeteoPlot::setFilename ( Date date)
virtual

Sets the filename to use based on a specific date

Parameters
dateDate to use

Implements WXP::Drawing.

References WXP::Filename::setDate().

◆ setFilename() [4/4]

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

Sets the filename to use based on a specific date and parameters

Parameters
dateDate to use
paramParameters to use for offset to date

Implements WXP::Drawing.

References WXP::Filename::setDate().

◆ setForeTime()

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

Sets specific forecast time to plot

Parameters
foreForecast time

Implements WXP::Drawing.

◆ setIdent()

int MeteoPlot::setIdent ( const char *  str)

Sets the station identifier or location to be used.

Parameters
strThe model name

References WXP::StrLib::copy().

◆ setInput()

int MeteoPlot::setInput ( const char *  type)
virtual

A method for setting input file type

Parameters
nameName convention to use

Implements WXP::Drawing.

References WXP::StrLib::equal().

Referenced by setFile().

◆ setModel()

int MeteoPlot::setModel ( const char *  str)

Sets the model type to be used.

Parameters
strThe model name

References WXP::StrLib::copy(), and WXP::StrLib::valid().

Referenced by init().

◆ setNameConv()

int MeteoPlot::setNameConv ( const char *  name)
virtual

A method for setting input file name convention

Parameters
nameName convention to use

Implements WXP::Drawing.

References WXP::Filename::setNameConv().

Referenced by setFile().

◆ setParam()

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

Sets specific parameters for the plot given a string

Parameters
strString specifying parameters

Implements WXP::Drawing.

References WXP::Strings::equal(), WXP::Strings::getNum(), WXP::Strings::getString(), and WXP::Timezone::set().

Referenced by init().


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