OpenASIP  2.0
Public Member Functions | Private Attributes | List of all members
DeleteGCUCmd Class Reference

#include <DeleteGCUCmd.hh>

Inheritance diagram for DeleteGCUCmd:
Inheritance graph
Collaboration diagram for DeleteGCUCmd:
Collaboration graph

Public Member Functions

 DeleteGCUCmd (EditPart *editPart)
 
virtual ~DeleteGCUCmd ()
 
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 delete. More...
 

Detailed Description

Command for deleting global control unit from the Machine.

Definition at line 42 of file DeleteGCUCmd.hh.

Constructor & Destructor Documentation

◆ DeleteGCUCmd()

DeleteGCUCmd::DeleteGCUCmd ( EditPart editPart)

The Constructor.

Parameters
editPartGlobal control unit to delete.

Definition at line 45 of file DeleteGCUCmd.cc.

45  :
46  ComponentCommand(), editPart_(editPart) {
47 }

◆ ~DeleteGCUCmd()

DeleteGCUCmd::~DeleteGCUCmd ( )
virtual

The Destructor.

Definition at line 53 of file DeleteGCUCmd.cc.

53  {
54 }

Member Function Documentation

◆ Do()

bool DeleteGCUCmd::Do ( )
virtual

Executes the command.

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

Implements ComponentCommand.

Definition at line 63 of file DeleteGCUCmd.cc.

63  {
64  ControlUnit* gcu = dynamic_cast<ControlUnit*>(editPart_->model());
65  assert (gcu != NULL);
66  delete gcu;
67  return true;
68 }

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

Here is the call graph for this function:

Member Data Documentation

◆ editPart_

EditPart* DeleteGCUCmd::editPart_
private

Global control unit to delete.

Definition at line 50 of file DeleteGCUCmd.hh.

Referenced by Do().


The documentation for this class was generated from the following files:
DeleteGCUCmd::editPart_
EditPart * editPart_
Global control unit to delete.
Definition: DeleteGCUCmd.hh:50
ComponentCommand::ComponentCommand
ComponentCommand()
Definition: ComponentCommand.cc:38
assert
#define assert(condition)
Definition: Application.hh:86
TTAMachine::ControlUnit
Definition: ControlUnit.hh:50
EditPart::model
TTAMachine::MachinePart * model() const