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

#include <DeleteBusCmd.hh>

Inheritance diagram for DeleteBusCmd:
Inheritance graph
Collaboration diagram for DeleteBusCmd:
Collaboration graph

Public Member Functions

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

Private Attributes

EditParteditPart_
 Bus to delete. More...
 

Detailed Description

Command for deleting buses from the Machine.

Definition at line 42 of file DeleteBusCmd.hh.

Constructor & Destructor Documentation

◆ DeleteBusCmd()

DeleteBusCmd::DeleteBusCmd ( EditPart editPart)

The Constructor.

Parameters
editPartBus to delete.

Definition at line 45 of file DeleteBusCmd.cc.

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

◆ ~DeleteBusCmd()

DeleteBusCmd::~DeleteBusCmd ( )
virtual

The Destructor.

Definition at line 53 of file DeleteBusCmd.cc.

53  {
54 }

Member Function Documentation

◆ Do()

bool DeleteBusCmd::Do ( )
virtual

Executes the command.

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

Implements ComponentCommand.

Definition at line 63 of file DeleteBusCmd.cc.

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

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

Here is the call graph for this function:

Member Data Documentation

◆ editPart_

EditPart* DeleteBusCmd::editPart_
private

Bus to delete.

Definition at line 50 of file DeleteBusCmd.hh.

Referenced by Do().


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