OpenASIP  2.0
Public Member Functions | List of all members
VerifyMachineCmd Class Reference

#include <VerifyMachineCmd.hh>

Inheritance diagram for VerifyMachineCmd:
Inheritance graph
Collaboration diagram for VerifyMachineCmd:
Collaboration graph

Public Member Functions

 VerifyMachineCmd ()
 
virtual ~VerifyMachineCmd ()
 
virtual bool Do ()
 
virtual int id () const
 
virtual VerifyMachineCmdcreate () 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

wxCommand for editing connections.

Definition at line 42 of file VerifyMachineCmd.hh.

Constructor & Destructor Documentation

◆ VerifyMachineCmd()

VerifyMachineCmd::VerifyMachineCmd ( )

The Constructor.

Definition at line 47 of file VerifyMachineCmd.cc.

Referenced by create().

◆ ~VerifyMachineCmd()

VerifyMachineCmd::~VerifyMachineCmd ( )
virtual

The Destructor.

Definition at line 56 of file VerifyMachineCmd.cc.

56 {}

Member Function Documentation

◆ create()

VerifyMachineCmd * VerifyMachineCmd::create ( ) const
virtual

Creates and returns a new instance of this command.

Implements GUICommand.

Definition at line 93 of file VerifyMachineCmd.cc.

93  {
94  return new VerifyMachineCmd();
95 }

References VerifyMachineCmd().

Here is the call graph for this function:

◆ Do()

bool VerifyMachineCmd::Do ( )
virtual

Executes the command.

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

Implements GUICommand.

Definition at line 65 of file VerifyMachineCmd.cc.

65  {
66 
67  wxString errorMessages;
68 
69  const TTAMachine::Machine* machine = dynamic_cast<MDFDocument*>(
70  view()->GetDocument())->getModel()->getMachine();
71 
73  dialog.ShowModal();
74 
75  return true;
76 
77 }

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

Here is the call graph for this function:

◆ icon()

string VerifyMachineCmd::icon ( ) const
virtual

Returns path to the command's icon file.

Reimplemented from EditorCommand.

Definition at line 103 of file VerifyMachineCmd.cc.

103  {
105 }

References ProDeConstants::CMD_ICON_VERIFY_MACHINE.

◆ id()

int VerifyMachineCmd::id ( ) const
virtual

Returns id of this command.

Implements GUICommand.

Definition at line 84 of file VerifyMachineCmd.cc.

84  {
86 }

References ProDeConstants::COMMAND_VERIFY_MACHINE.

◆ isEnabled()

bool VerifyMachineCmd::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 125 of file VerifyMachineCmd.cc.

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

◆ shortName()

string VerifyMachineCmd::shortName ( ) const
virtual

Returns short version of the command name.

Reimplemented from GUICommand.

Definition at line 112 of file VerifyMachineCmd.cc.

112  {
114 }

References ProDeConstants::CMD_SNAME_VERIFY_MACHINE.


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
ValidateMachineDialog
Definition: ValidateMachineDialog.hh:47
ProDeConstants::CMD_SNAME_VERIFY_MACHINE
static const std::string CMD_SNAME_VERIFY_MACHINE
Command name for the "Verify Machine" command.
Definition: ProDeConstants.hh:249
EditorCommand::EditorCommand
EditorCommand(std::string name, wxWindow *parent=NULL)
Definition: EditorCommand.cc:42
EditorCommand::view
wxView * view() const
Definition: EditorCommand.cc:76
ProDeConstants::CMD_NAME_VERIFY_MACHINE
static const std::string CMD_NAME_VERIFY_MACHINE
Command name for the "Verify Machine" command.
Definition: ProDeConstants.hh:169
MDFDocument
Definition: MDFDocument.hh:51
VerifyMachineCmd::VerifyMachineCmd
VerifyMachineCmd()
Definition: VerifyMachineCmd.cc:47
GUICommand::parentWindow
wxWindow * parentWindow() const
Definition: GUICommand.cc:75
ProDeConstants::CMD_ICON_VERIFY_MACHINE
static const std::string CMD_ICON_VERIFY_MACHINE
Icon location for the "Verify Machine" command.
Definition: ProDeConstants.hh:348
TTAMachine::Machine
Definition: Machine.hh:73
ProDeConstants::COMMAND_VERIFY_MACHINE
@ COMMAND_VERIFY_MACHINE
Definition: ProDeConstants.hh:457