00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef _moot_EVAL_H
00030 #define _moot_EVAL_H
00031
00032 #include <mootTypes.h>
00033 #include <mootToken.h>
00034 #include <string>
00035
00036
00037 moot_BEGIN_NAMESPACE
00038
00039
00040
00041
00042
00044 class mootEval {
00045 public:
00046
00048 typedef enum {
00049 MEF_None = 0x0000,
00050
00051 MEF_TokMismatch = 0x0002,
00052 MEF_BestMismatch = 0x0004,
00053 MEF_EmptyClass1 = 0x0008,
00054 MEF_EmptyClass2 = 0x0010,
00055 MEF_ImpClass1 = 0x0020,
00056 MEF_ImpClass2 = 0x0040,
00057 MEF_XImpClass1 = 0x0080,
00058 MEF_XImpClass2 = 0x0100
00059 } evalStatus;
00060
00061 public:
00062 int status;
00064 public:
00065 mootEval(void) : status(MEF_None) {};
00066
00068 inline void clear(void) { status = MEF_None; };
00069
00075 int compareTokens(const mootToken &tok1, const mootToken &tok2);
00076
00078
00079
00080
00081
00082
00084 inline bool isTokenMismatch(void) { return status&MEF_TokMismatch; };
00085
00087 inline bool isBestMismatch(void) { return status&MEF_BestMismatch; };
00088
00093 inline bool isEmptyClass1(void) { return status&MEF_EmptyClass1; };
00094
00099 inline bool isEmptyClass2(void) { return status&MEF_EmptyClass2; };
00100
00105 inline bool isImpClass1(void) { return status&MEF_ImpClass1; };
00106
00111 inline bool isImpClass2(void) { return status&MEF_ImpClass2; };
00112
00117 inline bool isXImpClass1(void) { return status&MEF_XImpClass1; };
00118
00123 inline bool isXImpClass2(void) { return status&MEF_XImpClass2; };
00124
00125
00126
00127
00128
00144 string status_string(void);
00145 };
00146
00147
00148 moot_END_NAMESPACE
00149
00150 #endif