OpenASIP
2.0
|
#include <OutputOperandDialog.hh>
Public Member Functions | |
OutputOperandDialog (wxWindow *window, Operand *operand, int index) | |
virtual | ~OutputOperandDialog () |
Private Types | |
enum | { ID_MEM_DATA, ID_OPERATION_OUTPUT_TYPES, ID_ELEMENT_WIDTH, ID_ELEMENT_COUNT, ID_TEXT_WIDTH, ID_TEXT_COUNT } |
Private Member Functions | |
OutputOperandDialog (const OutputOperandDialog &) | |
Copying not allowed. More... | |
OutputOperandDialog & | operator= (const OutputOperandDialog &) |
Assignment not allowed. More... | |
wxSizer * | createContents (wxWindow *window, bool call_fit, bool set_sizer) |
void | onOk (wxCommandEvent &event) |
void | onType (wxCommandEvent &event) |
void | onElementWidth (wxSpinEvent &event) |
void | onElementCount (wxCommandEvent &event) |
void | updateTypes () |
void | updateElementWidths () |
void | updateElementCounts () |
void | setTexts () |
Private Attributes | |
Operand * | operand_ |
Operand to be modified. More... | |
bool | memData_ |
Flag indicating whether operand is memory data or not. More... | |
int | index_ |
Index of the operand. More... | |
wxChoice * | outputTypesComboBox_ |
Choice box for operation input types. More... | |
wxSpinCtrl * | elementWidthSpinCtrl_ |
Spin ctrl for operand element width. More... | |
wxChoice * | elementCountChoice_ |
Choice box for operand element count. More... | |
int | type_ |
Current operand type in choice box. More... | |
int | elemWidth_ |
Current element width in choice box. More... | |
int | elemCount_ |
Current element count in choice box. More... | |
std::vector< std::string > | outputTypes_ |
Output types. More... | |
operandList | operandTypes_ |
Class for adding or modifying output operands.
Definition at line 49 of file OutputOperandDialog.hh.
|
private |
Component ids.
Enumerator | |
---|---|
ID_MEM_DATA | Memory data choice. |
ID_OPERATION_OUTPUT_TYPES | Output Type ComboBox. |
ID_ELEMENT_WIDTH | |
ID_ELEMENT_COUNT | |
ID_TEXT_WIDTH | |
ID_TEXT_COUNT |
Definition at line 74 of file OutputOperandDialog.hh.
OutputOperandDialog::OutputOperandDialog | ( | wxWindow * | parent, |
Operand * | operand, | ||
int | index | ||
) |
Constructor.
parent | Parent window. |
operand | Operand to be added or modified. |
index | Index of the operand. |
Definition at line 66 of file OutputOperandDialog.cc.
References Operand::BOOL, Operand::BOOL_STRING, Operand::DOUBLE_WORD, Operand::DOUBLE_WORD_STRING, Operand::FLOAT_WORD, Operand::FLOAT_WORD_STRING, Operand::HALF_FLOAT_WORD, Operand::HALF_FLOAT_WORD_STRING, Operand::RAW_DATA, Operand::RAW_DATA_STRING, Operand::SINT_WORD, Operand::SINT_WORD_STRING, Operand::SLONG_WORD, Operand::SLONG_WORD_STRING, Operand::UINT_WORD, Operand::UINT_WORD_STRING, Operand::ULONG_WORD, and Operand::ULONG_WORD_STRING.
|
virtual |
Destructor.
Definition at line 123 of file OutputOperandDialog.cc.
References DialogPosition::DIALOG_OUTPUT_OPERAND, and DialogPosition::setPosition().
|
private |
Copying not allowed.
|
private |
Creates the contents of the dialog.
NOTE! This function was generated by wxDesigner. This is why it may be ugly.
parent | Parent window. |
call_fit | If true fits the contents inside the dialog. |
set_sizer | If true, sets the main sizer as dialog contents. |
Definition at line 347 of file OutputOperandDialog.cc.
References ID_ELEMENT_COUNT, ID_ELEMENT_WIDTH, ID_MEM_DATA, ID_OPERATION_OUTPUT_TYPES, ID_TEXT_COUNT, and ID_TEXT_WIDTH.
|
private |
Event handler for element count choice box.
Definition at line 159 of file OutputOperandDialog.cc.
References elemCount_, elementCountChoice_, and updateElementWidths().
|
private |
Event handler for element width spin ctrl.
Definition at line 149 of file OutputOperandDialog.cc.
References elementWidthSpinCtrl_, elemWidth_, and updateElementCounts().
|
private |
Handles the event when OK button is pushed.
Definition at line 279 of file OutputOperandDialog.cc.
References Operand::BOOL, Operand::BOOL_STRING, Operand::DOUBLE_WORD, Operand::DOUBLE_WORD_STRING, elemCount_, elemWidth_, Operand::FLOAT_WORD, Operand::FLOAT_WORD_STRING, Operand::HALF_FLOAT_WORD, Operand::HALF_FLOAT_WORD_STRING, Operand::index(), Operand::loadState(), memData_, operand_, operandTypes_, Operand::OPRND_ELEM_COUNT, Operand::OPRND_ELEM_WIDTH, Operand::OPRND_ID, Operand::OPRND_MEM_ADDRESS, Operand::OPRND_MEM_DATA, Operand::OPRND_TYPE, outputTypesComboBox_, Operand::RAW_DATA, Operand::RAW_DATA_STRING, ObjectState::setAttribute(), Operand::SINT_WORD, Operand::SINT_WORD_STRING, Operand::SLONG_WORD, Operand::SLONG_WORD_STRING, Operand::UINT_WORD, Operand::UINT_WORD_STRING, Operand::ULONG_WORD, and Operand::ULONG_WORD_STRING.
|
private |
Event handler for operand type choice box.
Definition at line 134 of file OutputOperandDialog.cc.
References Operand::defaultElementWidth(), elemCount_, elemWidth_, outputTypesComboBox_, type_, updateElementCounts(), and updateElementWidths().
|
private |
Assignment not allowed.
|
private |
Set texts to widgets.
Definition at line 252 of file OutputOperandDialog.cc.
References ID_MEM_DATA, index_, OSEdTextGenerator::instance(), GUITextGenerator::instance(), WidgetTools::setLabel(), Texts::TextGenerator::text(), WxConversion::toWxString(), GUITextGenerator::TXT_BUTTON_CANCEL, GUITextGenerator::TXT_BUTTON_OK, OSEdTextGenerator::TXT_CHECKBOX_MEM_DATA, and OSEdTextGenerator::TXT_OUTPUT_OPERAND_DIALOG_TITLE.
|
private |
Updates the element count choice box list.
Definition at line 230 of file OutputOperandDialog.cc.
References elemCount_, elementCountChoice_, elemWidth_, SIMD_WORD_WIDTH, and WxConversion::toWxString().
Referenced by onElementWidth(), and onType().
|
private |
Updates the element width choice box list.
Definition at line 196 of file OutputOperandDialog.cc.
References elemCount_, elementWidthSpinCtrl_, elemWidth_, Operand::RAW_DATA, SIMD_WORD_WIDTH, Operand::SINT_WORD, type_, and Operand::UINT_WORD.
Referenced by onElementCount(), and onType().
|
private |
Updates the type lists.
Definition at line 179 of file OutputOperandDialog.cc.
References outputTypes_, outputTypesComboBox_, WxConversion::toWxString(), and type_.
|
private |
Current element count in choice box.
Definition at line 100 of file OutputOperandDialog.hh.
Referenced by onElementCount(), onOk(), onType(), updateElementCounts(), and updateElementWidths().
|
private |
Choice box for operand element count.
Definition at line 94 of file OutputOperandDialog.hh.
Referenced by onElementCount(), and updateElementCounts().
|
private |
Spin ctrl for operand element width.
Definition at line 92 of file OutputOperandDialog.hh.
Referenced by onElementWidth(), and updateElementWidths().
|
private |
Current element width in choice box.
Definition at line 98 of file OutputOperandDialog.hh.
Referenced by onElementWidth(), onOk(), onType(), updateElementCounts(), and updateElementWidths().
|
private |
Index of the operand.
Definition at line 88 of file OutputOperandDialog.hh.
Referenced by setTexts().
|
private |
Flag indicating whether operand is memory data or not.
Definition at line 86 of file OutputOperandDialog.hh.
Referenced by onOk().
|
private |
|
private |
Definition at line 104 of file OutputOperandDialog.hh.
Referenced by onOk().
|
private |
|
private |
Choice box for operation input types.
Definition at line 90 of file OutputOperandDialog.hh.
Referenced by onOk(), onType(), and updateTypes().
|
private |
Current operand type in choice box.
Definition at line 96 of file OutputOperandDialog.hh.
Referenced by onType(), updateElementWidths(), and updateTypes().