Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
AGPerson.h
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3// Copyright (C) 2001-2024 German Aerospace Center (DLR) and others.
4// activitygen module
5// Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/)
6// This program and the accompanying materials are made available under the
7// terms of the Eclipse Public License 2.0 which is available at
8// https://www.eclipse.org/legal/epl-2.0/
9// This Source Code may also be made available under the following Secondary
10// Licenses when the conditions for such availability set forth in the Eclipse
11// Public License 2.0 are satisfied: GNU General Public License, version 2
12// or later which is available at
13// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
14// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
15/****************************************************************************/
22// Parent object of every person, contains age and any natural characteristic
23/****************************************************************************/
24#pragma once
25#include <config.h>
26
27
28// ===========================================================================
29// class definitions
30// ===========================================================================
39class AGPerson {
40public:
45 virtual int getAge() const;
46
55 virtual bool decide(double probability) const;
56
59 virtual void print() const;
60
61protected:
62 int age;
63
68 AGPerson(int age);
69
72 virtual ~AGPerson();
73};
Base class of every person in the city (adults and children)
Definition AGPerson.h:39
virtual int getAge() const
Provides the age of the person.
Definition AGPerson.cpp:48
virtual bool decide(double probability) const
Lets the person make a decision.
Definition AGPerson.cpp:54
virtual ~AGPerson()
Cleans up everything.
Definition AGPerson.cpp:38
virtual void print() const
Puts out a summary of the class properties.
Definition AGPerson.cpp:42
int age
Definition AGPerson.h:62