Eclipse 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-2019 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
7
// are made available under the terms of the Eclipse Public License v2.0
8
// which accompanies this distribution, and is available at
9
// http://www.eclipse.org/legal/epl-v20.html
10
// SPDX-License-Identifier: EPL-2.0
11
/****************************************************************************/
19
// Parent object of every person, contains age and any natural characteristic
20
/****************************************************************************/
21
#ifndef AGPERSON_H
22
#define AGPERSON_H
23
24
25
// ===========================================================================
26
// included modules
27
// ===========================================================================
28
#include <
config.h
>
29
30
31
// ===========================================================================
32
// class definitions
33
// ===========================================================================
42
class
AGPerson
{
43
public
:
48
virtual
int
getAge
()
const
;
49
58
virtual
bool
decide
(
double
probability)
const
;
59
62
virtual
void
print
()
const
;
63
64
protected
:
65
int
age
;
66
71
AGPerson
(
int
age
);
72
75
virtual
~AGPerson
();
76
};
77
78
#endif
/* AGPerson */
79
80
/****************************************************************************/
AGPerson::~AGPerson
virtual ~AGPerson()
Cleans up everything.
Definition:
AGPerson.cpp:40
AGPerson::print
virtual void print() const
Puts out a summary of the class properties.
Definition:
AGPerson.cpp:44
AGPerson::decide
virtual bool decide(double probability) const
Lets the person make a decision.
Definition:
AGPerson.cpp:56
AGPerson
Base class of every person in the city (adults and children)
Definition:
AGPerson.h:42
AGPerson::AGPerson
AGPerson(int age)
Initialises the class attributes.
Definition:
AGPerson.cpp:37
AGPerson::age
int age
Definition:
AGPerson.h:65
config.h
AGPerson::getAge
virtual int getAge() const
Provides the age of the person.
Definition:
AGPerson.cpp:50
src
activitygen
city
AGPerson.h
Generated on Wed Jan 15 2020 15:04:13 for Eclipse SUMO - Simulation of Urban MObility by
1.8.16