FRED
|
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: AV_Status.h 00010 // 00011 00012 #ifndef _FRED_AVSTATUS_H 00013 #define _FRED_AVSTATUS_H 00014 00015 #include <stdio.h> 00016 #include <assert.h> 00017 #include <iostream> 00018 #include "Random.h" 00019 00020 class Antiviral; 00021 class Antivirals; 00022 class Health; 00023 00024 using namespace std; 00025 00026 class AV_Health{ 00027 public: 00028 // Creation Operations 00032 AV_Health(); 00033 00041 AV_Health(int _av_day, Antiviral* _AV, Health* _health); 00042 00043 //Access Members 00047 virtual int get_av_start_day() const {return av_day;} 00048 00052 virtual int get_av_end_day() const {return av_end_day;} 00053 00057 virtual Health * get_health() const {return health;} 00058 00062 virtual int get_disease() const {return disease;} 00063 00067 virtual Antiviral * get_antiviral() const { return AV; } 00068 00073 virtual bool is_on_av(int day) const { 00074 return ((day >= av_day) && (day <= av_end_day)); 00075 } 00076 00080 virtual bool is_effective() const { 00081 return (av_end_day !=-1); 00082 } 00083 00084 //Utility Functions 00090 virtual void update(int day); 00091 00095 virtual void print() const; 00096 00100 virtual void printTrace() const; 00101 00102 00103 private: 00104 int av_day; // Day on which the AV treatment starts 00105 int av_end_day; // Day on which the AV treatment ends 00106 Health* health; // Pointer to the health class for agent 00107 int disease; // Disease for this AV 00108 Antiviral* AV; // Pointer to the AV the person took 00109 }; 00110 00111 #endif