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

#include <ModifyIUCmd.hh>

Inheritance diagram for ModifyIUCmd:
Inheritance graph
Collaboration diagram for ModifyIUCmd:
Collaboration graph

Public Member Functions

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

Private Attributes

EditParteditPart_
 Immediate unit to modify.
 

Detailed Description

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

Definition at line 43 of file ModifyIUCmd.hh.

Constructor & Destructor Documentation

◆ ModifyIUCmd()

ModifyIUCmd::ModifyIUCmd ( EditPart editPart)

The Constructor.

Definition at line 43 of file ModifyIUCmd.cc.

43 :
44 editPart_(editPart) {
45
46}
EditPart * editPart_
Immediate unit to modify.

◆ ~ModifyIUCmd()

ModifyIUCmd::~ModifyIUCmd ( )
virtual

The Destructor.

Definition at line 52 of file ModifyIUCmd.cc.

52 {
53}

Member Function Documentation

◆ Do()

bool ModifyIUCmd::Do ( )
virtual

Executes the command.

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

Implements ComponentCommand.

Definition at line 62 of file ModifyIUCmd.cc.

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

Immediate unit to modify.

Definition at line 51 of file ModifyIUCmd.hh.

Referenced by Do().


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