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
GUIGlObjectStorage.h
Go to the documentation of this file.
1
/****************************************************************************/
9
// A storage for displayed objects via their numerical id
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
/****************************************************************************/
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 GUIGlObjectStorage_h
23
#define GUIGlObjectStorage_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 <map>
36
#include <string>
37
#include <set>
38
#include <fx.h>
39
#include "
GUIGlObject.h
"
40
#include <
utils/foxtools/MFXMutex.h
>
41
42
43
// ===========================================================================
44
// class definitions
45
// ===========================================================================
60
class
GUIGlObjectStorage
{
61
public
:
63
GUIGlObjectStorage
();
64
65
67
~GUIGlObjectStorage
();
68
69
79
GUIGlID
registerObject
(
GUIGlObject
*
object
,
const
std::string& fullName);
80
81
90
GUIGlObject
*
getObjectBlocking
(
GUIGlID
id
);
91
92
101
GUIGlObject
*
getObjectBlocking
(
const
std::string& fullName);
102
103
113
bool
remove
(
GUIGlID
id);
114
115
120
void
clear
();
121
122
128
void
unblockObject
(
GUIGlID
id
);
129
130
134
void
setNetObject
(
GUIGlObject
*
object
) {
135
myNetObject
= object;
136
}
137
138
142
GUIGlObject
*
getNetObject
()
const
{
143
return
myNetObject
;
144
}
145
146
149
static
GUIGlObjectStorage
gIDStorage
;
150
151
154
std::set<GUIGlID>
getAllIDs
()
const
;
155
156
private
:
158
typedef
std::map<GUIGlID, GUIGlObject*>
ObjectMap
;
159
161
ObjectMap
myMap
;
162
163
/* @brief The known objects by their fill name (used when loading selection
164
* from file */
165
std::map<std::string, GUIGlObject*>
myFullNameMap
;
166
168
ObjectMap
myBlocked
;
169
171
ObjectMap
my2Delete
;
172
174
GUIGlID
myAktID
;
175
177
mutable
MFXMutex
myLock
;
178
180
GUIGlObject
*
myNetObject
;
181
182
183
private
:
185
GUIGlObjectStorage
(
const
GUIGlObjectStorage
& s);
186
188
GUIGlObjectStorage
&
operator=
(
const
GUIGlObjectStorage
& s);
189
190
191
};
192
193
194
#endif
195
196
/****************************************************************************/
197
home
gladk
tmp
05
sumo-0.17.1~dfsg
src
utils
gui
globjects
GUIGlObjectStorage.h
Generated on Sun Jun 16 2013 07:07:14 for SUMO - Simulation of Urban MObility by
1.8.1.2