OpenASIP  2.0
SimulatorEvent.cc
Go to the documentation of this file.
1 /*
2  Copyright (c) 2002-2009 Tampere University.
3 
4  This file is part of TTA-Based Codesign Environment (TCE).
5 
6  Permission is hereby granted, free of charge, to any person obtaining a
7  copy of this software and associated documentation files (the "Software"),
8  to deal in the Software without restriction, including without limitation
9  the rights to use, copy, modify, merge, publish, distribute, sublicense,
10  and/or sell copies of the Software, and to permit persons to whom the
11  Software is furnished to do so, subject to the following conditions:
12 
13  The above copyright notice and this permission notice shall be included in
14  all copies or substantial portions of the Software.
15 
16  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19  THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22  DEALINGS IN THE SOFTWARE.
23  */
24 /**
25  * @file SimulatorEvent.cc
26  *
27  * Implementation of SimulatorEvent class.
28  *
29  * @author Veli-Pekka Jääskeläinen 2005 (vjaaskel-no.spam-cs.tut.fi)
30  * @note rating: red
31  */
32 
33 #include "SimulatorEvent.hh"
34 
35 const wxEventType SimulatorEvent::EVT_SIMULATOR_TERMINATED = wxNewEventType();
36 const wxEventType SimulatorEvent::EVT_SIMULATOR_START = wxNewEventType();
37 const wxEventType SimulatorEvent::EVT_SIMULATOR_STOP = wxNewEventType();
38 const wxEventType SimulatorEvent::EVT_SIMULATOR_RUN = wxNewEventType();
39 const wxEventType SimulatorEvent::EVT_SIMULATOR_OUTPUT = wxNewEventType();
40 const wxEventType SimulatorEvent::EVT_SIMULATOR_ERROR = wxNewEventType();
41 const wxEventType SimulatorEvent::EVT_SIMULATOR_COMMAND = wxNewEventType();
43  wxNewEventType();
44 
46  wxNewEventType();
48  wxNewEventType();
49 
51  wxNewEventType();
53  wxNewEventType();
55  wxNewEventType();
57  wxNewEventType();
58 const wxEventType SimulatorEvent::EVT_SIMULATOR_RESET = wxNewEventType();
59 
60 /**
61  * The Constructor.
62  *
63  * @param eventType Event type ID.
64  * @param data String data associated with the event.
65  */
66 SimulatorEvent::SimulatorEvent(WXTYPE eventType, std::string data) :
67  wxEvent(0, eventType), data_(data) {
68 
69 }
70 
71 
72 /**
73  * The Destructor.
74  */
76 }
77 
78 
79 /**
80  * Returns string data of the event.
81  *
82  * @return String data associated with the event.
83  */
84 std::string
86  return data_;
87 }
SimulatorEvent::EVT_SIMULATOR_STOP
static const wxEventType EVT_SIMULATOR_STOP
Simulation stopped.
Definition: SimulatorEvent.hh:71
SimulatorEvent.hh
SimulatorEvent::EVT_SIMULATOR_RUNTIME_WARNING
static const wxEventType EVT_SIMULATOR_RUNTIME_WARNING
Runtime warning event.
Definition: SimulatorEvent.hh:66
SimulatorEvent::EVT_SIMULATOR_OUTPUT
static const wxEventType EVT_SIMULATOR_OUTPUT
Textual output event from simulator interpreter.
Definition: SimulatorEvent.hh:60
SimulatorEvent::data_
std::string data_
Definition: SimulatorEvent.hh:89
SimulatorEvent::EVT_SIMULATOR_LOADING_MACHINE
static const wxEventType EVT_SIMULATOR_LOADING_MACHINE
Machine loading started.
Definition: SimulatorEvent.hh:77
SimulatorEvent::EVT_SIMULATOR_RESET
static const wxEventType EVT_SIMULATOR_RESET
Sent before program,machine or memory model is destroyed.
Definition: SimulatorEvent.hh:85
SimulatorEvent::~SimulatorEvent
virtual ~SimulatorEvent()
Definition: SimulatorEvent.cc:75
SimulatorEvent::EVT_SIMULATOR_RUNTIME_ERROR
static const wxEventType EVT_SIMULATOR_RUNTIME_ERROR
Runtime error event.
Definition: SimulatorEvent.hh:64
SimulatorEvent::EVT_SIMULATOR_LOADING_PROGRAM
static const wxEventType EVT_SIMULATOR_LOADING_PROGRAM
Program loading started.
Definition: SimulatorEvent.hh:81
SimulatorEvent::EVT_SIMULATOR_PROGRAM_LOADED
static const wxEventType EVT_SIMULATOR_PROGRAM_LOADED
Program loaded event.
Definition: SimulatorEvent.hh:83
SimulatorEvent::data
std::string data() const
Definition: SimulatorEvent.cc:85
SimulatorEvent::EVT_SIMULATOR_TERMINATED
static const wxEventType EVT_SIMULATOR_TERMINATED
Simulator thread terminated.
Definition: SimulatorEvent.hh:57
SimulatorEvent::EVT_SIMULATOR_ERROR
static const wxEventType EVT_SIMULATOR_ERROR
Simulator error event.
Definition: SimulatorEvent.hh:62
SimulatorEvent::EVT_SIMULATOR_START
static const wxEventType EVT_SIMULATOR_START
Simulation started.
Definition: SimulatorEvent.hh:69
SimulatorEvent::SimulatorEvent
SimulatorEvent(WXTYPE eventType, std::string data="")
Definition: SimulatorEvent.cc:66
SimulatorEvent::EVT_SIMULATOR_COMMAND
static const wxEventType EVT_SIMULATOR_COMMAND
Command received from the GUI.
Definition: SimulatorEvent.hh:53
SimulatorEvent::EVT_SIMULATOR_RUN
static const wxEventType EVT_SIMULATOR_RUN
Simulation ran/resumed.
Definition: SimulatorEvent.hh:73
SimulatorEvent::EVT_SIMULATOR_MACHINE_LOADED
static const wxEventType EVT_SIMULATOR_MACHINE_LOADED
Machine loaded event.
Definition: SimulatorEvent.hh:79
SimulatorEvent::EVT_SIMULATOR_COMMAND_DONE
static const wxEventType EVT_SIMULATOR_COMMAND_DONE
Command execution completed.
Definition: SimulatorEvent.hh:55