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

#include <ModifyGCUCmd.hh>

Inheritance diagram for ModifyGCUCmd:
Inheritance graph
Collaboration diagram for ModifyGCUCmd:
Collaboration graph

Public Member Functions

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

Private Attributes

EditParteditPart_
 Global control unit to modify.
 

Detailed Description

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

Definition at line 43 of file ModifyGCUCmd.hh.

Constructor & Destructor Documentation

◆ ModifyGCUCmd()

ModifyGCUCmd::ModifyGCUCmd ( EditPart editPart)

The Constructor.

Definition at line 44 of file ModifyGCUCmd.cc.

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

◆ ~ModifyGCUCmd()

ModifyGCUCmd::~ModifyGCUCmd ( )
virtual

The Destructor.

Definition at line 53 of file ModifyGCUCmd.cc.

53 {
54}

Member Function Documentation

◆ Do()

bool ModifyGCUCmd::Do ( )
virtual

Executes the command.

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

Implements ComponentCommand.

Definition at line 63 of file ModifyGCUCmd.cc.

63 {
64
65 ControlUnit* gcu = dynamic_cast<ControlUnit*>(editPart_->model());
66 assert (gcu != NULL);
67 assert (parentWindow() != NULL);
68
69 GCUDialog dialog(parentWindow(), gcu);
70
71 if (dialog.ShowModal() == wxID_OK) {
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* ModifyGCUCmd::editPart_
private

Global control unit to modify.

Definition at line 51 of file ModifyGCUCmd.hh.

Referenced by Do().


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