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
TrackerValueDesc.h
Go to the documentation of this file.
1
/****************************************************************************/
8
// Representation of a timeline of floats with their names and moments
9
/****************************************************************************/
10
// SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
11
// Copyright (C) 2001-2012 DLR (http://www.dlr.de/) and contributors
12
/****************************************************************************/
13
//
14
// This file is part of SUMO.
15
// SUMO is free software: you can redistribute it and/or modify
16
// it under the terms of the GNU General Public License as published by
17
// the Free Software Foundation, either version 3 of the License, or
18
// (at your option) any later version.
19
//
20
/****************************************************************************/
21
#ifndef TrackerValueDesc_h
22
#define TrackerValueDesc_h
23
// ===========================================================================
24
// included modules
25
// ===========================================================================
26
#ifdef _MSC_VER
27
#include <
windows_config.h
>
28
#else
29
#include <
config.h
>
30
#endif
31
32
#include <fx.h>
33
#include <string>
34
#include <vector>
35
#include <
utils/foxtools/MFXMutex.h
>
36
#include <
utils/common/RGBColor.h
>
37
#include <
utils/common/SUMOTime.h
>
38
#include <
utils/common/ValueRetriever.h
>
39
40
41
// ===========================================================================
42
// class definitions
43
// ===========================================================================
51
class
TrackerValueDesc
:
public
ValueRetriever
<SUMOReal> {
52
public
:
54
TrackerValueDesc
(
const
std::string& name,
const
RGBColor
& col,
55
SUMOTime
recordBegin);
56
58
~TrackerValueDesc
();
59
61
SUMOReal
getRange
()
const
;
62
64
SUMOReal
getMin
()
const
;
65
67
SUMOReal
getMax
()
const
;
68
70
SUMOReal
getYCenter
()
const
;
71
73
const
RGBColor
&
getColor
()
const
;
74
78
const
std::vector<SUMOReal>&
getValues
();
79
83
const
std::vector<SUMOReal>&
getAggregatedValues
();
84
86
const
std::string&
getName
()
const
;
87
89
void
addValue
(
SUMOReal
value);
90
92
void
unlockValues
();
93
95
void
setAggregationSpan
(
SUMOTime
as);
96
98
SUMOTime
getAggregationSpan
()
const
;
99
101
SUMOTime
getRecordingBegin
()
const
;
102
103
104
private
:
106
std::string
myName
;
107
109
RGBColor
myActiveCol
;
110
112
RGBColor
myInactiveCol
;
113
115
std::vector<SUMOReal>
myValues
;
116
118
std::vector<SUMOReal>
myAggregatedValues
;
119
121
SUMOReal
myMin
,
myMax
;
122
123
// Mutex to avoid parallel drawing and insertion of new items
124
MFXMutex
myLock
;
125
127
int
myAggregationInterval
;
128
130
SUMOReal
myInvalidValue
;
131
133
size_t
myValidNo
;
134
136
SUMOTime
myRecordingBegin
;
137
139
SUMOReal
myTmpLastAggValue
;
140
141
};
142
143
144
#endif
145
146
/****************************************************************************/
147
build
buildd
sumo-0.16.0~dfsg
src
utils
gui
tracker
TrackerValueDesc.h
Generated on Tue Apr 16 2013 01:32:21 for SUMO - Simulation of Urban MObility by
1.8.3.1