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

#include <DeleteRFCmd.hh>

Inheritance diagram for DeleteRFCmd:
Inheritance graph
Collaboration diagram for DeleteRFCmd:
Collaboration graph

Public Member Functions

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

Private Attributes

EditParteditPart_
 Register file to delete. More...
 

Detailed Description

Command for deleting register files from the Machine.

Definition at line 42 of file DeleteRFCmd.hh.

Constructor & Destructor Documentation

◆ DeleteRFCmd()

DeleteRFCmd::DeleteRFCmd ( EditPart editPart)

The Constructor.

Parameters
editPartRegister file to delete.

Definition at line 44 of file DeleteRFCmd.cc.

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

◆ ~DeleteRFCmd()

DeleteRFCmd::~DeleteRFCmd ( )
virtual

The Destructor.

Definition at line 52 of file DeleteRFCmd.cc.

52  {
53 }

Member Function Documentation

◆ Do()

bool DeleteRFCmd::Do ( )
virtual

Executes the command.

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

Implements ComponentCommand.

Definition at line 62 of file DeleteRFCmd.cc.

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

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

Here is the call graph for this function:

Member Data Documentation

◆ editPart_

EditPart* DeleteRFCmd::editPart_
private

Register file to delete.

Definition at line 50 of file DeleteRFCmd.hh.

Referenced by Do().


The documentation for this class was generated from the following files:
DeleteRFCmd::editPart_
EditPart * editPart_
Register file to delete.
Definition: DeleteRFCmd.hh:50
ComponentCommand::ComponentCommand
ComponentCommand()
Definition: ComponentCommand.cc:38
assert
#define assert(condition)
Definition: Application.hh:86
EditPart::model
TTAMachine::MachinePart * model() const
TTAMachine::RegisterFile
Definition: RegisterFile.hh:47