FRED
Policy.h
00001 /*
00002  Copyright 2009 by the University of Pittsburgh
00003  Licensed under the Academic Free License version 3.0
00004  See the file "LICENSE" for more information
00005  */
00006 
00007 //
00008 //
00009 // File: Policy.h
00010 //
00011 
00012 
00013 
00014 #ifndef _FRED_POLICY_H
00015 #define _FRED_POLICY_H
00016 
00017 #include <iostream>
00018 #include <string>
00019 #include <vector>
00020 
00021 class Manager;
00022 class Decision;
00023 class Person;
00024 
00025 using namespace std;
00026 
00031 class Policy{
00032   
00033 public:
00034 
00038   Policy();
00039   
00045   Policy(Manager* mgr);
00046   
00047   ~Policy();
00048 
00056   virtual int choose(Person* person, int disease, int current_day);
00057 
00065   virtual bool choose_first_positive(Person* person, int disease, int current_day);
00066 
00074   virtual bool choose_first_negative(Person* person, int disease, int current_day);
00075   // decision will return -1 if the decision is no
00076   // or the integer result of the policies in the decision   
00077   
00081   Manager* get_manager() const { return manager; }
00082 
00086   void reset();
00087 
00091   void print() const;
00092   
00093 protected:
00094   vector < Decision * > decision_list;
00095   string Name;
00096   Manager* manager;
00097   
00098 };
00099 
00100 #endif
 All Classes Functions