OpenASIP  2.0
IUDialog.cc
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 IUDialog.cc
26  *
27  * Definition of IUDialog class.
28  *
29  * @author Veli-Pekka Jääskeläinen 2004 (vjaaskel-no.spam-cs.tut.fi)
30  */
31 
32 #include <wx/valgen.h>
33 #include <boost/format.hpp>
34 
35 #include "ModelConstants.hh"
36 #include "IUDialog.hh"
37 #include "IUPortDialog.hh"
38 #include "ProDeConstants.hh"
39 #include "WxConversion.hh"
40 #include "Conversion.hh"
41 #include "WarningDialog.hh"
42 #include "InformationDialog.hh"
43 #include "Machine.hh"
44 #include "ImmediateUnit.hh"
45 #include "UserManualCmd.hh"
46 #include "Port.hh"
47 #include "MachineTester.hh"
48 #include "WidgetTools.hh"
49 #include "GUITextGenerator.hh"
50 #include "ProDeTextGenerator.hh"
51 
52 using boost::format;
53 using std::string;
54 using namespace TTAMachine;
55 
56 BEGIN_EVENT_TABLE(IUDialog, wxDialog)
57  EVT_TEXT(ID_NAME, IUDialog::onName)
58  EVT_BUTTON(ID_ADD_PORT, IUDialog::onAddPort)
59  EVT_BUTTON(ID_DELETE_PORT, IUDialog::onDeletePort)
60  EVT_BUTTON(ID_EDIT_PORT, IUDialog::onEditPort)
61  EVT_MENU(ID_EDIT_PORT, IUDialog::onEditPort)
62  EVT_MENU(ID_DELETE_PORT, IUDialog::onDeletePort)
64  EVT_LIST_ITEM_RIGHT_CLICK(ID_PORT_LIST, IUDialog::onPortRightClick)
65 
66  EVT_BUTTON(wxID_OK, IUDialog::onOK)
67 
68  EVT_LIST_ITEM_FOCUSED(ID_PORT_LIST, IUDialog::onPortSelection)
69  EVT_LIST_DELETE_ITEM(ID_PORT_LIST, IUDialog::onPortSelection)
73 
74 
75 /**
76  * The Constructor.
77  *
78  * @param parent Parent window of the dialog.
79  * @param immediateUnit Immediate unit to be modified with the dialog.
80  */
82  wxWindow* parent,
83  ImmediateUnit* immediateUnit):
84  wxDialog(parent, -1, _T(""), wxDefaultPosition),
85  immediateUnit_(immediateUnit),
86  name_(_T("")),
87  size_(ModelConstants::DEFAULT_IU_SIZE),
89  cycles_(ModelConstants::DEFAULT_IU_CYCLES),
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 
112  TransferDataToWindow();
113 }
114 
115 
116 /**
117  * The Destructor.
118  */
120 }
121 
122 
123 /**
124  * Sets texts for widgets.
125  */
126 void
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 
142  WidgetTools::setLabel(generator, FindWindow(ID_HELP),
144 
145  WidgetTools::setLabel(generator, FindWindow(ID_ADD_PORT),
147 
148  WidgetTools::setLabel(generator, FindWindow(ID_EDIT_PORT),
150 
151  WidgetTools::setLabel(generator, FindWindow(ID_DELETE_PORT),
153 
154  // widget labels
155  WidgetTools::setLabel(prodeTexts, FindWindow(ID_LABEL_NAME),
157 
158  WidgetTools::setLabel(prodeTexts, FindWindow(ID_LABEL_SIZE),
160 
161  WidgetTools::setLabel(prodeTexts, FindWindow(ID_LABEL_WIDTH),
163 
164  WidgetTools::setLabel(prodeTexts, FindWindow(ID_EXTENSION),
166 
167  // box sizer label
168  fmt = prodeTexts->text(ProDeTextGenerator::TXT_IU_PORTS_BOX);
169  WidgetTools::setWidgetLabel(portListSizer_, fmt.str());
170 
172  WidgetTools::setWidgetLabel(templateListSizer_, fmt.str());
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 }
193 
194 
195 /**
196  * Transfers data from the ImmediateUnit object to the dialog widgets.
197  *
198  * @return false, if an error occured in the transfer.
199  */
200 bool
202 
203  name_ = WxConversion::toWxString(immediateUnit_->name());
204  width_ = immediateUnit_->width();
205  size_ = immediateUnit_->numberOfRegisters();
206  cycles_ = immediateUnit_->latency();
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();
220  updateTemplateList();
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 }
229 
230 
231 /**
232  * Validates input in the controls, and updates the ImmediateUnit.
233  */
234 void
235 IUDialog::onOK(wxCommandEvent&) {
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 
262  immediateUnit_->machine()->immediateUnitNavigator();
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);
287  immediateUnit_->setNumberOfRegisters(size_);
288  immediateUnit_->setWidth(width_);
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 }
303 
304 
305 /**
306  * Checks whether name field is empty and disables OK button of the
307  * dialog if it is.
308  */
309 void
310 IUDialog::onName(wxCommandEvent&) {
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 }
321 
322 
323 /**
324  * Returns pointer to the port which is selected on the port list.
325  *
326  * @return Pointer to the port which is selected on the port list.
327  */
328 Port*
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 }
343 
344 
345 
346 
347 /**
348  * Creates and shows an empty IUPortDialog for adding ports.
349  */
350 void
351 IUDialog::onAddPort(wxCommandEvent&) {
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 }
371 
372 
373 /**
374  * Deletes selected port from the port list.
375  */
376 void
377 IUDialog::onDeletePort(wxCommandEvent&) {
378  Port* selected = selectedPort();
379  assert(selected != NULL);
380  delete selected;
381  updatePortList();
382 }
383 
384 
385 /**
386  * Handles left mouse button double click on the port list.
387  */
388 void
390  wxCommandEvent dummy;
391  onEditPort(dummy);
392 }
393 
394 
395 /**
396  * Handles the 'Edit Port' button event.
397  *
398  * Opens a IUPortDialog with the selected port's attributes set.
399  */
400 void
401 IUDialog::onEditPort(wxCommandEvent&) {
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 }
414 
415 /**
416  * Disables and enables Edit and Delete buttons under the port list.
417  *
418  * If a port is selected, buttons are enabled. If no port is selected the
419  * buttons will be disabled.
420  *
421  * @param event ListEvent, which may have changed the selection.
422  */
423 void
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 }
433 
434 
435 /**
436  * Opens a pop-up menu when right mouse button was pressed.
437  *
438  * @param event Information about right mouse click event.
439  */
440 void
441 IUDialog::onPortRightClick(wxListEvent& event) {
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 }
451 
452 
453 /**
454  * Updates 'Ports' list control.
455  *
456  * Clears all items from the choicer and adds all ports.
457  */
458 void
460  portList_->DeleteAllItems();
461  for (int i=0; i < immediateUnit_->portCount(); i++) {
462 
463  wxString portName =
464  WxConversion::toWxString(immediateUnit_->port(i)->name());
465 
466  portList_->InsertItem(i, portName);
467  }
468 }
469 
470 
471 /**
472  * Updates 'Templates' list control.
473  */
474 void
476 
477  templateList_->DeleteAllItems();
479  immediateUnit_->machine()->instructionTemplateNavigator();
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 }
490 
491 
492 /**
493  * Creates the dialog window contents.
494  *
495  * Code generated by wxDesigner.
496  *
497  * @return Main sizer of the created contents.
498  * @param parent The dialog window.
499  * @param call_fit If true, fits the contents inside the dialog.
500  * @param set_sizer If true, sets the main sizer as dialog contents.
501  */
502 wxSizer*
503 IUDialog::createContents(wxWindow *parent, bool call_fit, bool set_sizer) {
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 }
WarningDialog
Definition: WarningDialog.hh:42
IUDialog::updateTemplateList
void updateTemplateList()
Definition: IUDialog.cc:475
IUDialog::~IUDialog
virtual ~IUDialog()
Definition: IUDialog.cc:119
TTAMachine::Machine::ZERO
@ ZERO
Zero extension.
Definition: Machine.hh:81
IUDialog::onPortRightClick
void onPortRightClick(wxListEvent &event)
Definition: IUDialog.cc:441
IUDialog::onActivatePort
void onActivatePort(wxListEvent &event)
Definition: IUDialog.cc:389
WxConversion::toWxString
static wxString toWxString(const std::string &source)
TTAMachine::Component::name
virtual TCEString name() const
Definition: MachinePart.cc:125
EVT_LIST_ITEM_ACTIVATED
FUImplementationDialog::onAddExternalPort FUImplementationDialog::onDeleteExternalPort FUImplementationDialog::onArchPortSelection FUImplementationDialog::onArchPortActivation FUImplementationDialog::onExternalPortActivation FUImplementationDialog::onParameterSelection EVT_LIST_ITEM_ACTIVATED(ID_PARAMETER_LIST, FUImplementationDialog::onParameterActivation) EVT_LIST_ITEM_DESELECTED(ID_PARAMETER_LIST
machine
TTAMachine::Machine * machine
the architecture definition of the estimated processor
Definition: EstimatorCmdLineUI.cc:59
DEFAULT_WIDTH
const int DEFAULT_WIDTH
Default window width.
Definition: GUIOptionsSerializer.cc:98
WidgetTools::setLabel
static void setLabel(Texts::TextGenerator *generator, wxWindow *widget, int textID)
Definition: WidgetTools.cc:92
GUITextGenerator::instance
static GUITextGenerator * instance()
Definition: GUITextGenerator.cc:67
IUPortDialog.hh
GUITextGenerator
Definition: GUITextGenerator.hh:46
GUITextGenerator::TXT_BUTTON_HELP
@ TXT_BUTTON_HELP
Label for help button.
Definition: GUITextGenerator.hh:60
ModelConstants
Definition: ModelConstants.hh:40
ImmediateUnit.hh
WidgetTools.hh
FindWindow
Definition: FindWindow.hh:49
ProDeTextGenerator::TXT_IU_DIALOG_TITLE
@ TXT_IU_DIALOG_TITLE
Immediate unit Dialog title.
Definition: ProDeTextGenerator.hh:177
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
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
ProDeTextGenerator.hh
Conversion::toString
static std::string toString(const T &source)
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
ProDeTextGenerator::MSG_ERROR_SAME_NAME
@ MSG_ERROR_SAME_NAME
Error: Same name exists.
Definition: ProDeTextGenerator.hh:229
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
Port.hh
GUITextGenerator::TXT_BUTTON_CANCEL
@ TXT_BUTTON_CANCEL
Label for cancel button.
Definition: GUITextGenerator.hh:55
IUDialog::updatePortList
void updatePortList()
Definition: IUDialog.cc:459
IUDialog::onName
void onName(wxCommandEvent &event)
Definition: IUDialog.cc:310
WarningDialog.hh
Conversion.hh
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
InformationDialog.hh
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::onDeletePort
void onDeletePort(wxCommandEvent &event)
Definition: IUDialog.cc:377
IUDialog::onOK
void onOK(wxCommandEvent &event)
Definition: IUDialog.cc:235
ProDeTextGenerator::TXT_LABEL_SIZE
@ TXT_LABEL_SIZE
Label for size widget.
Definition: ProDeTextGenerator.hh:68
IUPortDialog
Definition: IUPortDialog.hh:45
ModelConstants.hh
Machine.hh
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
TTAMachine::Machine::SIGN
@ SIGN
Sign extension.
Definition: Machine.hh:82
EVT_LIST_ITEM_SELECTED
FUImplementationDialog::onAddExternalPort FUImplementationDialog::onDeleteExternalPort FUImplementationDialog::onArchPortSelection FUImplementationDialog::onArchPortActivation EVT_LIST_ITEM_SELECTED(ID_EXTERNAL_PORT_LIST, FUImplementationDialog::onExternalPortSelection) EVT_LIST_ITEM_ACTIVATED(ID_EXTERNAL_PORT_LIST
GUITextGenerator::TXT_BUTTON_DELETE
@ TXT_BUTTON_DELETE
Label for delete button.
Definition: GUITextGenerator.hh:56
ProDeConstants.hh
GUITextGenerator.hh
ProDeTextGenerator::TXT_IU_TEMPLATES_BOX
@ TXT_IU_TEMPLATES_BOX
Templates box title.
Definition: ProDeTextGenerator.hh:179
MachineTester.hh
IUDialog
Definition: IUDialog.hh:48
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::createContents
wxSizer * createContents(wxWindow *parent, bool call_fit, bool set_sizer)
Definition: IUDialog.cc:503
EVT_LIST_ITEM_DESELECTED
FUImplementationDialog::onAddExternalPort FUImplementationDialog::onDeleteExternalPort FUImplementationDialog::onArchPortSelection EVT_LIST_ITEM_DESELECTED(ID_ARCH_PORT_LIST, FUImplementationDialog::onArchPortSelection) EVT_LIST_ITEM_ACTIVATED(ID_ARCH_PORT_LIST
EVT_BUTTON
EVT_BUTTON(ID_EDIT_ARCH_PORT, FUImplementationDialog::onEditArchitecturePort) EVT_BUTTON(ID_ADD_EXTERNAL_PORT
GUITextGenerator::TXT_BUTTON_ADD_DIALOG
@ TXT_BUTTON_ADD_DIALOG
Label for add button (with trailing ...).
Definition: GUITextGenerator.hh:54
IUDialog.hh
GUITextGenerator::TXT_BUTTON_EDIT_DIALOG
@ TXT_BUTTON_EDIT_DIALOG
Label for edit button (with trailing ...).
Definition: GUITextGenerator.hh:58
IUDialog::onEditPort
void onEditPort(wxCommandEvent &event)
Definition: IUDialog.cc:401
IUDialog::onPortSelection
void onPortSelection(wxListEvent &event)
Definition: IUDialog.cc:424
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
WxConversion.hh
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
Definition: Assembler.hh:48
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
UserManualCmd.hh
IUDialog::onAddPort
void onAddPort(wxCommandEvent &event)
Definition: IUDialog.cc:351
END_EVENT_TABLE
END_EVENT_TABLE() using namespace IDF
GUITextGenerator::TXT_BUTTON_OK
@ TXT_BUTTON_OK
Label for OK button.
Definition: GUITextGenerator.hh:59
TTAMachine::ImmediateUnit
Definition: ImmediateUnit.hh:50