OpenASIP  2.0
Public Member Functions | Private Attributes | List of all members
ProximResumeCmd Class Reference

#include <ProximResumeCmd.hh>

Inheritance diagram for ProximResumeCmd:
Inheritance graph
Collaboration diagram for ProximResumeCmd:
Collaboration graph

Public Member Functions

 ProximResumeCmd ()
 
virtual ~ProximResumeCmd ()
 
virtual bool Do ()
 
virtual int id () const
 
virtual ProximResumeCmdcreate () const
 
virtual std::string icon () const
 
virtual bool isEnabled ()
 
- Public Member Functions inherited from GUICommand
 GUICommand (std::string name, wxWindow *parent)
 
virtual ~GUICommand ()
 
virtual bool isChecked () const
 
virtual std::string shortName () const
 
void setParentWindow (wxWindow *view)
 
wxWindow * parentWindow () const
 
std::string name () const
 

Private Attributes

SimulatorFrontendsimulator_
 

Detailed Description

Command for resuming simulation in Proxim until the simulation is finished or a breakpoint is reacehed.

Definition at line 44 of file ProximResumeCmd.hh.

Constructor & Destructor Documentation

◆ ProximResumeCmd()

ProximResumeCmd::ProximResumeCmd ( )

The Constructor.

Definition at line 42 of file ProximResumeCmd.cc.

42  :
44 
45  simulator_ = wxGetApp().simulation()->frontend();
46 }

References simulator_.

Referenced by create().

◆ ~ProximResumeCmd()

ProximResumeCmd::~ProximResumeCmd ( )
virtual

The Destructor.

Definition at line 51 of file ProximResumeCmd.cc.

51  {
52 }

Member Function Documentation

◆ create()

ProximResumeCmd * ProximResumeCmd::create ( ) const
virtual

Creates and returns a new isntance of this command.

Returns
Newly created instance of this command.

Implements GUICommand.

Definition at line 91 of file ProximResumeCmd.cc.

91  {
92  return new ProximResumeCmd();
93 }

References ProximResumeCmd().

Here is the call graph for this function:

◆ Do()

bool ProximResumeCmd::Do ( )
virtual

Executes the command.

Implements GUICommand.

Definition at line 59 of file ProximResumeCmd.cc.

59  {
60  wxGetApp().simulation()->lineReader().input("resume");
61  return true;
62 }

◆ icon()

std::string ProximResumeCmd::icon ( ) const
virtual

Returns full path to the command icon file.

Returns
Full path to the command icon file.

Implements GUICommand.

Definition at line 71 of file ProximResumeCmd.cc.

71  {
72  return "resume.png";
73 }

◆ id()

int ProximResumeCmd::id ( ) const
virtual

Returns ID of this command.

Implements GUICommand.

Definition at line 80 of file ProximResumeCmd.cc.

80  {
82 }

References ProximConstants::COMMAND_RESUME.

◆ isEnabled()

bool ProximResumeCmd::isEnabled ( )
virtual

Returns true if the command is enabled, false otherwise.

Returns
True if the simulation is stopped but not finished.

Implements GUICommand.

Definition at line 102 of file ProximResumeCmd.cc.

102  {
103 
104  if (simulator_ != NULL && simulator_->isSimulationStopped()) {
105  return true;
106  } else {
107  return false;
108  }
109 }

References SimulatorFrontend::isSimulationStopped(), and simulator_.

Here is the call graph for this function:

Member Data Documentation

◆ simulator_

SimulatorFrontend* ProximResumeCmd::simulator_
private

Definition at line 55 of file ProximResumeCmd.hh.

Referenced by isEnabled(), and ProximResumeCmd().


The documentation for this class was generated from the following files:
SimulatorFrontend::isSimulationStopped
bool isSimulationStopped() const
Definition: SimulatorFrontend.cc:1271
ProximResumeCmd::ProximResumeCmd
ProximResumeCmd()
Definition: ProximResumeCmd.cc:42
ProximConstants::COMMAND_RESUME
@ COMMAND_RESUME
Definition: ProximConstants.hh:65
GUICommand::GUICommand
GUICommand(std::string name, wxWindow *parent)
Definition: GUICommand.cc:42
ProximResumeCmd::simulator_
SimulatorFrontend * simulator_
Definition: ProximResumeCmd.hh:55
ProximConstants::COMMAND_NAME_RESUME
static const std::string COMMAND_NAME_RESUME
Name of the resume command.
Definition: ProximConstants.hh:128