SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
AGPerson.h
Go to the documentation of this file.
1 /****************************************************************************/
9 // Parent object of every person, contains age and any natural characteristic
10 /****************************************************************************/
11 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
12 // Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors
13 // activitygen module
14 // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/)
15 /****************************************************************************/
16 //
17 // This file is part of SUMO.
18 // SUMO is free software: you can redistribute it and/or modify
19 // it under the terms of the GNU General Public License as published by
20 // the Free Software Foundation, either version 3 of the License, or
21 // (at your option) any later version.
22 //
23 /****************************************************************************/
24 #ifndef AGPERSON_H
25 #define AGPERSON_H
26 
27 
28 // ===========================================================================
29 // included modules
30 // ===========================================================================
31 #ifdef _MSC_VER
32 #include <windows_config.h>
33 #else
34 #include <config.h>
35 #endif
36 
37 
38 // ===========================================================================
39 // class definitions
40 // ===========================================================================
49 class AGPerson {
50 public:
55  virtual int getAge() const;
56 
65  virtual bool decide(SUMOReal probability) const;
66 
69  virtual void print() const;
70 
71 protected:
72  int age;
73 
78  AGPerson(int age);
79 
82  virtual ~AGPerson();
83 };
84 
85 #endif /* AGPerson */
86 
87 /****************************************************************************/
virtual ~AGPerson()
Cleans up everything.
Definition: AGPerson.cpp:47
virtual bool decide(SUMOReal probability) const
Lets the person make a decision.
Definition: AGPerson.cpp:63
AGPerson(int age)
Initialises the class attributes.
Definition: AGPerson.cpp:44
int age
Definition: AGPerson.h:72
#define SUMOReal
Definition: config.h:218
virtual int getAge() const
Provides the age of the person.
Definition: AGPerson.cpp:57
virtual void print() const
Puts out a summary of the class properties.
Definition: AGPerson.cpp:51
Base class of every person in the city (adults and children)
Definition: AGPerson.h:49