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

#include <ModifyRFPortCmd.hh>

Inheritance diagram for ModifyRFPortCmd:
Inheritance graph
Collaboration diagram for ModifyRFPortCmd:
Collaboration graph

Public Member Functions

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

Private Attributes

EditParteditPart_
 Register file port to modify.
 

Detailed Description

Command which displays a register file port dialog with precompleted values for modifying a register file port.

Definition at line 44 of file ModifyRFPortCmd.hh.

Constructor & Destructor Documentation

◆ ModifyRFPortCmd()

ModifyRFPortCmd::ModifyRFPortCmd ( EditPart editPart)

The Constructor.

Parameters
editPartPort to modify.

Definition at line 47 of file ModifyRFPortCmd.cc.

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

◆ ~ModifyRFPortCmd()

ModifyRFPortCmd::~ModifyRFPortCmd ( )
virtual

The Destructor.

Definition at line 56 of file ModifyRFPortCmd.cc.

56 {
57}

Member Function Documentation

◆ Do()

bool ModifyRFPortCmd::Do ( )
virtual

Executes the command.

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

Implements ComponentCommand.

Definition at line 66 of file ModifyRFPortCmd.cc.

66 {
67
68 Port* port = dynamic_cast<Port*>(editPart_->model());
69
70 assert (port != NULL);
71 assert (parentWindow() != NULL);
72
73 RFPortDialog 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* ModifyRFPortCmd::editPart_
private

Register file port to modify.

Definition at line 52 of file ModifyRFPortCmd.hh.

Referenced by Do().


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