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