This class plots surface data. More...
#include "../include/SfcPlot.h"
Public Member Functions | |
| SfcPlot () | |
| SfcPlot (const char *param) | |
| int | init () |
| int | setParam (const char *str) |
| int | setPath (const char *path) |
| int | setFile () |
| int | setInput (const char *str) |
| int | setNameConv (const char *name) |
| int | setHour (const char *str) |
| int | setFilename () |
| int | setFilename (Date &date) |
| int | setFilename (const char *str) |
| 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 | 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 () |
This class plots surface data.
This class will read in a decoded surface 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:
SfcPlot splot;
splot.setParam( "parameters,..." );
splot.setFilename();
splot.setVariable( "variable" );
splot.draw( plot );
| SfcPlot::SfcPlot | ( | ) |
Constructor. Initializes class
References init().
| SfcPlot::SfcPlot | ( | const char * | param | ) |
Constructor. Initializes class and sets parameters
| str | The parameters to set |
References init(), and setParam().
| void SfcPlot::callback | ( | const char * | ev_str, | |
| const char * | ev_data, | |||
| const void * | data | |||
| ) | [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.
| int SfcPlot::draw | ( | Plot & | plot | ) | [virtual] |
Plots the surface data
| plot | The plot object to draw to |
Implements WXP::Drawing.
References WXP::Plot::addLabel(), WXP::String::append(), WXP::String::clear(), WXP::SfcDataTool::compute(), WXP::SfcGrid::compute(), WXP::StrLib::copy(), WXP::MapPlot::draw(), WXP::StrLib::equal(), WXP::String::get(), WXP::Filename::getName(), WXP::SfcDataTool::getUnits(), WXP::VarSpec::init(), WXP::GridSpec::init(), WXP::Wxp::isDebug(), WXP::Domain::isSet(), WXP::Wxp::outDebug(), WXP::Wxp::outMessage(), WXP::VarList::print(), WXP::FileAttr::READ, WXP::StrLib::replace(), WXP::VarSpec::set(), WXP::Filename::setFile(), WXP::Plot::setFill(), WXP::Grid::setInfo(), WXP::Plot::setLine(), WXP::Plot::setMark(), WXP::GridCont::setParam(), WXP::MapPlot::setParam(), WXP::Plot::setText(), WXP::SfcGrid::setVariable(), WXP::VarSpec::toInfoLabel(), WXP::GridMath::units(), WXP::StrLib::valid(), and WXP::String::valid().
| int SfcPlot::getDate | ( | Date & | date | ) | [virtual] |
Gets the date information from the input file
| date | The file date |
Implements WXP::Drawing.
References WXP::Filename::getDate().
| int SfcPlot::getDateOffset | ( | ) | [virtual] |
Gets the date offset from name convention for loops
Implements WXP::Drawing.
| int SfcPlot::getDomain | ( | Domain & | domain | ) | [virtual] |
Gets the default domain
| domain | The default domain |
Implements WXP::Drawing.
References WXP::DomainTool::set().
| int SfcPlot::getInitDate | ( | Date & | date | ) | [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().
| int SfcPlot::getLoopType | ( | ) | [virtual] |
| int SfcPlot::getNumFrames | ( | ) | [virtual] |
Gets the possible number of frames in a loop
Implements WXP::Drawing.
References WXP::Filename::getNumFiles().
| int WXP::SfcPlot::getSync | ( | ) | [inline, virtual] |
Tells whether an object should be used to sync other to it
Implements WXP::Drawing.
| int SfcPlot::init | ( | ) | [virtual] |
Intializes the class
Implements WXP::Drawing.
References WXP::StrLib::copy(), WXP::DomainTool::decode(), WXP::String::init(), WXP::Filename::init(), setFile(), setNameConv(), and setParam().
Referenced by SfcPlot().
| int SfcPlot::print | ( | ) | [virtual] |
Prints class information
Implements WXP::Drawing.
References WXP::String::get(), WXP::Domain::print(), and WXP::Filename::print().
| int SfcPlot::setColor | ( | const char * | str | ) |
Sets the color parameters
| str | Color string |
References WXP::String::set().
Referenced by setParam().
| int SfcPlot::setColorTable | ( | const char * | str | ) |
Sets the color table parameters
| str | Color table parameter |
References WXP::String::set().
Referenced by setParam().
| int SfcPlot::setFile | ( | ) | [virtual] |
Sets up the file parameters
Implements WXP::Drawing.
References setHour(), setInput(), setNameConv(), and WXP::Filename::setNumFiles().
Referenced by init().
| int SfcPlot::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
| date | The file date | |
| param | The name convention parameters |
Implements WXP::Drawing.
References WXP::Filename::setDate().
| int SfcPlot::setFilename | ( | const char * | str | ) | [virtual] |
Sets a specific file name
| str | The filename to use |
Implements WXP::Drawing.
References WXP::Filename::setFile().
| int SfcPlot::setFilename | ( | Date & | date | ) | [virtual] |
Sets the input file date. The file name is derived using name convention
| date | The file date |
Implements WXP::Drawing.
References WXP::Filename::setDate().
| int SfcPlot::setFilename | ( | ) | [virtual] |
| int WXP::SfcPlot::setForeTime | ( | const char * | fore | ) | [inline, virtual] |
| int SfcPlot::setHour | ( | const char * | str | ) |
Sets the specific file time
| str | The file time (hour) |
References WXP::Filename::setFixDate().
Referenced by setFile(), and setParam().
| int SfcPlot::setInput | ( | const char * | str | ) | [virtual] |
Sets the input file type
| str | The file type |
Implements WXP::Drawing.
Referenced by setFile().
| int SfcPlot::setNameConv | ( | const char * | name | ) | [virtual] |
Sets the file name convention
| name | The name convention |
Implements WXP::Drawing.
References WXP::Filename::setNameConv().
Referenced by init(), setFile(), and setParam().
| int SfcPlot::setParam | ( | const char * | str | ) | [virtual] |
Sets the parameters within the class:
| str | String to parse ct=file - Color table file co=color - Plotting color 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) sync - Specifes object as time sync |
Implements WXP::Drawing.
References WXP::StrLib::copy(), WXP::Strings::equal(), WXP::Strings::getNum(), WXP::Strings::getString(), WXP::Strings::getStringAfter(), WXP::Strings::iequal(), WXP::String::set(), setColor(), setColorTable(), setHour(), setNameConv(), WXP::GridCont::setParam(), WXP::DatumPlot::setParam(), and setVariable().
| int SfcPlot::setPath | ( | const char * | path | ) |
| int SfcPlot::setVariable | ( | const char * | str | ) |
Sets the variable to be plotted
| str | Variable string |
References WXP::String::set().
Referenced by setParam().
1.6.1