OpenASIP  2.0
BlockImplementationDialog.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 BlockImplementationDialog.hh
26  *
27  * Declaration of BlockImplementationDialog 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_BLOCK_IMPLEMENTATION_DIALOG_HH
34 #define TTA_BLOCK_IMPLEMENTATION_DIALOG_HH
35 
36 #include <set>
37 #include <string>
38 #include <wx/wx.h>
39 #include <wx/listctrl.h>
40 
41 namespace TTAMachine {
42  class Component;
43 }
44 
45 namespace IDF {
46  class UnitImplementationLocation;
47 }
48 
49 class BlockImplementationDialog : public wxDialog {
50 public:
52  wxWindow* parent, const TTAMachine::Component& block,
54 
56 
57 private:
58  wxSizer* createContents(wxWindow* parent, bool call_fit, bool set_sizer);
59  void onBrowse(wxCommandEvent& event);
60  void onImplSelection(wxListEvent& event);
61  void onImplActivation(wxListEvent& e);
62 
63  void doOK();
64  void onOK(wxCommandEvent& event);
65  void onHDBSelection(wxCommandEvent& event);
66 
69  wxListCtrl* list_;
70  wxChoice* hdbChoice_;
71 
72  /// Static set for hdb paths.
73  static std::set<std::string> hdbs_;
74  /// Static variable for the hdb choicer selection.
75  static int selection_;
76 
77  // Default HDB file to set in the beginning
78  static const std::string defaultHDB_;
79 
80  enum {
85  };
86 
87  DECLARE_EVENT_TABLE()
88 };
89 
90 #endif
IDF::UnitImplementationLocation
Definition: UnitImplementationLocation.hh:48
BlockImplementationDialog::hdbs_
static std::set< std::string > hdbs_
Static set for hdb paths.
Definition: BlockImplementationDialog.hh:73
BlockImplementationDialog::list_
wxListCtrl * list_
Definition: BlockImplementationDialog.hh:69
BlockImplementationDialog::impl_
IDF::UnitImplementationLocation & impl_
Definition: BlockImplementationDialog.hh:68
BlockImplementationDialog::ID_BROWSE
@ ID_BROWSE
Definition: BlockImplementationDialog.hh:82
BlockImplementationDialog::ID_LIST
@ ID_LIST
Definition: BlockImplementationDialog.hh:83
BlockImplementationDialog::onHDBSelection
void onHDBSelection(wxCommandEvent &event)
Definition: BlockImplementationDialog.cc:177
BlockImplementationDialog::onOK
void onOK(wxCommandEvent &event)
Definition: BlockImplementationDialog.cc:351
BlockImplementationDialog::onImplSelection
void onImplSelection(wxListEvent &event)
Definition: BlockImplementationDialog.cc:165
BlockImplementationDialog::onImplActivation
void onImplActivation(wxListEvent &e)
Definition: BlockImplementationDialog.cc:361
TTAMachine::Component
Definition: MachinePart.hh:90
BlockImplementationDialog::~BlockImplementationDialog
virtual ~BlockImplementationDialog()
Definition: BlockImplementationDialog.cc:135
BlockImplementationDialog::ID_HDB_CHOICE
@ ID_HDB_CHOICE
Definition: BlockImplementationDialog.hh:81
BlockImplementationDialog::block_
const TTAMachine::Component & block_
Definition: BlockImplementationDialog.hh:67
BlockImplementationDialog::hdbChoice_
wxChoice * hdbChoice_
Definition: BlockImplementationDialog.hh:70
BlockImplementationDialog::onBrowse
void onBrowse(wxCommandEvent &event)
Definition: BlockImplementationDialog.cc:144
BlockImplementationDialog
Definition: BlockImplementationDialog.hh:49
BlockImplementationDialog::BlockImplementationDialog
BlockImplementationDialog(wxWindow *parent, const TTAMachine::Component &block, IDF::UnitImplementationLocation &impl)
Definition: BlockImplementationDialog.cc:86
BlockImplementationDialog::doOK
void doOK()
Definition: BlockImplementationDialog.cc:335
BlockImplementationDialog::createContents
wxSizer * createContents(wxWindow *parent, bool call_fit, bool set_sizer)
Definition: BlockImplementationDialog.cc:369
BlockImplementationDialog::defaultHDB_
static const std::string defaultHDB_
Definition: BlockImplementationDialog.hh:78
BlockImplementationDialog::selection_
static int selection_
Static variable for the hdb choicer selection.
Definition: BlockImplementationDialog.hh:75
BlockImplementationDialog::ID_LINE
@ ID_LINE
Definition: BlockImplementationDialog.hh:84
TTAMachine
Definition: Assembler.hh:48
IDF
Definition: DSDBManager.hh:54