SUMO - Simulation of Urban MObility
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-2015 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(MsgHandler::MsgType type, const std::string& msg)
51  switch (type) {
54  break;
57  break;
60  break;
61  default:
62  throw 1;
63  }
64  }
65 
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 
The message is only something to show.
Definition: MsgHandler.h:62
send when a message occured
Definition: GUIEvent.h:50
GUIEventType myType
the type of the event
Definition: GUIEvent.h:96
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