00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef PREDICATE_H
00018 #define PREDICATE_H
00019 #include<DataType.h>
00020 class PredicateImpl;
00021 class Predicate;
00042 class Condition
00043 {
00044 Predicate *pred;
00045 public:
00046 Condition();
00047 ~Condition();
00048 void reset();
00049
00053 Predicate* getPredicate() { return pred; }
00054
00058 void setPredicate(Predicate * predicate) { pred = predicate; }
00059
00060
00066 void setTerm(const char* fName1, ComparisionOp op, const char *fName2);
00067
00073 void setTerm(const char* fName1, ComparisionOp op, void *opnd);
00074
00080 void setTerm(const char* fName1, ComparisionOp op, void **opnd);
00081
00082
00088 void setTerm(Predicate *p1, LogicalOp op, Predicate *p2 = NULL);
00089
00090 };
00091
00102 class Predicate
00103 {
00104 public:
00105 virtual void setTerm(const char* fName1, ComparisionOp op, const char *fName2)=0;
00106
00107
00108 virtual void setTerm(const char* fName1, ComparisionOp op, void *opnd)=0;
00109
00110
00111 virtual void setTerm(const char* fName1, ComparisionOp op, void **opnd)=0;
00112
00113 virtual void setTerm(Predicate *p1, LogicalOp op, Predicate *p2 = NULL)=0;
00114
00115 virtual void print()=0;
00116 virtual ~Predicate(){}
00117 };
00118
00119
00120 #endif