00001 #ifndef _WINC_VTEC
00002 #define _WINC_VTEC
00003
00004 #include <WXP/Date.h>
00005
00006 namespace WXP {
00007 class Vtec {
00008 int pclass;
00009 int action;
00010 char id[5];
00011 char type[3];
00012 int sig;
00013 int num;
00014 Date bdate;
00015 Date edate;
00016
00017 public:
00018 Vtec();
00019 Vtec( const char *str );
00020 int init();
00021 int decode( const char *str );
00022 int set( const char *str );
00023 inline int getClass(){ return pclass; };
00024 inline int getAction(){ return action; };
00025 inline const char *getId(){ return id; };
00026 inline const char *getType(){ return type; };
00027 inline int getSignificance(){ return sig; };
00028 inline int getNumber(){ return num; };
00029 inline int getBegDate( Date &rdate ){ rdate = bdate; return 1; };
00030 inline int getBegSecs(){ return bdate.getSeconds(); };
00031 inline int getEndDate( Date &rdate ){ rdate = edate; return 1; };
00032 inline int getEndSecs(){ return edate.getSeconds(); };
00033 int print();
00034
00035 enum Class {
00036 OPERATIONAL,
00037 TEST,
00038 EXP_PROD,
00039 EXP_VTEC
00040 };
00041
00042 enum Action {
00043 NEW,
00044 CONTINUED,
00045 EXTENDED_TIME,
00046 EXTENDED_AREA,
00047 EXTENDED_BOTH,
00048 UPGRADED,
00049 CANCELED,
00050 EXPIRED,
00051 CORRECTION,
00052 ROUTINE
00053 };
00054
00055 enum Sig {
00056 WARNING,
00057 WATCH,
00058 ADVISORY,
00059 STATEMENT,
00060 FORECAST,
00061 OUTLOOK,
00062 SYNOPSIS
00063 };
00064
00065 static const char *getClassString( int ind );
00066 static const char *getActionString( int ind );
00067 static const char *getPhenomString( const char *type );
00068 static const char *getSigString( int ind );
00069
00070 };
00071 }
00072 #endif