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
MSStateHandler.h
Go to the documentation of this file.
1
/****************************************************************************/
9
// Parser and output filter for routes and vehicles state saving and loading
10
/****************************************************************************/
11
// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/
12
// Copyright (C) 2012-2014 DLR (http://www.dlr.de/) and contributors
13
/****************************************************************************/
14
//
15
// This file is part of SUMO.
16
// SUMO is free software: you can redistribute it and/or modify
17
// it under the terms of the GNU General Public License as published by
18
// the Free Software Foundation, either version 3 of the License, or
19
// (at your option) any later version.
20
//
21
/****************************************************************************/
22
#ifndef MSStateHandler_h
23
#define MSStateHandler_h
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 <
utils/common/SUMOTime.h
>
36
#include <
utils/xml/SUMOSAXHandler.h
>
37
38
39
// ===========================================================================
40
// class declarations
41
// ===========================================================================
42
#ifdef HAVE_INTERNAL
43
class
MESegment;
44
#endif
45
46
47
// ===========================================================================
48
// class definitions
49
// ===========================================================================
54
class
MSStateHandler
:
public
SUMOSAXHandler
{
55
public
:
57
MSStateHandler
(
const
std::string& file,
const
SUMOTime
offset);
58
60
virtual
~MSStateHandler
();
61
66
static
void
saveState
(
const
std::string& file,
SUMOTime
step);
67
68
SUMOTime
getTime
()
const
{
69
return
myTime
;
70
}
71
72
protected
:
74
75
83
void
myStartElement
(
int
element,
84
const
SUMOSAXAttributes
& attrs);
85
86
93
void
myEndElement
(
int
element);
95
96
97
private
:
98
const
SUMOTime
myOffset
;
99
SUMOTime
myTime
;
100
#ifdef HAVE_INTERNAL
101
MESegment* mySegment;
102
#endif
103
std::pair<int, int>
myEdgeAndLane
;
104
unsigned
int
myQueIndex
;
105
107
SUMOVTypeParameter
*
myCurrentVType
;
108
109
private
:
111
MSStateHandler
(
const
MSStateHandler
& s);
112
114
MSStateHandler
&
operator=
(
const
MSStateHandler
& s);
115
116
};
117
118
119
#endif
120
121
/****************************************************************************/
tmp
buildd
sumo-0.21.0+dfsg
src
microsim
MSStateHandler.h
Generated on Thu Nov 20 2014 19:49:55 for SUMO - Simulation of Urban MObility by
1.8.1.2