OpenASIP
2.0
|
#include <RFGuardDialog.hh>
Public Member Functions | |
RFGuardDialog (wxWindow *parent, TTAMachine::Bus *bus, TTAMachine::RegisterGuard *guard=NULL) | |
virtual | ~RFGuardDialog () |
virtual bool | TransferDataToWindow () |
Private Types | |
enum | { ID_LABEL_NAME = 10000, ID_RF_NAME, ID_LABEL_INDEX, ID_RF_INDEX, ID_INVERTED, ID_HELP, ID_LINE } |
Private Member Functions | |
wxSizer * | createContents (wxWindow *parent, bool call_fit, bool set_sizer) |
void | onRFChoice (wxCommandEvent &event) |
void | onOK (wxCommandEvent &event) |
void | onCancel (wxCommandEvent &event) |
const TTAMachine::RegisterFile * | selectedRF () const |
void | setTexts () |
Private Attributes | |
wxChoice * | nameChoice_ |
Choice widget for register file name selection. More... | |
wxChoice * | indexChoice_ |
Choice widget for register index selection. More... | |
wxCheckBox * | invertedBox_ |
Checkbox widget for the inverted flag. More... | |
bool | inverted_ |
Inverted flag of the guard. More... | |
bool | newInverted_ |
Modified inverted flag of the guard. More... | |
int | index_ |
Register index of the guard. More... | |
int | newIndex_ |
Modified register index of the guard. More... | |
const TTAMachine::RegisterFile * | rf_ |
Guard register. More... | |
TTAMachine::Bus * | bus_ |
Parent bus of the register guard. More... | |
bool | adding_ |
True if a new guard is being added, false otherwise. More... | |
Dialog for editing register file guard properties.
Definition at line 46 of file RFGuardDialog.hh.
|
private |
Enumerator | |
---|---|
ID_LABEL_NAME | |
ID_RF_NAME | |
ID_LABEL_INDEX | |
ID_RF_INDEX | |
ID_INVERTED | |
ID_HELP | |
ID_LINE |
Definition at line 86 of file RFGuardDialog.hh.
RFGuardDialog::RFGuardDialog | ( | wxWindow * | parent, |
TTAMachine::Bus * | bus, | ||
TTAMachine::RegisterGuard * | guard = NULL |
||
) |
The Constructor.
parent | Parent window of the dialog. |
Definition at line 62 of file RFGuardDialog.cc.
|
virtual |
|
private |
Creates contents of the dialog window.
Code generated with wxDesigner.
parent | Parent dialog of the contents. |
call_fit | If true, fits sizer in dialog window. |
set_sizer | If true, sets sizer as dialog's sizer. |
Definition at line 347 of file RFGuardDialog.cc.
|
private |
Cancels the dialog effects by creating the original register guard.
Closes the dialog.
Definition at line 328 of file RFGuardDialog.cc.
|
private |
Updates the guard object when the OK-button is pressed.
Closes the dialog.
Definition at line 244 of file RFGuardDialog.cc.
References assert, ProDeTextGenerator::instance(), TTAMachine::Guard::isInverted(), ProDeTextGenerator::MSG_ERROR_GUARD_EXISTS, TTAMachine::Component::name(), TTAMachine::RegisterGuard::registerFile(), Texts::TextGenerator::text(), WxConversion::toString(), WxConversion::toWxString(), and ProDeTextGenerator::TXT_ALL.
|
private |
Updates the index choice when the register file selection is changed.
Definition at line 196 of file RFGuardDialog.cc.
References ProDeTextGenerator::instance(), TTAMachine::BaseRegisterFile::numberOfRegisters(), Texts::TextGenerator::text(), WxConversion::toWxString(), and ProDeTextGenerator::TXT_ALL.
|
private |
Returns a pointer to the selected register file.
Definition at line 229 of file RFGuardDialog.cc.
References TTAMachine::Machine::Navigator< ComponentType >::item(), and WxConversion::toString().
|
private |
Sets texts for widgets.
Definition at line 119 of file RFGuardDialog.cc.
References GUITextGenerator::instance(), ProDeTextGenerator::instance(), WidgetTools::setLabel(), Texts::TextGenerator::text(), WxConversion::toWxString(), GUITextGenerator::TXT_BUTTON_CANCEL, GUITextGenerator::TXT_BUTTON_HELP, GUITextGenerator::TXT_BUTTON_OK, ProDeTextGenerator::TXT_LABEL_INVERTED, ProDeTextGenerator::TXT_LABEL_REGISTER_INDEX, ProDeTextGenerator::TXT_LABEL_RF_NAME, and ProDeTextGenerator::TXT_RF_GUARD_DIALOG_TITLE.
|
virtual |
Transfers data from the Guard object to the dialog widgets.
Definition at line 156 of file RFGuardDialog.cc.
References TTAMachine::Machine::Navigator< ComponentType >::count(), ProDeTextGenerator::instance(), TTAMachine::Machine::Navigator< ComponentType >::item(), Texts::TextGenerator::text(), WxConversion::toWxString(), and ProDeTextGenerator::TXT_ALL.
|
private |
True if a new guard is being added, false otherwise.
Definition at line 83 of file RFGuardDialog.hh.
|
private |
Parent bus of the register guard.
Definition at line 81 of file RFGuardDialog.hh.
|
private |
Register index of the guard.
Definition at line 75 of file RFGuardDialog.hh.
|
private |
Choice widget for register index selection.
Definition at line 66 of file RFGuardDialog.hh.
|
private |
Inverted flag of the guard.
Definition at line 71 of file RFGuardDialog.hh.
|
private |
Checkbox widget for the inverted flag.
Definition at line 68 of file RFGuardDialog.hh.
|
private |
Choice widget for register file name selection.
Definition at line 64 of file RFGuardDialog.hh.
|
private |
Modified register index of the guard.
Definition at line 77 of file RFGuardDialog.hh.
|
private |
Modified inverted flag of the guard.
Definition at line 73 of file RFGuardDialog.hh.
|
private |
Guard register.
Definition at line 79 of file RFGuardDialog.hh.