WXP C++ Library Version 6.74.6
Loading...
Searching...
No Matches
Level.h
1#ifndef _WINC_LEVEL
2#define _WINC_LEVEL
3
4#include <WXP/String.h>
5#include <WXP/VCoord.h>
6
7namespace WXP {
8 class Level {
9 struct Lev {
10 int type;
11 float lev;
12 };
13 Lev l1; // Lower level
14 Lev l2; // Upper level
15
16 int decodeLev( const char *str, Lev &l );
17
18 public:
19 Level();
20 Level( int t1, float l1, int t2, float l2 );
21 Level( int t, float l1, float l2 );
22 Level( int t, int l );
23 Level( const char *str );
24 int init();
26 inline bool isSet(){ return l1.type != NONE; };
27 int decode( const char *str );
28 int toTypeCode();
29 int toLevelCode();
30 int set( int t1, float l1, int t2, float l2 );
31 int set( int t, float l1, float l2 );
32 int set( int t, float l );
33 int decode( int t, int l );
34 int set( const char *str );
36 inline int getType(){ return l1.type; };
38 inline int getType1(){ return l1.type; };
40 inline int getType2(){ return l2.type; };
42 inline float getLev1(){ return l1.lev; };
44 inline float getLev2(){ return l2.lev; };
45 int getLower( VCoord &vc );
46 int getUpper( VCoord &vc );
47 int toString( String &str );
48 int toLabel( String &str );
50 inline bool valid(){ return l1.lev != Const::MISS; };
51 int print();
52 bool isLayer();
53 bool isPres();
54 bool isHght();
55 bool isPot();
56
57 static int toTypeCode( int type1, int type2 );
58 static int toTypeCode( int type1 );
59 /*
60 Pressure level types
61 */
62 static const int NONE = -9999;
63 static const int SND = 0;
64 static const int SFC = 1;
65 static const int CLD_BOT = 2;
66 static const int CLD_TOP = 3;
67 static const int FRZ = 4;
68 static const int LCL = 5;
69 static const int MWND = 6;
70 static const int TROP = 7;
71 static const int TOP = 8;
72 static const int SEABOT = 9;
73 static const int WHOLE = 10;
74 static const int CB_BASE = 11;
75 static const int CB_TOP = 12;
76 static const int ISOTHERM = 20;
77 static const int PR = 100;
78 static const int MSL = 101;
79 static const int HT = 102;
80 static const int HAG = 103;
81 static const int SIG = 104;
82 static const int HYB = 105;
83 static const int HBG = 106;
84 static const int POT = 107;
85 static const int PAG = 108;
86 static const int POT_VORT = 109;
87 static const int ETA = 111;
88 static const int MISC = 199;
89 static const int WHOLEL = 200;
90 static const int TOP_FRZ = 204;
91 static const int GSCLD_BOT = 206;
92 static const int GSCLD_TOP = 207;
93 static const int BLCLD_BOT = 209;
94 static const int BLCLD_TOP = 210;
95 static const int BLCLD_LYR = 211;
96 static const int LCLD_BOT = 212;
97 static const int LCLD_TOP = 213;
98 static const int LCLD_LYR = 214;
99 static const int CLD_CEIL = 215;
100 static const int PBL = 220;
101 static const int MCLD_BOT = 222;
102 static const int MCLD_TOP = 223;
103 static const int MCLD_LYR = 224;
104 static const int HCLD_BOT = 232;
105 static const int HCLD_TOP = 233;
106 static const int HCLD_LYR = 234;
107 static const int CONV_BOT = 242;
108 static const int CONV_TOP = 243;
109 static const int CONV_LYR = 244;
110 static const int WBZERO = 245;
111 static const int MAXEPOT = 246;
112 static const int EQUILIB = 247;
113 static const int SCCLD_BOT = 248;
114 static const int SCCLD_TOP = 249;
115 static const int DCCLD_BOT = 251;
116 static const int DCCLD_TOP = 252;
117 static const int SCLW_BOT = 253;
118 static const int SCLW_TOP = 254;
119 };
120}
121#endif
static const int MISS
Definition: Const.h:7
This class defines vertical level parameters.
Definition: Level.h:8
int getType1()
Definition: Level.h:38
static const int LCLD_TOP
Definition: Level.h:97
static const int LCLD_BOT
Definition: Level.h:96
static const int WBZERO
Definition: Level.h:110
static const int WHOLEL
Definition: Level.h:89
static const int HCLD_LYR
Definition: Level.h:106
float getLev2()
Definition: Level.h:44
static const int SEABOT
Definition: Level.h:72
bool isSet()
Definition: Level.h:26
static const int SCLW_TOP
Definition: Level.h:118
static const int PR
Definition: Level.h:77
static const int MSL
Definition: Level.h:78
int decode(const char *str)
Definition: Level.cc:448
int getUpper(VCoord &vc)
Definition: Level.cc:612
static const int TOP
Definition: Level.h:71
static const int DCCLD_TOP
Definition: Level.h:116
static const int WHOLE
Definition: Level.h:73
static const int BLCLD_BOT
Definition: Level.h:93
static const int CLD_CEIL
Definition: Level.h:99
static const int FRZ
Definition: Level.h:67
static const int SCCLD_BOT
Definition: Level.h:113
static const int CLD_BOT
Definition: Level.h:65
bool isPres()
Definition: Level.cc:1258
static const int MISC
Definition: Level.h:88
bool valid()
Definition: Level.h:50
static const int SND
Definition: Level.h:63
float getLev1()
Definition: Level.h:42
static const int SIG
Definition: Level.h:81
static const int MAXEPOT
Definition: Level.h:111
static const int BLCLD_TOP
Definition: Level.h:94
static const int LCLD_LYR
Definition: Level.h:98
int getType()
Definition: Level.h:36
static const int NONE
Definition: Level.h:62
int print()
Definition: Level.cc:1293
int toLevelCode()
Definition: Level.cc:705
static const int MCLD_LYR
Definition: Level.h:103
static const int LCL
Definition: Level.h:68
static const int HCLD_TOP
Definition: Level.h:105
static const int PAG
Definition: Level.h:85
static const int SCLW_BOT
Definition: Level.h:117
static const int HAG
Definition: Level.h:80
static const int CONV_LYR
Definition: Level.h:109
bool isLayer()
Definition: Level.cc:1248
Level()
Definition: Level.cc:24
static const int GSCLD_BOT
Definition: Level.h:91
static const int BLCLD_LYR
Definition: Level.h:95
static const int ETA
Definition: Level.h:87
int getLower(VCoord &vc)
Definition: Level.cc:584
static const int ISOTHERM
Definition: Level.h:76
bool isPot()
Definition: Level.cc:1284
static const int MCLD_TOP
Definition: Level.h:102
static const int POT
Definition: Level.h:84
static const int HCLD_BOT
Definition: Level.h:104
static const int TROP
Definition: Level.h:70
int set(int t1, float l1, int t2, float l2)
Definition: Level.cc:89
int toLabel(String &str)
Definition: Level.cc:1083
static const int PBL
Definition: Level.h:100
static const int EQUILIB
Definition: Level.h:112
int init()
Definition: Level.cc:74
static const int HBG
Definition: Level.h:83
static const int CONV_BOT
Definition: Level.h:107
static const int POT_VORT
Definition: Level.h:86
static const int CLD_TOP
Definition: Level.h:66
static const int SCCLD_TOP
Definition: Level.h:114
static const int SFC
Definition: Level.h:64
static const int DCCLD_BOT
Definition: Level.h:115
static const int MWND
Definition: Level.h:69
static const int HT
Definition: Level.h:79
static const int CB_TOP
Definition: Level.h:75
static const int CB_BASE
Definition: Level.h:74
int toTypeCode()
Definition: Level.cc:640
static const int GSCLD_TOP
Definition: Level.h:92
static const int CONV_TOP
Definition: Level.h:108
static const int HYB
Definition: Level.h:82
int toString(String &str)
Definition: Level.cc:917
bool isHght()
Definition: Level.cc:1272
static const int TOP_FRZ
Definition: Level.h:90
int getType2()
Definition: Level.h:40
static const int MCLD_BOT
Definition: Level.h:101
This is a variable length string class.
Definition: String.h:5
This structure defines a vertical coordinate (type,val)
Definition: VCoord.h:5
All WXP classes fall under the WXP namespace.
Definition: Angle.h:4