home *** CD-ROM | disk | FTP | other *** search
/ ftp.umcs.maine.edu / 2015-02-07.ftp.umcs.maine.edu.tar / ftp.umcs.maine.edu / pub / thesis / zhongy / rule / rule.h < prev    next >
C/C++ Source or Header  |  1994-12-14  |  2KB  |  68 lines

  1. #ifndef RULE_H
  2. #define RULE_H
  3.  
  4.  
  5.  
  6. #include "object.h"
  7. /* operation for Premise */
  8. #define EQUAL_STR 1
  9. #define EQUAL_INT 2
  10. #define BIGGER 3
  11. #define LESSER 4
  12.  
  13.  
  14. class PremiseType{
  15.         private:
  16.            int operation;
  17.            ObjectType *IN_Object;
  18.            
  19.            ObjectValueType IN_Value; /*op code EQUAL_STR*/
  20.  
  21.            int int_val;              /*op code EQUAL_INT, BIGGER, LESSER*/
  22.  
  23.            PremiseType *IN_Next;
  24.         public:
  25.            void set_Object(ObjectType *Obj);
  26.            void set_Value(char *Obj_Value);
  27.            void set_Next(PremiseType *Next_Obj);
  28.            void set_Operation(int oper);
  29.            void set_Int(int val);
  30.            ObjectType *Object();
  31.            char *Value();
  32.            PremiseType *Next();
  33.            int Op();
  34.            int INT_Value();
  35.            };
  36.  
  37.  
  38.  
  39. class ConclusionType{
  40.         private:
  41.            ObjectType *IN_Object;
  42.            ObjectValueType IN_Value;
  43.         public:
  44.            void set_Object(ObjectType *Obj);
  45.            void set_Value(char *Obj_Value);
  46.            ObjectType *Object();
  47.            char *Value();
  48.            };
  49.  
  50. class RuleType{
  51.         private:
  52.            RuleNameType IN_Name;
  53.            PremiseType *IN_Premise;
  54.            ConclusionType *IN_Conclusion;
  55.            RuleType *IN_Next;
  56.         public:
  57.            void set_Name(char *Rule_Name);
  58.            void set_Premise(PremiseType *PremisePtr);
  59.            void set_Conclusion(ConclusionType *ConclusionPtr);
  60.            void set_Next(RuleType *Next_Rule);
  61.            char *Name();
  62.            PremiseType *Premise();
  63.            ConclusionType *Conclusion();
  64.            RuleType *Next();
  65.            };
  66.  
  67. #endif
  68.