Inter4ql  5.2
Rule.h
1 #ifndef __RULE_H__
2 #define __RULE_H__
3 
4 #include <map>
5 #include <vector>
6 
7 namespace Inter4ql {
8 
9  class Fact;
10  class Value;
11 
14  class Rule {
15  public:
21  Rule(Fact *_head, std::vector<std::vector<Fact*>*> *_body);
25  ~Rule();
31  Rule(Fact *_head, std::vector<Fact*> *_body);
36  Rule(Rule* other);
41  Fact *get_head();
46  std::vector<std::vector<Fact*>*> *get_body();
51  std::string print();
52 
53  void valuate_rule(std::map<std::string, Value*> binding);
54  private:
55  Fact *head;
56  std::vector<std::vector<Fact*>*> *body;
57  };
58 }
59 
60 #endif /* RULE_H */
61 
class that implements a fact
Definition: Fact.h:14
Rule(Fact *_head, std::vector< std::vector< Fact *> *> *_body)
constructor that creates rule
Definition: Rule.cc:8
Definition: Application.cc:37
std::vector< std::vector< Fact * > * > * get_body()
getter for a body facts
Definition: Rule.cc:57
std::string print()
returns string with rule information
Definition: Rule.cc:61
Fact * get_head()
getter for a head Fact
Definition: Rule.cc:53
class that handles rules in ModuleLocal
Definition: Rule.h:14
~Rule()
destructor of Rule object
Definition: Rule.cc:13