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

#include <BridgeDialog.hh>

Inheritance diagram for BridgeDialog:
Inheritance graph
Collaboration diagram for BridgeDialog:
Collaboration graph

Public Member Functions

 BridgeDialog (wxWindow *parent, TTAMachine::Bridge *bridge, TTAMachine::Bridge *opposite)
 
virtual ~BridgeDialog ()
 

Private Types

enum  {
  ID_NAME = 10000, ID_OUTPUT_BUS, ID_INPUT_BUS, ID_OPPOSITE_BRIDGE,
  ID_BIDIRECTIONAL, ID_HELP, ID_LABEL_NAME, ID_LABEL_OPPOSITE_NAME,
  ID_LABEL_INPUT_BUS, ID_LABEL_OUTPUT_BUS, ID_LINE
}
 

Private Member Functions

wxSizer * createContents (wxWindow *parent, bool call_fit, bool set_sizer)
 
virtual bool TransferDataToWindow ()
 
void setTexts ()
 
void updateBusChoices ()
 
void onOK (wxCommandEvent &)
 
void onCancel (wxCommandEvent &)
 
void onHelp (wxCommandEvent &event)
 
void onName (wxCommandEvent &)
 
void onInputBus (wxCommandEvent &)
 
void onOutputBus (wxCommandEvent &)
 
void onBidirectional (wxCommandEvent &)
 

Private Attributes

TTAMachine::Machinemachine_
 Parent machine of the bridge(s). More...
 
wxString name_
 Name of the bridge. More...
 
wxString oppositeName_
 Name of the opposite bridge. More...
 
wxString inputBus_
 Name of the bridge input bus. More...
 
wxString outputBus_
 Name of the bridge output bus. More...
 
wxTextCtrl * oppositeNameCtrl_
 Opposite name control. More...
 
wxChoice * inputBusChoice_
 Input bus choice control. More...
 
wxChoice * outputBusChoice_
 Output bus choice control. More...
 
wxCheckBox * bidirectionalBox_
 Indicates whether the bridge is bidirectional. More...
 
bool adding_
 Indicates whether we are adding a bridge or not. More...
 
bool bidirectional_
 Indicates whether we are modifying a bidirectional bridge or not. More...
 

Detailed Description

Dialog for querying bridge parameters from the user.

Definition at line 46 of file BridgeDialog.hh.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
ID_NAME 
ID_OUTPUT_BUS 
ID_INPUT_BUS 
ID_OPPOSITE_BRIDGE 
ID_BIDIRECTIONAL 
ID_HELP 
ID_LABEL_NAME 
ID_LABEL_OPPOSITE_NAME 
ID_LABEL_INPUT_BUS 
ID_LABEL_OUTPUT_BUS 
ID_LINE 

Definition at line 98 of file BridgeDialog.hh.

98  {
99  ID_NAME = 10000,
101  ID_INPUT_BUS,
104  ID_HELP,
109  ID_LINE
110  };

Constructor & Destructor Documentation

◆ BridgeDialog()

BridgeDialog::BridgeDialog ( wxWindow *  parent,
TTAMachine::Bridge bridge,
TTAMachine::Bridge opposite 
)

The Constructor.

Parameters
parentParent window of the dialog.
bridgeBridge to be modified with the dialog.
oppositeBridge to be modified having the opposite direction compared to bridge.

Definition at line 80 of file BridgeDialog.cc.

83  :
84  wxDialog(parent, -1, _T(""), wxDefaultPosition),
85  name_(_T("")),
86  oppositeName_(_T("")),
87  oppositeNameCtrl_(NULL),
88  inputBusChoice_(NULL),
89  outputBusChoice_(NULL),
90  bidirectionalBox_(NULL) {
91 
92  assert(bridge != NULL);
93 
94  // The canvas tool has to disabled.
95  MDFView* view =
96  dynamic_cast<MDFView*>(wxGetApp().docManager()->GetCurrentView());
97  view->canvas()->tool()->deactivate();
98 
99 
100  // initialize the dialog
101  createContents(this, true, true);
102  FindWindow(wxID_OK)->Disable();
103 
104  wxTextCtrl* nameCtrl = dynamic_cast<wxTextCtrl*>(FindWindow(ID_NAME));
105  assert(nameCtrl != 0);
106  nameCtrl->SetValidator(wxTextValidator(wxFILTER_ASCII, &name_));
107 
109  dynamic_cast<wxTextCtrl*>(FindWindow(ID_OPPOSITE_BRIDGE));
111  oppositeNameCtrl_->SetValidator(wxTextValidator(wxFILTER_ASCII,
112  &oppositeName_));
113 
114  inputBusChoice_ = dynamic_cast<wxChoice*>(FindWindow(ID_INPUT_BUS));
115  assert(inputBusChoice_ != NULL);
116  outputBusChoice_ = dynamic_cast<wxChoice*>(FindWindow(ID_OUTPUT_BUS));
117  assert(outputBusChoice_ != NULL);
118 
120  dynamic_cast<wxCheckBox*>(FindWindow(ID_BIDIRECTIONAL));
121  assert(bidirectionalBox_ != NULL);
122 
123 
124  // Machine tester is used to check legality of the bridge modifications.
125  // The modified bridge has to be deleted. Otherwise it will conflict
126  // with the modification legality checks.
127 
128  // save bridge information and delete the bridges
129  machine_ = bridge->machine();
132  name_ = WxConversion::toWxString(bridge->name());
133  if (opposite != NULL) {
134  bidirectional_ = true;
136  assert(opposite->sourceBus() == bridge->destinationBus());
137  assert(opposite->destinationBus() == bridge->sourceBus());
138  delete opposite;
139  } else {
140  bidirectional_ = false;
141  }
142  delete bridge;
143 
144  // set widget texts
145  setTexts();
146 
148 }

References assert, MDFView::canvas(), MachineCanvasTool::deactivate(), MachineCanvas::tool(), and WxConversion::toWxString().

Here is the call graph for this function:

◆ ~BridgeDialog()

BridgeDialog::~BridgeDialog ( )
virtual

The Destructor.

Definition at line 154 of file BridgeDialog.cc.

154  {
155 }

Member Function Documentation

◆ createContents()

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

Creates the dialog window contents.

This method was initially generated with wxDesigner, thus the ugly code and too long lines.

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 469 of file BridgeDialog.cc.

469  {
470 
471  wxBoxSizer *item0 = new wxBoxSizer( wxVERTICAL );
472 
473  wxBoxSizer *item1 = new wxBoxSizer( wxHORIZONTAL );
474 
475  wxFlexGridSizer *item2 = new wxFlexGridSizer( 2, 0, 0 );
476 
477  wxStaticText *item3 = new wxStaticText( parent, ID_LABEL_NAME, wxT("Name:"), wxDefaultPosition, wxDefaultSize, 0 );
478  item2->Add( item3, 0, wxALL, 5 );
479 
480  wxTextCtrl *item4 = new wxTextCtrl( parent, ID_NAME, wxT(""), wxDefaultPosition, wxSize(120,-1), 0 );
481  item2->Add( item4, 0, wxALIGN_CENTER|wxALL, 5 );
482 
483  wxStaticText *item5 = new wxStaticText( parent, ID_LABEL_INPUT_BUS, wxT("Input Bus:"), wxDefaultPosition, wxDefaultSize, 0 );
484  item2->Add( item5, 0, wxALL, 5 );
485 
486  wxString *strs6 = (wxString*) NULL;
487  wxChoice *item6 = new wxChoice( parent, ID_INPUT_BUS, wxDefaultPosition, wxSize(100,-1), 0, strs6, 0 );
488  item2->Add( item6, 0, wxGROW|wxALL, 5 );
489 
490  wxStaticText *item7 = new wxStaticText( parent, ID_LABEL_OUTPUT_BUS, wxT("Output Bus:"), wxDefaultPosition, wxDefaultSize, 0 );
491  item2->Add( item7, 0, wxALL, 5 );
492 
493  wxString *strs8 = (wxString*) NULL;
494  wxChoice *item8 = new wxChoice( parent, ID_OUTPUT_BUS, wxDefaultPosition, wxSize(100,-1), 0, strs8, 0 );
495  item2->Add( item8, 0, wxGROW|wxALL, 5 );
496 
497  item1->Add( item2, 0, wxALIGN_CENTER|wxALL, 5 );
498 
499  wxBoxSizer *item9 = new wxBoxSizer( wxVERTICAL );
500 
501  wxCheckBox *item10 = new wxCheckBox( parent, ID_BIDIRECTIONAL, wxT("Bidirectional"), wxDefaultPosition, wxDefaultSize, 0 );
502  item9->Add( item10, 0, wxALIGN_CENTER|wxALL, 5 );
503 
504  item9->Add( 20, 20, 0, wxALIGN_CENTER|wxALL, 5 );
505 
506  wxStaticText *item11 = new wxStaticText( parent, ID_LABEL_OPPOSITE_NAME, wxT("Opposite Bridge Name:"), wxDefaultPosition, wxDefaultSize, 0 );
507  item9->Add( item11, 0, wxGROW, 15 );
508 
509  wxTextCtrl *item12 = new wxTextCtrl( parent, ID_OPPOSITE_BRIDGE, wxT(""), wxDefaultPosition, wxSize(80,-1), 0 );
510  item9->Add( item12, 0, wxGROW|wxALL, 5 );
511 
512  item1->Add( item9, 0, wxGROW|wxALL, 5 );
513 
514  item0->Add( item1, 0, wxALIGN_CENTER|wxALL, 5 );
515 
516  wxStaticLine *item13 = new wxStaticLine( parent, ID_LINE, wxDefaultPosition, wxSize(20,-1), wxLI_HORIZONTAL );
517  item0->Add( item13, 0, wxGROW|wxALL, 5 );
518 
519  wxGridSizer *item14 = new wxGridSizer( 2, 0, 0 );
520 
521  wxButton *item15 = new wxButton( parent, ID_HELP, wxT("&Help"), wxDefaultPosition, wxDefaultSize, 0 );
522  item14->Add( item15, 0, wxALL, 5 );
523 
524  wxBoxSizer *item16 = new wxBoxSizer( wxHORIZONTAL );
525 
526  wxButton *item17 = new wxButton( parent, wxID_OK, wxT("&OK"), wxDefaultPosition, wxDefaultSize, 0 );
527  item16->Add( item17, 0, wxALIGN_CENTER|wxALL, 5 );
528 
529  wxButton *item18 = new wxButton( parent, wxID_CANCEL, wxT("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
530  item16->Add( item18, 0, wxALIGN_CENTER|wxALL, 5 );
531 
532  item14->Add( item16, 0, wxALL, 5 );
533 
534  item0->Add( item14, 0, wxALIGN_CENTER, 5 );
535 
536  if (set_sizer)
537  {
538  parent->SetSizer( item0 );
539  if (call_fit)
540  item0->SetSizeHints( parent );
541  }
542 
543  return item0;
544 }

◆ onBidirectional()

void BridgeDialog::onBidirectional ( wxCommandEvent &  )
private

Handles changes in bidirectional control.

When bdirectional is on, the opposite bridge name control is enabled, otherwise it is disabled.

Definition at line 444 of file BridgeDialog.cc.

444  {
445  if (bidirectionalBox_->IsChecked()) {
446  oppositeNameCtrl_->Enable();
447  bidirectional_ = true;
448  } else {
449  oppositeNameCtrl_->Disable();
450  bidirectional_ = false;
451  }
452  wxCommandEvent dummy;
453  onName(dummy);
454 }

References dummy.

◆ onCancel()

void BridgeDialog::onCancel ( wxCommandEvent &  )
private

Definition at line 354 of file BridgeDialog.cc.

354  {
355  MDFView* view =
356  dynamic_cast<MDFView*>(wxGetApp().docManager()->GetCurrentView());
357  view->canvas()->tool()->activate();
358  EndModal(wxID_CANCEL);
359 }

References MachineCanvasTool::activate(), MDFView::canvas(), and MachineCanvas::tool().

Here is the call graph for this function:

◆ onHelp()

void BridgeDialog::onHelp ( wxCommandEvent &  event)
private

◆ onInputBus()

void BridgeDialog::onInputBus ( wxCommandEvent &  )
private

Handles changes in the input bus control.

Output bus choicer is updated to contain only valid output busses for the selected input bus.

Definition at line 408 of file BridgeDialog.cc.

408  {
409 
410  string outputBus =
411  WxConversion::toString(outputBusChoice_->GetStringSelection());
412  string inputBus =
413  WxConversion::toString(inputBusChoice_->GetStringSelection());
414 
415  MachineTester tester(*machine_);
417  Bus* source = navigator.item(inputBus);
418  Bus* destination = navigator.item(outputBus);
419 
420  if (!tester.canBridge(*source, *destination)) {
421  outputBus = "";
422  for (int i=0; i < navigator.count(); i++) {
423  if (tester.canBridge(*source, *navigator.item(i))) {
424  outputBus = navigator.item(i)->name();
425  break;
426  }
427  }
428  assert(outputBus != "");
430  }
431 
434 }

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

Here is the call graph for this function:

◆ onName()

void BridgeDialog::onName ( wxCommandEvent &  )
private

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

Definition at line 366 of file BridgeDialog.cc.

366  {
367 
368  wxTextCtrl* nameCtrl = dynamic_cast<wxTextCtrl*>(FindWindow(ID_NAME));
369  wxTextCtrl* oppNameCtrl =
370  dynamic_cast<wxTextCtrl*>(FindWindow(ID_OPPOSITE_BRIDGE));
371 
372  wxString name = nameCtrl->GetValue();
373  wxString trimmedName = name.Trim(false).Trim(true);
374  wxString oppositeName = oppNameCtrl->GetValue();
375  wxString trimmedOppositeName = oppositeName.Trim(false).Trim(true);
376 
377  if (trimmedName == _T("") ||
378  (bidirectional_ && trimmedOppositeName == _T(""))) {
379 
380  FindWindow(wxID_OK)->Disable();
381  } else {
382  FindWindow(wxID_OK)->Enable();
383  }
384 }

◆ onOK()

void BridgeDialog::onOK ( wxCommandEvent &  )
private

Validates input in the controls, and updates the Bridge object.

Definition at line 263 of file BridgeDialog.cc.

263  {
264 
265  if (!Validate()) {
266  return;
267  }
268 
269  if (!TransferDataFromWindow()) {
270  return;
271  }
272 
273  string trimmedName = WxConversion::toString(name_.Trim(false).Trim(true));
274  string trimmedOppName =
275  WxConversion::toString(oppositeName_.Trim(false).Trim(true));
276 
277  // Check the name validity.
278  if (!MachineTester::isValidComponentName(trimmedName) ||
279  (bidirectional_ &&
280  !MachineTester::isValidComponentName(trimmedOppName))) {
281 
283  format message =
285  InformationDialog warning(
286  this, WxConversion::toWxString(message.str()));
287  warning.ShowModal();
288  return;
289  }
290 
291  // Check that the opposing bridge names aren't same.
292  if (bidirectional_ && trimmedName == trimmedOppName) {
294  format message =
296  WarningDialog warning(this, WxConversion::toWxString(message.str()));
297  warning.ShowModal();
298  return;
299  }
300 
302 
303  // Check that the opposite bridge name is not reserved.
304  if (bidirectional_ && navigator.hasItem(trimmedOppName)) {
305  ProDeTextGenerator* generator =
307  format message =
309  string component =
310  generator->text(ProDeTextGenerator::COMP_A_BRIDGE).str();
311  message % trimmedOppName % component;
312  WarningDialog warning(this, WxConversion::toWxString(message.str()));
313  warning.ShowModal();
314  return;
315  }
316  // Check that the bridge name is not reserved.
317  if (navigator.hasItem(trimmedName)) {
318  ProDeTextGenerator* generator =
320  format message =
322  string acomponent =
323  generator->text(ProDeTextGenerator::COMP_A_BRIDGE).str();
324  string machine =
325  generator->text(ProDeTextGenerator::COMP_MACHINE).str();
326  string component =
327  generator->text(ProDeTextGenerator::COMP_BRIDGE).str();
328 
329  message % trimmedName % acomponent % machine % component;
330  WarningDialog warning(this, WxConversion::toWxString(message.str()));
331  warning.ShowModal();
332  return;
333  }
334 
335  Machine::BusNavigator busNavigator = machine_->busNavigator();
336  MachineTester tester(*machine_);
337  Bus* source = busNavigator.item(WxConversion::toString(inputBus_));
338  Bus* destination = busNavigator.item(WxConversion::toString(outputBus_));
339 
340  // Add the new/modified bridges to the machine.
341  new Bridge(trimmedName, *source, *destination);
342 
343  if (bidirectional_ && tester.canBridge(*destination, *source)) {
344  new Bridge(trimmedOppName, *destination, *source);
345  }
346  MDFView* view =
347  dynamic_cast<MDFView*>(wxGetApp().docManager()->GetCurrentView());
348  view->canvas()->tool()->activate();
349  EndModal(wxID_OK);
350 }

References MachineCanvasTool::activate(), MachineTester::canBridge(), MDFView::canvas(), ProDeTextGenerator::COMP_A_BRIDGE, ProDeTextGenerator::COMP_BRIDGE, ProDeTextGenerator::COMP_MACHINE, TTAMachine::Machine::Navigator< ComponentType >::hasItem(), ProDeTextGenerator::instance(), MachineTester::isValidComponentName(), TTAMachine::Machine::Navigator< ComponentType >::item(), machine, ProDeTextGenerator::MSG_ERROR_BRIDGE_NAMES, ProDeTextGenerator::MSG_ERROR_ILLEGAL_NAME, ProDeTextGenerator::MSG_ERROR_SAME_NAME, Texts::TextGenerator::text(), MachineCanvas::tool(), WxConversion::toString(), and WxConversion::toWxString().

Here is the call graph for this function:

◆ onOutputBus()

void BridgeDialog::onOutputBus ( wxCommandEvent &  )
private

Handles changes in input bus control.

Checks that input bus is not the same as output bus. If it is the output bus is changed to the previous value of the input bus.

Definition at line 394 of file BridgeDialog.cc.

394  {
395  wxString outputBus = outputBusChoice_->GetStringSelection();
396  outputBus_ = outputBus;
398 }

◆ setTexts()

void BridgeDialog::setTexts ( )
private

Sets texts for widgets.

Definition at line 162 of file BridgeDialog.cc.

References GUITextGenerator::instance(), ProDeTextGenerator::instance(), WidgetTools::setLabel(), Texts::TextGenerator::text(), WxConversion::toWxString(), ProDeTextGenerator::TXT_BRIDGE_DIALOG_TITLE, GUITextGenerator::TXT_BUTTON_CANCEL, GUITextGenerator::TXT_BUTTON_HELP, GUITextGenerator::TXT_BUTTON_OK, ProDeTextGenerator::TXT_LABEL_BIDIRECTIONAL, ProDeTextGenerator::TXT_LABEL_INPUT_BUS, ProDeTextGenerator::TXT_LABEL_NAME, ProDeTextGenerator::TXT_LABEL_OPPOSITE_BRIDGE, and ProDeTextGenerator::TXT_LABEL_OUTPUT_BUS.

Here is the call graph for this function:

◆ TransferDataToWindow()

bool BridgeDialog::TransferDataToWindow ( )
privatevirtual

Transfers data from the bridge object(s) to the dialog widgets.

Returns
False, if an error occured in the transfer, true otherwise.

Definition at line 203 of file BridgeDialog.cc.

203  {
204 
206  if (bidirectional_) {
207  oppositeNameCtrl_->Enable();
208  } else {
209  oppositeNameCtrl_->Disable();
210  }
211 
213 
214  bool transferResult = wxWindow::TransferDataToWindow();
215 
216  // Force update of the OK-button enabled/disabled state.
217  wxCommandEvent dummy;
218  onName(dummy);
219 
220  return transferResult;
221 }

References dummy.

◆ updateBusChoices()

void BridgeDialog::updateBusChoices ( )
private

Updates the bus choicers.

Definition at line 228 of file BridgeDialog.cc.

228  {
229 
231  MachineTester tester(*machine_);
232  Bus* source = navigator.item(WxConversion::toString(inputBus_));
233 
234  // Add input buses which can be bridged.
235  inputBusChoice_->Clear();
236  for (int i = 0;i < navigator.count(); i++) {
237  wxString busName = WxConversion::toWxString(navigator.item(i)->name());
238  for (int j = 0;j < navigator.count(); j++) {
239  if (tester.canBridge(*navigator.item(i), *navigator.item(j))) {
240  inputBusChoice_->Append(busName);
241  break;
242  }
243  }
244  }
245  inputBusChoice_->SetStringSelection(inputBus_);
246 
247  // Add outputbuses which are legal for the current input bus.
248  outputBusChoice_->Clear();
249  for (int i = 0;i < navigator.count(); i++) {
250  wxString busName = WxConversion::toWxString(navigator.item(i)->name());
251  if (tester.canBridge(*source, *navigator.item(i))) {
252  outputBusChoice_->Append(busName);
253  }
254  }
255  outputBusChoice_->SetStringSelection(outputBus_);
256 }

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

Here is the call graph for this function:

Member Data Documentation

◆ adding_

bool BridgeDialog::adding_
private

Indicates whether we are adding a bridge or not.

Definition at line 93 of file BridgeDialog.hh.

◆ bidirectional_

bool BridgeDialog::bidirectional_
private

Indicates whether we are modifying a bidirectional bridge or not.

Definition at line 95 of file BridgeDialog.hh.

◆ bidirectionalBox_

wxCheckBox* BridgeDialog::bidirectionalBox_
private

Indicates whether the bridge is bidirectional.

Definition at line 90 of file BridgeDialog.hh.

◆ inputBus_

wxString BridgeDialog::inputBus_
private

Name of the bridge input bus.

Definition at line 79 of file BridgeDialog.hh.

◆ inputBusChoice_

wxChoice* BridgeDialog::inputBusChoice_
private

Input bus choice control.

Definition at line 86 of file BridgeDialog.hh.

◆ machine_

TTAMachine::Machine* BridgeDialog::machine_
private

Parent machine of the bridge(s).

Definition at line 72 of file BridgeDialog.hh.

◆ name_

wxString BridgeDialog::name_
private

Name of the bridge.

Definition at line 74 of file BridgeDialog.hh.

◆ oppositeName_

wxString BridgeDialog::oppositeName_
private

Name of the opposite bridge.

Definition at line 76 of file BridgeDialog.hh.

◆ oppositeNameCtrl_

wxTextCtrl* BridgeDialog::oppositeNameCtrl_
private

Opposite name control.

Definition at line 84 of file BridgeDialog.hh.

◆ outputBus_

wxString BridgeDialog::outputBus_
private

Name of the bridge output bus.

Definition at line 81 of file BridgeDialog.hh.

◆ outputBusChoice_

wxChoice* BridgeDialog::outputBusChoice_
private

Output bus choice control.

Definition at line 88 of file BridgeDialog.hh.


The documentation for this class was generated from the following files:
BridgeDialog::ID_OPPOSITE_BRIDGE
@ ID_OPPOSITE_BRIDGE
Definition: BridgeDialog.hh:102
BridgeDialog::bidirectionalBox_
wxCheckBox * bidirectionalBox_
Indicates whether the bridge is bidirectional.
Definition: BridgeDialog.hh:90
WarningDialog
Definition: WarningDialog.hh:42
BridgeDialog::inputBus_
wxString inputBus_
Name of the bridge input bus.
Definition: BridgeDialog.hh:79
BridgeDialog::onName
void onName(wxCommandEvent &)
Definition: BridgeDialog.cc:366
BridgeDialog::ID_LABEL_NAME
@ ID_LABEL_NAME
Definition: BridgeDialog.hh:105
TTAMachine::Bridge::sourceBus
Bus * sourceBus() const
WxConversion::toWxString
static wxString toWxString(const std::string &source)
TTAMachine::Bridge::destinationBus
Bus * destinationBus() const
BridgeDialog::outputBusChoice_
wxChoice * outputBusChoice_
Output bus choice control.
Definition: BridgeDialog.hh:88
TTAMachine::Component::name
virtual TCEString name() const
Definition: MachinePart.cc:125
BridgeDialog::ID_OUTPUT_BUS
@ ID_OUTPUT_BUS
Definition: BridgeDialog.hh:100
ProDeTextGenerator::COMP_BRIDGE
@ COMP_BRIDGE
Name for bridge component.
Definition: ProDeTextGenerator.hh:259
machine
TTAMachine::Machine * machine
the architecture definition of the estimated processor
Definition: EstimatorCmdLineUI.cc:59
MDFView::canvas
MachineCanvas * canvas() const
Definition: MDFView.cc:229
TTAMachine::Bridge
Definition: Bridge.hh:51
BridgeDialog::name_
wxString name_
Name of the bridge.
Definition: BridgeDialog.hh:74
WidgetTools::setLabel
static void setLabel(Texts::TextGenerator *generator, wxWindow *widget, int textID)
Definition: WidgetTools.cc:92
TTAMachine::Bus
Definition: Bus.hh:53
BridgeDialog::setTexts
void setTexts()
Definition: BridgeDialog.cc:162
GUITextGenerator::instance
static GUITextGenerator * instance()
Definition: GUITextGenerator.cc:67
BridgeDialog::ID_LABEL_OPPOSITE_NAME
@ ID_LABEL_OPPOSITE_NAME
Definition: BridgeDialog.hh:106
GUITextGenerator
Definition: GUITextGenerator.hh:46
GUITextGenerator::TXT_BUTTON_HELP
@ TXT_BUTTON_HELP
Label for help button.
Definition: GUITextGenerator.hh:60
FindWindow
Definition: FindWindow.hh:49
TTAMachine::Machine::Navigator::count
int count() const
Texts::TextGenerator::text
virtual boost::format text(int textId)
Definition: TextGenerator.cc:94
ProDeTextGenerator::TXT_LABEL_BIDIRECTIONAL
@ TXT_LABEL_BIDIRECTIONAL
Label for bidirectional checkbox.
Definition: ProDeTextGenerator.hh:82
BridgeDialog::createContents
wxSizer * createContents(wxWindow *parent, bool call_fit, bool set_sizer)
Definition: BridgeDialog.cc:469
ProDeTextGenerator
Definition: ProDeTextGenerator.hh:49
ProDeTextGenerator::TXT_BRIDGE_DIALOG_TITLE
@ TXT_BRIDGE_DIALOG_TITLE
Bridge dialog title.
Definition: ProDeTextGenerator.hh:195
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
assert
#define assert(condition)
Definition: Application.hh:86
ProDeTextGenerator::TXT_LABEL_OUTPUT_BUS
@ TXT_LABEL_OUTPUT_BUS
Label for output bus widget.
Definition: ProDeTextGenerator.hh:81
GUITextGenerator::TXT_BUTTON_CANCEL
@ TXT_BUTTON_CANCEL
Label for cancel button.
Definition: GUITextGenerator.hh:55
BridgeDialog::ID_NAME
@ ID_NAME
Definition: BridgeDialog.hh:99
BridgeDialog::ID_LABEL_OUTPUT_BUS
@ ID_LABEL_OUTPUT_BUS
Definition: BridgeDialog.hh:108
MachineCanvasTool::activate
virtual void activate()=0
TTAMachine::Machine::bridgeNavigator
virtual BridgeNavigator bridgeNavigator() const
Definition: Machine.cc:404
BridgeDialog::ID_BIDIRECTIONAL
@ ID_BIDIRECTIONAL
Definition: BridgeDialog.hh:103
ProDeTextGenerator::TXT_LABEL_OPPOSITE_BRIDGE
@ TXT_LABEL_OPPOSITE_BRIDGE
Label for opposite bridge name.
Definition: ProDeTextGenerator.hh:79
dummy
SimValue dummy(32)
a dummy simvalue which is given for operands that are not bound
TTAMachine::Machine::Navigator::hasItem
bool hasItem(const std::string &name) const
BridgeDialog::TransferDataToWindow
virtual bool TransferDataToWindow()
Definition: BridgeDialog.cc:203
ProDeTextGenerator::TXT_LABEL_NAME
@ TXT_LABEL_NAME
Label for component name widget.
Definition: ProDeTextGenerator.hh:56
MachineCanvas::tool
MachineCanvasTool * tool()
Definition: MachineCanvas.cc:318
ProDeTextGenerator::MSG_ERROR_BRIDGE_NAMES
@ MSG_ERROR_BRIDGE_NAMES
Error: Opposing brdgs w/same name.
Definition: ProDeTextGenerator.hh:234
BridgeDialog::machine_
TTAMachine::Machine * machine_
Parent machine of the bridge(s).
Definition: BridgeDialog.hh:72
MachineTester::isValidComponentName
static bool isValidComponentName(const std::string &name)
Definition: MachineTester.cc:312
BridgeDialog::ID_LABEL_INPUT_BUS
@ ID_LABEL_INPUT_BUS
Definition: BridgeDialog.hh:107
ProDeTextGenerator::instance
static ProDeTextGenerator * instance()
Definition: ProDeTextGenerator.cc:382
BridgeDialog::ID_HELP
@ ID_HELP
Definition: BridgeDialog.hh:104
BridgeDialog::oppositeName_
wxString oppositeName_
Name of the opposite bridge.
Definition: BridgeDialog.hh:76
ProDeTextGenerator::TXT_LABEL_INPUT_BUS
@ TXT_LABEL_INPUT_BUS
Label for input bus widget.
Definition: ProDeTextGenerator.hh:80
TTAMachine::Component::machine
virtual Machine * machine() const
TTAMachine::Machine::busNavigator
virtual BusNavigator busNavigator() const
Definition: Machine.cc:356
ProDeTextGenerator::COMP_MACHINE
@ COMP_MACHINE
Text for machine description.
Definition: ProDeTextGenerator.hh:252
TTAMachine::Machine::Navigator::item
ComponentType * item(int index) const
BridgeDialog::updateBusChoices
void updateBusChoices()
Definition: BridgeDialog.cc:228
InformationDialog
Definition: InformationDialog.hh:42
MachineTester
Definition: MachineTester.hh:46
WxConversion::toString
static std::string toString(const wxString &source)
MachineCanvasTool::deactivate
virtual void deactivate()=0
TTAMachine::Machine::Navigator
Definition: Machine.hh:186
BridgeDialog::ID_LINE
@ ID_LINE
Definition: BridgeDialog.hh:109
BridgeDialog::oppositeNameCtrl_
wxTextCtrl * oppositeNameCtrl_
Opposite name control.
Definition: BridgeDialog.hh:84
ProDeTextGenerator::COMP_A_BRIDGE
@ COMP_A_BRIDGE
Name for bridge (w/ article).
Definition: ProDeTextGenerator.hh:260
BridgeDialog::ID_INPUT_BUS
@ ID_INPUT_BUS
Definition: BridgeDialog.hh:101
BridgeDialog::inputBusChoice_
wxChoice * inputBusChoice_
Input bus choice control.
Definition: BridgeDialog.hh:86
BridgeDialog::bidirectional_
bool bidirectional_
Indicates whether we are modifying a bidirectional bridge or not.
Definition: BridgeDialog.hh:95
BridgeDialog::outputBus_
wxString outputBus_
Name of the bridge output bus.
Definition: BridgeDialog.hh:81
MDFView
Definition: MDFView.hh:59
GUITextGenerator::TXT_BUTTON_OK
@ TXT_BUTTON_OK
Label for OK button.
Definition: GUITextGenerator.hh:59