FRED
|
#include <Classroom.h>
Public Member Functions | |
Classroom () | |
Classroom (int loc, const char *lab, double lon, double lat, Place *container, Population *pop) | |
void | get_parameters (int diseases) |
void | enroll (Person *per) |
int | get_group (int disease, Person *per) |
double | get_transmission_prob (int disease, Person *i, Person *s) |
bool | should_be_open (int day, int disease) |
double | get_contacts_per_day (int disease) |
int | get_age_level () |
This class represents a classroom location in the FRED application. It inherits from Place
. The class contains many static variables that will be filled with values from the parameter file.
Classroom::Classroom | ( | ) | [inline] |
Default constructor
Classroom::Classroom | ( | int | loc, |
const char * | lab, | ||
double | lon, | ||
double | lat, | ||
Place * | container, | ||
Population * | pop | ||
) |
Convenience constructor that sets most of the values by calling Place::setup
void Classroom::enroll | ( | Person * | per | ) | [virtual] |
Add a person to the classroom. This method increments the number of people in the classroom and also sets the age level for the classroom, if the person added is the first child to be enrolled.
Overrides Place::enroll(Person * per)
per | a pointer to a Person object that may be added to the classroom |
Reimplemented from Place.
int Classroom::get_age_level | ( | ) | [inline] |
double Classroom::get_contacts_per_day | ( | int | disease | ) | [virtual] |
This method returns the value from the static array Classroom::Classroom_contacts_per_day
that corresponds to a particular disease.
The static array Classroom_contacts_per_day
will be filled with values from the parameter file for the key classroom_contacts[]
.
Implements Place.
void Classroom::get_parameters | ( | int | diseases | ) | [virtual] |
This method is called by the constructor Classroom(int loc, const char *lab, double lon, double lat, Place *container, Population *pop)
Implements Place.
This method returns the value from the static array Classroom::Classroom_contact_prob
that corresponds to a particular age-related value for each person.
The static array Classroom_contact_prob
will be filled with values from the parameter file for the key classroom_prob[]
.
Implements Place.
bool Classroom::should_be_open | ( | int | day, |
int | disease | ||
) | [virtual] |
Implements Place.