SUMO - Simulation of Urban MObility
GUIEvent_Message.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2017 German Aerospace Center (DLR) and others.
4 /****************************************************************************/
5 //
6 // This program and the accompanying materials
7 // are made available under the terms of the Eclipse Public License v2.0
8 // which accompanies this distribution, and is available at
9 // http://www.eclipse.org/legal/epl-v20.html
10 //
11 /****************************************************************************/
17 // Event send when a message (message, warning, error) has to besubmitted
18 /****************************************************************************/
19 #ifndef GUIEvent_Message_h
20 #define GUIEvent_Message_h
21 
22 
23 // ===========================================================================
24 // included modules
25 // ===========================================================================
26 #ifdef _MSC_VER
27 #include <windows_config.h>
28 #else
29 #include <config.h>
30 #endif
31 
32 #include "GUIEvent.h"
33 #include <string>
35 
36 
37 // ===========================================================================
38 // class definitions
39 // ===========================================================================
45 class GUIEvent_Message : public GUIEvent {
46 public:
48  GUIEvent_Message(const std::string& msg)
50  }
51 
53  GUIEvent_Message(MsgHandler::MsgType type, const std::string& msg)
55  switch (type) {
58  break;
61  break;
64  break;
65  default:
66  throw 1;
67  }
68  }
69 
72 
74  const std::string& getMsg() const {
75  return myMsg;
76  }
77 
78 protected:
79 
81  std::string myMsg;
82 
83 };
84 
85 
86 #endif
87 
88 /****************************************************************************/
89 
The message is only something to show.
Definition: MsgHandler.h:61
GUIEvent_Message(const std::string &msg)
constructor
send when a message occured
Definition: GUIEvent.h:49
GUIEventType myType
the type of the event
Definition: GUIEvent.h:98
const std::string & getMsg() const
Returns the message.
~GUIEvent_Message()
destructor
std::string myMsg
The message.
send when a error occured
Definition: GUIEvent.h:55
The message is a warning.
Definition: MsgHandler.h:63
send when a warning occured
Definition: GUIEvent.h:52
GUIEvent_Message(MsgHandler::MsgType type, const std::string &msg)
constructor
The message is an error.
Definition: MsgHandler.h:65
send when a status change occured
Definition: GUIEvent.h:58