id.h

Go to the documentation of this file.
00001 // Copyright (C) 2006 Bryan Jacobson <bryanjacobson@users.sourceforge.net>
00002 // This program is licensed under the terms of the GNU General Public License
00003 // version 2, as published by the Free Software Foundation.
00004 // This program is distributed in the hope that it will be useful,
00005 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00006 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00007 
00011 
00012 #ifndef ID_H
00013 #define ID_H
00014 
00016 typedef int Id;
00017 
00019 class I
00020 {
00021   public:
00023     static Id Get(char *str);
00024 
00026     static Id Check(char *str);
00027 
00029     static char *String(Id id);
00030 
00032     static void Print(Id id);
00033 
00035     static const Id I_NOT_FOUND;
00036 
00038     static void Dump(char *fileName);
00039 
00041     static void Read(char *fileName);
00042   private:
00043            I(); 
00044     void   Allocate(int size); 
00045     void   Insert(char *s, int loc);    
00046     int    mCount;     
00047     int    mHashSize;  
00048     int    mIndexSize; 
00049     char **mIndex;
00050     char ***mHashTable;
00051 };
00052 
00053 // =============================================================
00055 //   GetHashVal: Compute the hash value
00057 // =============================================================
00058 // TODO: Is the interface GetHashVal() still needed?
00059 extern unsigned int GetHashVal(char *str);
00060 
00061 // Pre-defined Id's:
00062 extern Id gIdInst;
00063 extern Id gIdClass;
00064 extern Id gIdRecip;
00065 extern Id gIdEquiv;
00066 extern Id gIdProp;
00067 extern Id gIdQuery;
00068 extern Id gIdLargest;
00069 extern Id gIdSmallest;
00070 extern Id gIdValue;
00071 extern Id gIdNumber;
00072 extern Id gIdLeft;
00073 extern Id gIdRight;
00074 extern Id gIdBoth;
00075 extern Id gIdStart;
00076 extern Id gIdEnd;
00077 extern Id gIdUnknown;
00078 extern Id gIdMath;
00079 extern Id gIdCalc;
00080 extern Id gIdPlus;
00081 extern Id gIdMinus;
00082 extern Id gIdTimes;
00083 extern Id gIdDivide;
00084 extern Id gIdName;
00085 extern Id gIdList;
00086 extern Id gIdChannel;
00087 extern Id gIdTitle;
00088 extern Id gIdSubTitle;
00089 extern Id gIdTime;
00090 extern Id gIdOnTv;
00091 extern Id gIdProgram;
00092 extern Id gIdJanuary;
00093 extern Id gIdFebruary;
00094 extern Id gIdMarch;
00095 extern Id gIdApril;
00096 extern Id gIdMay;
00097 extern Id gIdJune;
00098 extern Id gIdJuly;
00099 extern Id gIdAugust;
00100 extern Id gIdSeptember;
00101 extern Id gIdOctober;
00102 extern Id gIdNovember;
00103 extern Id gIdDecember;
00104 extern Id gIdSunday;
00105 extern Id gIdMonday;
00106 extern Id gIdTuesday;
00107 extern Id gIdWednesday;
00108 extern Id gIdThursday;
00109 extern Id gIdFriday;
00110 extern Id gIdSaturday;
00111 extern Id gIdTomorrow;
00112 extern Id gIdToday;
00113 extern Id gIdTonight;
00114 extern Id gIdYesterday;
00115 extern Id gIdNoon;
00116 extern Id gIdMidnight;
00117 extern Id gIdMorning;
00118 extern Id gIdAfternoon;
00119 extern Id gIdEvening;
00120 extern Id gIdPm;
00121 extern Id gIdAm;
00122 extern Id gIdNight;
00123 extern Id gIdDay;
00124 extern Id gIdSelect;
00125 extern Id gIdAction;
00126 extern Id gIdAct;
00127 extern Id gIdAdd;
00128 extern Id gIdDelete;
00129 extern Id gIdTvProg;
00130 extern Id gIdTimeAct;
00131 extern Id gIdDisplay;
00132 extern Id gIdAll;
00133 extern Id gIdFavorite;
00134 extern Id gIdComedy;
00135 extern Id gIdSitcom;
00136 extern Id gIdMovie;
00137 extern Id gIdNew;
00138 extern Id gIdDescr;
00139 extern Id gIdNote;
00140 extern Id gIdException;
00141 
00142 #endif // ID_H

Generated on Sun Oct 8 09:32:09 2006 for gabbie by  doxygen 1.4.6