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

#include <DeleteSocketCmd.hh>

Inheritance diagram for DeleteSocketCmd:
Inheritance graph
Collaboration diagram for DeleteSocketCmd:
Collaboration graph

Public Member Functions

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

Private Attributes

EditParteditPart_
 Socket to delete.
 

Detailed Description

Command for deleting sockets from the Machine.

Definition at line 42 of file DeleteSocketCmd.hh.

Constructor & Destructor Documentation

◆ DeleteSocketCmd()

DeleteSocketCmd::DeleteSocketCmd ( EditPart editPart)

The Constructor.

Parameters
editPartSocket to delete.

Definition at line 45 of file DeleteSocketCmd.cc.

45 :
46 ComponentCommand(), editPart_(editPart) {
47}
EditPart * editPart_
Socket to delete.

◆ ~DeleteSocketCmd()

DeleteSocketCmd::~DeleteSocketCmd ( )
virtual

The Destructor.

Definition at line 53 of file DeleteSocketCmd.cc.

53 {
54}

Member Function Documentation

◆ Do()

bool DeleteSocketCmd::Do ( )
virtual

Executes the command.

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

Implements ComponentCommand.

Definition at line 63 of file DeleteSocketCmd.cc.

63 {
64 Socket* socket = dynamic_cast<Socket*>(editPart_->model());
65 assert (socket != NULL);
66 delete socket;
67 return true;
68}
#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* DeleteSocketCmd::editPart_
private

Socket to delete.

Definition at line 50 of file DeleteSocketCmd.hh.

Referenced by Do().


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