List of all members.
Constructor & Destructor Documentation
Demographics::Demographics |
( |
| ) |
|
Demographics::Demographics |
( |
Person * |
_self, |
|
|
int |
_age, |
|
|
char |
_sex, |
|
|
int |
_marital_status, |
|
|
int |
rel, |
|
|
int |
_profession, |
|
|
int |
day, |
|
|
bool |
is_newborn = false |
|
) |
| |
Constructor that sets all of the attributes of a Demographics object
- Parameters:
-
_self | the Person object with which this Demographics object is associated |
_age | |
_sex | (M or F) |
_marital_status | 1 if married, 0 if not |
_profession | the code for the Person's occupation |
day | the simulation day |
is_newborn | needed to know how to set the date of birth |
Member Function Documentation
int Demographics::get_age |
( |
| ) |
[inline] |
int Demographics::get_init_age |
( |
| ) |
[inline] |
- Returns:
- the agent's init_age
int Demographics::get_init_marital_status |
( |
| ) |
[inline] |
- Returns:
- the agent's init_marital_status
int Demographics::get_init_profession |
( |
| ) |
[inline] |
- Returns:
- the agent's init_profession
int Demographics::get_marital_status |
( |
| ) |
[inline] |
- Returns:
- the agent's marital_status
int Demographics::get_profession |
( |
| ) |
[inline] |
- Returns:
- the agent's profession
double Demographics::get_real_age |
( |
int |
day | ) |
|
- Returns:
- the number of days the agent has been alive / 365.0
char Demographics::get_sex |
( |
| ) |
[inline] |
bool Demographics::is_deceased |
( |
| ) |
[inline] |
- Returns:
true
if the agent is deceased, false
otherwise
bool Demographics::is_pregnant |
( |
| ) |
[inline] |
- Returns:
true
if the agent is pregnant, false
otherwise
void Demographics::print |
( |
| ) |
|
Print out information about this object
void Demographics::update |
( |
int |
day | ) |
|
Perform the daily update for this object
- Parameters:
-
The documentation for this class was generated from the following files: