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

#include <DeleteFUCmd.hh>

Inheritance diagram for DeleteFUCmd:
Inheritance graph
Collaboration diagram for DeleteFUCmd:
Collaboration graph

Public Member Functions

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

Private Attributes

EditParteditPart_
 Function unit to delete. More...
 

Detailed Description

Command for deleting function units from the Machine.

Definition at line 42 of file DeleteFUCmd.hh.

Constructor & Destructor Documentation

◆ DeleteFUCmd()

DeleteFUCmd::DeleteFUCmd ( EditPart editPart)

The Constructor.

Parameters
editPartFunction unit to delete.

Definition at line 44 of file DeleteFUCmd.cc.

44  :
46  editPart_(editPart) {
47 }

◆ ~DeleteFUCmd()

DeleteFUCmd::~DeleteFUCmd ( )
virtual

The Destructor.

Definition at line 53 of file DeleteFUCmd.cc.

53  {
54 }

Member Function Documentation

◆ Do()

bool DeleteFUCmd::Do ( )
virtual

Executes the command.

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

Implements ComponentCommand.

Definition at line 63 of file DeleteFUCmd.cc.

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

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

Here is the call graph for this function:

Member Data Documentation

◆ editPart_

EditPart* DeleteFUCmd::editPart_
private

Function unit to delete.

Definition at line 50 of file DeleteFUCmd.hh.

Referenced by Do().


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