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-2018 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
15 // Event send when a message (message, warning, error) has to besubmitted
16 /****************************************************************************/
17 #ifndef GUIEvent_Message_h
18 #define GUIEvent_Message_h
19 
20 
21 // ===========================================================================
22 // included modules
23 // ===========================================================================
24 #include <config.h>
25 
26 #include "GUIEvent.h"
27 #include <string>
29 
30 
31 // ===========================================================================
32 // class definitions
33 // ===========================================================================
39 class GUIEvent_Message : public GUIEvent {
40 public:
42  GUIEvent_Message(const std::string& msg)
44  }
45 
47  GUIEvent_Message(MsgHandler::MsgType type, const std::string& msg)
49  switch (type) {
52  break;
55  break;
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:55
GUIEvent_Message(const std::string &msg)
constructor
send when a warning occured
Definition: GUIEvent.h:46
GUIEventType myType
the type of the event
Definition: GUIEvent.h:93
send when a debug occured
Definition: GUIEvent.h:52
send when a status change occured
Definition: GUIEvent.h:58
const std::string & getMsg() const
Returns the message.
~GUIEvent_Message()
destructor
std::string myMsg
The message.
The message is a warning.
Definition: MsgHandler.h:57
send when a gldebug occured
Definition: GUIEvent.h:55
send when a message occured
Definition: GUIEvent.h:43
send when a error occured
Definition: GUIEvent.h:49
The message is an debug.
Definition: MsgHandler.h:61
GUIEvent_Message(MsgHandler::MsgType type, const std::string &msg)
constructor
The message is an debug.
Definition: MsgHandler.h:63
The message is an error.
Definition: MsgHandler.h:59