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

#include <ModifyFUCmd.hh>

Inheritance diagram for ModifyFUCmd:
Inheritance graph
Collaboration diagram for ModifyFUCmd:
Collaboration graph

Public Member Functions

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

Private Attributes

EditParteditPart_
 Function unit to modify.
 

Detailed Description

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

Definition at line 43 of file ModifyFUCmd.hh.

Constructor & Destructor Documentation

◆ ModifyFUCmd()

ModifyFUCmd::ModifyFUCmd ( EditPart editPart)

The Constructor.

Definition at line 44 of file ModifyFUCmd.cc.

44 :
46 editPart_(editPart) {
47}
EditPart * editPart_
Function unit to modify.

◆ ~ModifyFUCmd()

ModifyFUCmd::~ModifyFUCmd ( )
virtual

The Destructor.

Definition at line 53 of file ModifyFUCmd.cc.

53 {
54}

Member Function Documentation

◆ Do()

bool ModifyFUCmd::Do ( )
virtual

Executes the command.

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

Implements ComponentCommand.

Definition at line 63 of file ModifyFUCmd.cc.

63 {
64
65 FunctionUnit* fu = dynamic_cast<FunctionUnit*>(editPart_->model());
66
67 assert (fu != NULL);
68 assert (parentWindow() != NULL);
69
70 FUDialog dialog(parentWindow(), fu);
71
72 if (dialog.ShowModal() == wxID_OK) {
73 // function unit was modified
74 return true;
75 } else {
76 // modification was cancelled
77 return false;
78 }
79}
#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* ModifyFUCmd::editPart_
private

Function unit to modify.

Definition at line 51 of file ModifyFUCmd.hh.

Referenced by Do().


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