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

#include <DeleteIUCmd.hh>

Inheritance diagram for DeleteIUCmd:
Inheritance graph
Collaboration diagram for DeleteIUCmd:
Collaboration graph

Public Member Functions

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

Private Attributes

EditParteditPart_
 Immediate unit to delete.
 

Detailed Description

Command for deleting immediate units from the Machine.

Definition at line 42 of file DeleteIUCmd.hh.

Constructor & Destructor Documentation

◆ DeleteIUCmd()

DeleteIUCmd::DeleteIUCmd ( EditPart editPart)

The Constructor.

Parameters
editPartFunction unit to delete.

Definition at line 44 of file DeleteIUCmd.cc.

44 :
45 ComponentCommand(), editPart_(editPart) {
46}
EditPart * editPart_
Immediate unit to delete.

◆ ~DeleteIUCmd()

DeleteIUCmd::~DeleteIUCmd ( )
virtual

The Destructor.

Definition at line 52 of file DeleteIUCmd.cc.

52 {
53}

Member Function Documentation

◆ Do()

bool DeleteIUCmd::Do ( )
virtual

Executes the command.

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

Implements ComponentCommand.

Definition at line 62 of file DeleteIUCmd.cc.

62 {
63 ImmediateUnit* iu = dynamic_cast<ImmediateUnit*>(editPart_->model());
64 assert (iu != NULL);
65 delete iu;
66 return true;
67}
#define assert(condition)
TTAMachine::MachinePart * model() const

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

Here is the call graph for this function:

Member Data Documentation

◆ editPart_

EditPart* DeleteIUCmd::editPart_
private

Immediate unit to delete.

Definition at line 50 of file DeleteIUCmd.hh.

Referenced by Do().


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