OpenASIP  2.0
CostEstimationDataDialog.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 CostEstimationDataDialog.hh
26  *
27  * Declaration of CostEstimationDataDialog 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_COST_ESTIMATION_DATA_DIALOG_HH
34 #define TTA_COST_ESTIMATION_DATA_DIALOG_HH
35 
36 #include <wx/wx.h>
37 #include "DBTypes.hh"
38 
39 namespace HDB {
40  class HDBManager;
41 }
42 
43 /**
44  * Dialog for adding and modifying cost function plugin data.
45  */
46 class CostEstimationDataDialog : public wxDialog {
47 public:
49  wxWindow* parent, wxWindowID id, HDB::HDBManager& hdb, RowID pluginID,
50  RowID dataID);
51 
52  virtual ~CostEstimationDataDialog();
53 
54 private:
55  virtual bool TransferDataToWindow();
56  void onOK(wxCommandEvent& event);
57  void onEntryTypeSelection(wxCommandEvent& event);
58 
59  wxSizer* createContents(wxWindow* parent, bool call_fit, bool set_sizer);
60 
61  /// widget IDs
62  enum {
63  ID_ENTRY_TYPE = 10000,
69  };
70 
71  /// HDB Containing the data.
73  /// ID of the data's parent plugin.
75  /// ID of the data to modify, or -1 if new data is being added.
77  /// Entry reference type choice widget.
78  wxChoice* typeChoice_;
79  /// Entry reference id choice widget.
80  wxChoice* idChoice_;
81  /// Name of the data.
82  wxString name_;
83  /// Value of the data.
84  wxString value_;
85 
86  static const wxString ENTRY_TYPE_NONE;
87  static const wxString ENTRY_TYPE_FU;
88  static const wxString ENTRY_TYPE_RF;
89  static const wxString ENTRY_TYPE_BUS;
90  static const wxString ENTRY_TYPE_SOCKET;
91 
92  DECLARE_EVENT_TABLE()
93 };
94 
95 #endif
CostEstimationDataDialog::name_
wxString name_
Name of the data.
Definition: CostEstimationDataDialog.hh:82
CostEstimationDataDialog::ID_NAME
@ ID_NAME
Definition: CostEstimationDataDialog.hh:65
CostEstimationDataDialog::CostEstimationDataDialog
CostEstimationDataDialog(wxWindow *parent, wxWindowID id, HDB::HDBManager &hdb, RowID pluginID, RowID dataID)
Definition: CostEstimationDataDialog.cc:63
CostEstimationDataDialog::hdb_
HDB::HDBManager & hdb_
HDB Containing the data.
Definition: CostEstimationDataDialog.hh:72
HDB
Definition: CostDatabase.hh:49
CostEstimationDataDialog::ENTRY_TYPE_SOCKET
static const wxString ENTRY_TYPE_SOCKET
Definition: CostEstimationDataDialog.hh:90
CostEstimationDataDialog::ID_ENTRY_TYPE
@ ID_ENTRY_TYPE
Definition: CostEstimationDataDialog.hh:63
CostEstimationDataDialog::idChoice_
wxChoice * idChoice_
Entry reference id choice widget.
Definition: CostEstimationDataDialog.hh:80
CostEstimationDataDialog::pluginID_
RowID pluginID_
ID of the data's parent plugin.
Definition: CostEstimationDataDialog.hh:74
CostEstimationDataDialog::~CostEstimationDataDialog
virtual ~CostEstimationDataDialog()
Definition: CostEstimationDataDialog.cc:93
RowID
int RowID
Type definition of row ID in relational databases.
Definition: DBTypes.hh:37
CostEstimationDataDialog::ID_LINE
@ ID_LINE
Definition: CostEstimationDataDialog.hh:68
CostEstimationDataDialog::ID_TEXT
@ ID_TEXT
Definition: CostEstimationDataDialog.hh:67
CostEstimationDataDialog::ENTRY_TYPE_NONE
static const wxString ENTRY_TYPE_NONE
Definition: CostEstimationDataDialog.hh:86
CostEstimationDataDialog::onEntryTypeSelection
void onEntryTypeSelection(wxCommandEvent &event)
Definition: CostEstimationDataDialog.cc:137
CostEstimationDataDialog
Definition: CostEstimationDataDialog.hh:46
DBTypes.hh
CostEstimationDataDialog::ENTRY_TYPE_RF
static const wxString ENTRY_TYPE_RF
Definition: CostEstimationDataDialog.hh:88
CostEstimationDataDialog::onOK
void onOK(wxCommandEvent &event)
Definition: CostEstimationDataDialog.cc:183
HDB::HDBManager
Definition: HDBManager.hh:82
CostEstimationDataDialog::ENTRY_TYPE_FU
static const wxString ENTRY_TYPE_FU
Definition: CostEstimationDataDialog.hh:87
CostEstimationDataDialog::createContents
wxSizer * createContents(wxWindow *parent, bool call_fit, bool set_sizer)
Definition: CostEstimationDataDialog.cc:239
CostEstimationDataDialog::dataID_
RowID dataID_
ID of the data to modify, or -1 if new data is being added.
Definition: CostEstimationDataDialog.hh:76
CostEstimationDataDialog::TransferDataToWindow
virtual bool TransferDataToWindow()
Definition: CostEstimationDataDialog.cc:102
CostEstimationDataDialog::ID_VALUE
@ ID_VALUE
Definition: CostEstimationDataDialog.hh:66
CostEstimationDataDialog::ENTRY_TYPE_BUS
static const wxString ENTRY_TYPE_BUS
Definition: CostEstimationDataDialog.hh:89
CostEstimationDataDialog::value_
wxString value_
Value of the data.
Definition: CostEstimationDataDialog.hh:84
CostEstimationDataDialog::typeChoice_
wxChoice * typeChoice_
Entry reference type choice widget.
Definition: CostEstimationDataDialog.hh:78
CostEstimationDataDialog::ID_ENTRY_ID
@ ID_ENTRY_ID
Definition: CostEstimationDataDialog.hh:64