00001 #ifndef _WINC_SFCDECODE
00002 #define _WINC_SFCDECODE
00003
00004 #include <WXP/Date.h>
00005 #include <WXP/DateRange.h>
00006 #include <WXP/Filename.h>
00007 #include <WXP/SfcFile.h>
00008 #include <WXP/SfcHash.h>
00009
00010 namespace WXP {
00011 class SfcDecode {
00012 int ver;
00013 int update;
00014 int min;
00015 int app;
00016 int stype;
00017 Date date;
00018 DateRange drange;
00019 Filename infile;
00020 Filename outfile;
00021 SfcFile sfile;
00022 SfcHash shash;
00023
00024 public:
00025 SfcDecode();
00026 SfcDecode( const char *filename );
00027 int init();
00028 int setParam( const char *str );
00029 int setInput( const char *conv );
00030 int setOutput( const char *conv );
00031 int setHour( const char *str );
00032 int setDate( Date &rdate );
00033 bool checkSave( SfcData &data );
00034 int decode( Date &date );
00035 int decode( const char *filename );
00036 int decode();
00037
00038 static const int METAR = 0x1;
00039 static const int SPECI = 0x2;
00040 static const int SA = 0x4;
00041 static const int SP = 0x8;
00042 static const int SYNOP = 0x10;
00043 static const int SHIP = 0x20;
00044 static const int BUOY = 0x40;
00045 static const int DRIBU = 0x80;
00046 static const int CMAN = 0x100;
00047 static const int MISC = 0x200;
00048 };
00049 }
00050 #endif