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

This class plots upper air data. More...

#include "../include/UpaPlot.h"

Inheritance diagram for WXP::UpaPlot:
WXP::Drawing WXP::Listener

Public Member Functions

 UpaPlot ()
 
 UpaPlot (const char *param)
 
int init ()
 
int setParam (const char *str)
 
int setPath (const char *path)
 
int setFile ()
 
int setInput (const char *type)
 
int setNameConv (const char *name)
 
int setHour (const char *str)
 
int setFilename ()
 
int setFilename (const char *str)
 
int setFilename (Date &date)
 
int setFilename (Date &date, const char *param)
 
int setForeTime (const char *fore)
 
int setColorTable (const char *str)
 
int setColor (const char *str)
 
int setVariable (const char *str)
 
int setLevel (const char *str)
 
int setPlotType (const char *str)
 
int setTimezone (const char *str)
 
int setGridDomain (const char *str)
 
int setMap (bool val)
 
int getDate (Date &date)
 
int getInitDate (Date &date)
 
int getDateOffset ()
 
int getLoopType ()
 
int getNumFrames ()
 
int getDomain (Domain &domain)
 
int getSync ()
 
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 upper air data.

This class will read in a decoded upper air data file and plot data to a plot object. The data is read in, either plotted directly or fit to a grid and contoured.

syntax:
UpaPlot uplot;
uplot.setParam( "parameters,..." );
uplot.setFilename();
uplot.setLevel( "level" );
uplot.setVariable( "variable" );
uplot.draw( plot );

Author
Dan Vietor

Constructor & Destructor Documentation

◆ UpaPlot() [1/2]

UpaPlot::UpaPlot ( )

Constructor. Initializes class

References init().

◆ UpaPlot() [2/2]

UpaPlot::UpaPlot ( const char *  param)

Constructor. Initializes class and sets parameters

Parameters
paramThe parameters to set

References init(), and setParam().

Member Function Documentation

◆ callback()

void UpaPlot::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 UpaPlot::draw ( Plot plot)
virtual

◆ getDate()

int UpaPlot::getDate ( Date date)
virtual

Gets the date information from the input file

Return values
dateDate values

Implements WXP::Drawing.

References WXP::Filename::getDate().

◆ getDateOffset()

int UpaPlot::getDateOffset ( )
virtual

Gets the date offset from name convention for loops

Returns
The offset in seconds

Implements WXP::Drawing.

◆ getDomain()

int UpaPlot::getDomain ( Domain domain)
virtual

Gets the default domain

Return values
domainThe default domain

Implements WXP::Drawing.

References WXP::DomainTool::set().

◆ getInitDate()

int UpaPlot::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 UpaPlot::getLoopType ( )
virtual

Returns the default loop type

Returns
The loop type (date)

Implements WXP::Drawing.

References WXP::Drawing::LOOP_DATE.

◆ getNumFrames()

int UpaPlot::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::UpaPlot::getSync ( )
inlinevirtual

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

Returns
Number of frames

Implements WXP::Drawing.

◆ init()

int UpaPlot::init ( )
virtual

◆ print()

int UpaPlot::print ( )
virtual

Method for printing class info

Implements WXP::Drawing.

◆ setColor()

int UpaPlot::setColor ( const char *  str)

Sets the color parameters

  • Parameters
    strColor string

References WXP::DatumPlot::setAttr().

Referenced by setParam().

◆ setColorTable()

int UpaPlot::setColorTable ( const char *  str)

Sets the color table parameters

  • Parameters
    strColor table parameter

References WXP::DatumPlot::setColorTable(), WXP::GridCont::setColorTable(), and WXP::GridVect::setColorTable().

Referenced by setParam().

◆ setFile()

int UpaPlot::setFile ( )
virtual

Sets the default file parameters

Implements WXP::Drawing.

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

Referenced by init().

◆ setFilename() [1/4]

int UpaPlot::setFilename ( )
virtual

Sets the input file name

Implements WXP::Drawing.

References WXP::Filename::setFile().

◆ setFilename() [2/4]

int UpaPlot::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 UpaPlot::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::Filename::setFile().

◆ setFilename() [4/4]

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

Sets the forecast time (ignored)

Implements WXP::Drawing.

◆ setGridDomain()

int UpaPlot::setGridDomain ( const char *  str)

Sets the grid domain (the domain data is fit to grid)

Parameters
strDomain

References WXP::DomainTool::decode().

Referenced by init().

◆ setHour()

int UpaPlot::setHour ( const char *  str)

Sets the specific file time

Parameters
strThe file time (hour)

References WXP::Filename::setFixDate().

Referenced by setFile(), and setParam().

◆ setInput()

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

Sets the input file type

Parameters
strThe file type

Implements WXP::Drawing.

Referenced by setFile().

◆ setLevel()

int UpaPlot::setLevel ( const char *  str)

Sets the level to be plotted

Parameters
strLevel string

References WXP::String::set().

Referenced by init(), and setParam().

◆ setMap()

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

Sets whether object is to draw map or not

Referenced by setParam().

◆ setNameConv()

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

Sets the file name convention

Parameters
nameThe name convention

Implements WXP::Drawing.

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

Referenced by init(), setFile(), and setParam().

◆ setParam()

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

Sets the parameters within the class:

Parameters
strString to parse
ct=file - Color table file
co=color - Plotting color
le=var - Level to plot
va=var - Variable to plot
if=var - Input file name convention
nc=var - Input file name convention
ho=hour - Fix date parameters (ie hour of day)
tz=zone - Zone information for label
pl=type - Plot type (data, cf, ln, etc)
map - Plots a map map_line - Plots a map with line contour settings map_fill - Plots a map with fill contour settings sync - Specifes object as time sync

Implements WXP::Drawing.

References WXP::Strings::equal(), WXP::Strings::getNum(), WXP::Strings::getString(), WXP::Strings::getStringAfter(), WXP::Strings::iequal(), WXP::String::set(), setColor(), setColorTable(), setHour(), setLevel(), setMap(), setNameConv(), WXP::DatumPlot::setParam(), WXP::GridCont::setParam(), WXP::GridVect::setParam(), setPlotType(), setTimezone(), and setVariable().

Referenced by init(), and UpaPlot().

◆ setPath()

int UpaPlot::setPath ( const char *  path)

Sets the input file path

Parameters
pathThe file path

References WXP::Filename::setPath().

◆ setPlotType()

int UpaPlot::setPlotType ( const char *  str)

Sets the plot type

Parameters
strType (data, ln, cf, lcf, gvalue)

References WXP::StrLib::copy().

Referenced by init(), and setParam().

◆ setTimezone()

int UpaPlot::setTimezone ( const char *  str)

Sets the timezone for dates

Parameters
strZone

References WXP::Timezone::set().

Referenced by init(), and setParam().

◆ setVariable()

int UpaPlot::setVariable ( const char *  str)

Sets the variable to be plotted

Parameters
strVariable string

References WXP::String::set().

Referenced by init(), and setParam().


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