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
/****************************************************************************/
8
// An abstract device that changes the state of the micro simulation
9
/****************************************************************************/
10
// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/
11
// Copyright (C) 2012-2014 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
// ===========================================================================
22
// included modules
23
// ===========================================================================
24
#include "
MSTrigger.h
"
25
26
27
// ===========================================================================
28
// static member definitions
29
// ===========================================================================
30
std::set<MSTrigger*>
MSTrigger::myInstances
;
31
32
33
// ===========================================================================
34
// method definitions
35
// ===========================================================================
36
MSTrigger::MSTrigger
(
const
std::string&
id
) :
37
Named
(id) {
38
myInstances
.insert(
this
);
39
}
40
41
42
MSTrigger::~MSTrigger
() {
43
myInstances
.erase(
this
);
44
}
45
46
47
void
MSTrigger::cleanup
() {
48
while
(!
myInstances
.empty()) {
49
delete
*
myInstances
.begin();
50
}
51
}
MSTrigger::MSTrigger
MSTrigger(const std::string &id)
Constructor.
Definition:
MSTrigger.cpp:36
MSTrigger::~MSTrigger
virtual ~MSTrigger()
Destructor.
Definition:
MSTrigger.cpp:42
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:47
Named
Base class for objects which have an id.
Definition:
Named.h:45
build
buildd
sumo-0.21.0+dfsg
src
microsim
trigger
MSTrigger.cpp
Generated on Sat Jun 21 2014 05:17:28 for SUMO - Simulation of Urban MObility by
1.8.7