OpenASIP  2.0
FUGuardDialog.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 FUGuardDialog.hh
26  *
27  * Declaration of FUGuardDualog class.
28  *
29  * @author Veli-Pekka Jääskeläinen 2004 (vjaaskel-no.spam-cs.tut.fi)
30  */
31 
32 #ifndef TTA_FU_GUARD_DIALOG_HH
33 #define TTA_FU_GUARD_DIALOG_HH
34 
35 #include <wx/wx.h>
36 
37 namespace TTAMachine {
38  class Bus;
39  class PortGuard;
40  class FunctionUnit;
41  class FUPort;
42 }
43 
44 /**
45  * Dialog for editing function unit port guard properties.
46  */
47 class FUGuardDialog : public wxDialog {
48 public:
50  wxWindow* parent,
51  TTAMachine::Bus* bus,
52  TTAMachine::PortGuard* guard = NULL);
53  virtual ~FUGuardDialog();
54  virtual bool TransferDataToWindow();
55 
56 private:
57  wxSizer* createContents(wxWindow* parent, bool call_fit, bool set_sizer);
58  void onFUChoice(wxCommandEvent& event);
59  void onOK(wxCommandEvent& event);
60  void onCancel(wxCommandEvent& event);
63  void setTexts();
64 
65  /// Choice widget for the function unit selection.
66  wxChoice* nameChoice_;
67  /// Choice widget for the port selection.
68  wxChoice* portChoice_;
69  /// Checkbox widget for the inverted flag.
70  wxCheckBox* invertedBox_;
71 
72  /// Inverted flag for the guard.
73  bool inverted_;
74  /// Modified inverted flag.
76  /// Port of the guard.
78  /// Parent bus of the guard.
80  /// True if a new guard is being added, false otherwise.
81  bool adding_;
82 
83  // IDs for the dialog widgets.
84  enum {
85  ID_LABEL_NAME = 10000,
92  };
93 
94  DECLARE_EVENT_TABLE()
95 };
96 #endif
FUGuardDialog::createContents
wxSizer * createContents(wxWindow *parent, bool call_fit, bool set_sizer)
Definition: FUGuardDialog.cc:320
FUGuardDialog::ID_LABEL_NAME
@ ID_LABEL_NAME
Definition: FUGuardDialog.hh:85
FUGuardDialog::invertedBox_
wxCheckBox * invertedBox_
Checkbox widget for the inverted flag.
Definition: FUGuardDialog.hh:70
FUGuardDialog::ID_FU_PORT
@ ID_FU_PORT
Definition: FUGuardDialog.hh:88
FUGuardDialog::selectedFU
TTAMachine::FunctionUnit * selectedFU() const
Definition: FUGuardDialog.cc:234
FUGuardDialog::ID_FU_NAME
@ ID_FU_NAME
Definition: FUGuardDialog.hh:87
TTAMachine::Bus
Definition: Bus.hh:53
FUGuardDialog::nameChoice_
wxChoice * nameChoice_
Choice widget for the function unit selection.
Definition: FUGuardDialog.hh:66
FUGuardDialog::portChoice_
wxChoice * portChoice_
Choice widget for the port selection.
Definition: FUGuardDialog.hh:68
TTAMachine::FunctionUnit
Definition: FunctionUnit.hh:55
TTAMachine::FUPort
Definition: FUPort.hh:46
FUGuardDialog::ID_LABEL_PORT
@ ID_LABEL_PORT
Definition: FUGuardDialog.hh:86
FUGuardDialog::bus_
TTAMachine::Bus * bus_
Parent bus of the guard.
Definition: FUGuardDialog.hh:79
FUGuardDialog::newInverted_
bool newInverted_
Modified inverted flag.
Definition: FUGuardDialog.hh:75
FUGuardDialog
Definition: FUGuardDialog.hh:47
FUGuardDialog::setTexts
void setTexts()
Definition: FUGuardDialog.cc:130
FUGuardDialog::onFUChoice
void onFUChoice(wxCommandEvent &event)
Definition: FUGuardDialog.cc:208
FUGuardDialog::TransferDataToWindow
virtual bool TransferDataToWindow()
Definition: FUGuardDialog.cc:167
FUGuardDialog::inverted_
bool inverted_
Inverted flag for the guard.
Definition: FUGuardDialog.hh:73
FUGuardDialog::onCancel
void onCancel(wxCommandEvent &event)
Definition: FUGuardDialog.cc:301
FUGuardDialog::~FUGuardDialog
virtual ~FUGuardDialog()
Definition: FUGuardDialog.cc:122
FUGuardDialog::FUGuardDialog
FUGuardDialog(wxWindow *parent, TTAMachine::Bus *bus, TTAMachine::PortGuard *guard=NULL)
Definition: FUGuardDialog.cc:65
FUGuardDialog::ID_INVERTED
@ ID_INVERTED
Definition: FUGuardDialog.hh:89
FUGuardDialog::selectedPort
TTAMachine::FUPort * selectedPort() const
Definition: FUGuardDialog.cc:249
TTAMachine::PortGuard
Definition: Guard.hh:99
TTAMachine
Definition: Assembler.hh:48
FUGuardDialog::ID_HELP
@ ID_HELP
Definition: FUGuardDialog.hh:90
FUGuardDialog::adding_
bool adding_
True if a new guard is being added, false otherwise.
Definition: FUGuardDialog.hh:81
FUGuardDialog::ID_LINE
@ ID_LINE
Definition: FUGuardDialog.hh:91
FUGuardDialog::onOK
void onOK(wxCommandEvent &event)
Definition: FUGuardDialog.cc:266
FUGuardDialog::port_
TTAMachine::FUPort * port_
Port of the guard.
Definition: FUGuardDialog.hh:77