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
GUIEvent_Message.h
Go to the documentation of this file.
1
/****************************************************************************/
7
// Event send when a message (message, warning, error) has to besubmitted
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
#ifndef GUIEvent_Message_h
21
#define GUIEvent_Message_h
22
23
24
// ===========================================================================
25
// included modules
26
// ===========================================================================
27
#ifdef _MSC_VER
28
#include <
windows_config.h
>
29
#else
30
#include <
config.h
>
31
#endif
32
33
#include "
GUIEvent.h
"
34
#include <string>
35
#include <
utils/common/MsgHandler.h
>
36
37
38
// ===========================================================================
39
// class definitions
40
// ===========================================================================
46
class
GUIEvent_Message
:
public
GUIEvent
{
47
public
:
49
GUIEvent_Message
(
MsgHandler::MsgType
type,
const
std::string& msg)
50
:
GUIEvent
(
EVENT_MESSAGE_OCCURED
),
myMsg
(msg) {
51
switch
(type) {
52
case
MsgHandler::MT_MESSAGE
:
53
myType
=
EVENT_MESSAGE_OCCURED
;
54
break
;
55
case
MsgHandler::MT_WARNING
:
56
myType
=
EVENT_WARNING_OCCURED
;
57
break
;
58
case
MsgHandler::MT_ERROR
:
59
myType
=
EVENT_ERROR_OCCURED
;
60
break
;
61
default
:
62
throw
1;
63
}
64
}
65
67
~GUIEvent_Message
() { }
68
70
const
std::string&
getMsg
()
const
{
71
return
myMsg
;
72
}
73
74
protected
:
75
77
std::string
myMsg
;
78
79
};
80
81
82
#endif
83
84
/****************************************************************************/
85
build
buildd
sumo-0.18~dfsg
src
utils
gui
events
GUIEvent_Message.h
Generated on Wed Oct 23 2013 01:15:08 for SUMO - Simulation of Urban MObility by
1.8.4