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

#include <ImplementMachineCmd.hh>

Inheritance diagram for ImplementMachineCmd:
Inheritance graph
Collaboration diagram for ImplementMachineCmd:
Collaboration graph

Public Member Functions

 ImplementMachineCmd ()
 
virtual ~ImplementMachineCmd ()
 
virtual bool Do ()
 
virtual int id () const
 
virtual ImplementMachineCmdcreate () const
 
virtual std::string icon () const
 
virtual std::string shortName () const
 
virtual bool isEnabled ()
 
- Public Member Functions inherited from EditorCommand
 EditorCommand (std::string name, wxWindow *parent=NULL)
 
virtual ~EditorCommand ()
 
void setView (wxView *view)
 
wxView * view () const
 
- Public Member Functions inherited from GUICommand
 GUICommand (std::string name, wxWindow *parent)
 
virtual ~GUICommand ()
 
virtual bool isChecked () const
 
void setParentWindow (wxWindow *view)
 
wxWindow * parentWindow () const
 
std::string name () const
 

Detailed Description

Command for opening processor implementation window.

Definition at line 43 of file ImplementMachineCmd.hh.

Constructor & Destructor Documentation

◆ ImplementMachineCmd()

ImplementMachineCmd::ImplementMachineCmd ( )

The Constructor.

Definition at line 47 of file ImplementMachineCmd.cc.

47 :
49
50}
static const std::string CMD_NAME_IMPLEMENTATION
Command name for the "Processor Implementation" command.

Referenced by create().

◆ ~ImplementMachineCmd()

ImplementMachineCmd::~ImplementMachineCmd ( )
virtual

The Destructor.

Definition at line 56 of file ImplementMachineCmd.cc.

56{}

Member Function Documentation

◆ create()

ImplementMachineCmd * ImplementMachineCmd::create ( ) const
virtual

Creates and returns a new instance of this command.

Implements GUICommand.

Definition at line 92 of file ImplementMachineCmd.cc.

92 {
93 return new ImplementMachineCmd();
94}

References ImplementMachineCmd().

Here is the call graph for this function:

◆ Do()

bool ImplementMachineCmd::Do ( )
virtual

Executes the command.

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

Implements GUICommand.

Definition at line 65 of file ImplementMachineCmd.cc.

65 {
66
67 TTAMachine::Machine* machine = dynamic_cast<MDFDocument*>(
68 view()->GetDocument())->getModel()->getMachine();
69
72 dialog.ShowModal();
73
74 return true;
75
76}
TTAMachine::Machine * machine
the architecture definition of the estimated processor
wxView * view() const
wxWindow * parentWindow() const
Definition GUICommand.cc:75

References machine, GUICommand::parentWindow(), and EditorCommand::view().

Here is the call graph for this function:

◆ icon()

string ImplementMachineCmd::icon ( ) const
virtual

Returns path to the command's icon file.

Reimplemented from EditorCommand.

Definition at line 102 of file ImplementMachineCmd.cc.

102 {
104}
static const std::string CMD_ICON_IMPLEMENTATION
Icon location for the "Implementation" command.

References ProDeConstants::CMD_ICON_IMPLEMENTATION.

◆ id()

int ImplementMachineCmd::id ( ) const
virtual

Returns id of this command.

Implements GUICommand.

Definition at line 83 of file ImplementMachineCmd.cc.

References ProDeConstants::COMMAND_IMPLEMENTATION.

◆ isEnabled()

bool ImplementMachineCmd::isEnabled ( )
virtual

Returns true when the command is executable, false when not.

This command is executable when a document is open.

Returns
True, if a document is open.

Reimplemented from EditorCommand.

Definition at line 124 of file ImplementMachineCmd.cc.

124 {
125 wxDocManager* manager = wxGetApp().docManager();
126 if (manager->GetCurrentView() != NULL) {
127 return true;
128 }
129 return false;
130}

◆ shortName()

string ImplementMachineCmd::shortName ( ) const
virtual

Returns short version of the command name.

Reimplemented from GUICommand.

Definition at line 111 of file ImplementMachineCmd.cc.

111 {
113}
static const std::string CMD_SNAME_IMPLEMENTATION
Command name for the "Processor Implementation" command.

References ProDeConstants::CMD_SNAME_IMPLEMENTATION.


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