OpenASIP 2.2
Loading...
Searching...
No Matches
DisassemblyGridTable.hh
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 DisassemblyGridTable.hh
26 *
27 * Declaration of DisassemblyGridTable class.
28 *
29 * @author Veli-Pekka Jääskeläinen 2006 (vjaaskel-no.spam-cs.tut.fi)
30 * @note rating: red
31 */
32
33#ifndef TTA_DISASSEMBLY_GRID_TABLE_HH
34#define TTA_DISASSEMBLY_GRID_TABLE_HH
35
36#include <map>
37#include <string>
38#include <wx/wx.h>
39#include <wx/grid.h>
40#include "BaseType.hh"
41
42namespace TTAProgram {
43 class Program;
44}
45
46class POMDisassembler;
47
48/**
49 * Grid table class which allows wxGrid to display disassembly of a tta program
50 * by disassembling only the currently visible instructions. Purpose of the
51 * 'lazy' disasembling is to conserve memory and processing time when the
52 * program is very large.
53 */
54class DisassemblyGridTable : public wxGridTableBase {
55public:
57 virtual ~DisassemblyGridTable();
58 virtual int GetNumberRows();
59 virtual int GetNumberCols();
60 virtual bool IsEmptyCell(int row, int col);
61 virtual wxString GetValue(int row, int col);
62 virtual wxString GetRowLabelValue(int row);
63 virtual wxString GetColLabelValue(int col);
64 virtual void SetValue(int row, int col, const wxString& value);
65 virtual bool CanHaveAttributes();
66 int rowOfAddress(Word address);
67 Word addressOfRow(int row);
69protected:
70 /// Program loaded in the table.
72private:
73 /// Disassembler for generating instruction disassemblies.
75
76 /// Type for the labels multimap
77 typedef std::multimap<int, std::string> LabelMap;
78
79 /// Program labels.
81};
82
83#endif
find Finds info of the inner loops in the program
virtual wxString GetColLabelValue(int col)
virtual bool IsEmptyCell(int row, int col)
virtual wxString GetValue(int row, int col)
virtual wxString GetRowLabelValue(int row)
void loadProgram(const TTAProgram::Program &program)
int rowOfAddress(Word address)
POMDisassembler * disassembler_
Disassembler for generating instruction disassemblies.
virtual void SetValue(int row, int col, const wxString &value)
std::multimap< int, std::string > LabelMap
Type for the labels multimap.
LabelMap labels_
Program labels.
const TTAProgram::Program * program_
Program loaded in the table.