FRED
Vaccine_Health.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: VaccineHealth.h
00010 //
00011 
00012 #ifndef _FRED_VACCINEHEALTH_H
00013 #define _FRED_VACCINEHEALTH_H
00014 
00015 #include <stdio.h>
00016 #include <assert.h>
00017 #include <iostream>
00018 #include "Random.h"
00019 #include "Population.h"
00020 #include "Utils.h"
00021 
00022 class Vaccine;
00023 class Vaccine_Dose;
00024 class Health;
00025 class Vaccine_Manager;
00026 
00027 class Vaccine_Health {
00028 public:
00029   //Creation Operations
00030   Vaccine_Health();
00031   Vaccine_Health(int _vaccination_day, Vaccine* _vaccine, int _age, 
00032                  Health* _health, Vaccine_Manager* _vaccine_manager);
00033   
00034   // Access Members
00035   int get_vaccination_day()              const { return vaccination_day; }
00036   int get_vaccination_effective_day()    const { return vaccination_effective_day; }
00037   int is_effective()                     const { if(vaccination_effective_day != -1) return 1; else return 0;}
00038   Vaccine* get_vaccine()                 const { return vaccine; }
00039   int get_current_dose()                 const { return current_dose; }
00040   int get_days_to_next_dose()            const { return days_to_next_dose; }
00041   Health* get_health()                   const { return health; }
00042   Vaccine_Manager* get_vaccine_manager() const { return vaccine_manager; }
00043   // Modifiers
00044   void set_vaccination_day(int day) { 
00045     if(vaccination_day ==-1){
00046       vaccination_day = day; 
00047     }
00048     else{
00049       //This is an error, but it will not stop a run, only pring a Warning.
00050       Utils::fred_warning("WARNING! Vaccination Status, setting vaccine day of someone who has already been vaccinated\n");
00051     }
00052   }
00053   
00054   //Utility Functions
00055   void print() const;
00056   void printTrace() const;
00057   void update(int day, int age);
00058   void update_for_next_dose(int day, int age);
00059   
00060 private:
00061   int vaccination_day;             // On which day did you get the vaccine
00062   int vaccination_effective_day;   // On which day is the vaccine effective
00063   Vaccine* vaccine;                // Which vaccine did you take
00064   int current_dose;                // Current Dose that the agent is on
00065   int days_to_next_dose;           // How long between doses
00066   Health* health;                  // The health object this belongs to.
00067   Vaccine_Manager* vaccine_manager; // Which manager did the vaccine come from?
00068 };
00069 
00070 #endif
 All Classes Functions