SUMO - Simulation of Urban MObility
AGPerson.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2017 German Aerospace Center (DLR) and others.
4 // activitygen module
5 // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/)
6 /****************************************************************************/
7 //
8 // This program and the accompanying materials
9 // are made available under the terms of the Eclipse Public License v2.0
10 // which accompanies this distribution, and is available at
11 // http://www.eclipse.org/legal/epl-v20.html
12 //
13 /****************************************************************************/
21 // Parent object of every person, contains age and any natural characteristic
22 /****************************************************************************/
23 #ifndef AGPERSON_H
24 #define AGPERSON_H
25 
26 
27 // ===========================================================================
28 // included modules
29 // ===========================================================================
30 #ifdef _MSC_VER
31 #include <windows_config.h>
32 #else
33 #include <config.h>
34 #endif
35 
36 
37 // ===========================================================================
38 // class definitions
39 // ===========================================================================
48 class AGPerson {
49 public:
54  virtual int getAge() const;
55 
64  virtual bool decide(double probability) const;
65 
68  virtual void print() const;
69 
70 protected:
71  int age;
72 
77  AGPerson(int age);
78 
81  virtual ~AGPerson();
82 };
83 
84 #endif /* AGPerson */
85 
86 /****************************************************************************/
virtual ~AGPerson()
Cleans up everything.
Definition: AGPerson.cpp:46
virtual bool decide(double probability) const
Lets the person make a decision.
Definition: AGPerson.cpp:62
virtual void print() const
Puts out a summary of the class properties.
Definition: AGPerson.cpp:50
AGPerson(int age)
Initialises the class attributes.
Definition: AGPerson.cpp:43
virtual int getAge() const
Provides the age of the person.
Definition: AGPerson.cpp:56
int age
Definition: AGPerson.h:71
Base class of every person in the city (adults and children)
Definition: AGPerson.h:48