SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules 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.dlr.de/
10 // Copyright (C) 2001-2016 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>
36 
37 
38 // ===========================================================================
39 // class definitions
40 // ===========================================================================
46 class GUIEvent_Message : public GUIEvent {
47 public:
49  GUIEvent_Message(const std::string& msg)
51  }
52 
54  GUIEvent_Message(MsgHandler::MsgType type, const std::string& msg)
56  switch (type) {
59  break;
62  break;
65  break;
66  default:
67  throw 1;
68  }
69  }
70 
73 
75  const std::string& getMsg() const {
76  return myMsg;
77  }
78 
79 protected:
80 
82  std::string myMsg;
83 
84 };
85 
86 
87 #endif
88 
89 /****************************************************************************/
90 
The message is only something to show.
Definition: MsgHandler.h:62
GUIEvent_Message(const std::string &msg)
constructor
send when a message occured
Definition: GUIEvent.h:50
GUIEventType myType
the type of the event
Definition: GUIEvent.h:99
const std::string & getMsg() const
Returns the message.
~GUIEvent_Message()
destructor
std::string myMsg
The message.
send when a error occured
Definition: GUIEvent.h:56
The message is a warning.
Definition: MsgHandler.h:64
send when a warning occured
Definition: GUIEvent.h:53
GUIEvent_Message(MsgHandler::MsgType type, const std::string &msg)
constructor
The message is an error.
Definition: MsgHandler.h:66
send when a status change occured
Definition: GUIEvent.h:59