00001 #ifndef _WINC_LEVEL
00002 #define _WINC_LEVEL
00003
00004 #include <WXP/String.h>
00005 #include <WXP/VCoord.h>
00006
00007 namespace WXP {
00008 class Level {
00009 int type1;
00010 float lev1;
00011 int type2;
00012 float lev2;
00013
00014 public:
00015 Level();
00016 Level( int t1, float l1, int t2, float l2 );
00017 Level( int t, float l1, float l2 );
00018 Level( int t, int l );
00019 Level( const char *str );
00020 int init();
00021 inline bool isSet(){ return type1 != NONE; };
00022 int decode( const char *str );
00023 int toTypeCode();
00024 int toLevelCode();
00025 int set( int t1, float l1, int t2, float l2 );
00026 int set( int t, float l1, float l2 );
00027 int set( int t, float l );
00028 int decode( int t, int l );
00029 int set( const char *str );
00030 inline int getType(){ return type1; };
00031 inline int getType1(){ return type1; };
00032 inline int getType2(){ return type2; };
00033 inline float getLev1(){ return lev1; };
00034 inline float getLev2(){ return lev2; };
00035 int getLower( VCoord &vc );
00036 int getUpper( VCoord &vc );
00037 int toString( String &str );
00038 int toLabel( String &str );
00039 inline bool valid(){ return lev1 != Const::MISS; };
00040 int print();
00041 bool isLayer();
00042 bool isPres();
00043 bool isHght();
00044 bool isPot();
00045
00046 static int toTypeCode( int type1, int type2 );
00047 static int toTypeCode( int type1 );
00048
00049
00050
00051 static const int NONE = -9999;
00052 static const int SND = 0;
00053 static const int SFC = 1;
00054 static const int CLD_BOT = 2;
00055 static const int CLD_TOP = 3;
00056 static const int FRZ = 4;
00057 static const int LCL = 5;
00058 static const int MWND = 6;
00059 static const int TROP = 7;
00060 static const int TOP = 8;
00061 static const int SEABOT = 9;
00062 static const int PR = 100;
00063 static const int MSL = 101;
00064 static const int HT = 102;
00065 static const int HAG = 103;
00066 static const int SIG = 104;
00067 static const int HYB = 105;
00068 static const int HBG = 106;
00069 static const int POT = 107;
00070 static const int PAG = 108;
00071 static const int POT_VORT = 109;
00072 static const int ETA = 111;
00073 static const int MISC = 199;
00074 static const int WHOLE = 200;
00075 static const int TOP_FRZ = 204;
00076 static const int GSCLD_BOT = 206;
00077 static const int GSCLD_TOP = 207;
00078 static const int BLCLD_BOT = 209;
00079 static const int BLCLD_TOP = 210;
00080 static const int BLCLD_LYR = 211;
00081 static const int LCLD_BOT = 212;
00082 static const int LCLD_TOP = 213;
00083 static const int LCLD_LYR = 214;
00084 static const int CLD_CEIL = 215;
00085 static const int PBL = 220;
00086 static const int MCLD_BOT = 222;
00087 static const int MCLD_TOP = 223;
00088 static const int MCLD_LYR = 224;
00089 static const int HCLD_BOT = 232;
00090 static const int HCLD_TOP = 233;
00091 static const int HCLD_LYR = 234;
00092 static const int CONV_BOT = 242;
00093 static const int CONV_TOP = 243;
00094 static const int CONV_LYR = 244;
00095 static const int WBZERO = 245;
00096 static const int MAXEPOT = 246;
00097 static const int EQUILIB = 247;
00098 static const int SCCLD_BOT = 248;
00099 static const int SCCLD_TOP = 249;
00100 static const int DCCLD_BOT = 251;
00101 static const int DCCLD_TOP = 252;
00102 static const int SCLW_BOT = 253;
00103 static const int SCLW_TOP = 254;
00104 };
00105 }
00106 #endif