![]() |
Eclipse SUMO - Simulation of Urban MObility
|
Base class of every person in the city (adults and children) More...
#include <AGPerson.h>
Public Member Functions | |
| virtual bool | decide (double probability) const |
| Lets the person make a decision. | |
| virtual int | getAge () const |
| Provides the age of the person. | |
| virtual void | print () const |
| Puts out a summary of the class properties. | |
Protected Member Functions | |
| AGPerson (int age) | |
| Initialises the class attributes. | |
| virtual | ~AGPerson () |
| Cleans up everything. | |
Protected Attributes | |
| int | age |
Base class of every person in the city (adults and children)
This class provides the functionality common to all person in the city. It is a base class for other classes and is not intended to be instantiated as an object. Therefore, all constructors are protected.
Definition at line 39 of file AGPerson.h.
|
protected |
Initialises the class attributes.
| [in] | age | the age of the person |
Definition at line 35 of file AGPerson.cpp.
|
protectedvirtual |
Cleans up everything.
Definition at line 38 of file AGPerson.cpp.
|
virtual |
Lets the person make a decision.
The higher the degree of belief is, the more likely this method returns true.
| [in] | degreeOfBelief | how strong the person beliefs the proposition |
Definition at line 54 of file AGPerson.cpp.
References RandHelper::rand().
Referenced by AGAdult::tryToWork().
|
virtual |
Provides the age of the person.
Definition at line 48 of file AGPerson.cpp.
References age.
|
virtual |
Puts out a summary of the class properties.
Reimplemented in AGAdult, and AGChild.
Definition at line 42 of file AGPerson.cpp.
References age.
|
protected |
Definition at line 62 of file AGPerson.h.
Referenced by AGChild::allocateASchool(), getAge(), AGAdult::print(), AGChild::print(), and print().