00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #include<os.h>
00017 #include<Predicate.h>
00018 #include<PredicateImpl.h>
00019 Condition::Condition()
00020 {
00021
00022 pred = NULL;
00023 }
00024 void Condition::reset()
00025 {
00026 if (pred) {delete pred;}
00027 pred = NULL;
00028 }
00029 Condition::~Condition()
00030 {
00031 if (pred) delete pred;
00032 pred = NULL;
00033 }
00034 void Condition::setTerm(const char* fName1, ComparisionOp op,
00035 const char *fName2)
00036 {
00037 if (pred) delete pred;
00038 pred = new PredicateImpl();
00039 pred->setTerm(fName1, op, fName2);
00040 }
00041
00042
00043 void Condition::setTerm(const char* fName1, ComparisionOp op, void *opnd)
00044 {
00045 if (pred) delete pred;
00046 pred = new PredicateImpl();
00047 pred->setTerm(fName1, op, opnd);
00048 }
00049
00050 void Condition::setTerm(const char* fName1, ComparisionOp op, void **opnd)
00051 {
00052 if (pred) delete pred;
00053 pred = new PredicateImpl();
00054 pred->setTerm(fName1, op, opnd);
00055 }
00056
00057 void Condition::setTerm(Predicate *p1, LogicalOp op, Predicate *p2 )
00058 {
00059 if (pred) delete pred;
00060 pred = new PredicateImpl();
00061 pred->setTerm(p1, op, p2);
00062 }