OpenASIP  2.0
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.

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 }

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 }

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.

83  {
85 }

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 }

References ProDeConstants::CMD_SNAME_IMPLEMENTATION.


The documentation for this class was generated from the following files:
machine
TTAMachine::Machine * machine
the architecture definition of the estimated processor
Definition: EstimatorCmdLineUI.cc:59
ImplementMachineCmd::ImplementMachineCmd
ImplementMachineCmd()
Definition: ImplementMachineCmd.cc:47
EditorCommand::EditorCommand
EditorCommand(std::string name, wxWindow *parent=NULL)
Definition: EditorCommand.cc:42
ProcessorImplementationWindow
Definition: ProcessorImplementationWindow.hh:55
ProDeConstants::CMD_SNAME_IMPLEMENTATION
static const std::string CMD_SNAME_IMPLEMENTATION
Command name for the "Processor Implementation" command.
Definition: ProDeConstants.hh:251
EditorCommand::view
wxView * view() const
Definition: EditorCommand.cc:76
ProDeConstants::COMMAND_IMPLEMENTATION
@ COMMAND_IMPLEMENTATION
Definition: ProDeConstants.hh:458
MDFDocument
Definition: MDFDocument.hh:51
ProDeConstants::CMD_ICON_IMPLEMENTATION
static const std::string CMD_ICON_IMPLEMENTATION
Icon location for the "Implementation" command.
Definition: ProDeConstants.hh:350
GUICommand::parentWindow
wxWindow * parentWindow() const
Definition: GUICommand.cc:75
IDF::MachineImplementation
Definition: MachineImplementation.hh:54
TTAMachine::Machine
Definition: Machine.hh:73
ProDeConstants::CMD_NAME_IMPLEMENTATION
static const std::string CMD_NAME_IMPLEMENTATION
Command name for the "Processor Implementation" command.
Definition: ProDeConstants.hh:171