OpenASIP 2.2
Loading...
Searching...
No Matches
OTAOperationDialog.hh
Go to the documentation of this file.
1/*
2 Copyright (C) 2022 Tampere University.
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with this library; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18/**
19 * @file OTAOperationDialog.hh
20 *
21 * Declaration of OTAOperationDialog.
22 *
23 * @author Kari Hepola 2022
24 * @note rating: red
25 */
26
27#ifndef TTA_TEMPLATE_SLOT_DIALOG_HH
28#define TTA_TEMPLATE_SLOT_DIALOG_HH
29
30#include <wx/wx.h>
31#include <wx/spinctrl.h>
32#include "TCEString.hh"
33#include <set>
34
35namespace TTAMachine {
36 class OperationTriggeredFormat;
37}
38
39/**
40 * Dialog for editing telplate slot properties.
41 */
42class OTAOperationDialog : public wxDialog {
43public:
45 wxWindow* parent,
47
48 virtual ~OTAOperationDialog();
49
50private:
51 wxSizer* createContents(wxWindow *parent, bool call_fit, bool set_sizer);
52 virtual bool TransferDataToWindow();
53 virtual bool TransferDataFromWindow();
54 void onOK(wxCommandEvent& event);
55 void onOperationFilterChange(wxCommandEvent& event);
56 void onSelectOperation(wxCommandEvent& event);
57
58 int numberOfInputs() const;
59 int numberOfOutputs() const;
60
61 bool validFormatName() const;
62 std::set<TCEString> addRISCVBaseOperations(
63 std::set<TCEString> opset) const;
64
65 /// Name of the selected operation.
67 /// Operation list widget.
68 wxListBox* operationList_;
69 /// A string to filter opset list.
71
73
74 // enumerated IDs for dialog widgets
75 enum {
82 };
83
84 DECLARE_EVENT_TABLE()
85};
86#endif
std::set< TCEString > addRISCVBaseOperations(std::set< TCEString > opset) const
void onOK(wxCommandEvent &event)
void onOperationFilterChange(wxCommandEvent &event)
virtual bool TransferDataFromWindow()
TCEString operation_
Name of the selected operation.
virtual bool TransferDataToWindow()
TTAMachine::OperationTriggeredFormat * format_
wxListBox * operationList_
Operation list widget.
TCEString opNameFilter_
A string to filter opset list.
wxSizer * createContents(wxWindow *parent, bool call_fit, bool set_sizer)
void onSelectOperation(wxCommandEvent &event)