00001
00002
00003 #ifndef _WTYPE_H
00004 #define _WTYPE_H
00005
00006 #include <string>
00007 #include <map>
00008
00011 typedef enum Tag {
00012 S_HAS_MAI = 0,
00013 S_DEN_MAI = 1,
00014 S_DEN_MAI_DEK = 2,
00015 S_DEN_MAI_ = 3,
00016 S_DEN_MAI_pDEKp = 4,
00017 S_PUNT_PUNT = 5,
00018 S_PUNT_KOMA = 6,
00019 S_PUNT_BI_PUNT = 7,
00020 S_PUNT_PUNT_KOMA = 8,
00021 S_PUNT_GALD = 9,
00022 S_PUNT_ESKL = 10,
00023 S_PUNT_HIRU = 11,
00024 S_BEREIZ = 12,
00025 S_ERROM = 13,
00026 S_ERREPIK = 14,
00027 S_KAR_BER = 15,
00028 S_IREKI = 16,
00029 S_ITXI = 17,
00030 S_TXURIAK = 18,
00031 S_SLASH = 19,
00032 S_ZEN_DEK = 20,
00033 S_ZEN = 21,
00034 S_ID = 22,
00035 S_IDENT = 23,
00036 S_BAK = 24,
00037 S_LAB_DEK = 25,
00038 S_SIG_MIN_DEK = 26,
00039 S_SIG_MIN = 27,
00040 S_SIG_MAI = 28,
00041 S_SIG_MAI_DEK = 29,
00042 S_SIG_MAI_DEK_ = 30,
00043 S_FOREIGN = 31,
00044 S_DEFEKTUZ = 32
00045 };
00046
00050 class WType{
00051 private:
00052 Tag tag;
00053 static std::map<const std::string, Tag> bereziT;
00054
00055 Tag string2Etiketak(const std::string & ) const;
00056 std::string Etiketak2string() const;
00057 public:
00058
00060 WType();
00061
00065 WType( const Tag & eti);
00066
00070 WType( const std::string & str);
00071
00075 WType( const WType & type);
00076
00081 bool operator ==(const WType & type) const;
00082
00087 bool operator ==(const Tag & tag) const;
00088
00093 bool operator !=(const WType & type) const;
00094
00099 bool operator !=(const Tag & tag) const;
00100
00105 WType operator =(const WType & type);
00106
00107
00111 Tag getTag() const;
00112
00116 std::string str() const;
00117
00121 char* c_str() const;
00122
00126 void init( const Tag & eti);
00127
00128 };
00129
00130 #endif //_WTYPE_H