WXP C++ Library Version 6.74.9
Loading...
Searching...
No Matches
MeteoPlot.h
1#ifndef _WINC_METEOPLOT
2#define _WINC_METEOPLOT
3
4#include <WXP/Date.h>
5#include <WXP/Drawing.h>
6#include <WXP/Filename.h>
7#include <WXP/Listener.h>
8#include <WXP/ModelSpec.h>
9#include <WXP/Plot.h>
10#include <WXP/Range.h>
11#include <WXP/Rect.h>
12#include <WXP/SfcData.h>
13#include <WXP/String.h>
14#include <WXP/VarSpec.h>
15
16namespace WXP {
17 class MeteoPlot : public Drawing, public Listener {
18 int type;
19 int sync;
20 Filename filename;
21 ModelSpec mspec;
22 char model[20];
23 char mlabel[20];
24 char id[20];
25 String variable;
26 PlotAttr gattr;
27 PlotAttr dattr;
28 PlotAttr lattr;
29 Date sdate, edate;
30 Timezone tz;
31
32 int num;
33 float size;
34 float offset;
35 float ymax, ymin;
36 float inc;
37 Rect view;
38 Rect pview;
39 int ptype;
40 int hours[121];
41
42 enum PType {
43 NORMAL,
44 CPLOT
45 };
46
47 public:
48 MeteoPlot();
49 MeteoPlot( const char *param );
50 int init();
51 int setType( int rtype );
52 int setType( const char *str );
53 int getType();
54 int setParam( const char *str );
55 int setFile();
56 int setInput( const char *type );
57 int setNameConv( const char *name );
58 int setHour( const char *str );
59 int setFilename();
60 int setFilename( const char *name );
61 int setFilename( Date &date );
62 int setFilename( Date &date, const char *param );
63 inline int setForeTime( const char *fore ){ return 1; };
64 int setModel( const char *str );
65 int setIdent( const char *str );
66 int setAttr( const char *str );
67 int setGridAttr( const char *str );
68 int setLabelAttr( const char *str );
69 int getDate( Date &date );
70 int getInitDate( Date &date );
71 int getDateOffset();
72 int getLoopType();
73 int getNumFrames();
74 int getDomain( Domain &domain );
75 inline int getSync(){ return sync; };
76 int getSfcStation( const char *id, SfcData sdata[], int &num );
77 int getMosStation( const char *id, SfcData sdata[], int &num );
78 int getRange( SfcData data[], int num, VarSpec &spec, Range &range );
79 float getX( float x );
80 float getY( float y );
81 int setPlotSize( VarSpec &spec, int type );
82 int nextPlot();
83 int setPlot( VarSpec &spec, Range &range );
84 int drawGrid( Plot &plot, const char *label );
85 int drawData( Plot &plot, SfcData data[], int num, VarSpec &spec );
86 int drawPlot( Plot &plot, SfcData data[], int num, VarSpec &spec );
87 int draw( Plot &plot );
88 int draw( Plot &plot, SfcData data[], int rnum );
89 void callback( const char *ev_str, const char *ev_data, const void *data );
90 int print();
91
92 enum Type {
93 PLOT,
94 DATA
95 };
96 enum {
97 SFC,
98 MOS
99 };
100 };
101}
102#endif
This class stores date and time information.
Definition Date.h:8
This class stores and manipulates domain data.
Definition Domain.h:19
This is a virtual class defining drawing routines.
Definition Drawing.h:16
This class creates filenames.
Definition Filename.h:11
This virtual class defines the callback method for use with plotting.
Definition Listener.h:11
This class plots a time series meteogram. This can either be a series of surface observations of data...
Definition MeteoPlot.h:17
int setParam(const char *str)
Definition MeteoPlot.cc:90
int setModel(const char *str)
Definition MeteoPlot.cc:177
int setNameConv(const char *name)
Definition MeteoPlot.cc:143
int setFilename()
Definition MeteoPlot.cc:153
int setFile()
Definition MeteoPlot.cc:108
int print()
Definition MeteoPlot.cc:753
int getDomain(Domain &domain)
Definition MeteoPlot.cc:238
int draw(Plot &plot)
Definition MeteoPlot.cc:718
void callback(const char *ev_str, const char *ev_data, const void *data)
Definition MeteoPlot.cc:235
int getNumFrames()
Definition MeteoPlot.cc:231
int setForeTime(const char *fore)
Definition MeteoPlot.h:63
int setInput(const char *type)
Definition MeteoPlot.cc:135
int getDateOffset()
Definition MeteoPlot.cc:219
int getLoopType()
Definition MeteoPlot.cc:223
int getInitDate(Date &date)
Definition MeteoPlot.cc:212
int getDate(Date &date)
Definition MeteoPlot.cc:207
int getSync()
Definition MeteoPlot.h:75
int setIdent(const char *str)
Definition MeteoPlot.cc:187
int init()
Definition MeteoPlot.cc:44
This class retrieves forecast model file parameters. This is a mapping between a model type and the f...
Definition ModelSpec.h:7
This class stores plot attributes.
Definition PlotAttr.h:8
This class defines mid-level graphics commands. Calls the Graph object for actual graphics output.
Definition Plot.h:26
This class stores surface data.
Definition SfcData.h:12
This is a variable length string class.
Definition String.h:5
This class manipulates timezones.
Definition Timezone.h:5
This class specifies variable information.
Definition VarSpec.h:13
All WXP classes fall under the WXP namespace.
Definition Angle.h:4
This struct defines a simple range of values.
Definition Range.h:5
This structure defines rectangle coordinates.
Definition Rect.h:5