FRED
Classroom Class Reference

#include <Classroom.h>

Inheritance diagram for Classroom:
Place

List of all members.

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 ()

Detailed Description

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.

See also:
Place

Constructor & Destructor Documentation

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

See also:
Place::setup(int loc_id, const char *lab, double lon, double lat, Place* cont, Population *pop)

Member Function Documentation

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)

Parameters:
pera pointer to a Person object that may be added to the classroom

Reimplemented from Place.

int Classroom::get_age_level ( ) [inline]
Returns:
the age_level
double Classroom::get_contacts_per_day ( int  disease) [virtual]
See also:
Place::get_contacts_per_day(int disease)

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.

int Classroom::get_group ( int  disease,
Person per 
) [virtual]
void Classroom::get_parameters ( int  diseases) [virtual]
double Classroom::get_transmission_prob ( int  disease,
Person i,
Person s 
) [virtual]
See also:
Place::get_transmission_prob(int disease, Person * i, Person * s)

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]

The documentation for this class was generated from the following files:
 All Classes Functions