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

#include <ProximStepICmd.hh>

Inheritance diagram for ProximStepICmd:
Inheritance graph
Collaboration diagram for ProximStepICmd:
Collaboration graph

Public Member Functions

 ProximStepICmd ()
 
virtual ~ProximStepICmd ()
 
virtual bool Do ()
 
virtual int id () const
 
virtual ProximStepICmdcreate () 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 advancing to the next machine instruction in Proxim simulation.

Definition at line 43 of file ProximStepICmd.hh.

Constructor & Destructor Documentation

◆ ProximStepICmd()

ProximStepICmd::ProximStepICmd ( )

The Constructor.

Definition at line 42 of file ProximStepICmd.cc.

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

References simulator_.

Referenced by create().

◆ ~ProximStepICmd()

ProximStepICmd::~ProximStepICmd ( )
virtual

The Destructor.

Definition at line 51 of file ProximStepICmd.cc.

51  {
52 }

Member Function Documentation

◆ create()

ProximStepICmd * ProximStepICmd::create ( ) const
virtual

Creates and returns a new isntance of this command.

Returns
Newly created instance of this command.

Implements GUICommand.

Definition at line 92 of file ProximStepICmd.cc.

92  {
93  return new ProximStepICmd();
94 }

References ProximStepICmd().

Here is the call graph for this function:

◆ Do()

bool ProximStepICmd::Do ( )
virtual

Executes the command.

Implements GUICommand.

Definition at line 59 of file ProximStepICmd.cc.

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

References ProximConstants::SCL_STEP_INSTRUCTION.

◆ icon()

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

Returns full path to the command icon file.

Returns
Full path to the command icon file.

Implements GUICommand.

Definition at line 72 of file ProximStepICmd.cc.

72  {
73  return "stepi.png";
74 }

◆ id()

int ProximStepICmd::id ( ) const
virtual

Returns ID of this command.

Implements GUICommand.

Definition at line 81 of file ProximStepICmd.cc.

81  {
83 }

References ProximConstants::COMMAND_STEPI.

◆ isEnabled()

bool ProximStepICmd::isEnabled ( )
virtual

Returns true if the command is enabled, false otherwise.

Returns
True if the simulation is initialized or stopped.

Implements GUICommand.

Definition at line 103 of file ProximStepICmd.cc.

103  {
104 
105  if (simulator_ != NULL &&
108 
109  return true;
110  } else {
111  return false;
112  }
113 }

References SimulatorFrontend::isSimulationInitialized(), SimulatorFrontend::isSimulationStopped(), and simulator_.

Here is the call graph for this function:

Member Data Documentation

◆ simulator_

SimulatorFrontend* ProximStepICmd::simulator_
private

Definition at line 54 of file ProximStepICmd.hh.

Referenced by isEnabled(), and ProximStepICmd().


The documentation for this class was generated from the following files:
ProximStepICmd::ProximStepICmd
ProximStepICmd()
Definition: ProximStepICmd.cc:42
SimulatorFrontend::isSimulationStopped
bool isSimulationStopped() const
Definition: SimulatorFrontend.cc:1271
ProximConstants::SCL_STEP_INSTRUCTION
static const std::string SCL_STEP_INSTRUCTION
Command for stepping an instruction.
Definition: ProximConstants.hh:165
ProximConstants::COMMAND_NAME_STEPI
static const std::string COMMAND_NAME_STEPI
Name of the step instruction command.
Definition: ProximConstants.hh:120
ProximConstants::COMMAND_STEPI
@ COMMAND_STEPI
Definition: ProximConstants.hh:61
GUICommand::GUICommand
GUICommand(std::string name, wxWindow *parent)
Definition: GUICommand.cc:42
SimulatorFrontend::isSimulationInitialized
bool isSimulationInitialized() const
Definition: SimulatorFrontend.cc:1228
ProximStepICmd::simulator_
SimulatorFrontend * simulator_
Definition: ProximStepICmd.hh:54