WXP C++ Library Version 6.74.9
Loading...
Searching...
No Matches
ModelSpec.h
1#ifndef _WINC_MODELSPEC
2#define _WINC_MODELSPEC
3
4#include <WXP/Const.h>
5
6namespace WXP {
7 class ModelSpec {
8 char name[20];
9 int num;
10 int nx, ny;
11 int itype;
12
13 struct ModelType {
14 int x,y;
15 int type;
16 char name[20];
17 };
18 ModelType spec[12];
19
20 public:
21 ModelSpec();
22 ModelSpec(const char *model);
23 int init();
24 int set( const char *model );
26 inline bool valid(){ return num > 0? true: false; };
28 inline int getNum(){ return num; };
30 inline const char *getName(){ return name; };
32 inline const char *getName( int ind ){
33 return ind >= 0 && ind < num ? spec[ind].name: NULL; };
35 inline int getNx(){ return nx; };
37 inline int getNy(){ return ny; };
39 inline int getX( int ind ){
40 return ind >= 0 && ind < num ? spec[ind].x: Const::MISS; };
42 inline int getY( int ind ){
43 return ind >= 0 && ind < num ? spec[ind].y: Const::MISS; };
45 inline int getType( int ind ){
46 return ind >= 0 && ind < num ? spec[ind].type: Const::MISS; };
47 int print();
48 };
49}
50#endif
static const int MISS
Definition Const.h:7
This class retrieves forecast model file parameters. This is a mapping between a model type and the f...
Definition ModelSpec.h:7
int getNy()
Definition ModelSpec.h:37
int getType(int ind)
Definition ModelSpec.h:45
int getNx()
Definition ModelSpec.h:35
const char * getName()
Definition ModelSpec.h:30
ModelSpec()
Definition ModelSpec.cc:29
int getY(int ind)
Definition ModelSpec.h:42
bool valid()
Definition ModelSpec.h:26
const char * getName(int ind)
Definition ModelSpec.h:32
int set(const char *model)
Definition ModelSpec.cc:56
int getNum()
Definition ModelSpec.h:28
int print()
Definition ModelSpec.cc:113
int init()
Definition ModelSpec.cc:44
int getX(int ind)
Definition ModelSpec.h:39
All WXP classes fall under the WXP namespace.
Definition Angle.h:4