Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
AGCar.h
Go to the documentation of this file.
1
/****************************************************************************/
2
// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3
// Copyright (C) 2010-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
/****************************************************************************/
23
// Cars owned by people of the city: included in households.
24
/****************************************************************************/
25
#pragma once
26
#include <config.h>
27
28
#include <iostream>
29
#include <string>
30
#include "
AGAdult.h
"
31
32
33
// ===========================================================================
34
// class definitions
35
// ===========================================================================
36
class
AGCar
{
37
public
:
38
AGCar
(std::string name) :
39
idName
(name) {};
40
AGCar
(
int
idHH,
int
idCar) :
41
idName
(
createName
(idHH, idCar)) {};
42
bool
associateTo
(
AGAdult
* pers);
43
bool
isAssociated
()
const
;
44
std::string
getName
()
const
;
45
46
private
:
47
std::string
createName
(
int
idHH,
int
idCar);
48
49
std::string
idName
;
50
AGAdult
*
currentUser
;
51
52
};
AGAdult.h
AGAdult
An adult person who can have a job.
Definition
AGAdult.h:48
AGCar
Definition
AGCar.h:36
AGCar::associateTo
bool associateTo(AGAdult *pers)
Definition
AGCar.cpp:45
AGCar::currentUser
AGAdult * currentUser
Definition
AGCar.h:50
AGCar::AGCar
AGCar(std::string name)
Definition
AGCar.h:38
AGCar::createName
std::string createName(int idHH, int idCar)
Definition
AGCar.cpp:38
AGCar::getName
std::string getName() const
Definition
AGCar.cpp:59
AGCar::isAssociated
bool isAssociated() const
Definition
AGCar.cpp:54
AGCar::idName
std::string idName
Definition
AGCar.h:49
AGCar::AGCar
AGCar(int idHH, int idCar)
Definition
AGCar.h:40
src
activitygen
city
AGCar.h
Generated on Fri Nov 22 2024 00:15:29 for Eclipse SUMO - Simulation of Urban MObility by
1.9.8