OpenASIP  2.0
CallExplorerPlugin.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 CallExplorerPlugin.hh
26  *
27  * Declaration of CallExplorerPluginWindow class.
28  *
29  * @author Viljami Korhonen 2008 (viljami.korhonen-no.spam-.tut.fi)
30  * @note rating: red
31  */
32 
33 #ifndef CALL_EXPLORER_PLUGIN_WINDOW_HH
34 #define CALL_EXPLORER_PLUGIN_WINDOW_HH
35 
36 #include <wx/wx.h>
37 #include <wx/listctrl.h>
38 #include "PluginTools.hh"
39 #include "DesignSpaceExplorer.hh"
41 
42 namespace TTAMachine {
43  class Machine;
44 }
45 
47 class Model;
48 
49 /**
50  * Explorer plugin call window.
51  */
52 class CallExplorerPluginWindow : public wxDialog {
53 public:
55  wxWindow* parent, TTAMachine::Machine& machine, Model& model);
56 
57  virtual ~CallExplorerPluginWindow();
58 
59 private:
60 
61  virtual bool TransferDataToWindow();
62  void onClose(wxCommandEvent& event);
63  void onEdit(wxCommandEvent&);
64  void onRun(wxCommandEvent& event);
65  void onSelectPlugin(wxCommandEvent& event);
66  void onParamActivate(wxListEvent& event);
67  void onParamSelect(wxListEvent& event);
68  void onParamDeSelect(wxListEvent& event);
69 
70  void doEdit();
71  void updateParameterList();
72  void setTexts();
73  ExplorerPluginParameter getParam(int paramNum);
74 
75  wxSizer* createContents(wxWindow* parent, bool call_fit, bool set_sizer);
76 
77 
78 
79  /// Machine that is being modified.
81  /// The model
83 
84  /// Plugin names combo box
85  wxComboBox* pluginNames_;
86  /// description text field
87  wxTextCtrl* pluginDescription_;
88  /// Parameter list;
89  wxListCtrl* parameterList_;
90  /// Edit button
91  wxButton* editButton;
92  /// Run button
93  wxButton* runButton;
94  /// Selected parameter, or -1
96 
97  // Widget IDs.
98  enum {
99  ID_TEXT = 10000,
105  };
106 
108  std::vector<DesignSpaceExplorerPlugin*> plugins_;
110 
111  DECLARE_EVENT_TABLE()
112 };
113 
114 #endif
CallExplorerPluginWindow::parameterList_
wxListCtrl * parameterList_
Parameter list;.
Definition: CallExplorerPlugin.hh:89
CallExplorerPluginWindow::createContents
wxSizer * createContents(wxWindow *parent, bool call_fit, bool set_sizer)
Definition: CallExplorerPlugin.cc:380
CallExplorerPluginWindow::CallExplorerPluginWindow
CallExplorerPluginWindow(wxWindow *parent, TTAMachine::Machine &machine, Model &model)
Definition: CallExplorerPlugin.cc:81
machine
TTAMachine::Machine * machine
the architecture definition of the estimated processor
Definition: EstimatorCmdLineUI.cc:59
CallExplorerPluginWindow::onRun
void onRun(wxCommandEvent &event)
Definition: CallExplorerPlugin.cc:206
CallExplorerPluginWindow::onParamSelect
void onParamSelect(wxListEvent &event)
Definition: CallExplorerPlugin.cc:267
ExplorerPluginParameter.hh
CallExplorerPluginWindow::ID_TEXT
@ ID_TEXT
Definition: CallExplorerPlugin.hh:99
DesignSpaceExplorerPlugin
Definition: DesignSpaceExplorerPlugin.hh:55
CallExplorerPluginWindow::onClose
void onClose(wxCommandEvent &event)
Definition: CallExplorerPlugin.cc:189
CallExplorerPluginWindow::runButton
wxButton * runButton
Run button.
Definition: CallExplorerPlugin.hh:93
CallExplorerPluginWindow::getParam
ExplorerPluginParameter getParam(int paramNum)
Definition: CallExplorerPlugin.cc:354
CallExplorerPluginWindow::TransferDataToWindow
virtual bool TransferDataToWindow()
Definition: CallExplorerPlugin.cc:179
CallExplorerPluginWindow::ID_DESCRIPTION_FIELD
@ ID_DESCRIPTION_FIELD
Definition: CallExplorerPlugin.hh:101
CallExplorerPluginWindow::pluginNames_
wxComboBox * pluginNames_
Plugin names combo box.
Definition: CallExplorerPlugin.hh:85
CallExplorerPluginWindow::editButton
wxButton * editButton
Edit button.
Definition: CallExplorerPlugin.hh:91
CallExplorerPluginWindow::machine_
TTAMachine::Machine & machine_
Machine that is being modified.
Definition: CallExplorerPlugin.hh:80
ExplorerPluginParameter
Definition: ExplorerPluginParameter.hh:46
CallExplorerPluginWindow::ID_PARAM_LIST
@ ID_PARAM_LIST
Definition: CallExplorerPlugin.hh:102
CallExplorerPluginWindow::model_
Model & model_
The model.
Definition: CallExplorerPlugin.hh:82
CallExplorerPluginWindow::updateParameterList
void updateParameterList()
Definition: CallExplorerPlugin.cc:327
CallExplorerPluginWindow
Definition: CallExplorerPlugin.hh:52
CallExplorerPluginWindow::onParamActivate
void onParamActivate(wxListEvent &event)
Definition: CallExplorerPlugin.cc:258
CallExplorerPluginWindow::pluginDescription_
wxTextCtrl * pluginDescription_
description text field
Definition: CallExplorerPlugin.hh:87
CallExplorerPluginWindow::setTexts
void setTexts()
Definition: CallExplorerPlugin.cc:143
PluginTools.hh
CallExplorerPluginWindow::ID_EDIT
@ ID_EDIT
Definition: CallExplorerPlugin.hh:103
CallExplorerPluginWindow::doEdit
void doEdit()
Definition: CallExplorerPlugin.cc:310
CallExplorerPluginWindow::selectedPlugin_
DesignSpaceExplorerPlugin * selectedPlugin_
Definition: CallExplorerPlugin.hh:109
Model
Definition: Model.hh:50
DesignSpaceExplorer.hh
CallExplorerPluginWindow::explorer_
DesignSpaceExplorer explorer_
Definition: CallExplorerPlugin.hh:107
CallExplorerPluginWindow::onParamDeSelect
void onParamDeSelect(wxListEvent &event)
Definition: CallExplorerPlugin.cc:275
CallExplorerPluginWindow::onEdit
void onEdit(wxCommandEvent &)
Definition: CallExplorerPlugin.cc:197
DesignSpaceExplorer
Definition: DesignSpaceExplorer.hh:70
TTAMachine
Definition: Assembler.hh:48
CallExplorerPluginWindow::selectedParam_
int selectedParam_
Selected parameter, or -1.
Definition: CallExplorerPlugin.hh:95
CallExplorerPluginWindow::~CallExplorerPluginWindow
virtual ~CallExplorerPluginWindow()
Definition: CallExplorerPlugin.cc:135
CallExplorerPluginWindow::ID_RUN
@ ID_RUN
Definition: CallExplorerPlugin.hh:104
CallExplorerPluginWindow::ID_PLUGIN_CHOOSER
@ ID_PLUGIN_CHOOSER
Definition: CallExplorerPlugin.hh:100
TTAMachine::Machine
Definition: Machine.hh:73
CallExplorerPluginWindow::plugins_
std::vector< DesignSpaceExplorerPlugin * > plugins_
Definition: CallExplorerPlugin.hh:108
CallExplorerPluginWindow::onSelectPlugin
void onSelectPlugin(wxCommandEvent &event)
Definition: CallExplorerPlugin.cc:284