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-2017 German Aerospace Center (DLR) and others.
4 // activitygen module
5 // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/)
6 /****************************************************************************/
7 //
8 // This program and the accompanying materials
9 // are made available under the terms of the Eclipse Public License v2.0
10 // which accompanies this distribution, and is available at
11 // http://www.eclipse.org/legal/epl-v20.html
12 //
13 /****************************************************************************/
22 // Cars owned by people of the city: included in households.
23 /****************************************************************************/
24 #ifndef AGCAR_H
25 #define AGCAR_H
26 
27 
28 // ===========================================================================
29 // included modules
30 // ===========================================================================
31 #ifdef _MSC_VER
32 #include <windows_config.h>
33 #else
34 #include <config.h>
35 #endif
36 
37 #include <iostream>
38 #include <string>
39 #include "AGAdult.h"
40 
41 
42 // ===========================================================================
43 // class definitions
44 // ===========================================================================
45 class AGCar {
46 public:
47  AGCar(std::string name) :
48  idName(name) {};
49  AGCar(int idHH, int idCar) :
50  idName(createName(idHH, idCar)) {};
51  bool associateTo(AGAdult* pers);
52  bool isAssociated() const;
53  std::string getName() const;
54 
55 private:
56  std::string createName(int idHH, int idCar);
57 
58  std::string idName;
60 
61 };
62 
63 #endif
64 
65 /****************************************************************************/
Definition: AGCar.h:45
AGCar(int idHH, int idCar)
Definition: AGCar.h:49
std::string idName
Definition: AGCar.h:58
An adult person who can have a job.
Definition: AGAdult.h:57
bool associateTo(AGAdult *pers)
Definition: AGCar.cpp:53
AGCar(std::string name)
Definition: AGCar.h:47
AGAdult * currentUser
Definition: AGCar.h:59
std::string getName() const
Definition: AGCar.cpp:67
std::string createName(int idHH, int idCar)
Definition: AGCar.cpp:46
bool isAssociated() const
Definition: AGCar.cpp:62