OpenASIP  2.0
TemplateListDialog.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 TemplateListDialog.cc
26  *
27  * Implementation of TemplateListDialog class.
28  *
29  * @author Veli-Pekka Jääskeläinen 2004 (vjaaskel-no.spam-cs.tut.fi)
30  * @note rating: red
31  */
32 
33 #include <boost/format.hpp>
34 #include <wx/wx.h>
35 #include <wx/sizer.h>
36 #include <wx/statline.h>
37 #include <wx/listctrl.h>
38 
39 #include "TemplateListDialog.hh"
40 #include "Machine.hh"
41 #include "MachineTester.hh"
42 #include "InstructionTemplate.hh"
43 #include "Bus.hh"
44 #include "WxConversion.hh"
45 #include "TemplateSlotDialog.hh"
46 #include "WidgetTools.hh"
47 #include "InformationDialog.hh"
48 #include "WarningDialog.hh"
49 #include "GUITextGenerator.hh"
50 #include "ProDeTextGenerator.hh"
51 
52 using std::string;
53 using boost::format;
54 using namespace TTAMachine;
55 
56 // too long lines to keep doxygen quiet
57 BEGIN_EVENT_TABLE(TemplateListDialog, wxDialog)
67  EVT_TEXT(ID_NAME, TemplateListDialog::onTemplateName)
69 
70 
71 /**
72  * The Constructor.
73  *
74  * @param parent Parent window of the dialog.
75  * @param machine Parent machine of the instruction templates.
76  */
78  wxWindow* parent,
79  Machine* machine) :
80  wxDialog(parent, -1, _T(""), wxDefaultPosition),
81  machine_(machine),
82  templateName_(_T("")) {
83 
84  createContents(this, true, true);
85 
86  templateList_ = dynamic_cast<wxListCtrl*>(FindWindow(ID_TEMPLATE_LIST));
87  slotList_ = dynamic_cast<wxListCtrl*>(FindWindow(ID_SLOT_LIST));
88 
89  FindWindow(ID_NAME)->SetValidator(
90  wxTextValidator(wxFILTER_ASCII, &templateName_));
91  FindWindow(ID_ADD_TEMPLATE)->Disable();
92  FindWindow(ID_DELETE_TEMPLATE)->Disable();
93  FindWindow(ID_EDIT_SLOT)->Disable();
94 
95  // set widget texts
96  setTexts();
97 }
98 
99 
100 /**
101  * The Destructor.
102  */
104 }
105 
106 
107 /**
108  * Sets texts for widgets.
109  */
110 void
114 
115  // Dialog title
116  format fmt = prodeTexts->text(
118  SetTitle(WxConversion::toWxString(fmt.str()));
119 
120  // buttons
121  WidgetTools::setLabel(generator, FindWindow(wxID_OK),
123 
124  WidgetTools::setLabel(generator, FindWindow(wxID_CANCEL),
126 
127  WidgetTools::setLabel(generator, FindWindow(ID_HELP),
129 
130  WidgetTools::setLabel(generator, FindWindow(ID_ADD_TEMPLATE),
132 
133  WidgetTools::setLabel(generator, FindWindow(ID_DELETE_TEMPLATE),
135 
136  WidgetTools::setLabel(generator, FindWindow(ID_ADD_SLOT),
138 
139  WidgetTools::setLabel(generator, FindWindow(ID_EDIT_SLOT),
141 
142  WidgetTools::setLabel(generator, FindWindow(ID_DELETE_SLOT),
144 
145  // widget labels
146  WidgetTools::setLabel(prodeTexts, FindWindow(ID_LABEL_NAME),
148 
149  // box sizer label
151  WidgetTools::setWidgetLabel(templateSizer_, fmt.str());
152 
154  WidgetTools::setWidgetLabel(slotSizer_, fmt.str());
155 
156  // Create instruction template list columns.
157  wxListCtrl* templateList =
158  dynamic_cast<wxListCtrl*>(FindWindow(ID_TEMPLATE_LIST));
159  fmt = prodeTexts->text(ProDeTextGenerator::TXT_COLUMN_NAME);
160  templateList->InsertColumn(0, WxConversion::toWxString(fmt.str()),
161  wxLIST_FORMAT_LEFT, 160);
162 
163  // Create template slot list columns.
164  wxListCtrl* slotList =
165  dynamic_cast<wxListCtrl*>(FindWindow(ID_SLOT_LIST));
166  fmt = prodeTexts->text(ProDeTextGenerator::TXT_COLUMN_SLOT);
167  slotList->InsertColumn(0, WxConversion::toWxString(fmt.str()),
168  wxLIST_FORMAT_LEFT, 100);
170  slotList->InsertColumn(1, WxConversion::toWxString(fmt.str()),
171  wxLIST_FORMAT_LEFT, 100);
172  fmt = prodeTexts->text(ProDeTextGenerator::TXT_COLUMN_WIDTH);
173  slotList->InsertColumn(2, WxConversion::toWxString(fmt.str()),
174  wxLIST_FORMAT_LEFT, 50);
175 
176 }
177 
178 
179 /**
180  * Transfers data from the machine to the dialog widgets.
181  */
182 bool
184 
185  // update template list
186  templateList_->DeleteAllItems();
188  machine_->instructionTemplateNavigator();
189  for (int i = 0; i < navigator.count(); i++) {
190  templateList_->InsertItem(
191  i, WxConversion::toWxString(navigator.item(i)->name()));
192  }
193  updateSlotList();
194  return wxDialog::TransferDataToWindow();
195 }
196 
197 
198 /**
199  * Updates the template slot list.
200  */
201 void
203 
204 
205  slotList_->DeleteAllItems();
206  slotList_->Enable();
207 
208  InstructionTemplate* templ = selectedTemplate();
209 
210  if (templ == NULL) {
211  FindWindow(ID_ADD_SLOT)->Disable();
212  return;
213  }
214 
215  FindWindow(ID_ADD_SLOT)->Enable();
216 
217  // Add bus slots.
218  Machine::BusNavigator busNavigator = machine_->busNavigator();
219  for (int i = 0; i < busNavigator.count(); i++) {
220  if (templ->usesSlot(busNavigator.item(i)->name())) {
221 
222  Bus* slot = busNavigator.item(i);
223  // Add slot name.
224  slotList_->InsertItem(
225  0, WxConversion::toWxString(slot->name()));
226 
227  // Add slot Destination.
228 
229  // Set slot destination.
230  wxString name = WxConversion::toWxString(
231  templ->destinationOfSlot(slot->name())->name());
232  slotList_->SetItem(0, 1, name);
233 
234  // Set slot width.
235  wxString width = WxConversion::toWxString(
236  templ->supportedWidth(slot->name()));
237  slotList_->SetItem(0, 2, width);
238  }
239  }
240 
241  // Add immediate slots.
242  Machine::ImmediateSlotNavigator immsNavigator =
243  machine_->immediateSlotNavigator();
244  for (int i = 0; i < immsNavigator.count(); i++) {
245  if (templ->usesSlot(immsNavigator.item(i)->name())) {
246 
247  ImmediateSlot* slot = immsNavigator.item(i);
248 
249  // Add slot name.
250  slotList_->InsertItem(
251  0, WxConversion::toWxString(slot->name()));
252 
253  // Set slot destination.
254  wxString name = WxConversion::toWxString(
255  templ->destinationOfSlot(slot->name())->name());
256  slotList_->SetItem(0, 1, name);
257 
258  // Set slot width.
259  wxString width = WxConversion::toWxString(
260  templ->supportedWidth(slot->name()));
261  slotList_->SetItem(0, 2, width);
262  }
263  }
264  wxListEvent dummy;
265  onSlotSelection(dummy);
266 }
267 
268 
269 /**
270  * Updates the slot list when the template selection changes.
271  */
272 void
274  if (templateList_->GetSelectedItemCount() == 0) {
275  FindWindow(ID_DELETE_TEMPLATE)->Disable();
276  } else {
277  FindWindow(ID_DELETE_TEMPLATE)->Enable();
278  }
279  updateSlotList();
280 }
281 
282 
283 /**
284  * Updates the edit/delete slot buttons when the slot selection changes.
285  */
286 void
288  if (slotList_->GetSelectedItemCount() == 1) {
289  FindWindow(ID_DELETE_SLOT)->Enable();
290  FindWindow(ID_EDIT_SLOT)->Enable();
291  } else {
292  FindWindow(ID_DELETE_SLOT)->Disable();
293  FindWindow(ID_EDIT_SLOT)->Disable();
294  }
295 }
296 
297 
298 /**
299  * Deletes the selected template.
300  */
301 void
303  delete selectedTemplate();
304  TransferDataToWindow();
305  wxListEvent dummy;
306  onTemplateSelection(dummy);
307 }
308 
309 
310 /**
311  * Returns pointer to the selected InstructionTemplate.
312  *
313  * @return Pointer to the selected InstructionTemplate.
314  */
317  long item = -1;
318  item = templateList_->GetNextItem(
319  item, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
320 
321  if (item < 0) {
322  return NULL;
323  }
324 
325  InstructionTemplate* temp =
326  machine_->instructionTemplateNavigator().item(item);
327  return temp;
328 }
329 
330 
331 /**
332  * Returns name of the selected slot.
333  *
334  * @return Name of the selected slot.
335  */
336 string
338  string name = WidgetTools::lcStringSelection(slotList_, 0);
339  return name;
340 }
341 
342 
343 /**
344  * Handles the Add tempalte button event.
345  *
346  * Adds a new template to the machine.
347  */
348 void
350  if (!TransferDataFromWindow()) {
351  assert(false);
352  }
353  string trimmedName =
354  WxConversion::toString(templateName_.Trim(false).Trim(true));
355 
356  // Check the name validity.
357  if (!MachineTester::isValidComponentName(trimmedName)) {
359  format message =
361  InformationDialog warning(
362  this, WxConversion::toWxString(message.str()));
363  warning.ShowModal();
364  return;
365  }
366 
368  machine_->instructionTemplateNavigator();
369 
370  if (navigator.hasItem(trimmedName)) {
371  ProDeTextGenerator* prodeTexts =
373  format message =
375  format a_tmplate =
377  format machine =
379  format tmplate =
381  message % trimmedName % a_tmplate.str() % machine.str() %
382  tmplate.str();
383  WarningDialog warning(this, WxConversion::toWxString(message.str()));
384  warning.ShowModal();
385  return;
386  }
387  new InstructionTemplate(trimmedName, *machine_);
388  templateName_ = _T("");
389  TransferDataToWindow();
390 }
391 
392 
393 /**
394  * Enables and disables the Add template button when text is entered in the
395  * template name widget.
396  */
397 void
399  if (!TransferDataFromWindow()) {
400  assert(false);
401  }
402  wxString trimmedName = templateName_.Trim(false).Trim(true);
403  if (trimmedName == _T("")) {
404  FindWindow(ID_ADD_TEMPLATE)->Disable();
405  } else {
406  FindWindow(ID_ADD_TEMPLATE)->Enable();
407  }
408 }
409 
410 
411 /**
412  * Handles the add slot button event.
413  */
414 void
416 
417  if (selectedTemplate() == NULL) {
418  assert(false);
419  }
420 
421  // Check that there is at least one immediate unit in the machine.
422  const Machine::ImmediateUnitNavigator iuNavigator =
423  machine_->immediateUnitNavigator();
424 
425  if (iuNavigator.count() == 0) {
427  wxString message = WxConversion::toWxString(generator->text(
429 
430  InformationDialog dialog(this, message);
431  dialog.ShowModal();
432  return;
433  }
434 
435  // check that the template doesn't have all possible slots already
436  bool available = false;
437 
438  // check buses
439  const Machine::BusNavigator busNavigator = machine_->busNavigator();
440  for (int i = 0; i < busNavigator.count(); i++) {
441  if (!selectedTemplate()->usesSlot(busNavigator.item(i)->name())) {
442  available = true;
443  break;
444  }
445  }
446 
447  // check immediate slots
448  const Machine::ImmediateSlotNavigator immsNavigator =
449  machine_->immediateSlotNavigator();
450  for (int i = 0; i < immsNavigator.count(); i++) {
451  if (!selectedTemplate()->usesSlot(immsNavigator.item(i)->name())) {
452  available = true;
453  break;
454  }
455  }
456 
457  if (available == false) {
459  wxString message = WxConversion::toWxString(generator->text(
461  InformationDialog dialog(this, message);
462  dialog.ShowModal();
463  return;
464  }
465 
466  TemplateSlotDialog dialog(this, selectedTemplate());
467  dialog.ShowModal();
468  updateSlotList();
469 }
470 
471 
472 /**
473  * Handles the delete slot button event.
474  */
475 void
477  selectedTemplate()->removeSlot(selectedSlot());
478  updateSlotList();
479 }
480 
481 
482 /**
483  * Handles the edit slot button event.
484  */
485 void
487  TemplateSlotDialog dialog(this, selectedTemplate(),
488  selectedTemplate()->templateSlot(selectedSlot()) );
489  dialog.ShowModal();
490  updateSlotList();
491 }
492 
493 
494 /**
495  * Creates the dialog window contents.
496  *
497  * This method was generated with wxDesigner.
498  *
499  * @return Main sizer of the created contents.
500  * @param parent The dialog window.
501  * @param call_fit If true, fits the contents inside the dialog.
502  * @param set_sizer If true, sets the main sizer as dialog contents.
503  */
504 wxSizer*
506  wxWindow *parent, bool call_fit, bool set_sizer) {
507 
508  wxBoxSizer *item0 = new wxBoxSizer( wxVERTICAL );
509 
510  wxBoxSizer *item1 = new wxBoxSizer( wxHORIZONTAL );
511 
512  wxStaticBox *item3 = new wxStaticBox( parent, -1, wxT("Instruction Templates:") );
513  wxStaticBoxSizer *item2 = new wxStaticBoxSizer( item3, wxVERTICAL );
514  templateSizer_ = item2;
515 
516  wxListCtrl *item4 = new wxListCtrl( parent, ID_TEMPLATE_LIST, wxDefaultPosition, wxSize(160,200), wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
517  item2->Add( item4, 0, wxGROW|wxALL, 5 );
518 
519  wxBoxSizer *item5 = new wxBoxSizer( wxHORIZONTAL );
520 
521  wxStaticText *item6 = new wxStaticText( parent, ID_LABEL_NAME, wxT("Name:"), wxDefaultPosition, wxDefaultSize, 0 );
522  item5->Add( item6, 0, wxALIGN_CENTER|wxALL, 5 );
523 
524  wxTextCtrl *item7 = new wxTextCtrl( parent, ID_NAME, wxT(""), wxDefaultPosition, wxSize(120,-1), 0 );
525  item5->Add( item7, 0, wxALIGN_CENTER|wxALL, 5 );
526 
527  item2->Add( item5, 0, wxGROW|wxALL, 5 );
528 
529  wxBoxSizer *item8 = new wxBoxSizer( wxHORIZONTAL );
530 
531  wxButton *item9 = new wxButton( parent, ID_ADD_TEMPLATE, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
532  item8->Add( item9, 0, wxALIGN_CENTER|wxALL, 5 );
533 
534  wxButton *item10 = new wxButton( parent, ID_DELETE_TEMPLATE, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
535  item8->Add( item10, 0, wxALIGN_CENTER|wxALL, 5 );
536 
537  item2->Add( item8, 0, wxALIGN_CENTER|wxALL, 5 );
538 
539  item1->Add( item2, 0, wxGROW|wxALL, 5 );
540 
541  wxStaticBox *item12 = new wxStaticBox( parent, -1, wxT("Template Slots:") );
542  wxStaticBoxSizer *item11 = new wxStaticBoxSizer( item12, wxVERTICAL );
543  slotSizer_ = item11;
544 
545  wxListCtrl *item13 = new wxListCtrl( parent, ID_SLOT_LIST, wxDefaultPosition, wxSize(250,245), wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
546  item11->Add( item13, 0, wxGROW|wxALL, 5 );
547 
548  wxBoxSizer *item14 = new wxBoxSizer( wxHORIZONTAL );
549 
550  wxButton *item15 = new wxButton( parent, ID_ADD_SLOT, wxT("Add..."), wxDefaultPosition, wxDefaultSize, 0 );
551  item14->Add( item15, 0, wxALIGN_CENTER|wxALL, 5 );
552 
553  wxButton *item16 = new wxButton( parent, ID_EDIT_SLOT, wxT("Edit..."), wxDefaultPosition, wxDefaultSize, 0 );
554  item14->Add( item16, 0, wxALIGN_CENTER|wxALL, 5 );
555 
556  wxButton *item17 = new wxButton( parent, ID_DELETE_SLOT, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
557  item14->Add( item17, 0, wxALIGN_CENTER|wxALL, 5 );
558 
559  item11->Add( item14, 0, wxALIGN_CENTER|wxALL, 5 );
560 
561  item1->Add( item11, 0, wxGROW|wxALL, 5 );
562 
563  item0->Add( item1, 0, wxALIGN_CENTER|wxALL, 5 );
564 
565  wxStaticLine *item18 = new wxStaticLine( parent, ID_LINE, wxDefaultPosition, wxSize(20,-1), wxLI_HORIZONTAL );
566  item0->Add( item18, 0, wxGROW|wxALL, 5 );
567 
568  wxGridSizer *item19 = new wxGridSizer( 2, 0, 0 );
569 
570  wxButton *item20 = new wxButton( parent, ID_HELP, wxT("&Help"), wxDefaultPosition, wxDefaultSize, 0 );
571  item19->Add( item20, 0, wxALL, 5 );
572 
573  wxBoxSizer *item21 = new wxBoxSizer( wxHORIZONTAL );
574 
575  wxButton *item22 = new wxButton( parent, wxID_OK, wxT("&OK"), wxDefaultPosition, wxDefaultSize, 0 );
576  item21->Add( item22, 0, wxALIGN_CENTER|wxALL, 5 );
577 
578  wxButton *item23 = new wxButton( parent, wxID_CANCEL, wxT("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
579  item21->Add( item23, 0, wxALIGN_CENTER|wxALL, 5 );
580 
581  item19->Add( item21, 0, wxALL, 5 );
582 
583  item0->Add( item19, 0, wxGROW, 5 );
584 
585  if (set_sizer)
586  {
587  parent->SetSizer( item0 );
588  if (call_fit)
589  item0->SetSizeHints( parent );
590  }
591 
592  return item0;
593 }
WarningDialog
Definition: WarningDialog.hh:42
TemplateListDialog::setTexts
void setTexts()
Definition: TemplateListDialog.cc:111
TemplateListDialog::onTemplateSelection
void onTemplateSelection(wxListEvent &event)
Definition: TemplateListDialog.cc:273
TemplateListDialog.hh
WxConversion::toWxString
static wxString toWxString(const std::string &source)
TemplateSlotDialog.hh
TemplateListDialog::selectedSlot
std::string selectedSlot()
Definition: TemplateListDialog.cc:337
TTAMachine::Component::name
virtual TCEString name() const
Definition: MachinePart.cc:125
TemplateListDialog::createContents
wxSizer * createContents(wxWindow *parent, bool call_fit, bool set_sizer)
Definition: TemplateListDialog.cc:505
machine
TTAMachine::Machine * machine
the architecture definition of the estimated processor
Definition: EstimatorCmdLineUI.cc:59
TemplateListDialog::updateSlotList
void updateSlotList()
Definition: TemplateListDialog.cc:202
WidgetTools::setLabel
static void setLabel(Texts::TextGenerator *generator, wxWindow *widget, int textID)
Definition: WidgetTools.cc:92
TTAMachine::Bus
Definition: Bus.hh:53
GUITextGenerator::instance
static GUITextGenerator * instance()
Definition: GUITextGenerator.cc:67
TemplateListDialog::selectedTemplate
TTAMachine::InstructionTemplate * selectedTemplate()
Definition: TemplateListDialog.cc:316
GUITextGenerator
Definition: GUITextGenerator.hh:46
GUITextGenerator::TXT_BUTTON_HELP
@ TXT_BUTTON_HELP
Label for help button.
Definition: GUITextGenerator.hh:60
TemplateListDialog::onAddTemplate
void onAddTemplate(wxCommandEvent &event)
Definition: TemplateListDialog.cc:349
WidgetTools.hh
TemplateListDialog::onDeleteTemplate
void onDeleteTemplate(wxCommandEvent &event)
Definition: TemplateListDialog.cc:302
FindWindow
Definition: FindWindow.hh:49
ProDeTextGenerator::TXT_COLUMN_WIDTH
@ TXT_COLUMN_WIDTH
Label for width column in a list.
Definition: ProDeTextGenerator.hh:109
TTAMachine::Machine::Navigator::count
int count() const
Texts::TextGenerator::text
virtual boost::format text(int textId)
Definition: TextGenerator.cc:94
TemplateListDialog::onTemplateName
void onTemplateName(wxCommandEvent &event)
Definition: TemplateListDialog.cc:398
ProDeTextGenerator.hh
ProDeTextGenerator
Definition: ProDeTextGenerator.hh:49
ProDeTextGenerator::MSG_ERROR_ILLEGAL_NAME
@ MSG_ERROR_ILLEGAL_NAME
Error: Illegal component name.
Definition: ProDeTextGenerator.hh:223
ProDeTextGenerator::MSG_ERROR_SAME_NAME
@ MSG_ERROR_SAME_NAME
Error: Same name exists.
Definition: ProDeTextGenerator.hh:229
ProDeTextGenerator::TXT_TEMPLATES_SLOTS_BOX
@ TXT_TEMPLATES_SLOTS_BOX
Template Slots box title.
Definition: ProDeTextGenerator.hh:165
ProDeTextGenerator::MSG_ERROR_NO_SLOTS_AVAILABLE
@ MSG_ERROR_NO_SLOTS_AVAILABLE
Error: No slots available for IT.
Definition: ProDeTextGenerator.hh:231
TTAMachine::InstructionTemplate
Definition: InstructionTemplate.hh:49
assert
#define assert(condition)
Definition: Application.hh:86
ProDeTextGenerator::COMP_A_TEMPLATE
@ COMP_A_TEMPLATE
Name for template (w/ article).
Definition: ProDeTextGenerator.hh:272
GUITextGenerator::TXT_BUTTON_CANCEL
@ TXT_BUTTON_CANCEL
Label for cancel button.
Definition: GUITextGenerator.hh:55
WarningDialog.hh
InstructionTemplate.hh
ProDeTextGenerator::TXT_TEMPLATES_TEMPLATES_BOX
@ TXT_TEMPLATES_TEMPLATES_BOX
Instruction Templates bos title.
Definition: ProDeTextGenerator.hh:164
dummy
SimValue dummy(32)
a dummy simvalue which is given for operands that are not bound
ProDeTextGenerator::TXT_COLUMN_SLOT
@ TXT_COLUMN_SLOT
Label for slot column in a list.
Definition: ProDeTextGenerator.hh:115
TTAMachine::Machine::Navigator::hasItem
bool hasItem(const std::string &name) const
InformationDialog.hh
WidgetTools::lcStringSelection
static std::string lcStringSelection(wxListCtrl *list, int column)
Definition: WidgetTools.cc:108
TemplateListDialog::onAddSlot
void onAddSlot(wxCommandEvent &event)
Definition: TemplateListDialog.cc:415
ProDeTextGenerator::TXT_COLUMN_DESTINATION
@ TXT_COLUMN_DESTINATION
Label for destination column.
Definition: ProDeTextGenerator.hh:117
ProDeTextGenerator::COMP_TEMPLATE
@ COMP_TEMPLATE
Name for template (w/o article).
Definition: ProDeTextGenerator.hh:273
TemplateListDialog::~TemplateListDialog
virtual ~TemplateListDialog()
Definition: TemplateListDialog.cc:103
GUITextGenerator::TXT_BUTTON_ADD
@ TXT_BUTTON_ADD
Label for an add button.
Definition: GUITextGenerator.hh:53
ProDeTextGenerator::TXT_LABEL_NAME
@ TXT_LABEL_NAME
Label for component name widget.
Definition: ProDeTextGenerator.hh:56
TemplateSlotDialog
Definition: TemplateSlotDialog.hh:49
TTAMachine::InstructionTemplate::supportedWidth
virtual int supportedWidth() const
Definition: InstructionTemplate.cc:427
Machine.hh
MachineTester::isValidComponentName
static bool isValidComponentName(const std::string &name)
Definition: MachineTester.cc:312
Bus.hh
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
GUITextGenerator.hh
MachineTester.hh
ProDeTextGenerator::instance
static ProDeTextGenerator * instance()
Definition: ProDeTextGenerator.cc:382
TemplateListDialog::onDeleteSlot
void onDeleteSlot(wxCommandEvent &event)
Definition: TemplateListDialog.cc:476
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
GUITextGenerator::TXT_BUTTON_EDIT_DIALOG
@ TXT_BUTTON_EDIT_DIALOG
Label for edit button (with trailing ...).
Definition: GUITextGenerator.hh:58
TemplateListDialog
Definition: TemplateListDialog.hh:50
ProDeTextGenerator::TXT_TEMPLATES_DIALOG_TITLE
@ TXT_TEMPLATES_DIALOG_TITLE
Templates dialog title.
Definition: ProDeTextGenerator.hh:163
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::MSG_ERROR_NO_IMMEDIATE_UNITS
@ MSG_ERROR_NO_IMMEDIATE_UNITS
Error: No IUs for a template slot.
Definition: ProDeTextGenerator.hh:245
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
TemplateListDialog::onSlotSelection
void onSlotSelection(wxListEvent &event)
Definition: TemplateListDialog.cc:287
TTAMachine::Machine::Navigator
Definition: Machine.hh:186
TTAMachine::ImmediateSlot
Definition: ImmediateSlot.hh:44
TemplateListDialog::onEditSlot
void onEditSlot(wxCommandEvent &event)
Definition: TemplateListDialog.cc:486
TTAMachine::InstructionTemplate::usesSlot
virtual bool usesSlot(const std::string &slotName) const
Definition: InstructionTemplate.cc:265
END_EVENT_TABLE
END_EVENT_TABLE() using namespace IDF
TTAMachine::Machine
Definition: Machine.hh:73
TemplateListDialog::TransferDataToWindow
virtual bool TransferDataToWindow()
Definition: TemplateListDialog.cc:183
TTAMachine::InstructionTemplate::destinationOfSlot
virtual ImmediateUnit * destinationOfSlot(const std::string &slotName) const
Definition: InstructionTemplate.cc:346
GUITextGenerator::TXT_BUTTON_OK
@ TXT_BUTTON_OK
Label for OK button.
Definition: GUITextGenerator.hh:59