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

#include <ModifyFUPortCmd.hh>

Inheritance diagram for ModifyFUPortCmd:
Inheritance graph
Collaboration diagram for ModifyFUPortCmd:
Collaboration graph

Public Member Functions

 ModifyFUPortCmd (EditPart *editPart)
 
virtual ~ModifyFUPortCmd ()
 
virtual bool Do ()
 
- Public Member Functions inherited from ComponentCommand
 ComponentCommand ()
 
virtual ~ComponentCommand ()
 
wxWindow * parentWindow ()
 
void setParentWindow (wxWindow *window)
 

Private Attributes

EditParteditPart_
 Function unit port to modify. More...
 

Detailed Description

Command which displays a function unit port dialog with precompleted values for modifying a function unit port.

Definition at line 44 of file ModifyFUPortCmd.hh.

Constructor & Destructor Documentation

◆ ModifyFUPortCmd()

ModifyFUPortCmd::ModifyFUPortCmd ( EditPart editPart)

The Constructor.

Parameters
editPartPort to modify.

Definition at line 47 of file ModifyFUPortCmd.cc.

47  :
49  editPart_(editPart) {
50 }

◆ ~ModifyFUPortCmd()

ModifyFUPortCmd::~ModifyFUPortCmd ( )
virtual

The Destructor.

Definition at line 56 of file ModifyFUPortCmd.cc.

56  {
57 }

Member Function Documentation

◆ Do()

bool ModifyFUPortCmd::Do ( )
virtual

Executes the command.

Returns
true, if the command was succesfully executed, false otherwise.

Implements ComponentCommand.

Definition at line 66 of file ModifyFUPortCmd.cc.

66  {
67 
68  FUPort* port = dynamic_cast<FUPort*>(editPart_->model());
69 
70  assert (port != NULL);
71  assert (parentWindow() != NULL);
72 
73  FUPortDialog dialog(parentWindow(), port);
74 
75  if (dialog.ShowModal() == wxID_OK) {
76  // port was modified
77  return true;
78  } else {
79  return false;
80  }
81 }

References assert, editPart_, EditPart::model(), and ComponentCommand::parentWindow().

Here is the call graph for this function:

Member Data Documentation

◆ editPart_

EditPart* ModifyFUPortCmd::editPart_
private

Function unit port to modify.

Definition at line 52 of file ModifyFUPortCmd.hh.

Referenced by Do().


The documentation for this class was generated from the following files:
ModifyFUPortCmd::editPart_
EditPart * editPart_
Function unit port to modify.
Definition: ModifyFUPortCmd.hh:52
ComponentCommand::ComponentCommand
ComponentCommand()
Definition: ComponentCommand.cc:38
assert
#define assert(condition)
Definition: Application.hh:86
TTAMachine::FUPort
Definition: FUPort.hh:46
EditPart::model
TTAMachine::MachinePart * model() const
FUPortDialog
Definition: FUPortDialog.hh:44
ComponentCommand::parentWindow
wxWindow * parentWindow()
Definition: ComponentCommand.cc:66