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

#include <ModifyBusCmd.hh>

Inheritance diagram for ModifyBusCmd:
Inheritance graph
Collaboration diagram for ModifyBusCmd:
Collaboration graph

Public Member Functions

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

Private Attributes

EditParteditPart_
 Bus to modify.
 

Detailed Description

Command which displays a bus dialog with precompleted values for modifying a bus.

Definition at line 43 of file ModifyBusCmd.hh.

Constructor & Destructor Documentation

◆ ModifyBusCmd()

ModifyBusCmd::ModifyBusCmd ( EditPart editPart)

The Constructor.

Definition at line 45 of file ModifyBusCmd.cc.

45 :
47 editPart_(editPart) {
48
49}
EditPart * editPart_
Bus to modify.

◆ ~ModifyBusCmd()

ModifyBusCmd::~ModifyBusCmd ( )
virtual

The Destructor.

Definition at line 55 of file ModifyBusCmd.cc.

55 {
56}

Member Function Documentation

◆ Do()

bool ModifyBusCmd::Do ( )
virtual

Executes the command.

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

Implements ComponentCommand.

Definition at line 65 of file ModifyBusCmd.cc.

65 {
66
67 Bus* bus = dynamic_cast<Bus*>(editPart_->model());
68 assert (bus != NULL);
69
70 assert (parentWindow() != NULL);
71
72 BusDialog dialog(parentWindow(), bus);
73
74 if (dialog.ShowModal() == wxID_OK) {
75 // bus was modified
76 return true;
77 } else {
78 // modification was cancelled
79 return false;
80 }
81 return false;
82}
#define assert(condition)
wxWindow * parentWindow()
TTAMachine::MachinePart * model() const

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

Here is the call graph for this function:

Member Data Documentation

◆ editPart_

EditPart* ModifyBusCmd::editPart_
private

Bus to modify.

Definition at line 51 of file ModifyBusCmd.hh.

Referenced by Do().


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