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: Antiviral.h 00010 // 00011 #ifndef _FRED_ANTIVIRALS_H 00012 #define _FRED_ANTIVIRALS_H 00013 00014 #include <stdio.h> 00015 #include <iomanip> 00016 #include <vector> 00017 #define MAX_ANTIVIRALS 4 00018 00019 using namespace std; 00020 00021 class Antiviral; 00022 00026 class Antivirals { 00027 00028 public: 00029 // Creation Operations 00034 Antivirals(); // This is created from input 00035 00036 //Paramter Access Members 00040 bool do_av() const { return AVs.size() > 0; } 00041 00045 int get_number_antivirals() const { return AVs.size(); } 00046 00050 int get_total_current_stock() const; 00051 00055 vector <Antiviral *> const get_AV_vector() const { return AVs; } 00056 00060 Antiviral* const get_AV(int nav) const { return AVs[nav]; } 00061 00062 // Utility Functions 00066 void print() const; 00067 00071 void print_stocks() const; 00072 00076 void reset(); 00077 00083 void update(int day); 00084 00090 void report(int day) const; 00091 00099 void quality_control(int ndiseases) const; 00100 00101 // Polling the collection 00110 vector < Antiviral*> find_applicable_AVs(int disease) const; 00111 00115 vector < Antiviral*> prophylaxis_AVs() const; 00116 00117 private: 00118 vector < Antiviral* > AVs; // A Vector to hold the AVs in the collection 00119 FILE* reportFile; // Create an AV report file, to be deprecated 00120 }; 00121 #endif // _FRED_ANTIVIRALS_H