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
/****************************************************************************/
9
// Cars owned by people of the city: included in households.
10
/****************************************************************************/
11
// SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
12
// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors
13
// activitygen module
14
// Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/)
15
/****************************************************************************/
16
//
17
// This file is part of SUMO.
18
// SUMO is free software: you can redistribute it and/or modify
19
// it under the terms of the GNU General Public License as published by
20
// the Free Software Foundation, either version 3 of the License, or
21
// (at your option) any later version.
22
//
23
/****************************************************************************/
24
25
26
// ===========================================================================
27
// included modules
28
// ===========================================================================
29
#ifdef _MSC_VER
30
#include <
windows_config.h
>
31
#else
32
#include <
config.h
>
33
#endif
34
35
#include <iostream>
36
#include <sstream>
37
#include <string>
38
#include "
AGCar.h
"
39
#include "
AGAdult.h
"
40
41
42
// ===========================================================================
43
// method definitions
44
// ===========================================================================
45
std::string
46
AGCar::createName
(
int
idHH,
int
idCar) {
47
std::ostringstream os;
48
os <<
"h"
<< idHH <<
"c"
<< idCar;
49
return
os.str();
50
}
51
52
bool
53
AGCar::associateTo
(
AGAdult
* pers) {
54
if
(
currentUser
== NULL) {
55
currentUser
= pers;
56
return
true
;
57
}
58
return
false
;
59
}
60
61
bool
62
AGCar::isAssociated
()
const
{
63
return
(
currentUser
!= NULL);
64
}
65
66
std::string
67
AGCar::getName
()
const
{
68
return
idName
;
69
}
70
71
/****************************************************************************/
build
buildd
sumo-0.17.1~dfsg
src
activitygen
city
AGCar.cpp
Generated on Sun Jun 16 2013 17:30:14 for SUMO - Simulation of Urban MObility by
1.8.3.1