OpenASIP 2.2
Loading...
Searching...
No Matches
ProximDebuggerWindow.hh
Go to the documentation of this file.
1/*
2 Copyright (c) 2002-20016 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 ProximDebuggerWindow.cc
26 *
27 * Declaration of ProximDebuggerWindow class.
28 *
29 * @author Alex Hirvonen 2016 (alex.hirvonen-no.spam-gmail.com)
30 * @note rating: red
31 */
32
33
34#ifndef TTA_PROXIM_DEBUGGER_WINDOW_HH
35#define TTA_PROXIM_DEBUGGER_WINDOW_HH
36
37
38#include <vector>
39
41#include "SimulatorEvent.hh"
42
43
44namespace TTAProgram {
45 class Program;
46}
47
48/**
49 * Proxim subwindow which displays program source code annotations.
50 *
51 * This window listens to SimulatorEvents and updates the window
52 * contents automatically.
53 */
55public:
57 virtual ~ProximDebuggerWindow();
58 virtual void reset();
60 void updateAnnotations();
61 void loadSourceCode(wxString sourceFile);
62 void setLineAttributes(int lineNum, wxTextAttr style);
63 void highlightLine(int lineNum);
64 void showLine(int lineNum);
65
66private:
67 void onProgramLoaded(const SimulatorEvent& event);
68 void onSimulationStop(const SimulatorEvent& event);
69 void onSourceFileChoice(wxCommandEvent& event);
70 wxSizer* createContents(wxWindow *parent, bool call_fit, bool set_sizer);
71
72 // Currently loaded source code file
73 wxString currentFile_;
74 // Currently highlighted source code line numbers
75 std::vector<int> currentLineNums_;
76 // Drop-down list of available source code files
77 wxChoice* sourceFileList_;
78 // Widget for displaying source code contents
79 wxTextCtrl* sourceCodeText_;
80
81 // Widget IDs.
82 enum {
85 };
86
87 DECLARE_EVENT_TABLE()
88};
89
90#endif
find Finds info of the inner loops in the program
void setLineAttributes(int lineNum, wxTextAttr style)
void onSourceFileChoice(wxCommandEvent &event)
void loadProgram(const TTAProgram::Program &program)
void highlightLine(int lineNum)
void loadSourceCode(wxString sourceFile)
void onProgramLoaded(const SimulatorEvent &event)
wxSizer * createContents(wxWindow *parent, bool call_fit, bool set_sizer)
std::vector< int > currentLineNums_
void onSimulationStop(const SimulatorEvent &event)