OpenASIP 2.2
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
ModifyIUPortCmd Class Reference

#include <ModifyIUPortCmd.hh>

Inheritance diagram for ModifyIUPortCmd:
Inheritance graph
Collaboration diagram for ModifyIUPortCmd:
Collaboration graph

Public Member Functions

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

Private Attributes

EditParteditPart_
 Immediate unit port to modify.
 

Detailed Description

Command which displays an immediate unit port dialog with precompleted values for modifying an imediate unit port.

Definition at line 44 of file ModifyIUPortCmd.hh.

Constructor & Destructor Documentation

◆ ModifyIUPortCmd()

ModifyIUPortCmd::ModifyIUPortCmd ( EditPart editPart)

The Constructor.

Parameters
editPartPort to modify.

Definition at line 47 of file ModifyIUPortCmd.cc.

47 :
49 editPart_(editPart) {
50}
EditPart * editPart_
Immediate unit port to modify.

◆ ~ModifyIUPortCmd()

ModifyIUPortCmd::~ModifyIUPortCmd ( )
virtual

The Destructor.

Definition at line 56 of file ModifyIUPortCmd.cc.

56 {
57}

Member Function Documentation

◆ Do()

bool ModifyIUPortCmd::Do ( )
virtual

Executes the command.

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

Implements ComponentCommand.

Definition at line 66 of file ModifyIUPortCmd.cc.

66 {
67
68 Port* port = dynamic_cast<Port*>(editPart_->model());
69
70 assert (port != NULL);
71 assert (parentWindow() != NULL);
72
73 IUPortDialog dialog(parentWindow(), port);
74
75 if (dialog.ShowModal() == wxID_OK) {
76 // port was modified
77 return true;
78 } else {
79 return false;
80 }
81}
#define assert(condition)
wxWindow * parentWindow()
TTAMachine::MachinePart * model() const

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

Here is the call graph for this function:

Member Data Documentation

◆ editPart_

EditPart* ModifyIUPortCmd::editPart_
private

Immediate unit port to modify.

Definition at line 52 of file ModifyIUPortCmd.hh.

Referenced by Do().


The documentation for this class was generated from the following files: