OpenASIP  2.0
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 
35 namespace TTAMachine {
36  class OperationTriggeredFormat;
37 }
38 
39 /**
40  * Dialog for editing telplate slot properties.
41  */
42 class OTAOperationDialog : public wxDialog {
43 public:
45  wxWindow* parent,
47 
48  virtual ~OTAOperationDialog();
49 
50 private:
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
OTAOperationDialog::OTAOperationDialog
OTAOperationDialog(wxWindow *parent, TTAMachine::OperationTriggeredFormat *format)
Definition: OTAOperationDialog.cc:70
OTAOperationDialog::onSelectOperation
void onSelectOperation(wxCommandEvent &event)
Definition: OTAOperationDialog.cc:246
OTAOperationDialog::TransferDataToWindow
virtual bool TransferDataToWindow()
Definition: OTAOperationDialog.cc:170
OTAOperationDialog::ID_OP_FILTER
@ ID_OP_FILTER
Definition: OTAOperationDialog.hh:79
OTAOperationDialog::ID_LINE
@ ID_LINE
Definition: OTAOperationDialog.hh:80
OTAOperationDialog::TransferDataFromWindow
virtual bool TransferDataFromWindow()
Definition: OTAOperationDialog.cc:216
OTAOperationDialog::ID_LIST
@ ID_LIST
Definition: OTAOperationDialog.hh:78
TCEString.hh
OTAOperationDialog::operationList_
wxListBox * operationList_
Operation list widget.
Definition: OTAOperationDialog.hh:68
OTAOperationDialog::ID_OTA_OPERATION
@ ID_OTA_OPERATION
Definition: OTAOperationDialog.hh:77
OTAOperationDialog::numberOfOutputs
int numberOfOutputs() const
Definition: OTAOperationDialog.cc:107
OTAOperationDialog::format_
TTAMachine::OperationTriggeredFormat * format_
Definition: OTAOperationDialog.hh:72
OTAOperationDialog::addRISCVBaseOperations
std::set< TCEString > addRISCVBaseOperations(std::set< TCEString > opset) const
Definition: OTAOperationDialog.cc:131
TTAMachine::OperationTriggeredFormat
Definition: OperationTriggeredFormat.hh:44
OTAOperationDialog
Definition: OTAOperationDialog.hh:42
OTAOperationDialog::numberOfInputs
int numberOfInputs() const
Definition: OTAOperationDialog.cc:90
OTAOperationDialog::onOperationFilterChange
void onOperationFilterChange(wxCommandEvent &event)
Definition: OTAOperationDialog.cc:257
OTAOperationDialog::~OTAOperationDialog
virtual ~OTAOperationDialog()
Definition: OTAOperationDialog.cc:86
OTAOperationDialog::ID_OP_FILTER_LABEL
@ ID_OP_FILTER_LABEL
Definition: OTAOperationDialog.hh:81
OTAOperationDialog::ID_LABEL_OTA_OPERATION
@ ID_LABEL_OTA_OPERATION
Definition: OTAOperationDialog.hh:76
TCEString
Definition: TCEString.hh:53
OTAOperationDialog::validFormatName
bool validFormatName() const
Definition: OTAOperationDialog.cc:118
OTAOperationDialog::operation_
TCEString operation_
Name of the selected operation.
Definition: OTAOperationDialog.hh:66
TTAMachine
Definition: Assembler.hh:48
OTAOperationDialog::opNameFilter_
TCEString opNameFilter_
A string to filter opset list.
Definition: OTAOperationDialog.hh:70
OTAOperationDialog::onOK
void onOK(wxCommandEvent &event)
Definition: OTAOperationDialog.cc:225
OTAOperationDialog::createContents
wxSizer * createContents(wxWindow *parent, bool call_fit, bool set_sizer)
Definition: OTAOperationDialog.cc:276