SUMO - Simulation of Urban MObility
AGCar.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2010-2018 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 /****************************************************************************/
20 // Cars owned by people of the city: included in households.
21 /****************************************************************************/
22 #ifndef AGCAR_H
23 #define AGCAR_H
24 
25 
26 // ===========================================================================
27 // included modules
28 // ===========================================================================
29 #include <config.h>
30 
31 #include <iostream>
32 #include <string>
33 #include "AGAdult.h"
34 
35 
36 // ===========================================================================
37 // class definitions
38 // ===========================================================================
39 class AGCar {
40 public:
41  AGCar(std::string name) :
42  idName(name) {};
43  AGCar(int idHH, int idCar) :
44  idName(createName(idHH, idCar)) {};
45  bool associateTo(AGAdult* pers);
46  bool isAssociated() const;
47  std::string getName() const;
48 
49 private:
50  std::string createName(int idHH, int idCar);
51 
52  std::string idName;
54 
55 };
56 
57 #endif
58 
59 /****************************************************************************/
Definition: AGCar.h:39
AGCar(int idHH, int idCar)
Definition: AGCar.h:43
std::string idName
Definition: AGCar.h:52
An adult person who can have a job.
Definition: AGAdult.h:51
bool associateTo(AGAdult *pers)
Definition: AGCar.cpp:47
AGCar(std::string name)
Definition: AGCar.h:41
AGAdult * currentUser
Definition: AGCar.h:53
std::string getName() const
Definition: AGCar.cpp:61
std::string createName(int idHH, int idCar)
Definition: AGCar.cpp:40
bool isAssociated() const
Definition: AGCar.cpp:56