SUMO - Simulation of Urban MObility
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
AGCar.cpp
Go to the documentation of this file.
1
/****************************************************************************/
10
// Cars owned by people of the city: included in households.
11
/****************************************************************************/
12
// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/
13
// Copyright (C) 2010-2014 DLR (http://www.dlr.de/) and contributors
14
// activitygen module
15
// Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/)
16
/****************************************************************************/
17
//
18
// This file is part of SUMO.
19
// SUMO is free software: you can redistribute it and/or modify
20
// it under the terms of the GNU General Public License as published by
21
// the Free Software Foundation, either version 3 of the License, or
22
// (at your option) any later version.
23
//
24
/****************************************************************************/
25
26
27
// ===========================================================================
28
// included modules
29
// ===========================================================================
30
#ifdef _MSC_VER
31
#include <
windows_config.h
>
32
#else
33
#include <
config.h
>
34
#endif
35
36
#include <iostream>
37
#include <sstream>
38
#include <string>
39
#include "
AGCar.h
"
40
#include "
AGAdult.h
"
41
42
43
// ===========================================================================
44
// method definitions
45
// ===========================================================================
46
std::string
47
AGCar::createName
(
int
idHH,
int
idCar) {
48
std::ostringstream os;
49
os <<
"h"
<< idHH <<
"c"
<< idCar;
50
return
os.str();
51
}
52
53
bool
54
AGCar::associateTo
(
AGAdult
* pers) {
55
if
(
currentUser
== NULL) {
56
currentUser
= pers;
57
return
true
;
58
}
59
return
false
;
60
}
61
62
bool
63
AGCar::isAssociated
()
const
{
64
return
(
currentUser
!= NULL);
65
}
66
67
std::string
68
AGCar::getName
()
const
{
69
return
idName
;
70
}
71
72
/****************************************************************************/
AGCar::getName
std::string getName() const
Definition:
AGCar.cpp:68
windows_config.h
AGCar::idName
std::string idName
Definition:
AGCar.h:59
config.h
AGCar.h
AGAdult
An adult person who can have a job.
Definition:
AGAdult.h:58
AGCar::associateTo
bool associateTo(AGAdult *pers)
Definition:
AGCar.cpp:54
AGCar::isAssociated
bool isAssociated() const
Definition:
AGCar.cpp:63
AGCar::currentUser
AGAdult * currentUser
Definition:
AGCar.h:60
AGCar::createName
std::string createName(int idHH, int idCar)
Definition:
AGCar.cpp:47
AGAdult.h
tmp
buildd
sumo-0.21.0+dfsg
src
activitygen
city
AGCar.cpp
Generated on Fri Jun 20 2014 21:20:03 for SUMO - Simulation of Urban MObility by
1.8.7