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

#include <OperationPropertyDialog.hh>

Inheritance diagram for OperationPropertyDialog:
Inheritance graph
Collaboration diagram for OperationPropertyDialog:
Collaboration graph

Public Member Functions

 OperationPropertyDialog (wxWindow *parent, Operation *op, OperationModule &module, const std::string &path)
 
virtual ~OperationPropertyDialog ()
 
Operationoperation () const
 

Private Types

enum  {
  ID_TEXT_NAME = 1000, ID_NAME, ID_READS_MEMORY, ID_WRITES_MEMORY,
  ID_CAN_TRAP, ID_HAS_SIDE_EFFECTS, ID_CLOCKED, ID_AFFECTED_BY,
  ID_OPERATION_AFFECTED_BY, ID_AFFECTED_ADD_BUTTON, ID_AFFECTED_DELETE_BUTTON, ID_INPUT_OPERANDS,
  ID_INPUT_UP_BUTTON, ID_INPUT_DOWN_BUTTON, ID_INPUT_ADD_BUTTON, ID_INPUT_MODIFY_BUTTON,
  ID_INPUT_DELETE_BUTTON, ID_AFFECTS, ID_OPERATION_AFFECTS, ID_AFFECTS_ADD_BUTTON,
  ID_AFFECTS_DELETE_BUTTON, ID_OUTPUT_OPERANDS, ID_OUTPUT_UP_BUTTON, ID_OUTPUT_DOWN_BUTTON,
  ID_OUTPUT_ADD_BUTTON, ID_OUTPUT_MODIFY_BUTTON, ID_OUTPUT_DELETE_BUTTON, ID_OPEN_BUTTON,
  ID_DAG_BUTTON, ID_OK_BUTTON, ID_TEXT_CTRL, ID_TEXT_OPEN,
  ID_EDIT_DESCRIPTION
}
 

Private Member Functions

 OperationPropertyDialog (const OperationPropertyDialog &)
 Copying not allowed. More...
 
OperationPropertyDialogoperator= (const OperationPropertyDialog &)
 Assignment not allowed. More...
 
wxSizer * createContents (wxWindow *parent, bool call_fit, bool set_sizer)
 
wxBitmap createBitmaps (size_t index)
 
virtual bool TransferDataToWindow ()
 
void updateOperands ()
 
void updateIndex ()
 
void updateDAG ()
 
void updateAffected ()
 
void updateTypes ()
 
void onSelection (wxListEvent &event)
 
void onAddAffectedBy (wxCommandEvent &event)
 
void onDeleteAffectedBy (wxCommandEvent &event)
 
void onAddAffects (wxCommandEvent &event)
 
void onDeleteAffects (wxCommandEvent &event)
 
void onAddInputOperand (wxCommandEvent &event)
 
void onModifyInputOperand (wxCommandEvent &event)
 
void onDeleteInputOperand (wxCommandEvent &event)
 
void onAddOutputOperand (wxCommandEvent &event)
 
void onModifyOutputOperand (wxCommandEvent &event)
 
void onDeleteOutputOperand (wxCommandEvent &event)
 
void onMoveInputUp (wxCommandEvent &event)
 
void onMoveInputDown (wxCommandEvent &event)
 
void onMoveOutputUp (wxCommandEvent &event)
 
void onMoveOutputDown (wxCommandEvent &event)
 
void onOpen (wxCommandEvent &event)
 
void onOpenDAG (wxCommandEvent &event)
 
void onSaveDAG (wxCommandEvent &event)
 
void onUndoDAG (wxCommandEvent &event)
 
void onDeleteDAG (wxCommandEvent &event)
 
void onNewDAG (wxCommandEvent &event)
 
void onDAGChange (wxCommandEvent &event)
 
void onComboBoxChange (wxCommandEvent &event)
 
void moveUp (std::vector< Operand * > &ops, int id, wxListCtrl *list)
 
void moveDown (std::vector< Operand * > &ops, int id, wxListCtrl *list)
 
std::vector< std::string > getSelectedItems (wxListCtrl *listCtrl)
 
void onOk (wxCommandEvent &event)
 
ObjectStatesaveOperation ()
 
void setTexts ()
 
void setBehaviorLabel ()
 
void launchEditor (const std::string &cmd)
 
void updateSwapLists (std::vector< std::string > deletedOperands)
 
void updateOperation (bool newOpDag)
 

Private Attributes

wxStaticBoxSizer * inputSizer_
 Input operand sizer. More...
 
wxStaticBoxSizer * outputSizer_
 Output operand sizer. More...
 
wxStaticBoxSizer * affectsSizer_
 Affects sizer. More...
 
wxStaticBoxSizer * affectedBySizer_
 Affected by sizer. More...
 
wxListCtrl * affectedByList_
 List of affected by operations. More...
 
wxListCtrl * affectsList_
 List of affects operations. More...
 
wxListCtrl * inputOperandList_
 List of input operands. More...
 
wxListCtrl * outputOperandList_
 List of output operands. More...
 
wxComboBox * affectedByChoice_
 Choice box for new affected by operations. More...
 
wxComboBox * affectsChoice_
 Choice box for new affects operations. More...
 
wxCheckBox * readMemoryCB_
 Read memory check box. More...
 
wxCheckBox * writeMemoryCB_
 Write memory check box. More...
 
wxCheckBox * canTrapCB_
 Can trap check box. More...
 
wxCheckBox * sideEffectsCB_
 Has side effects check box. More...
 
wxCheckBox * clockedCB_
 Clocked check box. More...
 
Operationoperation_
 Operation to be created or to be modified. More...
 
ObjectStateorig_
 Original operation's ObjectState tree. More...
 
wxString name_
 Name of the operation. More...
 
OperationModulemodule_
 Module in which operation belongs to. More...
 
std::string path_
 Path in which module belongs to. More...
 
bool readMemory_
 Does operation read memory? More...
 
bool writeMemory_
 Does operation write memory? More...
 
bool canTrap_
 Can operation trap? More...
 
bool hasSideEffects_
 Does operation has side effects? More...
 
bool clocked_
 Is operation clocked? More...
 
bool controlFlow_
 Can operation can change program flow. More...
 
bool isCall_
 Operation performs function call. More...
 
bool isBranch_
 Operation is branch. More...
 
wxTextCtrl * editDescription_
 
std::vector< Operand * > inputOperands_
 Input operands. More...
 
std::vector< Operand * > outputOperands_
 Output operands. More...
 
std::vector< std::string > affects_
 Operations that affects this operation. More...
 
std::vector< std::string > affectedBy_
 Operations that are affected by this operation. More...
 
bool operationWasCreatedHere_
 

Detailed Description

Dialog which is used to create or modify an operation.

Definition at line 51 of file OperationPropertyDialog.hh.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private

Component ids.

Enumerator
ID_TEXT_NAME 
ID_NAME 
ID_READS_MEMORY 
ID_WRITES_MEMORY 
ID_CAN_TRAP 
ID_HAS_SIDE_EFFECTS 
ID_CLOCKED 
ID_AFFECTED_BY 
ID_OPERATION_AFFECTED_BY 
ID_AFFECTED_ADD_BUTTON 
ID_AFFECTED_DELETE_BUTTON 
ID_INPUT_OPERANDS 
ID_INPUT_UP_BUTTON 
ID_INPUT_DOWN_BUTTON 
ID_INPUT_ADD_BUTTON 
ID_INPUT_MODIFY_BUTTON 
ID_INPUT_DELETE_BUTTON 
ID_AFFECTS 
ID_OPERATION_AFFECTS 
ID_AFFECTS_ADD_BUTTON 
ID_AFFECTS_DELETE_BUTTON 
ID_OUTPUT_OPERANDS 
ID_OUTPUT_UP_BUTTON 
ID_OUTPUT_DOWN_BUTTON 
ID_OUTPUT_ADD_BUTTON 
ID_OUTPUT_MODIFY_BUTTON 
ID_OUTPUT_DELETE_BUTTON 
ID_OPEN_BUTTON 
ID_DAG_BUTTON 
ID_OK_BUTTON 
ID_TEXT_CTRL 
ID_TEXT_OPEN 
ID_EDIT_DESCRIPTION 

Definition at line 118 of file OperationPropertyDialog.hh.

Constructor & Destructor Documentation

◆ OperationPropertyDialog() [1/2]

OperationPropertyDialog::OperationPropertyDialog ( wxWindow *  parent,
Operation op,
OperationModule module,
const std::string &  path 
)

Constructor.

Parameters
parentThe parent window.
opOperation to be created or modified.
moduleModule in which operation belongs to.
pathPath in which module belongs to.

Definition at line 122 of file OperationPropertyDialog.cc.

126  :
127  wxDialog(
128  parent, -1, _T(""),
130  wxDefaultSize, wxRESIZE_BORDER),
131  operation_(op), name_(_T("")), module_(module), path_(path),
132  operationWasCreatedHere_(false) {
133 
134  createContents(this, true, true);
135 
136  affectedByList_ = dynamic_cast<wxListCtrl*>(FindWindow(ID_AFFECTED_BY));
137  affectsList_ = dynamic_cast<wxListCtrl*>(FindWindow(ID_AFFECTS));
139  dynamic_cast<wxListCtrl*>(FindWindow(ID_INPUT_OPERANDS));
141  dynamic_cast<wxListCtrl*>(FindWindow(ID_OUTPUT_OPERANDS));
143  dynamic_cast<wxComboBox*>(FindWindow(ID_OPERATION_AFFECTED_BY));
145  dynamic_cast<wxComboBox*>(FindWindow(ID_OPERATION_AFFECTS));
146  readMemoryCB_ = dynamic_cast<wxCheckBox*>(FindWindow(ID_READS_MEMORY));
147  writeMemoryCB_ = dynamic_cast<wxCheckBox*>(FindWindow(ID_WRITES_MEMORY));
148  canTrapCB_ = dynamic_cast<wxCheckBox*>(FindWindow(ID_CAN_TRAP));
150  dynamic_cast<wxCheckBox*>(FindWindow(ID_HAS_SIDE_EFFECTS));
151  clockedCB_ =
152  dynamic_cast<wxCheckBox*>(FindWindow(ID_CLOCKED));
153 
154  editDescription_ = dynamic_cast<wxTextCtrl*>(FindWindow(ID_EDIT_DESCRIPTION));
155 
156  FindWindow(ID_NAME)->SetValidator(
157  wxTextValidator(wxFILTER_ASCII, &name_));
158 
159  FindWindow(ID_READS_MEMORY)->SetValidator(
160  wxGenericValidator(&readMemory_));
161 
162  FindWindow(ID_WRITES_MEMORY)->SetValidator(
163  wxGenericValidator(&writeMemory_));
164 
165  FindWindow(ID_CAN_TRAP)->SetValidator(wxGenericValidator(&canTrap_));
166 
167  FindWindow(ID_HAS_SIDE_EFFECTS)->SetValidator(
168  wxGenericValidator(&hasSideEffects_));
169 
170  FindWindow(ID_CLOCKED)->SetValidator(
171  wxGenericValidator(&clocked_));
172 
173  // set OK button as default choice
174  FindWindow(ID_OK_BUTTON)->SetFocus();
175 
176  if (operation_ != NULL) {
177  for (int i = 1; i <= operation_->numberOfInputs(); i++) {
178  Operand* op = new Operand(operation_->operand(i));
179  inputOperands_.push_back(op);
180  }
181 
182  for (int i = operation_->numberOfInputs() + 1;
183  i <= operation_->numberOfInputs() + operation_->numberOfOutputs(); i++) {
184 
185  Operand* op = new Operand(operation_->operand(i));
186  outputOperands_.push_back(op);
187  }
188 
189  for (int i = 0; i < operation_->affectsCount(); i++) {
190  affects_.push_back(operation_->affects(i));
191  }
192 
193  for (int i = 0; i < operation_->affectedByCount(); i++) {
194  affectedBy_.push_back(operation_->affectedBy(i));
195  }
196  } else {
199  }
200 
201  orig_ = operation_->saveState(); // save original operation's state
202 
203  setTexts();
204 }

References NullOperationBehavior::instance().

Here is the call graph for this function:

◆ ~OperationPropertyDialog()

OperationPropertyDialog::~OperationPropertyDialog ( )
virtual

Destructor.

Definition at line 209 of file OperationPropertyDialog.cc.

209  {
210 
211  for (unsigned int i = 0; i < inputOperands_.size(); i++) {
212  delete inputOperands_[i];
213  }
214 
215  for (unsigned int i = 0; i < outputOperands_.size(); i++) {
216  delete outputOperands_[i];
217  }
218 
219  int x, y;
220  GetPosition(&x, &y);
221  wxPoint point(x, y);
223 
225  delete operation_;
226  operation_ = NULL;
227  }
228 }

References DialogPosition::DIALOG_PROPERTIES, inputOperands_, operation_, operationWasCreatedHere_, outputOperands_, and DialogPosition::setPosition().

Here is the call graph for this function:

◆ OperationPropertyDialog() [2/2]

OperationPropertyDialog::OperationPropertyDialog ( const OperationPropertyDialog )
private

Copying not allowed.

Member Function Documentation

◆ createBitmaps()

wxBitmap OperationPropertyDialog::createBitmaps ( size_t  index)
private

Creates the bitmaps.

NOTE! This function was created by wxDesigner.

Parameters
indexIndex of the bitmap.
Returns
The bitmap.

Definition at line 1507 of file OperationPropertyDialog.cc.

1507  {
1508  if (index == 0)
1509  {
1510  /* XPM */
1511  static const char *xpm_data[] = {
1512  /* columns rows colors chars-per-pixel */
1513  "16 30 2 1",
1514  " c None",
1515  "a c Black",
1516  /* pixels */
1517  " ",
1518  " ",
1519  " ",
1520  " aa ",
1521  " aaaa ",
1522  " aaaaaa ",
1523  " aa aa aa ",
1524  " aa aa aa ",
1525  " aa aa aa ",
1526  " aa aa aa ",
1527  " a aa a ",
1528  " aa ",
1529  " aa ",
1530  " aa ",
1531  " aa ",
1532  " aa ",
1533  " aa ",
1534  " aa ",
1535  " aa ",
1536  " aa ",
1537  " aa ",
1538  " aa ",
1539  " aa ",
1540  " aa ",
1541  " aa ",
1542  " aa ",
1543  " aa ",
1544  " aa ",
1545  " aa ",
1546  " "
1547  };
1548  wxBitmap bitmap(xpm_data);
1549  return bitmap;
1550  }
1551  if (index == 1)
1552  {
1553  /* XPM */
1554  static const char *xpm_data[] = {
1555  /* columns rows colors chars-per-pixel */
1556  "16 30 2 1",
1557  " c None",
1558  "a c Black",
1559  /* pixels */
1560  " ",
1561  " aa ",
1562  " aa ",
1563  " aa ",
1564  " aa ",
1565  " aa ",
1566  " aa ",
1567  " aa ",
1568  " aa ",
1569  " aa ",
1570  " aa ",
1571  " aa ",
1572  " aa ",
1573  " aa ",
1574  " aa ",
1575  " aa ",
1576  " aa ",
1577  " aa ",
1578  " aa ",
1579  " aa ",
1580  " a aa a ",
1581  " aa aa aa ",
1582  " aa aa aa ",
1583  " aa aa aa ",
1584  " aaaaaa ",
1585  " aaaa ",
1586  " aa ",
1587  " ",
1588  " ",
1589  " "
1590  };
1591  wxBitmap bitmap(xpm_data);
1592  return bitmap;
1593  }
1594  return wxNullBitmap;
1595 }

References OperationPool::index().

Referenced by createContents().

Here is the call graph for this function:

◆ createContents()

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

Creates the contents of the dialog.

NOTE! This function was generated by wxDesigner, that's why it is so ugly.

Parameters
parentParent window.
call_fitIf true, fits the contents inside the dialog.
set_sizerIf true, sets the main sizer as dialog contents.
Returns
The created sizer.

Definition at line 1271 of file OperationPropertyDialog.cc.

1274  {
1275 
1276  wxBoxSizer *item0 = new wxBoxSizer(wxVERTICAL);
1277 
1278  wxGridSizer *item1 = new wxGridSizer(2, 0, 0);
1279 
1280  wxBoxSizer *opHeaderSizer = new wxBoxSizer(wxHORIZONTAL);
1281 
1282  wxBoxSizer *nameSizer = new wxBoxSizer(wxHORIZONTAL);
1283 
1284  wxStaticText *item2 = new wxStaticText(parent, ID_TEXT_NAME, wxT("Name:"), wxDefaultPosition, wxDefaultSize, 0);
1285  nameSizer->Add(item2, 0, wxALL, 5);
1286 
1287  wxTextCtrl *item3 = new wxTextCtrl(parent, ID_NAME, wxT(""), wxDefaultPosition, wxSize(200,-1), 0);
1288  nameSizer->Add(item3, 0, wxALL, 5);
1289 
1290  wxStaticBox *opProperties = new wxStaticBox(parent, -1, wxT("Operation properties"));
1291  wxStaticBoxSizer *opPropertiesContainer = new wxStaticBoxSizer(opProperties, wxVERTICAL);
1292 
1293  opPropertiesContainer->Add(nameSizer, 0, wxGROW, 5);
1294  opPropertiesContainer->Add(item1, 0, wxGROW, 5);
1295 
1296  wxStaticBox *opDescription = new wxStaticBox(parent, -1, wxT("Operation description"));
1297  wxTextCtrl* editDescription = new wxTextCtrl(parent, ID_EDIT_DESCRIPTION, wxT(""), wxDefaultPosition, wxSize(250,50), wxTE_MULTILINE);
1298  wxStaticBoxSizer *opDescriptionContainer = new wxStaticBoxSizer(opDescription, wxHORIZONTAL);
1299 
1300  opDescriptionContainer->Add(editDescription, 0, wxALL|wxEXPAND, 5);
1301 
1302  opHeaderSizer->Add(opPropertiesContainer, 0, wxALL, 5);
1303  opHeaderSizer->Add(opDescriptionContainer, 0, wxALL|wxGROW, 5);
1304 
1305  wxCheckBox *item4 = new wxCheckBox(parent, ID_READS_MEMORY, wxT("Reads memory"), wxDefaultPosition, wxDefaultSize, 0);
1306  item1->Add(item4, 0, wxALL, 5);
1307 
1308  wxCheckBox *item5 = new wxCheckBox(parent, ID_WRITES_MEMORY, wxT("Writes memory"), wxDefaultPosition, wxDefaultSize, 0);
1309  item1->Add(item5, 0, wxALL, 5);
1310 
1311  wxCheckBox *item6 = new wxCheckBox(parent, ID_CAN_TRAP, wxT("Can trap"), wxDefaultPosition, wxDefaultSize, 0);
1312  item1->Add(item6, 0, wxALL, 5);
1313 
1314  wxCheckBox *item7 = new wxCheckBox(parent, ID_HAS_SIDE_EFFECTS, wxT("Has side effects"), wxDefaultPosition, wxDefaultSize, 0);
1315  item1->Add(item7, 0, wxALL, 5);
1316 
1317  wxCheckBox *clocked = new wxCheckBox(parent, ID_CLOCKED, wxT("Clocked"), wxDefaultPosition, wxDefaultSize, 0);
1318  item1->Add(clocked, 0, wxALL, 5);
1319 
1320  item0->Add(opHeaderSizer, 0, wxALIGN_CENTER|wxALL, 5);
1321 
1322  wxGridSizer *item8 = new wxGridSizer(2, 0, 0);
1323 
1324  wxStaticBox *item10 = new wxStaticBox(parent, -1, wxT("Affected by"));
1325  wxStaticBoxSizer *item9 = new wxStaticBoxSizer(item10, wxVERTICAL);
1326  affectedBySizer_ = item9;
1327 
1328  wxListCtrl *item11 = new wxListCtrl(parent, ID_AFFECTED_BY, wxDefaultPosition, wxSize(160,120), wxLC_REPORT|wxSUNKEN_BORDER);
1329  item9->Add(item11, 0, wxGROW|wxALL, 10);
1330 
1331  wxBoxSizer *item12 = new wxBoxSizer(wxHORIZONTAL);
1332 
1333  wxString strs13[] =
1334  {
1335  wxT("ComboItem")
1336  };
1337  wxComboBox *item13 = new wxComboBox(parent, ID_OPERATION_AFFECTED_BY, wxT(""), wxDefaultPosition, wxSize(100,-1), 1, strs13, wxCB_SORT);
1338  item12->Add(item13, 0, wxALIGN_CENTER|wxALL, 5);
1339 
1340  wxButton *item14 = new wxButton(parent, ID_AFFECTED_ADD_BUTTON, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0);
1341  item12->Add(item14, 0, wxALIGN_CENTER|wxALL, 5);
1342 
1343  wxButton *item15 = new wxButton(parent, ID_AFFECTED_DELETE_BUTTON, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0);
1344  item12->Add(item15, 0, wxALIGN_CENTER|wxALL, 5);
1345 
1346  item9->Add(item12, 0, wxGROW|wxALL, 5);
1347 
1348  item8->Add(item9, 0, wxGROW|wxALL, 5);
1349 
1350  // Operation inputs
1351  wxStaticBox *item17 = new wxStaticBox(parent, -1, wxT("Input operands"));
1352  wxStaticBoxSizer *item16 = new wxStaticBoxSizer(item17, wxVERTICAL);
1353  inputSizer_ = item16;
1354 
1355  wxBoxSizer *item18 = new wxBoxSizer(wxHORIZONTAL);
1356 
1357  wxListCtrl *item19 = new wxListCtrl(parent, ID_INPUT_OPERANDS, wxDefaultPosition, wxSize(335,120), wxLC_REPORT|wxSUNKEN_BORDER);
1358  item18->Add(item19, 0, wxALIGN_CENTER|wxALL, 5);
1359 
1360  // BoxSizer for up and down buttons
1361  wxBoxSizer *item20 = new wxBoxSizer(wxVERTICAL);
1362 
1363  // Move up and down buttons
1364  wxBitmapButton *item21 = new wxBitmapButton(parent, ID_INPUT_UP_BUTTON, createBitmaps(0), wxDefaultPosition, wxDefaultSize);
1365  item20->Add(item21, 0, wxALL, 5);
1366 
1367  wxBitmapButton *item22 = new wxBitmapButton(parent, ID_INPUT_DOWN_BUTTON, createBitmaps(1), wxDefaultPosition, wxDefaultSize);
1368  item20->Add(item22, 0, wxALIGN_CENTER|wxALL, 5);
1369 
1370  item18->Add(item20, 0, wxALIGN_CENTER|wxALL, 5);
1371 
1372  item16->Add(item18, 0, wxGROW|wxALL, 5);
1373 
1374  wxBoxSizer *item23 = new wxBoxSizer(wxHORIZONTAL);
1375 
1376  wxButton *item24 = new wxButton(parent, ID_INPUT_ADD_BUTTON, wxT("Add..."), wxDefaultPosition, wxDefaultSize, 0);
1377  item23->Add(item24, 0, wxALIGN_CENTER|wxALL, 5);
1378 
1379  wxButton *item25 = new wxButton(parent, ID_INPUT_MODIFY_BUTTON, wxT("Modify..."), wxDefaultPosition, wxDefaultSize, 0);
1380  item23->Add(item25, 0, wxALIGN_CENTER|wxALL, 5);
1381 
1382  wxButton *item26 = new wxButton(parent, ID_INPUT_DELETE_BUTTON, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0);
1383  item23->Add(item26, 0, wxALIGN_CENTER|wxALL, 5);
1384 
1385  item16->Add(item23, 0, wxALIGN_CENTER|wxALL, 5);
1386 
1387  item8->Add(item16, 0, wxGROW|wxALL, 5);
1388 
1389  wxStaticBox *item28 = new wxStaticBox(parent, -1, wxT("Affects"));
1390  wxStaticBoxSizer *item27 = new wxStaticBoxSizer(item28, wxVERTICAL);
1391  affectsSizer_ = item27;
1392 
1393  wxListCtrl *item29 = new wxListCtrl(parent, ID_AFFECTS, wxDefaultPosition, wxSize(160,120), wxLC_REPORT|wxSUNKEN_BORDER);
1394  item27->Add(item29, 0, wxGROW|wxALL, 10);
1395 
1396  wxBoxSizer *item30 = new wxBoxSizer(wxHORIZONTAL);
1397 
1398  wxString strs31[] =
1399  {
1400  wxT("ComboItem")
1401  };
1402  wxComboBox *item31 = new wxComboBox(parent, ID_OPERATION_AFFECTS, wxT(""), wxDefaultPosition, wxSize(100,-1), 1, strs31, wxCB_SORT);
1403  item30->Add(item31, 0, wxALIGN_CENTER|wxALL, 5);
1404 
1405  wxButton *item32 = new wxButton(parent, ID_AFFECTS_ADD_BUTTON, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0);
1406  item30->Add(item32, 0, wxALIGN_CENTER|wxALL, 5);
1407 
1408  wxButton *item33 = new wxButton(parent, ID_AFFECTS_DELETE_BUTTON, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0);
1409  item30->Add(item33, 0, wxALIGN_CENTER|wxALL, 5);
1410 
1411  item27->Add(item30, 0, wxGROW|wxALL, 5);
1412 
1413  item8->Add(item27, 0, wxGROW|wxALL, 5);
1414 
1415  wxStaticBox *item35 = new wxStaticBox(parent, -1, wxT("Output operands"));
1416  wxStaticBoxSizer *item34 = new wxStaticBoxSizer(item35, wxVERTICAL);
1417  outputSizer_ = item34;
1418 
1419  wxBoxSizer *item36 = new wxBoxSizer(wxHORIZONTAL);
1420 
1421  wxListCtrl *item37 = new wxListCtrl(parent, ID_OUTPUT_OPERANDS, wxDefaultPosition, wxSize(335,120), wxLC_REPORT|wxSUNKEN_BORDER);
1422  item36->Add(item37, 0, wxALIGN_CENTER|wxALL, 5);
1423 
1424  wxBoxSizer *item38 = new wxBoxSizer(wxVERTICAL);
1425 
1426  wxBitmapButton *item39 = new wxBitmapButton(parent, ID_OUTPUT_UP_BUTTON, createBitmaps(0), wxDefaultPosition, wxDefaultSize);
1427  item38->Add(item39, 0, wxALIGN_CENTER|wxALL, 5);
1428 
1429  wxBitmapButton *item40 = new wxBitmapButton(parent, ID_OUTPUT_DOWN_BUTTON, createBitmaps(1), wxDefaultPosition, wxDefaultSize);
1430  item38->Add(item40, 0, wxALIGN_CENTER|wxALL, 5);
1431 
1432  item36->Add(item38, 0, wxALIGN_CENTER|wxALL, 5);
1433 
1434  item34->Add(item36, 0, wxGROW|wxALL, 5);
1435 
1436  wxBoxSizer *item41 = new wxBoxSizer(wxHORIZONTAL);
1437 
1438  wxButton *item42 = new wxButton(parent, ID_OUTPUT_ADD_BUTTON, wxT("Add..."), wxDefaultPosition, wxDefaultSize, 0);
1439  item41->Add(item42, 0, wxALIGN_CENTER|wxALL, 5);
1440 
1441  wxButton *item43 = new wxButton(parent, ID_OUTPUT_MODIFY_BUTTON, wxT("Modify..."), wxDefaultPosition, wxDefaultSize, 0);
1442  item41->Add(item43, 0, wxALIGN_CENTER|wxALL, 5);
1443 
1444  wxButton *item44 = new wxButton(parent, ID_OUTPUT_DELETE_BUTTON, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0);
1445  item41->Add(item44, 0, wxALIGN_CENTER|wxALL, 5);
1446 
1447  item34->Add(item41, 0, wxALIGN_CENTER|wxALL, 5);
1448 
1449  item8->Add(item34, 0, wxALIGN_CENTER|wxALL, 5);
1450 
1451  wxBoxSizer *pageSizer = new wxBoxSizer(wxHORIZONTAL);
1452  pageSizer->Add(item8, 0, wxALL, 5);
1453 
1454  item0->Add(pageSizer, 0, wxALIGN_CENTER|wxALL, 5);
1455 
1456  wxGridSizer *item45 = new wxGridSizer(2, 0, 0);
1457 
1458  wxBoxSizer *item46 = new wxBoxSizer(wxHORIZONTAL);
1459 
1460  wxStaticText *item47 = NULL;
1461  if (module_.hasBehaviorSource()) {
1462  item47 = new wxStaticText(parent, ID_TEXT_OPEN, _T("Operation behavior module defined."), wxDefaultPosition, wxDefaultSize, 0);
1463  } else {
1464  item47 = new wxStaticText(parent, ID_TEXT_OPEN, wxT("Operation behavior module not defined."), wxDefaultPosition, wxDefaultSize, 0);
1465  }
1466  item46->Add(item47, 0, wxALIGN_CENTER|wxALL, 5);
1467 
1468  wxButton *item48 = new wxButton(parent, ID_OPEN_BUTTON, wxT("Open"), wxDefaultPosition, wxDefaultSize, 0);
1469  item46->Add(item48, 0, wxALIGN_CENTER|wxALL, 5);
1470 
1471  wxButton *OpenDAG = new wxButton(parent, ID_DAG_BUTTON, wxT("Open DAG"), wxDefaultPosition, wxDefaultSize, 0);
1472  item46->Add(OpenDAG, 0, wxALIGN_CENTER|wxALL, 5);
1473 
1474  item45->Add(item46, 0, wxALL, 5);
1475 
1476  wxBoxSizer *item49 = new wxBoxSizer(wxHORIZONTAL);
1477 
1478  wxButton *item50 = new wxButton(parent, ID_OK_BUTTON, wxT("&OK"), wxDefaultPosition, wxDefaultSize, 0);
1479  item49->Add(item50, 0, wxALIGN_CENTER|wxALL, 5);
1480 
1481  wxButton *item51 = new wxButton(parent, wxID_CANCEL, wxT("&Cancel"), wxDefaultPosition, wxDefaultSize, 0);
1482  item49->Add(item51, 0, wxALIGN_CENTER|wxALL, 5);
1483 
1484  item45->Add(item49, 0, wxALL, 5);
1485 
1486  item0->Add(item45, 0, wxGROW|wxALL, 5);
1487 
1488  if (set_sizer)
1489  {
1490  parent->SetSizer(item0);
1491  if (call_fit)
1492  item0->SetSizeHints(parent);
1493  }
1494 
1495  return item0;
1496 }

References affectedBySizer_, affectsSizer_, createBitmaps(), OperationModule::hasBehaviorSource(), ID_AFFECTED_ADD_BUTTON, ID_AFFECTED_BY, ID_AFFECTED_DELETE_BUTTON, ID_AFFECTS, ID_AFFECTS_ADD_BUTTON, ID_AFFECTS_DELETE_BUTTON, ID_CAN_TRAP, ID_CLOCKED, ID_DAG_BUTTON, ID_EDIT_DESCRIPTION, ID_HAS_SIDE_EFFECTS, ID_INPUT_ADD_BUTTON, ID_INPUT_DELETE_BUTTON, ID_INPUT_DOWN_BUTTON, ID_INPUT_MODIFY_BUTTON, ID_INPUT_OPERANDS, ID_INPUT_UP_BUTTON, ID_NAME, ID_OK_BUTTON, ID_OPEN_BUTTON, ID_OPERATION_AFFECTED_BY, ID_OPERATION_AFFECTS, ID_OUTPUT_ADD_BUTTON, ID_OUTPUT_DELETE_BUTTON, ID_OUTPUT_DOWN_BUTTON, ID_OUTPUT_MODIFY_BUTTON, ID_OUTPUT_OPERANDS, ID_OUTPUT_UP_BUTTON, ID_READS_MEMORY, ID_TEXT_NAME, ID_TEXT_OPEN, ID_WRITES_MEMORY, inputSizer_, module_, and outputSizer_.

Here is the call graph for this function:

◆ getSelectedItems()

vector< string > OperationPropertyDialog::getSelectedItems ( wxListCtrl *  listCtrl)
private

Returns all the selected items of the list control.

Parameters
listCtrlList control which is investigated.
Returns
All selected items as a vector.

Definition at line 998 of file OperationPropertyDialog.cc.

998  {
999  vector<string> selected;
1000  long item = -1;
1001  for (;;) {
1002  item = listCtrl->GetNextItem(
1003  item, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
1004  if (item == -1) {
1005  break;
1006  }
1007  wxListItem info;
1008  info.SetId(item);
1009  info.SetColumn(0);
1010  listCtrl->GetItem(info);
1011  selected.push_back(WxConversion::toString(info.GetText()));
1012  }
1013  return selected;
1014 }

References WxConversion::toString().

Referenced by onDeleteAffectedBy(), onDeleteAffects(), onDeleteInputOperand(), and onDeleteOutputOperand().

Here is the call graph for this function:

◆ launchEditor()

void OperationPropertyDialog::launchEditor ( const std::string &  cmd)
private

Launches editor for editing operation behavior.

Parameters
cmdCommand for launching the editor.

Definition at line 1203 of file OperationPropertyDialog.cc.

1203  {
1204  CommandThread* thread = new CommandThread(cmd);
1205  thread->Create();
1206  thread->Run();
1207 }

Referenced by onOpen().

◆ moveDown()

void OperationPropertyDialog::moveDown ( std::vector< Operand * > &  ops,
int  id,
wxListCtrl *  list 
)
private

Moves operand down.

Parameters
listList from which operand is selected.
opsOperands.
idId of the operand.

Definition at line 974 of file OperationPropertyDialog.cc.

977  {
978 
979  if (static_cast<unsigned int>(id) != ops.size()) {
980  Operand* temp = ops[id - 1];
981  ops[id - 1] = ops[id];
982  ops[id] = temp;
983  long item = -1;
984  item = list->GetNextItem(item, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
985  list->SetItemState(
986  item + 1, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED);
987  list->SetItemState(item, 0, wxLIST_STATE_SELECTED);
988  }
989 }

Referenced by onMoveInputDown(), and onMoveOutputDown().

◆ moveUp()

void OperationPropertyDialog::moveUp ( std::vector< Operand * > &  ops,
int  id,
wxListCtrl *  list 
)
private

Moves operand up.

Parameters
listList from which operand is selected.
idId of the operand.
opsOperands.

Definition at line 949 of file OperationPropertyDialog.cc.

952  {
953 
954  if (id != 1) {
955  Operand* temp = ops[id - 2];
956  ops[id - 2] = ops[id - 1];
957  ops[id - 1] = temp;
958  long item = -1;
959  item = list->GetNextItem(item, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
960  list->SetItemState(
961  item - 1, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED);
962  list->SetItemState(item, 0, wxLIST_STATE_SELECTED);
963  }
964 }

Referenced by onMoveInputUp(), and onMoveOutputUp().

◆ onAddAffectedBy()

void OperationPropertyDialog::onAddAffectedBy ( wxCommandEvent &  event)
private

Handles adding new item to affected by list.

Definition at line 634 of file OperationPropertyDialog.cc.

634  {
635 
636  wxString name = affectedByChoice_->GetValue();
638 
640  format fmt = texts.text(
642  fmt % name;
643  ErrorDialog dialog(this, WxConversion::toWxString(fmt.str()));
644  dialog.ShowModal();
645  } else {
646  affectedBy_.push_back(WxConversion::toString(name));
647  updateAffected();
648  }
649 }

References affectedBy_, affectedByChoice_, OSEdTextGenerator::instance(), OperationContainer::operationExists(), Texts::TextGenerator::text(), WxConversion::toString(), WxConversion::toWxString(), OSEdTextGenerator::TXT_ERROR_NON_EXISTING_OPERATION, and updateAffected().

Here is the call graph for this function:

◆ onAddAffects()

void OperationPropertyDialog::onAddAffects ( wxCommandEvent &  event)
private

Handles event of adding new item to affects list.

Definition at line 676 of file OperationPropertyDialog.cc.

676  {
677 
678  wxString name = affectsChoice_->GetValue();
680 
682  format fmt = texts.text(
684  fmt % name;
685  ErrorDialog dialog(this, WxConversion::toWxString(fmt.str()));
686  dialog.ShowModal();
687  } else {
688  affects_.push_back(WxConversion::toString(name));
689  updateAffected();
690  }
691 }

References affects_, affectsChoice_, OSEdTextGenerator::instance(), OperationContainer::operationExists(), Texts::TextGenerator::text(), WxConversion::toString(), WxConversion::toWxString(), OSEdTextGenerator::TXT_ERROR_NON_EXISTING_OPERATION, and updateAffected().

Here is the call graph for this function:

◆ onAddInputOperand()

void OperationPropertyDialog::onAddInputOperand ( wxCommandEvent &  event)
private

Handles event for adding new operand to input operand list.

Definition at line 718 of file OperationPropertyDialog.cc.

718  {
719  Operand* input =
720  new Operand(true, inputOperands_.size() + 1, Operand::SINT_WORD);
721 
722  InputOperandDialog dialog(
723  this, input, inputOperands_.size(), inputOperands_.size() + 1);
724 
725  if (dialog.ShowModal() == wxID_OK) {
726  inputOperands_.push_back(input);
727  updateOperands();
728  } else {
729  delete input;
730  }
731  updateOperands();
732 }

References inputOperands_, Operand::SINT_WORD, and updateOperands().

Here is the call graph for this function:

◆ onAddOutputOperand()

void OperationPropertyDialog::onAddOutputOperand ( wxCommandEvent &  event)
private

Handles the event of adding new output operand.

Definition at line 779 of file OperationPropertyDialog.cc.

779  {
780  unsigned int id = inputOperands_.size() + outputOperands_.size() + 1;
781  Operand* output = new Operand(false, id, Operand::SINT_WORD);
782  OutputOperandDialog dialog(this, output, id);
783  if (dialog.ShowModal() == wxID_OK) {
784  outputOperands_.push_back(output);
785  updateOperands();
786  } else {
787  delete output;
788  }
789  updateOperands();
790 }

References inputOperands_, outputOperands_, Operand::SINT_WORD, and updateOperands().

Here is the call graph for this function:

◆ onComboBoxChange()

void OperationPropertyDialog::onComboBoxChange ( wxCommandEvent &  event)
private

◆ onDAGChange()

void OperationPropertyDialog::onDAGChange ( wxCommandEvent &  event)
private

◆ onDeleteAffectedBy()

void OperationPropertyDialog::onDeleteAffectedBy ( wxCommandEvent &  event)
private

Handles deleting an item from affected by list.

Definition at line 655 of file OperationPropertyDialog.cc.

655  {
656 
657  vector<string> toBeDeleted = getSelectedItems(affectedByList_);
658 
659  for (size_t i = 0; i < toBeDeleted.size(); i++) {
660  vector<string>::iterator it = affectedBy_.begin();
661  while (it != affectedBy_.end()) {
662  if (*it == toBeDeleted[i]) {
663  affectedBy_.erase(it);
664  break;
665  }
666  it++;
667  }
668  }
669  updateAffected();
670 }

References affectedBy_, affectedByList_, getSelectedItems(), and updateAffected().

Here is the call graph for this function:

◆ onDeleteAffects()

void OperationPropertyDialog::onDeleteAffects ( wxCommandEvent &  event)
private

Handles event of deleting item from affects list.

Definition at line 697 of file OperationPropertyDialog.cc.

697  {
698 
699  vector<string> toBeDeleted = getSelectedItems(affectsList_);
700 
701  for (size_t i = 0; i < toBeDeleted.size(); i++) {
702  vector<string>::iterator it = affects_.begin();
703  while (it != affects_.end()) {
704  if (*it == toBeDeleted[i]) {
705  affects_.erase(it);
706  break;
707  }
708  it++;
709  }
710  }
711  updateAffected();
712 }

References affects_, affectsList_, getSelectedItems(), and updateAffected().

Here is the call graph for this function:

◆ onDeleteDAG()

void OperationPropertyDialog::onDeleteDAG ( wxCommandEvent &  event)
private

◆ onDeleteInputOperand()

void OperationPropertyDialog::onDeleteInputOperand ( wxCommandEvent &  event)
private

Handles the event of deleting input operand.

Definition at line 753 of file OperationPropertyDialog.cc.

753  {
754 
755  vector<string> toBeDeleted = getSelectedItems(inputOperandList_);
756  size_t i = 0;
757  vector<Operand*>::iterator it = inputOperands_.begin();
758  int index = 1;
759 
760  updateSwapLists(toBeDeleted);
761  while (it != inputOperands_.end() && i < toBeDeleted.size()) {
762  int id = Conversion::toInt(toBeDeleted[i]);
763  while (index < id) {
764  it++;
765  index++;
766  }
767  delete *it;
768  it = inputOperands_.erase(it);
769  index++;
770  i++;
771  }
772  updateOperands();
773 }

References getSelectedItems(), OperationPool::index(), inputOperandList_, inputOperands_, Conversion::toInt(), updateOperands(), and updateSwapLists().

Here is the call graph for this function:

◆ onDeleteOutputOperand()

void OperationPropertyDialog::onDeleteOutputOperand ( wxCommandEvent &  event)
private

Handles the event of deleting output operand.

Definition at line 812 of file OperationPropertyDialog.cc.

812  {
813 
814  vector<string> toBeDeleted = getSelectedItems(outputOperandList_);
815  size_t i = 0;
816  vector<Operand*>::iterator it = outputOperands_.begin();
817  int index = inputOperands_.size() + 1;
818 
819  while (it != outputOperands_.end() && i < toBeDeleted.size()) {
820  int id = Conversion::toInt(toBeDeleted[i]);
821  while (index < id) {
822  it++;
823  index++;
824  }
825  delete *it;
826  it = outputOperands_.erase(it);
827  index++;
828  i++;
829  }
830  updateOperands();
831 }

References getSelectedItems(), OperationPool::index(), inputOperands_, outputOperandList_, outputOperands_, Conversion::toInt(), and updateOperands().

Here is the call graph for this function:

◆ onModifyInputOperand()

void OperationPropertyDialog::onModifyInputOperand ( wxCommandEvent &  event)
private

Handles the event for modifying input operand.

Definition at line 738 of file OperationPropertyDialog.cc.

738  {
740  int id = Conversion::toInt(idString);
741  Operand* operand = NULL;
742  operand = inputOperands_[id - 1];
743  assert(operand != NULL);
744  InputOperandDialog dialog(this, operand, inputOperands_.size(), id);
745  dialog.ShowModal();
746  updateOperands();
747 }

References assert, inputOperandList_, inputOperands_, WidgetTools::lcStringSelection(), Conversion::toInt(), and updateOperands().

Here is the call graph for this function:

◆ onModifyOutputOperand()

void OperationPropertyDialog::onModifyOutputOperand ( wxCommandEvent &  event)
private

Handles the event for mofifying output operand.

Definition at line 796 of file OperationPropertyDialog.cc.

796  {
798  int realId = Conversion::toInt(idString);
799  int id = realId - static_cast<int>(inputOperands_.size());
800  Operand* operand = NULL;
801  operand = outputOperands_[id - 1];
802  assert(operand != NULL);
803  OutputOperandDialog dialog(this, operand, realId);
804  dialog.ShowModal();
805  updateOperands();
806 }

References assert, inputOperands_, WidgetTools::lcStringSelection(), outputOperandList_, outputOperands_, Conversion::toInt(), and updateOperands().

Here is the call graph for this function:

◆ onMoveInputDown()

void OperationPropertyDialog::onMoveInputDown ( wxCommandEvent &  event)
private

Handles the event when input operand is moved down.

Definition at line 847 of file OperationPropertyDialog.cc.

847  {
849  int id = Conversion::toInt(idString);
851 }

References inputOperandList_, inputOperands_, WidgetTools::lcStringSelection(), moveDown(), and Conversion::toInt().

Here is the call graph for this function:

◆ onMoveInputUp()

void OperationPropertyDialog::onMoveInputUp ( wxCommandEvent &  event)
private

Handles the event when input operand is moved up.

Definition at line 837 of file OperationPropertyDialog.cc.

837  {
839  int id = Conversion::toInt(idString);
841 }

References inputOperandList_, inputOperands_, WidgetTools::lcStringSelection(), moveUp(), and Conversion::toInt().

Here is the call graph for this function:

◆ onMoveOutputDown()

void OperationPropertyDialog::onMoveOutputDown ( wxCommandEvent &  event)
private

Handles the event when output operand is moved down.

Definition at line 868 of file OperationPropertyDialog.cc.

868  {
870  int id = Conversion::toInt(idString) -
871  static_cast<int>(inputOperands_.size());
873 }

References inputOperands_, WidgetTools::lcStringSelection(), moveDown(), outputOperandList_, outputOperands_, and Conversion::toInt().

Here is the call graph for this function:

◆ onMoveOutputUp()

void OperationPropertyDialog::onMoveOutputUp ( wxCommandEvent &  event)
private

Handles the event when output operand is moved up.

Definition at line 857 of file OperationPropertyDialog.cc.

857  {
859  int id = Conversion::toInt(idString) -
860  static_cast<int>(inputOperands_.size());
862 }

References inputOperands_, WidgetTools::lcStringSelection(), moveUp(), outputOperandList_, outputOperands_, and Conversion::toInt().

Here is the call graph for this function:

◆ onNewDAG()

void OperationPropertyDialog::onNewDAG ( wxCommandEvent &  event)
private

◆ onOk()

void OperationPropertyDialog::onOk ( wxCommandEvent &  event)
private

Handles the event when OK button is pushed.

Definition at line 1020 of file OperationPropertyDialog.cc.

1020  {
1021  updateOperation(false);
1022 }

References updateOperation().

Here is the call graph for this function:

◆ onOpen()

void OperationPropertyDialog::onOpen ( wxCommandEvent &  event)
private

Handles the event when Open button is pushed.

Definition at line 879 of file OperationPropertyDialog.cc.

879  {
880 
882  OSEdOptions* options = wxGetApp().options();
883  string editor = options->editor();
884  if (editor == "") {
885  format fmt = texts.text(OSEdTextGenerator::TXT_ERROR_NO_EDITOR);
886  ErrorDialog error(this, WxConversion::toWxString(fmt.str()));
887  error.ShowModal();
888  } else {
889  if (FileSystem::fileExists(editor)) {
890  if (module_.hasBehaviorSource()) {
891  string code = module_.behaviorSourceModule();
892  string cmd = editor + " " + code;
893 
894  launchEditor(cmd);
895  } else {
896  // new behavior is added for the module
897  string code = module_.propertiesModule();
898  size_t pos = code.find_last_of(".");
899  code.erase(pos);
900  code += ".cc";
901 
902  // copy template file as new file
903  string dir =
907 
908  string templateFile = dir + FileSystem::DIRECTORY_SEPARATOR +
910 
911  FileSystem::copy(templateFile, code);
912 
913  string cmd = editor + " " + code;
914  launchEditor(cmd);
915  }
916  } else {
917  format fmt = texts.text(OSEdTextGenerator::TXT_ERROR_OPEN);
918  fmt % editor;
919  ErrorDialog error(this, WxConversion::toWxString(fmt.str()));
920  error.ShowModal();
921  }
922  }
923 
925 }

References OSEdConstants::APPLICATION_NAME, OSEdConstants::BEHAVIOR_TEMPLATE_FILE_NAME, OperationModule::behaviorSourceModule(), FileSystem::copy(), Environment::dataDirPath(), FileSystem::DIRECTORY_SEPARATOR, FileSystem::fileExists(), OperationModule::hasBehaviorSource(), OSEdTextGenerator::instance(), launchEditor(), module_, options, OperationModule::propertiesModule(), setBehaviorLabel(), Texts::TextGenerator::text(), WxConversion::toString(), WxConversion::toWxString(), OSEdTextGenerator::TXT_ERROR_NO_EDITOR, and OSEdTextGenerator::TXT_ERROR_OPEN.

Here is the call graph for this function:

◆ onOpenDAG()

void OperationPropertyDialog::onOpenDAG ( wxCommandEvent &  event)
private

Handles the event when Open DAG button is pushed.

Definition at line 931 of file OperationPropertyDialog.cc.

931  {
932 
934  updateOperation(true);
935  }
936  // TODO: here set the number of operands of new operation.
937  OperationDAGDialog dialog(this, operation_);
938  dialog.ShowModal();
939 }

References operation_, operationWasCreatedHere_, and updateOperation().

Here is the call graph for this function:

◆ onSaveDAG()

void OperationPropertyDialog::onSaveDAG ( wxCommandEvent &  event)
private

◆ onSelection()

void OperationPropertyDialog::onSelection ( wxListEvent &  event)
private

Handles the event when an item is selected from a list.

Item selection affects statuses of several buttons.

Definition at line 556 of file OperationPropertyDialog.cc.

556  {
557 
558  if (affectedByList_->GetSelectedItemCount() < 1) {
560  } else {
562  }
563 
564  if (affectsList_->GetSelectedItemCount() < 1) {
566  } else {
568  }
569 
570  if (inputOperandList_->GetSelectedItemCount() < 1) {
572  } else {
574  }
575 
576  if (outputOperandList_->GetSelectedItemCount() < 1) {
578  } else {
580  }
581 
582  if (inputOperandList_->GetSelectedItemCount() != 1) {
584  FindWindow(ID_INPUT_UP_BUTTON)->Disable();
585  FindWindow(ID_INPUT_DOWN_BUTTON)->Disable();
586  } else {
588 
590  int id = Conversion::toInt(idString);
591 
592  if (id != 1) {
593  FindWindow(ID_INPUT_UP_BUTTON)->Enable();
594  } else {
595  FindWindow(ID_INPUT_UP_BUTTON)->Disable();
596  }
597 
598  if (id != static_cast<int>(inputOperands_.size())) {
599  FindWindow(ID_INPUT_DOWN_BUTTON)->Enable();
600  } else {
601  FindWindow(ID_INPUT_DOWN_BUTTON)->Disable();
602  }
603  }
604 
605  if (outputOperandList_->GetSelectedItemCount() != 1) {
607  FindWindow(ID_OUTPUT_UP_BUTTON)->Disable();
608  FindWindow(ID_OUTPUT_DOWN_BUTTON)->Disable();
609  } else {
611 
613  int id = Conversion::toInt(idString);
614 
615  if (id != static_cast<int>(inputOperands_.size()) + 1) {
616  FindWindow(ID_OUTPUT_UP_BUTTON)->Enable();
617  } else {
618  FindWindow(ID_OUTPUT_UP_BUTTON)->Disable();
619  }
620 
621  if (id != static_cast<int>(inputOperands_.size()) +
622  static_cast<int>(outputOperands_.size())) {
624  } else {
625  FindWindow(ID_OUTPUT_DOWN_BUTTON)->Disable();
626  }
627  }
628 }

References affectedByList_, affectsList_, ID_AFFECTED_DELETE_BUTTON, ID_AFFECTS_DELETE_BUTTON, ID_INPUT_DELETE_BUTTON, ID_INPUT_DOWN_BUTTON, ID_INPUT_MODIFY_BUTTON, ID_INPUT_UP_BUTTON, ID_OUTPUT_DELETE_BUTTON, ID_OUTPUT_DOWN_BUTTON, ID_OUTPUT_MODIFY_BUTTON, ID_OUTPUT_UP_BUTTON, inputOperandList_, inputOperands_, WidgetTools::lcStringSelection(), outputOperandList_, outputOperands_, and Conversion::toInt().

Referenced by updateAffected(), and updateOperands().

Here is the call graph for this function:

◆ onUndoDAG()

void OperationPropertyDialog::onUndoDAG ( wxCommandEvent &  event)
private

◆ operation()

Operation * OperationPropertyDialog::operation ( ) const

Returns operation object of dialog.

Returns
Operation object of dialog.

Definition at line 236 of file OperationPropertyDialog.cc.

236  {
237  return operation_;
238 }

References operation_.

Referenced by OSEdAddOperationCmd::Do().

◆ operator=()

OperationPropertyDialog& OperationPropertyDialog::operator= ( const OperationPropertyDialog )
private

Assignment not allowed.

◆ saveOperation()

ObjectState * OperationPropertyDialog::saveOperation ( )
private

Returns the operation properties as ObjectState tree.

Returns
Operation properties as ObjectState tree.

Definition at line 1105 of file OperationPropertyDialog.cc.

1105  {
1106 
1109 
1110  std::string description("");
1111  wxString wxTemp;
1112 
1113  for (int i = 0; i < editDescription_->GetNumberOfLines(); ++i)
1114  {
1115  wxTemp = editDescription_->GetLineText(i);
1116 #if wxCHECK_VERSION(2, 6, 0)
1117  std::string stdTemp(wxTemp.mb_str());
1118 #else
1119  std::string stdTemp(wxTemp.c_str());
1120 #endif
1121  if (!StringTools::endsWith(stdTemp, "\n"))
1122  stdTemp = stdTemp + "\n";
1123  description += stdTemp;
1124  }
1125 
1126  description = StringTools::trim(description);
1127 
1128  root->setAttribute(Operation::OPRN_DESCRIPTION, description);
1129 
1130  int inputs = inputOperands_.size();
1131  int outputs = outputOperands_.size();
1132 
1133  root->setAttribute(Operation::OPRN_INPUTS, inputs);
1134  root->setAttribute(Operation::OPRN_OUTPUTS, outputs);
1135 
1144 
1145  if (affectedBy_.size() > 0) {
1147  for (unsigned int i = 0; i < affectedBy_.size(); i++) {
1148  ObjectState* affectedByChild =
1150  affectedByChild->setAttribute(Operation::OPRN_NAME, affectedBy_[i]);
1151  affectedBy->addChild(affectedByChild);
1152  }
1153  root->addChild(affectedBy);
1154  }
1155 
1156  if (affects_.size() > 0) {
1158  for (unsigned int i = 0; i < affects_.size(); i++) {
1159  ObjectState* affectsChild =
1161  affectsChild->setAttribute(Operation::OPRN_NAME, affects_[i]);
1162  affects->addChild(affectsChild);
1163  }
1164  root->addChild(affects);
1165  }
1166 
1167  for (unsigned int i = 0; i < inputOperands_.size(); i++) {
1168  ObjectState* operand = inputOperands_[i]->saveState();
1169  operand->setName(Operation::OPRN_IN);
1170  int index = i + 1;
1171  operand->setAttribute(Operand::OPRND_ID, index);
1172  std::string type = inputOperands_.at(i)->typeString();
1173  operand->setAttribute(Operand::OPRND_TYPE, type);
1174  root->addChild(operand);
1175  }
1176 
1177  for (unsigned int i = 0; i < outputOperands_.size(); i++) {
1178  ObjectState* operand = outputOperands_[i]->saveState();
1179  operand->setName(Operation::OPRN_OUT);
1180  int index = inputOperands_.size() + i + 1;
1181  operand->setAttribute(Operand::OPRND_ID, index);
1182  std::string type = outputOperands_.at(i)->typeString();
1183  operand->setAttribute(Operand::OPRND_TYPE, type);
1184  root->addChild(operand);
1185  }
1186 
1187  // copy dags from operation to objectState tree
1188  for (int i = 0; i < operation_->dagCount(); i++) {
1190  trigger->setValue(operation_->dagCode(i));
1191  root->addChild(trigger);
1192  }
1193 
1194  return root;
1195 }

References ObjectState::addChild(), affectedBy_, affects_, canTrap_, clocked_, controlFlow_, Operation::dagCode(), Operation::dagCount(), editDescription_, StringTools::endsWith(), hasSideEffects_, OperationPool::index(), inputOperands_, isBranch_, isCall_, name_, operation_, Operation::OPRN_AFFECTED_BY, Operation::OPRN_AFFECTS, Operation::OPRN_CLOCKED, Operation::OPRN_CONTROL_FLOW, Operation::OPRN_DESCRIPTION, Operation::OPRN_IN, Operation::OPRN_INPUTS, Operation::OPRN_ISBRANCH, Operation::OPRN_ISCALL, Operation::OPRN_NAME, Operation::OPRN_OPERATION, Operation::OPRN_OUT, Operation::OPRN_OUTPUTS, Operation::OPRN_READS_MEMORY, Operation::OPRN_SIDE_EFFECTS, Operation::OPRN_TRAP, Operation::OPRN_TRIGGER, Operation::OPRN_WRITES_MEMORY, Operand::OPRND_ID, Operand::OPRND_TYPE, outputOperands_, readMemory_, ObjectState::setAttribute(), ObjectState::setName(), ObjectState::setValue(), WxConversion::toString(), StringTools::trim(), and writeMemory_.

Referenced by updateOperation().

Here is the call graph for this function:

◆ setBehaviorLabel()

void OperationPropertyDialog::setBehaviorLabel ( )
private

◆ setTexts()

void OperationPropertyDialog::setTexts ( )
private

Set texts to all widgets.

Definition at line 244 of file OperationPropertyDialog.cc.

244  {
245 
248 
249  // title
250  format fmt = osedText.text(OSEdTextGenerator::TXT_PROPERTY_DIALOG_TITLE);
251  SetTitle(WxConversion::toWxString(fmt.str()));
252 
255 
256  // buttons
259 
260  WidgetTools::setLabel(&guiText, FindWindow(wxID_CANCEL),
262 
265 
268 
271 
274 
277 
280 
283 
286 
289 
292 
295 
296 
298 
299  // column titles
301  affectedByList_->InsertColumn(
302  0, WxConversion::toWxString(fmt.str()), wxLIST_FORMAT_LEFT,
304 
305  affectsList_->InsertColumn(
306  0, WxConversion::toWxString(fmt.str()), wxLIST_FORMAT_LEFT,
308 
310 
311  inputOperandList_->InsertColumn(
312  0, WxConversion::toWxString(fmt.str()), wxLIST_FORMAT_LEFT,
313  110);
314 
316 
317  inputOperandList_->InsertColumn(
318  0, WxConversion::toWxString(fmt.str()), wxLIST_FORMAT_LEFT,
319  110);
320 
322 
323  inputOperandList_->InsertColumn(
324  0, WxConversion::toWxString(fmt.str()), wxLIST_FORMAT_LEFT,
325  110);
326 
328 
329  inputOperandList_->InsertColumn(
330  0, WxConversion::toWxString(fmt.str()), wxLIST_FORMAT_LEFT,
331  70);
332 
334 
335  outputOperandList_->InsertColumn(
336  0, WxConversion::toWxString(fmt.str()), wxLIST_FORMAT_LEFT,
337  110);
338 
340 
341  outputOperandList_->InsertColumn(
342  0, WxConversion::toWxString(fmt.str()), wxLIST_FORMAT_LEFT,
343  110);
344 
346 
347  outputOperandList_->InsertColumn(
348  0, WxConversion::toWxString(fmt.str()), wxLIST_FORMAT_LEFT,
349  110);
350 
352 
353  outputOperandList_->InsertColumn(
354  0, WxConversion::toWxString(fmt.str()), wxLIST_FORMAT_LEFT,
355  70);
356 
357  // check boxes
360 
363 
366 
369 
372 
373  // box sizers
376 
379 
382 
385 
386 
387 }

References affectedByList_, affectedBySizer_, affectsList_, affectsSizer_, OSEdConstants::DEFAULT_COLUMN_WIDTH, ID_AFFECTED_ADD_BUTTON, ID_AFFECTED_DELETE_BUTTON, ID_AFFECTS_ADD_BUTTON, ID_AFFECTS_DELETE_BUTTON, ID_CAN_TRAP, ID_CLOCKED, ID_HAS_SIDE_EFFECTS, ID_INPUT_ADD_BUTTON, ID_INPUT_DELETE_BUTTON, ID_INPUT_MODIFY_BUTTON, ID_OK_BUTTON, ID_OPEN_BUTTON, ID_OUTPUT_ADD_BUTTON, ID_OUTPUT_DELETE_BUTTON, ID_OUTPUT_MODIFY_BUTTON, ID_READS_MEMORY, ID_TEXT_NAME, ID_WRITES_MEMORY, inputOperandList_, inputSizer_, OSEdTextGenerator::instance(), GUITextGenerator::instance(), outputOperandList_, outputSizer_, setBehaviorLabel(), WidgetTools::setLabel(), WidgetTools::setWidgetLabel(), Texts::TextGenerator::text(), WxConversion::toWxString(), OSEdTextGenerator::TXT_BOX_AFFECTED_BY, OSEdTextGenerator::TXT_BOX_AFFECTS, OSEdTextGenerator::TXT_BOX_INPUT_OPERANDS, OSEdTextGenerator::TXT_BOX_OUTPUT_OPERANDS, GUITextGenerator::TXT_BUTTON_ADD, GUITextGenerator::TXT_BUTTON_ADD_DIALOG, GUITextGenerator::TXT_BUTTON_CANCEL, GUITextGenerator::TXT_BUTTON_DELETE, OSEdTextGenerator::TXT_BUTTON_MODIFY, GUITextGenerator::TXT_BUTTON_OK, OSEdTextGenerator::TXT_BUTTON_OPEN, OSEdTextGenerator::TXT_CHECKBOX_CAN_TRAP, OSEdTextGenerator::TXT_CHECKBOX_CLOCKED, OSEdTextGenerator::TXT_CHECKBOX_HAS_SIDE_EFFECTS, OSEdTextGenerator::TXT_CHECKBOX_READS_MEMORY, OSEdTextGenerator::TXT_CHECKBOX_WRITES_MEMORY, OSEdTextGenerator::TXT_COLUMN_ELEMENT_COUNT, OSEdTextGenerator::TXT_COLUMN_ELEMENT_WIDTH, OSEdTextGenerator::TXT_COLUMN_OPERAND, OSEdTextGenerator::TXT_COLUMN_OPERATION, OSEdTextGenerator::TXT_COLUMN_TYPE, OSEdTextGenerator::TXT_LABEL_OPERATION_NAME, and OSEdTextGenerator::TXT_PROPERTY_DIALOG_TITLE.

Here is the call graph for this function:

◆ TransferDataToWindow()

bool OperationPropertyDialog::TransferDataToWindow ( )
privatevirtual

Transfers data to window.

Returns
True if transfer is successful.

Definition at line 410 of file OperationPropertyDialog.cc.

410  {
411  if (operation_ != NULL) {
413  editDescription_->Clear();
423  updateOperands();
424  updateAffected();
425  } else {
426  readMemory_ = false;
427  writeMemory_ = false;
428  canTrap_ = false;
429  hasSideEffects_ = false;
430  clocked_ = false;
431  controlFlow_ = false;
432  isCall_ = false;
433  isBranch_ = false;
434  }
435 
436  return wxWindow::TransferDataToWindow();
437 }

References Operation::canTrap(), canTrap_, clocked_, controlFlow_, Operation::description(), editDescription_, Operation::hasSideEffects(), hasSideEffects_, Operation::isBranch(), isBranch_, Operation::isCall(), isCall_, Operation::isClocked(), Operation::isControlFlowOperation(), Operation::name(), name_, operation_, readMemory_, Operation::readsMemory(), WxConversion::toWxString(), updateAffected(), updateOperands(), writeMemory_, and Operation::writesMemory().

Here is the call graph for this function:

◆ updateAffected()

void OperationPropertyDialog::updateAffected ( )
private

Updates the affects and affected by lists.

Definition at line 485 of file OperationPropertyDialog.cc.

485  {
486 
487  affectedByList_->DeleteAllItems();
488  affectsList_->DeleteAllItems();
489 
490  for (unsigned int i = 0; i < affectedBy_.size(); i++) {
491  wxString oper = WxConversion::toWxString(affectedBy_[i]);
492  affectedByList_->InsertItem(i, oper);
493  }
494 
495  for (unsigned int i = 0; i < affects_.size(); i++) {
496  wxString oper = WxConversion::toWxString(affects_[i]);
497  affectsList_->InsertItem(i, oper);
498  }
499 
501  affectsChoice_->Clear();
502  affectedByChoice_->Clear();
503  for (int i = 0; i < index.pathCount(); i++) {
504  string path = index.path(i);
505  int modules = index.moduleCount(path);
506  for (int j = 0; j < modules; j++) {
507  OperationModule& module = index.module(j, path);
508  int operations = 0;
509  try {
510  operations = index.operationCount(module);
511  } catch (const Exception& e) {
512  continue;
513  }
514  for (int k = 0; k < operations; k++) {
515  string name = index.operationName(k, module);
516  if (affectsList_->
517  FindItem(-1, WxConversion::toWxString(name)) == -1) {
518 
520  }
521  if (affectedByList_->
522  FindItem(-1, WxConversion::toWxString(name)) == -1) {
523 
525  }
526  }
527 
528  }
529  }
530  affectsChoice_->SetSelection(0);
531  affectedByChoice_->SetSelection(0);
532 
533  if (affectsChoice_->GetCount() == 0) {
534  FindWindow(ID_AFFECTS_ADD_BUTTON)->Disable();
535  } else {
537  }
538 
539  if (affectedByChoice_->GetCount() == 0) {
541  } else {
543  }
544 
545  wxListEvent dummy;
547 }

References affectedBy_, affectedByChoice_, affectedByList_, affects_, affectsChoice_, affectsList_, dummy, ID_AFFECTED_ADD_BUTTON, ID_AFFECTS_ADD_BUTTON, OperationPool::index(), OperationIndex::module(), OperationIndex::moduleCount(), onSelection(), OperationIndex::operationCount(), OperationContainer::operationIndex(), OperationIndex::operationName(), OperationIndex::path(), OperationIndex::pathCount(), and WxConversion::toWxString().

Referenced by onAddAffectedBy(), onAddAffects(), onDeleteAffectedBy(), onDeleteAffects(), and TransferDataToWindow().

Here is the call graph for this function:

◆ updateDAG()

void OperationPropertyDialog::updateDAG ( )
private

◆ updateIndex()

void OperationPropertyDialog::updateIndex ( )
private

◆ updateOperands()

void OperationPropertyDialog::updateOperands ( )
private

Updates the operand lists.

Definition at line 443 of file OperationPropertyDialog.cc.

443  {
444 
445  inputOperandList_->DeleteAllItems();
446  outputOperandList_->DeleteAllItems();
447 
448  for (unsigned int i = 0; i < inputOperands_.size(); i++) {
449  wxString id = WxConversion::toWxString(i + 1);
450  inputOperandList_->InsertItem(i, id);
451  std::string type = inputOperands_.at(i)->typeString();
452  inputOperandList_->SetItem(i, 1, WxConversion::toWxString(type));
453  std::string elemWidth = Conversion::toString(
454  inputOperands_.at(i)->elementWidth());
455  inputOperandList_->SetItem(i, 2, WxConversion::toWxString(elemWidth));
456  std::string elemCount = Conversion::toString(
457  inputOperands_.at(i)->elementCount());
458  inputOperandList_->SetItem(i, 3, WxConversion::toWxString(elemCount));
459  }
460  int k = 0;
461  for (unsigned int i = inputOperands_.size() + 1;
462  i <= inputOperands_.size() + outputOperands_.size(); i++) {
463 
464  wxString id = WxConversion::toWxString(i);
465  outputOperandList_->InsertItem(k, id);
466  std::string type = outputOperands_.at(k)->typeString();
467  outputOperandList_->SetItem(k, 1, WxConversion::toWxString(type));
468  std::string elemWidth = Conversion::toString(
469  outputOperands_.at(k)->elementWidth());
470  outputOperandList_->SetItem(k, 2, WxConversion::toWxString(elemWidth));
471  std::string elemCount = Conversion::toString(
472  outputOperands_.at(k)->elementCount());
473  outputOperandList_->SetItem(k, 3, WxConversion::toWxString(elemCount));
474  k++;
475  }
476 
477  wxListEvent dummy;
479 }

References dummy, inputOperandList_, inputOperands_, onSelection(), outputOperandList_, outputOperands_, Conversion::toString(), and WxConversion::toWxString().

Referenced by onAddInputOperand(), onAddOutputOperand(), onDeleteInputOperand(), onDeleteOutputOperand(), onModifyInputOperand(), onModifyOutputOperand(), and TransferDataToWindow().

Here is the call graph for this function:

◆ updateOperation()

void OperationPropertyDialog::updateOperation ( bool  newOpDag)
private

Definition at line 1025 of file OperationPropertyDialog.cc.

1025  {
1026  TransferDataFromWindow();
1027  string opName =
1029 
1030  if (newOpDag && opName == "") {
1031  opName = "__UnnamedNewOperation";
1032  }
1033 
1035 
1036  if (opName == "" && operation_->name() == "") {
1037  format fmt = texts.text(OSEdTextGenerator::TXT_ERROR_NO_NAME);
1038  fmt % "operation";
1039  WarningDialog dialog(this, WxConversion::toWxString(fmt.str()));
1040  dialog.ShowModal();
1041  } else {
1042 
1043  // let's check there isn't already an operation by the same name.
1044  // Do the check only if we are renaming this op.
1045  if (operation_ != NULL && operation_->name() != opName) {
1046 
1047  Operation* op =
1049 
1050  // there was old operation with same name
1051  if (op != NULL) {
1052  format fmt =
1055  WarningDialog dialog(this, WxConversion::toWxString(fmt.str()));
1056  dialog.ShowModal();
1057  return;
1058  }
1059  }
1060 
1061  ObjectState* mod = saveOperation(); // load modified operation's settings from gui
1062  ObjectState* orig = orig_;
1063 
1064  if (newOpDag) {
1065  operation_->loadState(mod);
1066  } else {
1067  if (*orig != *mod) {
1068  format fmt = texts.text(
1070  ConfirmDialog dialog(this, WxConversion::toWxString(fmt.str()));
1071  int ans = dialog.ShowModal();
1072  if (ans == wxID_YES) {
1073  try {
1074  operation_->loadState(mod);
1075  } catch (ObjectStateLoadingException& e) {
1076  std::cerr << "Exception caught: " << e.errorMessage()
1077  << std::endl;
1078  assert(false);
1079  }
1080  }
1081 
1082  delete mod;
1083 
1084  if (ans == wxID_YES) {
1085  delete orig;
1086  EndModal(wxID_OK);
1087  } else if (ans == wxID_NO) {
1088  EndModal(wxID_CANCEL);
1089  }
1090  } else {
1091  delete orig;
1092  delete mod;
1093  EndModal(wxID_OK);
1094  }
1095  }
1096  }
1097 }

References assert, Exception::errorMessage(), OSEdTextGenerator::instance(), Operation::loadState(), module_, OperationModule::name(), Operation::name(), name_, OperationContainer::operation(), operation_, orig_, path_, saveOperation(), StringTools::stringToUpper(), Texts::TextGenerator::text(), WxConversion::toString(), WxConversion::toWxString(), OSEdTextGenerator::TXT_ERROR_NO_NAME, OSEdTextGenerator::TXT_ERROR_OPERATION_EXISTS, and OSEdTextGenerator::TXT_QUESTION_SAVE_PROPERTIES.

Referenced by onOk(), and onOpenDAG().

Here is the call graph for this function:

◆ updateSwapLists()

void OperationPropertyDialog::updateSwapLists ( std::vector< std::string >  deletedOperands)
private

Deletes deleted operands from swap lists.

Parameters
deletedOperandsDeleted operands.

Definition at line 1215 of file OperationPropertyDialog.cc.

1215  {
1216 
1217  for (size_t i = 0; i < inputOperands_.size(); i++) {
1218  Operand* operand = inputOperands_[i];
1219  ObjectState* state = operand->saveState();
1220  for (int j = 0; j < state->childCount(); j++) {
1221  if (state->child(j)->name() == Operand::OPRND_CAN_SWAP) {
1222  ObjectState* canSwap = state->child(j);
1223 
1224  int k = 0;
1225  while (k < canSwap->childCount()) {
1226  ObjectState* child = canSwap->child(k);
1227  int id = child->intAttribute(Operand::OPRND_ID);
1228  string idString = Conversion::toString(id);
1229 
1230  bool deleted = false;
1231  for (size_t r = 0; r < deletedOperands.size(); r++) {
1232  if (deletedOperands[r] == idString) {
1233  delete child;
1234  child = NULL;
1235  k--;
1236  deleted = true;
1237  break;
1238  }
1239  }
1240 
1241  if (!deleted) {
1242  int dec = 0;
1243  for (size_t r = 0; r < deletedOperands.size(); r++) {
1244  int delId = Conversion::toInt(deletedOperands[r]);
1245  if (delId < id) {
1246  dec++;
1247  }
1248  }
1249  id = id - dec;
1250  child->setAttribute(Operand::OPRND_ID, id);
1251  }
1252  k++;
1253  }
1254  }
1255  }
1256  operand->loadState(state);
1257  }
1258 }

References ObjectState::child(), ObjectState::childCount(), inputOperands_, ObjectState::intAttribute(), Operand::loadState(), ObjectState::name(), Operand::OPRND_CAN_SWAP, Operand::OPRND_ID, Operand::saveState(), ObjectState::setAttribute(), Conversion::toInt(), and Conversion::toString().

Referenced by onDeleteInputOperand().

Here is the call graph for this function:

◆ updateTypes()

void OperationPropertyDialog::updateTypes ( )
private

Member Data Documentation

◆ affectedBy_

std::vector<std::string> OperationPropertyDialog::affectedBy_
private

Operations that are affected by this operation.

Definition at line 223 of file OperationPropertyDialog.hh.

Referenced by onAddAffectedBy(), onDeleteAffectedBy(), saveOperation(), and updateAffected().

◆ affectedByChoice_

wxComboBox* OperationPropertyDialog::affectedByChoice_
private

Choice box for new affected by operations.

Definition at line 172 of file OperationPropertyDialog.hh.

Referenced by onAddAffectedBy(), and updateAffected().

◆ affectedByList_

wxListCtrl* OperationPropertyDialog::affectedByList_
private

List of affected by operations.

Definition at line 164 of file OperationPropertyDialog.hh.

Referenced by onDeleteAffectedBy(), onSelection(), setTexts(), and updateAffected().

◆ affectedBySizer_

wxStaticBoxSizer* OperationPropertyDialog::affectedBySizer_
private

Affected by sizer.

Definition at line 161 of file OperationPropertyDialog.hh.

Referenced by createContents(), and setTexts().

◆ affects_

std::vector<std::string> OperationPropertyDialog::affects_
private

Operations that affects this operation.

Definition at line 221 of file OperationPropertyDialog.hh.

Referenced by onAddAffects(), onDeleteAffects(), saveOperation(), and updateAffected().

◆ affectsChoice_

wxComboBox* OperationPropertyDialog::affectsChoice_
private

Choice box for new affects operations.

Definition at line 174 of file OperationPropertyDialog.hh.

Referenced by onAddAffects(), and updateAffected().

◆ affectsList_

wxListCtrl* OperationPropertyDialog::affectsList_
private

List of affects operations.

Definition at line 166 of file OperationPropertyDialog.hh.

Referenced by onDeleteAffects(), onSelection(), setTexts(), and updateAffected().

◆ affectsSizer_

wxStaticBoxSizer* OperationPropertyDialog::affectsSizer_
private

Affects sizer.

Definition at line 159 of file OperationPropertyDialog.hh.

Referenced by createContents(), and setTexts().

◆ canTrap_

bool OperationPropertyDialog::canTrap_
private

Can operation trap?

Definition at line 201 of file OperationPropertyDialog.hh.

Referenced by saveOperation(), and TransferDataToWindow().

◆ canTrapCB_

wxCheckBox* OperationPropertyDialog::canTrapCB_
private

Can trap check box.

Definition at line 180 of file OperationPropertyDialog.hh.

◆ clocked_

bool OperationPropertyDialog::clocked_
private

Is operation clocked?

Definition at line 205 of file OperationPropertyDialog.hh.

Referenced by saveOperation(), and TransferDataToWindow().

◆ clockedCB_

wxCheckBox* OperationPropertyDialog::clockedCB_
private

Clocked check box.

Definition at line 184 of file OperationPropertyDialog.hh.

◆ controlFlow_

bool OperationPropertyDialog::controlFlow_
private

Can operation can change program flow.

Definition at line 207 of file OperationPropertyDialog.hh.

Referenced by saveOperation(), and TransferDataToWindow().

◆ editDescription_

wxTextCtrl* OperationPropertyDialog::editDescription_
private

Definition at line 214 of file OperationPropertyDialog.hh.

Referenced by saveOperation(), and TransferDataToWindow().

◆ hasSideEffects_

bool OperationPropertyDialog::hasSideEffects_
private

Does operation has side effects?

Definition at line 203 of file OperationPropertyDialog.hh.

Referenced by saveOperation(), and TransferDataToWindow().

◆ inputOperandList_

wxListCtrl* OperationPropertyDialog::inputOperandList_
private

◆ inputOperands_

std::vector<Operand*> OperationPropertyDialog::inputOperands_
private

◆ inputSizer_

wxStaticBoxSizer* OperationPropertyDialog::inputSizer_
private

Input operand sizer.

Definition at line 155 of file OperationPropertyDialog.hh.

Referenced by createContents(), and setTexts().

◆ isBranch_

bool OperationPropertyDialog::isBranch_
private

Operation is branch.

Definition at line 211 of file OperationPropertyDialog.hh.

Referenced by saveOperation(), and TransferDataToWindow().

◆ isCall_

bool OperationPropertyDialog::isCall_
private

Operation performs function call.

Definition at line 209 of file OperationPropertyDialog.hh.

Referenced by saveOperation(), and TransferDataToWindow().

◆ module_

OperationModule& OperationPropertyDialog::module_
private

Module in which operation belongs to.

Definition at line 193 of file OperationPropertyDialog.hh.

Referenced by createContents(), onOpen(), setBehaviorLabel(), and updateOperation().

◆ name_

wxString OperationPropertyDialog::name_
private

Name of the operation.

Definition at line 191 of file OperationPropertyDialog.hh.

Referenced by saveOperation(), TransferDataToWindow(), and updateOperation().

◆ operation_

Operation* OperationPropertyDialog::operation_
private

Operation to be created or to be modified.

Definition at line 186 of file OperationPropertyDialog.hh.

Referenced by onOpenDAG(), operation(), saveOperation(), TransferDataToWindow(), updateOperation(), and ~OperationPropertyDialog().

◆ operationWasCreatedHere_

bool OperationPropertyDialog::operationWasCreatedHere_
private

Definition at line 225 of file OperationPropertyDialog.hh.

Referenced by onOpenDAG(), and ~OperationPropertyDialog().

◆ orig_

ObjectState* OperationPropertyDialog::orig_
private

Original operation's ObjectState tree.

Definition at line 188 of file OperationPropertyDialog.hh.

Referenced by updateOperation().

◆ outputOperandList_

wxListCtrl* OperationPropertyDialog::outputOperandList_
private

◆ outputOperands_

std::vector<Operand*> OperationPropertyDialog::outputOperands_
private

◆ outputSizer_

wxStaticBoxSizer* OperationPropertyDialog::outputSizer_
private

Output operand sizer.

Definition at line 157 of file OperationPropertyDialog.hh.

Referenced by createContents(), and setTexts().

◆ path_

std::string OperationPropertyDialog::path_
private

Path in which module belongs to.

Definition at line 195 of file OperationPropertyDialog.hh.

Referenced by updateOperation().

◆ readMemory_

bool OperationPropertyDialog::readMemory_
private

Does operation read memory?

Definition at line 197 of file OperationPropertyDialog.hh.

Referenced by saveOperation(), and TransferDataToWindow().

◆ readMemoryCB_

wxCheckBox* OperationPropertyDialog::readMemoryCB_
private

Read memory check box.

Definition at line 176 of file OperationPropertyDialog.hh.

◆ sideEffectsCB_

wxCheckBox* OperationPropertyDialog::sideEffectsCB_
private

Has side effects check box.

Definition at line 182 of file OperationPropertyDialog.hh.

◆ writeMemory_

bool OperationPropertyDialog::writeMemory_
private

Does operation write memory?

Definition at line 199 of file OperationPropertyDialog.hh.

Referenced by saveOperation(), and TransferDataToWindow().

◆ writeMemoryCB_

wxCheckBox* OperationPropertyDialog::writeMemoryCB_
private

Write memory check box.

Definition at line 178 of file OperationPropertyDialog.hh.


The documentation for this class was generated from the following files:
OSEdConstants::BEHAVIOR_TEMPLATE_FILE_NAME
static const std::string BEHAVIOR_TEMPLATE_FILE_NAME
Name of the behavior template file name.
Definition: OSEdConstants.hh:82
Operand
Definition: Operand.hh:52
OperationPropertyDialog::setBehaviorLabel
void setBehaviorLabel()
Definition: OperationPropertyDialog.cc:393
OperationPropertyDialog::readMemory_
bool readMemory_
Does operation read memory?
Definition: OperationPropertyDialog.hh:197
OperationPropertyDialog::name_
wxString name_
Name of the operation.
Definition: OperationPropertyDialog.hh:191
Operation::affects
virtual TCEString affects(unsigned int i) const
Definition: Operation.cc:431
StringTools::endsWith
static bool endsWith(const std::string &source, const std::string &searchString)
Definition: StringTools.cc:126
Operation::affectedByCount
virtual int affectedByCount() const
Definition: Operation.cc:416
WarningDialog
Definition: WarningDialog.hh:42
OperationPropertyDialog::operation_
Operation * operation_
Operation to be created or to be modified.
Definition: OperationPropertyDialog.hh:186
OperationPropertyDialog::ID_TEXT_NAME
@ ID_TEXT_NAME
Definition: OperationPropertyDialog.hh:119
Operation::writesMemory
virtual bool writesMemory() const
Definition: Operation.cc:252
OSEdConstants::DEFAULT_COLUMN_WIDTH
static const int DEFAULT_COLUMN_WIDTH
Default column width.
Definition: OSEdConstants.hh:113
OSEdConstants::APPLICATION_NAME
static const wxString APPLICATION_NAME
The name of the application.
Definition: OSEdConstants.hh:110
OperationPropertyDialog::ID_OUTPUT_UP_BUTTON
@ ID_OUTPUT_UP_BUTTON
Definition: OperationPropertyDialog.hh:141
OSEdTextGenerator::TXT_COLUMN_ELEMENT_WIDTH
@ TXT_COLUMN_ELEMENT_WIDTH
Operand element width header.
Definition: OSEdTextGenerator.hh:105
WxConversion::toWxString
static wxString toWxString(const std::string &source)
OperationPropertyDialog::onSelection
void onSelection(wxListEvent &event)
Definition: OperationPropertyDialog.cc:556
OperationPropertyDialog::affectsChoice_
wxComboBox * affectsChoice_
Choice box for new affects operations.
Definition: OperationPropertyDialog.hh:174
Operation::hasSideEffects
virtual bool hasSideEffects() const
Definition: Operation.cc:272
OperationPropertyDialog::readMemoryCB_
wxCheckBox * readMemoryCB_
Read memory check box.
Definition: OperationPropertyDialog.hh:176
OperationPropertyDialog::ID_WRITES_MEMORY
@ ID_WRITES_MEMORY
Definition: OperationPropertyDialog.hh:122
OperationPropertyDialog::isBranch_
bool isBranch_
Operation is branch.
Definition: OperationPropertyDialog.hh:211
OperationPropertyDialog::ID_OPERATION_AFFECTED_BY
@ ID_OPERATION_AFFECTED_BY
Definition: OperationPropertyDialog.hh:127
Operand::saveState
virtual ObjectState * saveState() const
Definition: Operand.cc:490
ObjectStateLoadingException
Definition: Exception.hh:551
Operation::OPRN_IN
static const char * OPRN_IN
Object state name for input operand.
Definition: Operation.hh:91
OperationPropertyDialog::ID_READS_MEMORY
@ ID_READS_MEMORY
Definition: OperationPropertyDialog.hh:121
OperationPropertyDialog::ID_OUTPUT_DELETE_BUTTON
@ ID_OUTPUT_DELETE_BUTTON
Definition: OperationPropertyDialog.hh:145
OSEdTextGenerator::TXT_CHECKBOX_HAS_SIDE_EFFECTS
@ TXT_CHECKBOX_HAS_SIDE_EFFECTS
Has side effects label.
Definition: OSEdTextGenerator.hh:90
WidgetTools::setLabel
static void setLabel(Texts::TextGenerator *generator, wxWindow *widget, int textID)
Definition: WidgetTools.cc:92
OperationPropertyDialog::controlFlow_
bool controlFlow_
Can operation can change program flow.
Definition: OperationPropertyDialog.hh:207
OperationPropertyDialog::affectedBySizer_
wxStaticBoxSizer * affectedBySizer_
Affected by sizer.
Definition: OperationPropertyDialog.hh:161
GUITextGenerator::instance
static GUITextGenerator * instance()
Definition: GUITextGenerator.cc:67
OperationPropertyDialog::ID_AFFECTED_BY
@ ID_AFFECTED_BY
Definition: OperationPropertyDialog.hh:126
DialogPosition::getPosition
static wxPoint getPosition(Dialogs dialog)
Definition: DialogPosition.cc:49
OperationPropertyDialog::editDescription_
wxTextCtrl * editDescription_
Definition: OperationPropertyDialog.hh:214
Operation::OPRN_NAME
static const char * OPRN_NAME
Object state name for name.
Definition: Operation.hh:67
Operand::OPRND_CAN_SWAP
static const std::string OPRND_CAN_SWAP
Object state name for can swap.
Definition: Operand.hh:92
OutputOperandDialog
Definition: OutputOperandDialog.hh:49
OperationPropertyDialog::ID_TEXT_CTRL
@ ID_TEXT_CTRL
Definition: OperationPropertyDialog.hh:149
Operation::numberOfInputs
virtual int numberOfInputs() const
Definition: Operation.cc:192
GUITextGenerator
Definition: GUITextGenerator.hh:46
Operation::affectedBy
virtual TCEString affectedBy(unsigned int i) const
Definition: Operation.cc:447
OperationPropertyDialog::updateOperation
void updateOperation(bool newOpDag)
Definition: OperationPropertyDialog.cc:1025
ObjectState
Definition: ObjectState.hh:59
OSEdTextGenerator::TXT_LABEL_NO_BEHAVIOR
@ TXT_LABEL_NO_BEHAVIOR
No behavior label.
Definition: OSEdTextGenerator.hh:55
Operation::isClocked
virtual bool isClocked() const
Definition: Operation.cc:282
OperationPropertyDialog::isCall_
bool isCall_
Operation performs function call.
Definition: OperationPropertyDialog.hh:209
OSEdTextGenerator::TXT_ERROR_OPERATION_EXISTS
@ TXT_ERROR_OPERATION_EXISTS
Operation exists error.
Definition: OSEdTextGenerator.hh:152
Operation::OPRN_AFFECTS
static const char * OPRN_AFFECTS
Object state name for affects.
Definition: Operation.hh:87
FindWindow
Definition: FindWindow.hh:49
OSEdTextGenerator::TXT_LABEL_OPERATION_NAME
@ TXT_LABEL_OPERATION_NAME
Operation name label.
Definition: OSEdTextGenerator.hh:52
OperationPropertyDialog::ID_OK_BUTTON
@ ID_OK_BUTTON
Definition: OperationPropertyDialog.hh:148
OperationContainer::operationExists
static bool operationExists(const std::string &name)
Definition: OperationContainer.cc:219
OperationPropertyDialog::canTrap_
bool canTrap_
Can operation trap?
Definition: OperationPropertyDialog.hh:201
Texts::TextGenerator::text
virtual boost::format text(int textId)
Definition: TextGenerator.cc:94
ObjectState::setName
void setName(const std::string &name)
OperationPropertyDialog::moveUp
void moveUp(std::vector< Operand * > &ops, int id, wxListCtrl *list)
Definition: OperationPropertyDialog.cc:949
OperationPropertyDialog::updateOperands
void updateOperands()
Definition: OperationPropertyDialog.cc:443
OSEdTextGenerator::TXT_CHECKBOX_CAN_TRAP
@ TXT_CHECKBOX_CAN_TRAP
Can trap label.
Definition: OSEdTextGenerator.hh:89
OperationPropertyDialog::ID_TEXT_OPEN
@ ID_TEXT_OPEN
Definition: OperationPropertyDialog.hh:150
Operation::name
virtual TCEString name() const
Definition: Operation.cc:93
DialogPosition::setPosition
static void setPosition(Dialogs dialog, wxPoint point)
Definition: DialogPosition.cc:63
Operation::OPRN_AFFECTED_BY
static const char * OPRN_AFFECTED_BY
Object state name for affected by.
Definition: Operation.hh:89
OperationPropertyDialog::canTrapCB_
wxCheckBox * canTrapCB_
Can trap check box.
Definition: OperationPropertyDialog.hh:180
OperationPropertyDialog::ID_DAG_BUTTON
@ ID_DAG_BUTTON
Definition: OperationPropertyDialog.hh:147
Conversion::toString
static std::string toString(const T &source)
OperationPropertyDialog::setTexts
void setTexts()
Definition: OperationPropertyDialog.cc:244
OSEdTextGenerator::TXT_CHECKBOX_WRITES_MEMORY
@ TXT_CHECKBOX_WRITES_MEMORY
Writes memory label.
Definition: OSEdTextGenerator.hh:88
OSEdTextGenerator::TXT_CHECKBOX_READS_MEMORY
@ TXT_CHECKBOX_READS_MEMORY
Reads memory label.
Definition: OSEdTextGenerator.hh:87
OperationPropertyDialog::clockedCB_
wxCheckBox * clockedCB_
Clocked check box.
Definition: OperationPropertyDialog.hh:184
Operation::dagCode
virtual TCEString dagCode(int index) const
Definition: Operation.cc:159
OSEdTextGenerator::TXT_BUTTON_MODIFY
@ TXT_BUTTON_MODIFY
Modify button label.
Definition: OSEdTextGenerator.hh:70
StringTools::stringToUpper
static std::string stringToUpper(const std::string &source)
Definition: StringTools.cc:143
OperationPropertyDialog::updateSwapLists
void updateSwapLists(std::vector< std::string > deletedOperands)
Definition: OperationPropertyDialog.cc:1215
OperationPropertyDialog::affectedByList_
wxListCtrl * affectedByList_
List of affected by operations.
Definition: OperationPropertyDialog.hh:164
OSEdTextGenerator::TXT_COLUMN_ELEMENT_COUNT
@ TXT_COLUMN_ELEMENT_COUNT
Operand element count header.
Definition: OSEdTextGenerator.hh:106
assert
#define assert(condition)
Definition: Application.hh:86
OperationIndex::pathCount
int pathCount() const
OSEdTextGenerator::TXT_BOX_AFFECTED_BY
@ TXT_BOX_AFFECTED_BY
Affected by sizer label.
Definition: OSEdTextGenerator.hh:124
OperationPropertyDialog::ID_CLOCKED
@ ID_CLOCKED
Definition: OperationPropertyDialog.hh:125
Operation::OPRN_CONTROL_FLOW
static const char * OPRN_CONTROL_FLOW
Object state name for control flow property.
Definition: Operation.hh:81
OperationModule::propertiesModule
virtual std::string propertiesModule() const
Definition: OperationModule.cc:121
GUITextGenerator::TXT_BUTTON_CANCEL
@ TXT_BUTTON_CANCEL
Label for cancel button.
Definition: GUITextGenerator.hh:55
OperationPropertyDialog::ID_CAN_TRAP
@ ID_CAN_TRAP
Definition: OperationPropertyDialog.hh:123
OperationPropertyDialog::affectsSizer_
wxStaticBoxSizer * affectsSizer_
Affects sizer.
Definition: OperationPropertyDialog.hh:159
Operation::OPRN_DESCRIPTION
static const char * OPRN_DESCRIPTION
Object state name for description.
Definition: Operation.hh:69
OperationPropertyDialog::writeMemoryCB_
wxCheckBox * writeMemoryCB_
Write memory check box.
Definition: OperationPropertyDialog.hh:178
Operand::OPRND_ID
static const std::string OPRND_ID
Object state name for operand id.
Definition: Operand.hh:82
OperationPropertyDialog::affectedByChoice_
wxComboBox * affectedByChoice_
Choice box for new affected by operations.
Definition: OperationPropertyDialog.hh:172
Operation::OPRN_TRAP
static const char * OPRN_TRAP
Object state name for trap.
Definition: Operation.hh:75
OperationPropertyDialog::inputOperandList_
wxListCtrl * inputOperandList_
List of input operands.
Definition: OperationPropertyDialog.hh:168
ErrorDialog
Definition: ErrorDialog.hh:42
Operation::OPRN_TRIGGER
static const char * OPRN_TRIGGER
Object state name for trigger semantics.
Definition: Operation.hh:95
OperationPropertyDialog::ID_OUTPUT_MODIFY_BUTTON
@ ID_OUTPUT_MODIFY_BUTTON
Definition: OperationPropertyDialog.hh:144
OSEdTextGenerator::TXT_COLUMN_OPERATION
@ TXT_COLUMN_OPERATION
Operation column header.
Definition: OSEdTextGenerator.hh:96
OSEdTextGenerator::TXT_BUTTON_OPEN
@ TXT_BUTTON_OPEN
Open button label.
Definition: OSEdTextGenerator.hh:71
OperationPropertyDialog::path_
std::string path_
Path in which module belongs to.
Definition: OperationPropertyDialog.hh:195
OSEdTextGenerator::TXT_QUESTION_SAVE_PROPERTIES
@ TXT_QUESTION_SAVE_PROPERTIES
Save properties question.
Definition: OSEdTextGenerator.hh:210
OSEdTextGenerator::TXT_LABEL_HAS_BEHAVIOR
@ TXT_LABEL_HAS_BEHAVIOR
Has behavior label.
Definition: OSEdTextGenerator.hh:54
OperationPropertyDialog::inputSizer_
wxStaticBoxSizer * inputSizer_
Input operand sizer.
Definition: OperationPropertyDialog.hh:155
OperationPropertyDialog::ID_INPUT_MODIFY_BUTTON
@ ID_INPUT_MODIFY_BUTTON
Definition: OperationPropertyDialog.hh:134
dummy
SimValue dummy(32)
a dummy simvalue which is given for operands that are not bound
OperationModule::behaviorSourceModule
virtual std::string behaviorSourceModule() const
Definition: OperationModule.cc:144
WidgetTools::lcStringSelection
static std::string lcStringSelection(wxListCtrl *list, int column)
Definition: WidgetTools.cc:108
Operation::OPRN_OPERATION
static const char * OPRN_OPERATION
Object state name for operation.
Definition: Operation.hh:65
Operation::OPRN_CLOCKED
static const char * OPRN_CLOCKED
Object state name for clockedness.
Definition: Operation.hh:79
OperationPropertyDialog::getSelectedItems
std::vector< std::string > getSelectedItems(wxListCtrl *listCtrl)
Definition: OperationPropertyDialog.cc:998
OSEdTextGenerator::TXT_ERROR_NO_EDITOR
@ TXT_ERROR_NO_EDITOR
Error when no editor is given.
Definition: OSEdTextGenerator.hh:140
InputOperandDialog
Definition: InputOperandDialog.hh:47
OperationPropertyDialog::clocked_
bool clocked_
Is operation clocked?
Definition: OperationPropertyDialog.hh:205
Operation::OPRN_ISCALL
static const char * OPRN_ISCALL
Object state name for call property.
Definition: Operation.hh:97
OperationPropertyDialog::createBitmaps
wxBitmap createBitmaps(size_t index)
Definition: OperationPropertyDialog.cc:1507
Operation::loadState
virtual void loadState(const ObjectState *state)
Definition: Operation.cc:480
FileSystem::copy
static void copy(const std::string &source, const std::string &target)
Definition: FileSystem.cc:524
GUITextGenerator::TXT_BUTTON_ADD
@ TXT_BUTTON_ADD
Label for an add button.
Definition: GUITextGenerator.hh:53
OperationPropertyDialog::sideEffectsCB_
wxCheckBox * sideEffectsCB_
Has side effects check box.
Definition: OperationPropertyDialog.hh:182
ObjectState::child
ObjectState * child(int index) const
Definition: ObjectState.cc:471
ObjectState::addChild
void addChild(ObjectState *child)
Definition: ObjectState.cc:376
OperationPropertyDialog::ID_AFFECTS
@ ID_AFFECTS
Definition: OperationPropertyDialog.hh:136
OSEdTextGenerator::TXT_ERROR_OPEN
@ TXT_ERROR_OPEN
Error when opening fails.
Definition: OSEdTextGenerator.hh:141
OperationPropertyDialog::affects_
std::vector< std::string > affects_
Operations that affects this operation.
Definition: OperationPropertyDialog.hh:221
Operation::OPRN_WRITES_MEMORY
static const char * OPRN_WRITES_MEMORY
Object state name for writes memory.
Definition: Operation.hh:85
ObjectState::childCount
int childCount() const
Operation::readsMemory
virtual bool readsMemory() const
Definition: Operation.cc:242
Operation::canTrap
virtual bool canTrap() const
Definition: Operation.cc:262
Operation::saveState
virtual ObjectState * saveState() const
Definition: Operation.cc:490
Operand::SINT_WORD
@ SINT_WORD
Definition: Operand.hh:59
OperationPropertyDialog::outputSizer_
wxStaticBoxSizer * outputSizer_
Output operand sizer.
Definition: OperationPropertyDialog.hh:157
Operation::OPRN_READS_MEMORY
static const char * OPRN_READS_MEMORY
Object state name for reads memory.
Definition: Operation.hh:83
Exception
Definition: Exception.hh:54
OSEdTextGenerator::TXT_COLUMN_TYPE
@ TXT_COLUMN_TYPE
Type column header.
Definition: OSEdTextGenerator.hh:98
OSEdTextGenerator::TXT_CHECKBOX_CLOCKED
@ TXT_CHECKBOX_CLOCKED
Clocked label.
Definition: OSEdTextGenerator.hh:91
OperationPropertyDialog::launchEditor
void launchEditor(const std::string &cmd)
Definition: OperationPropertyDialog.cc:1203
ObjectState::name
std::string name() const
OperationPropertyDialog::ID_OUTPUT_DOWN_BUTTON
@ ID_OUTPUT_DOWN_BUTTON
Definition: OperationPropertyDialog.hh:142
ConfirmDialog
Definition: ConfirmDialog.hh:41
Operation
Definition: Operation.hh:59
Operation::OPRN_OUT
static const char * OPRN_OUT
Object state name for output operand.
Definition: Operation.hh:93
Exception::errorMessage
std::string errorMessage() const
Definition: Exception.cc:123
GUITextGenerator::TXT_BUTTON_DELETE
@ TXT_BUTTON_DELETE
Label for delete button.
Definition: GUITextGenerator.hh:56
Operation::OPRN_INPUTS
static const char * OPRN_INPUTS
Object state name for inputs.
Definition: Operation.hh:71
FileSystem::DIRECTORY_SEPARATOR
static const std::string DIRECTORY_SEPARATOR
Definition: FileSystem.hh:189
CommandThread
Definition: CommandThread.hh:43
options
static MachInfoCmdLineOptions options
Definition: MachInfo.cc:46
Operand::OPRND_TYPE
static const std::string OPRND_TYPE
Object state name for operand type.
Definition: Operand.hh:84
Operation::description
virtual TCEString description() const
Definition: Operation.cc:103
OperationPropertyDialog::ID_OPEN_BUTTON
@ ID_OPEN_BUTTON
Definition: OperationPropertyDialog.hh:146
OSEdTextGenerator::TXT_BOX_INPUT_OPERANDS
@ TXT_BOX_INPUT_OPERANDS
Input operand sizer label.
Definition: OSEdTextGenerator.hh:125
StringTools::trim
static std::string trim(const std::string &source)
Definition: StringTools.cc:55
OperationPropertyDialog::ID_AFFECTED_DELETE_BUTTON
@ ID_AFFECTED_DELETE_BUTTON
Definition: OperationPropertyDialog.hh:129
Operation::OPRN_SIDE_EFFECTS
static const char * OPRN_SIDE_EFFECTS
Object state name for side effects.
Definition: Operation.hh:77
OperationPropertyDialog::affectedBy_
std::vector< std::string > affectedBy_
Operations that are affected by this operation.
Definition: OperationPropertyDialog.hh:223
Operation::operand
virtual Operand & operand(int id) const
Definition: Operation.cc:541
Operation::dagCount
virtual int dagCount() const
Definition: Operation.cc:134
OperationPropertyDialog::ID_OUTPUT_OPERANDS
@ ID_OUTPUT_OPERANDS
Definition: OperationPropertyDialog.hh:140
NullOperationBehavior::instance
static NullOperationBehavior & instance()
Definition: OperationBehavior.hh:95
OSEdTextGenerator::TXT_ERROR_NON_EXISTING_OPERATION
@ TXT_ERROR_NON_EXISTING_OPERATION
Error when operation does not exist.
Definition: OSEdTextGenerator.hh:145
OperationIndex::moduleCount
int moduleCount() const
DialogPosition::DIALOG_PROPERTIES
@ DIALOG_PROPERTIES
Operation properties dialog.
Definition: DialogPosition.hh:48
GUITextGenerator::TXT_BUTTON_ADD_DIALOG
@ TXT_BUTTON_ADD_DIALOG
Label for add button (with trailing ...).
Definition: GUITextGenerator.hh:54
OperationPropertyDialog::affectsList_
wxListCtrl * affectsList_
List of affects operations.
Definition: OperationPropertyDialog.hh:166
OperationPropertyDialog::ID_EDIT_DESCRIPTION
@ ID_EDIT_DESCRIPTION
Definition: OperationPropertyDialog.hh:151
OperationPropertyDialog::ID_AFFECTS_DELETE_BUTTON
@ ID_AFFECTS_DELETE_BUTTON
Definition: OperationPropertyDialog.hh:139
OSEdTextGenerator::TXT_ERROR_NO_NAME
@ TXT_ERROR_NO_NAME
Error when no name is given.
Definition: OSEdTextGenerator.hh:132
FileSystem::fileExists
static bool fileExists(const std::string fileName)
OperationModule
Definition: OperationModule.hh:46
OperationPropertyDialog::createContents
wxSizer * createContents(wxWindow *parent, bool call_fit, bool set_sizer)
Definition: OperationPropertyDialog.cc:1271
OperationModule::hasBehaviorSource
virtual bool hasBehaviorSource() const
Definition: OperationModule.cc:131
OperationPropertyDialog::operationWasCreatedHere_
bool operationWasCreatedHere_
Definition: OperationPropertyDialog.hh:225
OperationPropertyDialog::ID_HAS_SIDE_EFFECTS
@ ID_HAS_SIDE_EFFECTS
Definition: OperationPropertyDialog.hh:124
OperationIndex::path
std::string path(int i) const
OperationIndex
Definition: OperationIndex.hh:58
OSEdTextGenerator::instance
static OSEdTextGenerator & instance()
Definition: OSEdTextGenerator.cc:214
OperationPropertyDialog::ID_OUTPUT_ADD_BUTTON
@ ID_OUTPUT_ADD_BUTTON
Definition: OperationPropertyDialog.hh:143
OSEdTextGenerator::TXT_COLUMN_OPERAND
@ TXT_COLUMN_OPERAND
Operand column header.
Definition: OSEdTextGenerator.hh:97
OperationPropertyDialog::module_
OperationModule & module_
Module in which operation belongs to.
Definition: OperationPropertyDialog.hh:193
OperationPropertyDialog::ID_OPERATION_AFFECTS
@ ID_OPERATION_AFFECTS
Definition: OperationPropertyDialog.hh:137
OperationPropertyDialog::ID_INPUT_DOWN_BUTTON
@ ID_INPUT_DOWN_BUTTON
Definition: OperationPropertyDialog.hh:132
ObjectState::intAttribute
int intAttribute(const std::string &name) const
Definition: ObjectState.cc:276
OSEdTextGenerator
Definition: OSEdTextGenerator.hh:42
OSEdTextGenerator::TXT_BOX_OUTPUT_OPERANDS
@ TXT_BOX_OUTPUT_OPERANDS
Output operand sizer label.
Definition: OSEdTextGenerator.hh:126
OperationPropertyDialog::ID_INPUT_UP_BUTTON
@ ID_INPUT_UP_BUTTON
Definition: OperationPropertyDialog.hh:131
OperationPropertyDialog::ID_INPUT_DELETE_BUTTON
@ ID_INPUT_DELETE_BUTTON
Definition: OperationPropertyDialog.hh:135
OSEdOptions
Definition: OSEdOptions.hh:46
WidgetTools::setWidgetLabel
static void setWidgetLabel(wxWindow *widget, std::string text)
Definition: WidgetTools.cc:52
OperationContainer::operation
static Operation * operation(const std::string &path, const std::string &module, const std::string &oper)
Definition: OperationContainer.cc:173
Conversion::toInt
static int toInt(const T &source)
OperationPropertyDialog::ID_AFFECTED_ADD_BUTTON
@ ID_AFFECTED_ADD_BUTTON
Definition: OperationPropertyDialog.hh:128
OperationPropertyDialog::outputOperands_
std::vector< Operand * > outputOperands_
Output operands.
Definition: OperationPropertyDialog.hh:219
OperationPropertyDialog::ID_AFFECTS_ADD_BUTTON
@ ID_AFFECTS_ADD_BUTTON
Definition: OperationPropertyDialog.hh:138
Operation::isCall
virtual bool isCall() const
Definition: Operation.cc:318
OperationModule::name
virtual std::string name() const
Definition: OperationModule.cc:160
OperationPropertyDialog::inputOperands_
std::vector< Operand * > inputOperands_
Input operands.
Definition: OperationPropertyDialog.hh:217
OperationPropertyDialog::hasSideEffects_
bool hasSideEffects_
Does operation has side effects?
Definition: OperationPropertyDialog.hh:203
OperationPropertyDialog::outputOperandList_
wxListCtrl * outputOperandList_
List of output operands.
Definition: OperationPropertyDialog.hh:170
OperationIndex::operationCount
int operationCount(const OperationModule &om)
Definition: OperationIndex.cc:363
OperationPropertyDialog::ID_INPUT_ADD_BUTTON
@ ID_INPUT_ADD_BUTTON
Definition: OperationPropertyDialog.hh:133
WxConversion::toString
static std::string toString(const wxString &source)
OSEdTextGenerator::TXT_BOX_AFFECTS
@ TXT_BOX_AFFECTS
Affects sizer label.
Definition: OSEdTextGenerator.hh:123
OperationPropertyDialog::ID_INPUT_OPERANDS
@ ID_INPUT_OPERANDS
Definition: OperationPropertyDialog.hh:130
OperationPropertyDialog::updateAffected
void updateAffected()
Definition: OperationPropertyDialog.cc:485
OperationContainer::operationIndex
static OperationIndex & operationIndex()
Definition: OperationContainer.cc:94
Operation::numberOfOutputs
virtual int numberOfOutputs() const
Definition: Operation.cc:202
OperationPropertyDialog::writeMemory_
bool writeMemory_
Does operation write memory?
Definition: OperationPropertyDialog.hh:199
ObjectState::setValue
void setValue(const std::string &value)
OperationPropertyDialog::ID_NAME
@ ID_NAME
Definition: OperationPropertyDialog.hh:120
Operation::OPRN_ISBRANCH
static const char * OPRN_ISBRANCH
Object state name for branch property.
Definition: Operation.hh:99
OperationPropertyDialog::moveDown
void moveDown(std::vector< Operand * > &ops, int id, wxListCtrl *list)
Definition: OperationPropertyDialog.cc:974
OperationDAGDialog
Definition: OperationDAGDialog.hh:51
Operation::OPRN_OUTPUTS
static const char * OPRN_OUTPUTS
Object state name for outputs.
Definition: Operation.hh:73
OperationIndex::module
OperationModule & module(int i)
Operation::affectsCount
virtual int affectsCount() const
Definition: Operation.cc:402
Operation::isBranch
virtual bool isBranch() const
Definition: Operation.cc:306
OperationIndex::operationName
std::string operationName(int i, const OperationModule &om)
Definition: OperationIndex.cc:337
OperationPropertyDialog::saveOperation
ObjectState * saveOperation()
Definition: OperationPropertyDialog.cc:1105
OSEdTextGenerator::TXT_PROPERTY_DIALOG_TITLE
@ TXT_PROPERTY_DIALOG_TITLE
Property dialog title.
Definition: OSEdTextGenerator.hh:109
ObjectState::setAttribute
void setAttribute(const std::string &name, const std::string &value)
Definition: ObjectState.cc:100
Environment::dataDirPath
static std::string dataDirPath(const std::string &prog)
Definition: Environment.cc:176
Operand::loadState
virtual void loadState(const ObjectState *state)
Definition: Operand.cc:383
OperationPropertyDialog::orig_
ObjectState * orig_
Original operation's ObjectState tree.
Definition: OperationPropertyDialog.hh:188
Operation::isControlFlowOperation
virtual bool isControlFlowOperation() const
Definition: Operation.cc:294
GUITextGenerator::TXT_BUTTON_OK
@ TXT_BUTTON_OK
Label for OK button.
Definition: GUITextGenerator.hh:59