OpenASIP  2.0
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
IUDialog Class Reference

#include <IUDialog.hh>

Inheritance diagram for IUDialog:
Inheritance graph
Collaboration diagram for IUDialog:
Collaboration graph

Public Member Functions

 IUDialog (wxWindow *parent, TTAMachine::ImmediateUnit *immediateUnit)
 
virtual ~IUDialog ()
 

Private Types

enum  {
  ID_NAME = 10000, ID_WIDTH, ID_SIZE, ID_EXTENSION,
  ID_PORT_LIST, ID_ADD_PORT, ID_EDIT_PORT, ID_DELETE_PORT,
  ID_TEMPLATE_LIST, ID_HELP, ID_LABEL_NAME, ID_LABEL_WIDTH,
  ID_LABEL_SIZE, ID_LINE
}
 enumerated IDs for the dialog controls More...
 

Private Member Functions

wxSizer * createContents (wxWindow *parent, bool call_fit, bool set_sizer)
 
virtual bool TransferDataToWindow ()
 
TTAMachine::PortselectedPort () const
 
void onOK (wxCommandEvent &event)
 
void onHelp (wxCommandEvent &event)
 
void onName (wxCommandEvent &event)
 
void onPortSelection (wxListEvent &event)
 
void onPortRightClick (wxListEvent &event)
 
void onAddPort (wxCommandEvent &event)
 
void onActivatePort (wxListEvent &event)
 
void onEditPort (wxCommandEvent &event)
 
void onDeletePort (wxCommandEvent &event)
 
void updatePortList ()
 
void updateTemplateList ()
 
void setTexts ()
 

Private Attributes

wxStaticBoxSizer * portListSizer_
 Sizer containing the port list and associated buttons. More...
 
wxStaticBoxSizer * templateListSizer_
 Sizer containing the template list. More...
 
TTAMachine::ImmediateUnitimmediateUnit_
 Immediate unit to modify. More...
 
wxString name_
 Name of the immediate unit. More...
 
int size_
 Number of registers. More...
 
int width_
 Width. More...
 
int cycles_
 Cycles. More...
 
wxListCtrl * portList_
 Port list control. More...
 
wxListCtrl * templateList_
 Template list control. More...
 
wxRadioBox * extensionBox_
 Radio box for extension. More...
 

Detailed Description

Dialog for editing immediate unit parameters.

Definition at line 48 of file IUDialog.hh.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private

enumerated IDs for the dialog controls

Enumerator
ID_NAME 
ID_WIDTH 
ID_SIZE 
ID_EXTENSION 
ID_PORT_LIST 
ID_ADD_PORT 
ID_EDIT_PORT 
ID_DELETE_PORT 
ID_TEMPLATE_LIST 
ID_HELP 
ID_LABEL_NAME 
ID_LABEL_WIDTH 
ID_LABEL_SIZE 
ID_LINE 

Definition at line 98 of file IUDialog.hh.

98  {
99  ID_NAME = 10000,
100  ID_WIDTH,
101  ID_SIZE,
102  ID_EXTENSION,
103  ID_PORT_LIST,
104  ID_ADD_PORT,
105  ID_EDIT_PORT,
108  ID_HELP,
112  ID_LINE
113  };

Constructor & Destructor Documentation

◆ IUDialog()

IUDialog::IUDialog ( wxWindow *  parent,
TTAMachine::ImmediateUnit immediateUnit 
)

The Constructor.

Parameters
parentParent window of the dialog.
immediateUnitImmediate unit to be modified with the dialog.

Definition at line 81 of file IUDialog.cc.

83  :
84  wxDialog(parent, -1, _T(""), wxDefaultPosition),
85  immediateUnit_(immediateUnit),
86  name_(_T("")),
90  portList_(NULL),
91  templateList_(NULL),
92  extensionBox_(NULL) {
93 
94  createContents(this, true, true);
95 
96  portList_ = dynamic_cast<wxListCtrl*>(FindWindow(ID_PORT_LIST));
97  templateList_ = dynamic_cast<wxListCtrl*>(FindWindow(ID_TEMPLATE_LIST));
98  extensionBox_ = dynamic_cast<wxRadioBox*>(FindWindow(ID_EXTENSION));
99 
100  FindWindow(ID_SIZE)->SetValidator(wxGenericValidator(&size_));
101  FindWindow(ID_WIDTH)->SetValidator(wxGenericValidator(&width_));
102  FindWindow(ID_NAME)->SetValidator(wxTextValidator(wxFILTER_ASCII, &name_));
103 
104  // set OK button disabled initially
105  FindWindow(wxID_OK)->Disable();
106  FindWindow(ID_DELETE_PORT)->Disable();
107  FindWindow(ID_EDIT_PORT)->Disable();
108 
109  // set widget texts
110  setTexts();
111 
113 }

◆ ~IUDialog()

IUDialog::~IUDialog ( )
virtual

The Destructor.

Definition at line 119 of file IUDialog.cc.

119  {
120 }

Member Function Documentation

◆ createContents()

wxSizer * IUDialog::createContents ( wxWindow *  parent,
bool  call_fit,
bool  set_sizer 
)
private

Creates the dialog window contents.

Code generated by wxDesigner.

Returns
Main sizer of the created contents.
Parameters
parentThe dialog window.
call_fitIf true, fits the contents inside the dialog.
set_sizerIf true, sets the main sizer as dialog contents.

Definition at line 503 of file IUDialog.cc.

503  {
504 
505  wxBoxSizer *item0 = new wxBoxSizer( wxVERTICAL );
506 
507  wxFlexGridSizer *item1 = new wxFlexGridSizer( 2, 0, 0 );
508 
509  wxFlexGridSizer *item2 = new wxFlexGridSizer( 4, 0, 0 );
510 
511  wxStaticText *item3 = new wxStaticText( parent, ID_LABEL_NAME, wxT("Name:"), wxDefaultPosition, wxDefaultSize, 0 );
512  item2->Add( item3, 0, wxALIGN_RIGHT|wxALL, 5 );
513 
514  wxTextCtrl *item4 = new wxTextCtrl( parent, ID_NAME, wxT(""), wxDefaultPosition, wxSize(120,-1), 0 );
515  item2->Add( item4, 0, wxGROW|wxALL, 5 );
516 
517  wxStaticText *item5 = new wxStaticText( parent, ID_LABEL_SIZE, wxT("Size:"), wxDefaultPosition, wxDefaultSize, 0 );
518  item2->Add( item5, 0, wxALIGN_RIGHT|wxALL, 5 );
519 
520  wxSpinCtrl *item6 = new wxSpinCtrl( parent, ID_SIZE, wxT("1"), wxDefaultPosition, wxSize(-1,-1), 0, 1, 10000, 1 );
521  item2->Add( item6, 0, wxGROW|wxALL, 5 );
522 
523  wxStaticText *item7 = new wxStaticText( parent, ID_LABEL_WIDTH, wxT("Width:"), wxDefaultPosition, wxDefaultSize, 0 );
524  item2->Add( item7, 0, wxALIGN_RIGHT|wxALL, 5 );
525 
526  wxSpinCtrl *item8 = new wxSpinCtrl( parent, ID_WIDTH, wxT("1"), wxDefaultPosition, wxSize(-1,-1), 0, 1, 10000, 1 );
527  item2->Add( item8, 0, wxGROW|wxALL, 5 );
528 
529  item1->Add( item2, 0, 0, 5 );
530 
531  wxString strs11[] =
532  {
533  wxT("Zero"),
534  wxT("Sign")
535  };
536  wxRadioBox *item11 = new wxRadioBox( parent, ID_EXTENSION, wxT("Extension"), wxDefaultPosition, wxDefaultSize, 2, strs11, 1, wxRA_SPECIFY_COLS );
537  item1->Add( item11, 0, wxGROW|wxALL, 5 );
538 
539  wxStaticBox *item13 = new wxStaticBox( parent, -1, wxT("Templates:") );
540  wxStaticBoxSizer *item12 = new wxStaticBoxSizer( item13, wxVERTICAL );
541  templateListSizer_ = item12;
542 
543  wxListCtrl *item14 = new wxListCtrl( parent, ID_TEMPLATE_LIST, wxDefaultPosition, wxSize(200,200), wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
544  item12->Add( item14, 0, wxGROW|wxALL, 5 );
545 
546  item1->Add( item12, 0, wxGROW|wxALL, 5 );
547 
548  wxStaticBox *item16 = new wxStaticBox( parent, -1, wxT("Ports:") );
549  wxStaticBoxSizer *item15 = new wxStaticBoxSizer( item16, wxVERTICAL );
550  portListSizer_ = item15;
551 
552  wxListCtrl *item17 = new wxListCtrl( parent, ID_PORT_LIST, wxDefaultPosition, wxSize(240,150), wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
553  item15->Add( item17, 0, wxGROW|wxALL, 5 );
554 
555  wxBoxSizer *item18 = new wxBoxSizer( wxHORIZONTAL );
556 
557  wxButton *item19 = new wxButton( parent, ID_ADD_PORT, wxT("Add..."), wxDefaultPosition, wxDefaultSize, 0 );
558  item18->Add( item19, 0, wxALIGN_CENTER|wxALL, 5 );
559 
560  wxButton *item20 = new wxButton( parent, ID_EDIT_PORT, wxT("Edit..."), wxDefaultPosition, wxDefaultSize, 0 );
561  item18->Add( item20, 0, wxALIGN_CENTER|wxALL, 5 );
562 
563  wxButton *item21 = new wxButton( parent, ID_DELETE_PORT, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
564  item18->Add( item21, 0, wxALIGN_CENTER|wxALL, 5 );
565 
566  item15->Add( item18, 0, wxALIGN_CENTER|wxALL, 5 );
567 
568  item1->Add( item15, 0, wxGROW|wxALL, 5 );
569 
570  item0->Add( item1, 0, wxALL, 5 );
571 
572  wxStaticLine *item22 = new wxStaticLine( parent, ID_LINE, wxDefaultPosition, wxSize(20,-1), wxLI_HORIZONTAL );
573  item0->Add( item22, 0, wxGROW|wxALL, 5 );
574 
575  wxGridSizer *item23 = new wxGridSizer( 2, 0, 0 );
576 
577  wxButton *item24 = new wxButton( parent, ID_HELP, wxT("&Help"), wxDefaultPosition, wxDefaultSize, 0 );
578  item23->Add( item24, 0, wxALL, 5 );
579 
580  wxBoxSizer *item25 = new wxBoxSizer( wxHORIZONTAL );
581 
582  wxButton *item26 = new wxButton( parent, wxID_OK, wxT("&OK"), wxDefaultPosition, wxDefaultSize, 0 );
583  item25->Add( item26, 0, wxALIGN_CENTER|wxALL, 5 );
584 
585  wxButton *item27 = new wxButton( parent, wxID_CANCEL, wxT("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
586  item25->Add( item27, 0, wxALIGN_CENTER|wxALL, 5 );
587 
588  item23->Add( item25, 0, wxALL, 5 );
589 
590  item0->Add( item23, 0, wxGROW, 5 );
591 
592  if (set_sizer)
593  {
594  parent->SetSizer( item0 );
595  if (call_fit)
596  item0->SetSizeHints( parent );
597  }
598 
599  return item0;
600 }

◆ onActivatePort()

void IUDialog::onActivatePort ( wxListEvent &  event)
private

Handles left mouse button double click on the port list.

Definition at line 389 of file IUDialog.cc.

389  {
390  wxCommandEvent dummy;
391  onEditPort(dummy);
392 }

References dummy.

◆ onAddPort()

void IUDialog::onAddPort ( wxCommandEvent &  event)
private

Creates and shows an empty IUPortDialog for adding ports.

Definition at line 351 of file IUDialog.cc.

351  {
352 
353  // Generate name for the new port.
354  int i = 1;
357  while (immediateUnit_->hasPort(newName)) {
360  i++;
361  }
362 
363  RFPort* port = new RFPort(newName, *immediateUnit_);
364  IUPortDialog portDialog(this, port);
365  if (portDialog.ShowModal() == wxID_OK) {
366  updatePortList();
367  } else {
368  delete port;
369  }
370 }

References ProDeConstants::COMP_NEW_NAME_PREFIX_PORT, and Conversion::toString().

Here is the call graph for this function:

◆ onDeletePort()

void IUDialog::onDeletePort ( wxCommandEvent &  event)
private

Deletes selected port from the port list.

Definition at line 377 of file IUDialog.cc.

377  {
378  Port* selected = selectedPort();
379  assert(selected != NULL);
380  delete selected;
381  updatePortList();
382 }

References assert.

◆ onEditPort()

void IUDialog::onEditPort ( wxCommandEvent &  event)
private

Handles the 'Edit Port' button event.

Opens a IUPortDialog with the selected port's attributes set.

Definition at line 401 of file IUDialog.cc.

401  {
402 
403  Port* port = selectedPort();
404  if (port == NULL) {
405  // No port selected.
406  return;
407  }
408 
409  IUPortDialog portDialog(this, port);
410  if (portDialog.ShowModal() == wxID_OK) {
411  updatePortList();
412  }
413 }

◆ onHelp()

void IUDialog::onHelp ( wxCommandEvent &  event)
private

◆ onName()

void IUDialog::onName ( wxCommandEvent &  event)
private

Checks whether name field is empty and disables OK button of the dialog if it is.

Definition at line 310 of file IUDialog.cc.

310  {
311  if (!TransferDataFromWindow()) {
312  assert(false);
313  }
314  wxString trimmedName = name_.Trim(false).Trim(true);
315  if (trimmedName == _T("")) {
316  FindWindow(wxID_OK)->Disable();
317  } else {
318  FindWindow(wxID_OK)->Enable();
319  }
320 }

References assert.

◆ onOK()

void IUDialog::onOK ( wxCommandEvent &  event)
private

Validates input in the controls, and updates the ImmediateUnit.

Definition at line 235 of file IUDialog.cc.

235  {
236 
237  if (!Validate()) {
238  return;
239  }
240 
241  if (!TransferDataFromWindow()) {
242  return;
243  }
244 
245  string trimmedName =
246  WxConversion::toString(name_.Trim(false).Trim(true));
247 
248  // Check the name validity.
249  if (!MachineTester::isValidComponentName(trimmedName)) {
251  format message =
253  InformationDialog warning(
254  this, WxConversion::toWxString(message.str()));
255  warning.ShowModal();
256  return;
257  }
258 
259  if (trimmedName != immediateUnit_->name()) {
260 
263  for (int i = 0; i < navigator.count(); i++) {
264  ImmediateUnit* iu = navigator.item(i);
265  if (trimmedName == iu->name()) {
266  ProDeTextGenerator* prodeTexts =
268  format message =
270  format an_iu = prodeTexts->text(
272  format machine =
274  format iu =
276  message % trimmedName % an_iu.str() % machine.str() % iu.str();
277  WarningDialog warning(
278  this, WxConversion::toWxString(message.str()));
279  warning.ShowModal();
280  return;
281  }
282  }
283  }
284 
285  // set IU attributes
286  immediateUnit_->setName(trimmedName);
289 
290  wxString extension = extensionBox_->GetStringSelection();
291 
292  // set IU extension
293  if (extension.IsSameAs(ProDeConstants::EXTENSION_ZERO)) {
294  immediateUnit_->setExtensionMode(Machine::ZERO);
295  } else if (extension.IsSameAs(ProDeConstants::EXTENSION_SIGN)) {
296  immediateUnit_->setExtensionMode(Machine::SIGN);
297  } else {
298  assert(false);
299  }
300 
301  EndModal(wxID_OK);
302 }

References assert, ProDeTextGenerator::COMP_AN_IMMEDIATE_UNIT, ProDeTextGenerator::COMP_IMMEDIATE_UNIT, ProDeTextGenerator::COMP_MACHINE, TTAMachine::Machine::Navigator< ComponentType >::count(), ProDeConstants::EXTENSION_SIGN, ProDeConstants::EXTENSION_ZERO, ProDeTextGenerator::instance(), MachineTester::isValidComponentName(), TTAMachine::Machine::Navigator< ComponentType >::item(), machine, ProDeTextGenerator::MSG_ERROR_ILLEGAL_NAME, ProDeTextGenerator::MSG_ERROR_SAME_NAME, TTAMachine::Component::name(), TTAMachine::Machine::SIGN, Texts::TextGenerator::text(), WxConversion::toString(), WxConversion::toWxString(), and TTAMachine::Machine::ZERO.

Here is the call graph for this function:

◆ onPortRightClick()

void IUDialog::onPortRightClick ( wxListEvent &  event)
private

Opens a pop-up menu when right mouse button was pressed.

Parameters
eventInformation about right mouse click event.

Definition at line 441 of file IUDialog.cc.

441  {
442 
443  portList_->SetItemState(event.GetIndex(), wxLIST_STATE_SELECTED,
444  wxLIST_STATE_SELECTED);
445 
446  wxMenu* contextMenu = new wxMenu();
447  contextMenu->Append(ID_EDIT_PORT, _T("&Edit..."));
448  contextMenu->Append(ID_DELETE_PORT, _T("&Delete"));
449  portList_->PopupMenu(contextMenu, event.GetPoint());
450 }

◆ onPortSelection()

void IUDialog::onPortSelection ( wxListEvent &  event)
private

Disables and enables Edit and Delete buttons under the port list.

If a port is selected, buttons are enabled. If no port is selected the buttons will be disabled.

Parameters
eventListEvent, which may have changed the selection.

Definition at line 424 of file IUDialog.cc.

424  {
425  if (portList_->GetSelectedItemCount() != 1) {
426  FindWindow(ID_DELETE_PORT)->Disable();
427  FindWindow(ID_EDIT_PORT)->Disable();
428  return;
429  }
430  FindWindow(ID_DELETE_PORT)->Enable();
431  FindWindow(ID_EDIT_PORT)->Enable();
432 }

◆ selectedPort()

Port * IUDialog::selectedPort ( ) const
private

Returns pointer to the port which is selected on the port list.

Returns
Pointer to the port which is selected on the port list.

Definition at line 329 of file IUDialog.cc.

329  {
330  long item = -1;
331  item = portList_->GetNextItem(
332  item, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
333 
334  if (item == -1) {
335  return NULL;
336  }
337 
338  string portName =
339  WxConversion::toString(portList_->GetItemText(item));
340 
341  return immediateUnit_->port(portName);
342 }

References WxConversion::toString().

Here is the call graph for this function:

◆ setTexts()

void IUDialog::setTexts ( )
private

Sets texts for widgets.

Definition at line 127 of file IUDialog.cc.

127  {
130 
131  // Dialog title
132  format fmt = prodeTexts->text(ProDeTextGenerator::TXT_IU_DIALOG_TITLE);
133  SetTitle(WxConversion::toWxString(fmt.str()));
134 
135  // buttons
136  WidgetTools::setLabel(generator, FindWindow(wxID_OK),
138 
139  WidgetTools::setLabel(generator, FindWindow(wxID_CANCEL),
141 
144 
147 
150 
153 
154  // widget labels
157 
160 
163 
166 
167  // box sizer label
168  fmt = prodeTexts->text(ProDeTextGenerator::TXT_IU_PORTS_BOX);
170 
173 
174  // Radio button labels
176  extensionBox_->SetString(0, WxConversion::toWxString(fmt.str()));
178  extensionBox_->SetString(1, WxConversion::toWxString(fmt.str()));
179 
180  // Create list columns.
181  wxListCtrl* portList =
182  dynamic_cast<wxListCtrl*>(FindWindow(ID_PORT_LIST));
183  fmt = prodeTexts->text(ProDeTextGenerator::TXT_COLUMN_NAME);
184  portList->InsertColumn(0, WxConversion::toWxString(fmt.str()),
185  wxLIST_FORMAT_LEFT, 240);
186  wxListCtrl* templateList =
187  dynamic_cast<wxListCtrl*>(FindWindow(ID_TEMPLATE_LIST));
188  fmt = prodeTexts->text(ProDeTextGenerator::TXT_COLUMN_NAME);
189  templateList->InsertColumn(0, WxConversion::toWxString(fmt.str()),
190  wxLIST_FORMAT_LEFT, 240);
191 
192 }

References GUITextGenerator::instance(), ProDeTextGenerator::instance(), WidgetTools::setLabel(), WidgetTools::setWidgetLabel(), Texts::TextGenerator::text(), WxConversion::toWxString(), GUITextGenerator::TXT_BUTTON_ADD_DIALOG, GUITextGenerator::TXT_BUTTON_CANCEL, GUITextGenerator::TXT_BUTTON_DELETE, GUITextGenerator::TXT_BUTTON_EDIT_DIALOG, GUITextGenerator::TXT_BUTTON_HELP, GUITextGenerator::TXT_BUTTON_OK, ProDeTextGenerator::TXT_COLUMN_NAME, ProDeTextGenerator::TXT_IU_DIALOG_TITLE, ProDeTextGenerator::TXT_IU_PORTS_BOX, ProDeTextGenerator::TXT_IU_TEMPLATES_BOX, ProDeTextGenerator::TXT_LABEL_EXTENSION, ProDeTextGenerator::TXT_LABEL_NAME, ProDeTextGenerator::TXT_LABEL_SIZE, ProDeTextGenerator::TXT_LABEL_WIDTH, ProDeTextGenerator::TXT_RADIO_EXTENSION_SIGN, and ProDeTextGenerator::TXT_RADIO_EXTENSION_ZERO.

Here is the call graph for this function:

◆ TransferDataToWindow()

bool IUDialog::TransferDataToWindow ( )
privatevirtual

Transfers data from the ImmediateUnit object to the dialog widgets.

Returns
false, if an error occured in the transfer.

Definition at line 201 of file IUDialog.cc.

201  {
202 
207 
208  // transfer extension
209  if (immediateUnit_->extensionMode() == Machine::ZERO) {
210  wxString zero = ProDeConstants::EXTENSION_ZERO;
211  extensionBox_->SetStringSelection(zero);
212  } else if (immediateUnit_->extensionMode() == Machine::SIGN) {
213  wxString sign = ProDeConstants::EXTENSION_SIGN;
214  extensionBox_->SetStringSelection(sign);
215  } else {
216  assert(false);
217  }
218 
219  updatePortList();
221 
222  // wxWidgets GTK1 version seems to bug with spincontrol validators.
223  // The widget value has to be set manually.
224  dynamic_cast<wxSpinCtrl*>(FindWindow(ID_WIDTH))->SetValue(width_);
225  dynamic_cast<wxSpinCtrl*>(FindWindow(ID_SIZE))->SetValue(size_);
226 
227  return wxWindow::TransferDataToWindow();
228 }

References assert, ProDeConstants::EXTENSION_SIGN, ProDeConstants::EXTENSION_ZERO, TTAMachine::Machine::SIGN, WxConversion::toWxString(), and TTAMachine::Machine::ZERO.

Here is the call graph for this function:

◆ updatePortList()

void IUDialog::updatePortList ( )
private

Updates 'Ports' list control.

Clears all items from the choicer and adds all ports.

Definition at line 459 of file IUDialog.cc.

459  {
460  portList_->DeleteAllItems();
461  for (int i=0; i < immediateUnit_->portCount(); i++) {
462 
463  wxString portName =
465 
466  portList_->InsertItem(i, portName);
467  }
468 }

References WxConversion::toWxString().

Here is the call graph for this function:

◆ updateTemplateList()

void IUDialog::updateTemplateList ( )
private

Updates 'Templates' list control.

Definition at line 475 of file IUDialog.cc.

475  {
476 
477  templateList_->DeleteAllItems();
480 
481  for (int i = 0; i < navigator.count(); i++) {
482  if (navigator.item(i)->isOneOfDestinations(*immediateUnit_)) {
483  wxString name =
484  WxConversion::toWxString(navigator.item(i)->name());
485 
486  templateList_->InsertItem(0, name);
487  }
488  }
489 }

References TTAMachine::Machine::Navigator< ComponentType >::count(), TTAMachine::Machine::Navigator< ComponentType >::item(), and WxConversion::toWxString().

Here is the call graph for this function:

Member Data Documentation

◆ cycles_

int IUDialog::cycles_
private

Cycles.

Definition at line 88 of file IUDialog.hh.

◆ extensionBox_

wxRadioBox* IUDialog::extensionBox_
private

Radio box for extension.

Definition at line 95 of file IUDialog.hh.

◆ immediateUnit_

TTAMachine::ImmediateUnit* IUDialog::immediateUnit_
private

Immediate unit to modify.

Definition at line 80 of file IUDialog.hh.

◆ name_

wxString IUDialog::name_
private

Name of the immediate unit.

Definition at line 82 of file IUDialog.hh.

◆ portList_

wxListCtrl* IUDialog::portList_
private

Port list control.

Definition at line 91 of file IUDialog.hh.

◆ portListSizer_

wxStaticBoxSizer* IUDialog::portListSizer_
private

Sizer containing the port list and associated buttons.

Definition at line 75 of file IUDialog.hh.

◆ size_

int IUDialog::size_
private

Number of registers.

Definition at line 84 of file IUDialog.hh.

◆ templateList_

wxListCtrl* IUDialog::templateList_
private

Template list control.

Definition at line 93 of file IUDialog.hh.

◆ templateListSizer_

wxStaticBoxSizer* IUDialog::templateListSizer_
private

Sizer containing the template list.

Definition at line 77 of file IUDialog.hh.

◆ width_

int IUDialog::width_
private

Width.

Definition at line 86 of file IUDialog.hh.


The documentation for this class was generated from the following files:
TTAMachine::BaseRegisterFile::setWidth
virtual void setWidth(int width)
Definition: BaseRegisterFile.cc:112
WarningDialog
Definition: WarningDialog.hh:42
IUDialog::updateTemplateList
void updateTemplateList()
Definition: IUDialog.cc:475
WxConversion::toWxString
static wxString toWxString(const std::string &source)
TTAMachine::Component::name
virtual TCEString name() const
Definition: MachinePart.cc:125
IUDialog::ID_ADD_PORT
@ ID_ADD_PORT
Definition: IUDialog.hh:104
machine
TTAMachine::Machine * machine
the architecture definition of the estimated processor
Definition: EstimatorCmdLineUI.cc:59
IUDialog::extensionBox_
wxRadioBox * extensionBox_
Radio box for extension.
Definition: IUDialog.hh:95
WidgetTools::setLabel
static void setLabel(Texts::TextGenerator *generator, wxWindow *widget, int textID)
Definition: WidgetTools.cc:92
IUDialog::ID_TEMPLATE_LIST
@ ID_TEMPLATE_LIST
Definition: IUDialog.hh:107
GUITextGenerator::instance
static GUITextGenerator * instance()
Definition: GUITextGenerator.cc:67
IUDialog::ID_LABEL_NAME
@ ID_LABEL_NAME
Definition: IUDialog.hh:109
GUITextGenerator
Definition: GUITextGenerator.hh:46
GUITextGenerator::TXT_BUTTON_HELP
@ TXT_BUTTON_HELP
Label for help button.
Definition: GUITextGenerator.hh:60
IUDialog::ID_WIDTH
@ ID_WIDTH
Definition: IUDialog.hh:100
FindWindow
Definition: FindWindow.hh:49
IUDialog::name_
wxString name_
Name of the immediate unit.
Definition: IUDialog.hh:82
ProDeTextGenerator::TXT_IU_DIALOG_TITLE
@ TXT_IU_DIALOG_TITLE
Immediate unit Dialog title.
Definition: ProDeTextGenerator.hh:177
IUDialog::ID_NAME
@ ID_NAME
Definition: IUDialog.hh:99
ProDeConstants::COMP_NEW_NAME_PREFIX_PORT
static const std::string COMP_NEW_NAME_PREFIX_PORT
Prefix for new port names.
Definition: ProDeConstants.hh:373
TTAMachine::Machine::Navigator::count
int count() const
Texts::TextGenerator::text
virtual boost::format text(int textId)
Definition: TextGenerator.cc:94
ModelConstants::DEFAULT_IU_CYCLES
static const int DEFAULT_IU_CYCLES
Default immediate unit cycles.
Definition: ModelConstants.hh:58
ProDeConstants::EXTENSION_SIGN
static const wxString EXTENSION_SIGN
String for the sign extension.
Definition: ProDeConstants.hh:65
IUDialog::TransferDataToWindow
virtual bool TransferDataToWindow()
Definition: IUDialog.cc:201
Conversion::toString
static std::string toString(const T &source)
TTAMachine::ImmediateUnit::latency
virtual int latency() const
Definition: ImmediateUnit.cc:155
ProDeTextGenerator
Definition: ProDeTextGenerator.hh:49
ProDeTextGenerator::MSG_ERROR_ILLEGAL_NAME
@ MSG_ERROR_ILLEGAL_NAME
Error: Illegal component name.
Definition: ProDeTextGenerator.hh:223
TTAMachine::RFPort
Definition: RFPort.hh:45
TTAMachine::BaseRegisterFile::numberOfRegisters
virtual int numberOfRegisters() const
IUDialog::ID_LABEL_WIDTH
@ ID_LABEL_WIDTH
Definition: IUDialog.hh:110
ProDeTextGenerator::MSG_ERROR_SAME_NAME
@ MSG_ERROR_SAME_NAME
Error: Same name exists.
Definition: ProDeTextGenerator.hh:229
IUDialog::ID_LINE
@ ID_LINE
Definition: IUDialog.hh:112
assert
#define assert(condition)
Definition: Application.hh:86
ProDeTextGenerator::COMP_AN_IMMEDIATE_UNIT
@ COMP_AN_IMMEDIATE_UNIT
Immediate unit (w/ article).
Definition: ProDeTextGenerator.hh:266
IUDialog::selectedPort
TTAMachine::Port * selectedPort() const
Definition: IUDialog.cc:329
TTAMachine::ImmediateUnit::setName
virtual void setName(const std::string &name)
Definition: ImmediateUnit.cc:120
GUITextGenerator::TXT_BUTTON_CANCEL
@ TXT_BUTTON_CANCEL
Label for cancel button.
Definition: GUITextGenerator.hh:55
ModelConstants::DEFAULT_WIDTH
static const int DEFAULT_WIDTH
Default bit width.
Definition: ModelConstants.hh:46
IUDialog::updatePortList
void updatePortList()
Definition: IUDialog.cc:459
IUDialog::ID_HELP
@ ID_HELP
Definition: IUDialog.hh:108
TTAMachine::Machine::immediateUnitNavigator
virtual ImmediateUnitNavigator immediateUnitNavigator() const
Definition: Machine.cc:416
IUDialog::ID_DELETE_PORT
@ ID_DELETE_PORT
Definition: IUDialog.hh:106
ProDeTextGenerator::TXT_RADIO_EXTENSION_ZERO
@ TXT_RADIO_EXTENSION_ZERO
Label for 'zero' radio button.
Definition: ProDeTextGenerator.hh:100
TTAMachine::Port
Definition: Port.hh:54
dummy
SimValue dummy(32)
a dummy simvalue which is given for operands that are not bound
ModelConstants::DEFAULT_IU_SIZE
static const int DEFAULT_IU_SIZE
Default immediate unit size.
Definition: ModelConstants.hh:56
IUDialog::ID_PORT_LIST
@ ID_PORT_LIST
Definition: IUDialog.hh:103
ProDeTextGenerator::TXT_RADIO_EXTENSION_SIGN
@ TXT_RADIO_EXTENSION_SIGN
Label for 'sign' radio button.
Definition: ProDeTextGenerator.hh:101
ProDeTextGenerator::TXT_LABEL_NAME
@ TXT_LABEL_NAME
Label for component name widget.
Definition: ProDeTextGenerator.hh:56
IUDialog::setTexts
void setTexts()
Definition: IUDialog.cc:127
IUDialog::ID_EXTENSION
@ ID_EXTENSION
Definition: IUDialog.hh:102
TTAMachine::Unit::hasPort
virtual bool hasPort(const std::string &name) const
Definition: Unit.cc:96
ProDeTextGenerator::TXT_LABEL_SIZE
@ TXT_LABEL_SIZE
Label for size widget.
Definition: ProDeTextGenerator.hh:68
IUPortDialog
Definition: IUPortDialog.hh:45
IUDialog::width_
int width_
Width.
Definition: IUDialog.hh:86
IUDialog::ID_EDIT_PORT
@ ID_EDIT_PORT
Definition: IUDialog.hh:105
MachineTester::isValidComponentName
static bool isValidComponentName(const std::string &name)
Definition: MachineTester.cc:312
ProDeConstants::EXTENSION_ZERO
static const wxString EXTENSION_ZERO
String for the zero extension.
Definition: ProDeConstants.hh:63
IUDialog::immediateUnit_
TTAMachine::ImmediateUnit * immediateUnit_
Immediate unit to modify.
Definition: IUDialog.hh:80
TTAMachine::Unit::portCount
virtual int portCount() const
Definition: Unit.cc:135
GUITextGenerator::TXT_BUTTON_DELETE
@ TXT_BUTTON_DELETE
Label for delete button.
Definition: GUITextGenerator.hh:56
IUDialog::portList_
wxListCtrl * portList_
Port list control.
Definition: IUDialog.hh:91
ProDeTextGenerator::TXT_IU_TEMPLATES_BOX
@ TXT_IU_TEMPLATES_BOX
Templates box title.
Definition: ProDeTextGenerator.hh:179
ProDeTextGenerator::instance
static ProDeTextGenerator * instance()
Definition: ProDeTextGenerator.cc:382
ProDeTextGenerator::TXT_LABEL_EXTENSION
@ TXT_LABEL_EXTENSION
Label for 'extension' radiobox.
Definition: ProDeTextGenerator.hh:66
IUDialog::ID_SIZE
@ ID_SIZE
Definition: IUDialog.hh:101
TTAMachine::BaseRegisterFile::port
virtual RFPort * port(const std::string &name) const
Definition: BaseRegisterFile.cc:129
IUDialog::createContents
wxSizer * createContents(wxWindow *parent, bool call_fit, bool set_sizer)
Definition: IUDialog.cc:503
GUITextGenerator::TXT_BUTTON_ADD_DIALOG
@ TXT_BUTTON_ADD_DIALOG
Label for add button (with trailing ...).
Definition: GUITextGenerator.hh:54
GUITextGenerator::TXT_BUTTON_EDIT_DIALOG
@ TXT_BUTTON_EDIT_DIALOG
Label for edit button (with trailing ...).
Definition: GUITextGenerator.hh:58
TTAMachine::Component::machine
virtual Machine * machine() const
TTAMachine::Port::name
virtual std::string name() const
Definition: Port.cc:141
IUDialog::onEditPort
void onEditPort(wxCommandEvent &event)
Definition: IUDialog.cc:401
IUDialog::size_
int size_
Number of registers.
Definition: IUDialog.hh:84
IUDialog::templateList_
wxListCtrl * templateList_
Template list control.
Definition: IUDialog.hh:93
ProDeTextGenerator::TXT_IU_PORTS_BOX
@ TXT_IU_PORTS_BOX
Ports box title.
Definition: ProDeTextGenerator.hh:178
ProDeTextGenerator::COMP_IMMEDIATE_UNIT
@ COMP_IMMEDIATE_UNIT
Immediate unit (w/o article).
Definition: ProDeTextGenerator.hh:267
ProDeTextGenerator::COMP_MACHINE
@ COMP_MACHINE
Text for machine description.
Definition: ProDeTextGenerator.hh:252
IUDialog::cycles_
int cycles_
Cycles.
Definition: IUDialog.hh:88
TTAMachine::Machine::Navigator::item
ComponentType * item(int index) const
WidgetTools::setWidgetLabel
static void setWidgetLabel(wxWindow *widget, std::string text)
Definition: WidgetTools.cc:52
InformationDialog
Definition: InformationDialog.hh:42
TTAMachine::ImmediateUnit::extensionMode
virtual Machine::Extension extensionMode() const
Definition: ImmediateUnit.cc:143
TTAMachine::ImmediateUnit::setExtensionMode
virtual void setExtensionMode(Machine::Extension mode)
Definition: ImmediateUnit.cc:185
IUDialog::ID_LABEL_SIZE
@ ID_LABEL_SIZE
Definition: IUDialog.hh:111
TTAMachine::Machine::instructionTemplateNavigator
virtual InstructionTemplateNavigator instructionTemplateNavigator() const
Definition: Machine.cc:428
TTAMachine::BaseRegisterFile::width
virtual int width() const
ProDeTextGenerator::TXT_LABEL_WIDTH
@ TXT_LABEL_WIDTH
Label for bit width widget.
Definition: ProDeTextGenerator.hh:57
WxConversion::toString
static std::string toString(const wxString &source)
ProDeTextGenerator::TXT_COLUMN_NAME
@ TXT_COLUMN_NAME
Label for name column in a list.
Definition: ProDeTextGenerator.hh:105
TTAMachine::Machine::Navigator
Definition: Machine.hh:186
IUDialog::portListSizer_
wxStaticBoxSizer * portListSizer_
Sizer containing the port list and associated buttons.
Definition: IUDialog.hh:75
TTAMachine::RegisterFile::setNumberOfRegisters
virtual void setNumberOfRegisters(int registers)
Definition: RegisterFile.cc:320
GUITextGenerator::TXT_BUTTON_OK
@ TXT_BUTTON_OK
Label for OK button.
Definition: GUITextGenerator.hh:59
IUDialog::templateListSizer_
wxStaticBoxSizer * templateListSizer_
Sizer containing the template list.
Definition: IUDialog.hh:77
TTAMachine::ImmediateUnit
Definition: ImmediateUnit.hh:50