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
MSTrigger.cpp
Go to the documentation of this file.
1
/****************************************************************************/
7
// An abstract device that changes the state of the micro simulation
8
/****************************************************************************/
9
// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/
10
// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors
11
/****************************************************************************/
12
//
13
// This file is part of SUMO.
14
// SUMO is free software: you can redistribute it and/or modify
15
// it under the terms of the GNU General Public License as published by
16
// the Free Software Foundation, either version 3 of the License, or
17
// (at your option) any later version.
18
//
19
/****************************************************************************/
20
// ===========================================================================
21
// included modules
22
// ===========================================================================
23
#include "
MSTrigger.h
"
24
25
26
// ===========================================================================
27
// static member definitions
28
// ===========================================================================
29
std::set<MSTrigger*>
MSTrigger::myInstances
;
30
31
32
// ===========================================================================
33
// method definitions
34
// ===========================================================================
35
MSTrigger::MSTrigger
(
const
std::string&
id
) :
36
Named
(id) {
37
myInstances
.insert(
this
);
38
}
39
40
41
MSTrigger::~MSTrigger
() {
42
myInstances
.erase(
this
);
43
}
44
45
46
void
MSTrigger::cleanup
() {
47
while
(!
myInstances
.empty()) {
48
delete
*
myInstances
.begin();
49
}
50
}
MSTrigger::MSTrigger
MSTrigger(const std::string &id)
Constructor.
Definition:
MSTrigger.cpp:35
MSTrigger::~MSTrigger
virtual ~MSTrigger()
Destructor.
Definition:
MSTrigger.cpp:41
MSTrigger.h
MSTrigger::myInstances
static std::set< MSTrigger * > myInstances
Definition:
MSTrigger.h:69
MSTrigger::cleanup
static void cleanup()
properly deletes all trigger instances
Definition:
MSTrigger.cpp:46
Named
Base class for objects which have an id.
Definition:
Named.h:45
tmp
buildd
sumo-0.19.0+dfsg
src
microsim
trigger
MSTrigger.cpp
Generated on Sun Dec 15 2013 19:38:58 for SUMO - Simulation of Urban MObility by
1.8.5