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

#include <ProximNextICmd.hh>

Inheritance diagram for ProximNextICmd:
Inheritance graph
Collaboration diagram for ProximNextICmd:
Collaboration graph

Public Member Functions

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

Proxim simulation command for advancing to the next machine instruction in current procedure.

Definition at line 44 of file ProximNextICmd.hh.

Constructor & Destructor Documentation

◆ ProximNextICmd()

ProximNextICmd::ProximNextICmd ( )

The Constructor.

Definition at line 42 of file ProximNextICmd.cc.

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

References simulator_.

Referenced by create().

◆ ~ProximNextICmd()

ProximNextICmd::~ProximNextICmd ( )
virtual

The Destructor.

Definition at line 51 of file ProximNextICmd.cc.

51  {
52 }

Member Function Documentation

◆ create()

ProximNextICmd * ProximNextICmd::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 ProximNextICmd.cc.

92  {
93  return new ProximNextICmd();
94 }

References ProximNextICmd().

Here is the call graph for this function:

◆ Do()

bool ProximNextICmd::Do ( )
virtual

Executes the command.

Implements GUICommand.

Definition at line 59 of file ProximNextICmd.cc.

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

References ProximConstants::SCL_NEXT_INSTRUCTION.

◆ icon()

std::string ProximNextICmd::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 ProximNextICmd.cc.

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

◆ id()

int ProximNextICmd::id ( ) const
virtual

Returns ID of this command.

Implements GUICommand.

Definition at line 81 of file ProximNextICmd.cc.

81  {
83 }

References ProximConstants::COMMAND_NEXTI.

◆ isEnabled()

bool ProximNextICmd::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 ProximNextICmd.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* ProximNextICmd::simulator_
private

Definition at line 55 of file ProximNextICmd.hh.

Referenced by isEnabled(), and ProximNextICmd().


The documentation for this class was generated from the following files:
ProximConstants::COMMAND_NAME_NEXTI
static const std::string COMMAND_NAME_NEXTI
Name of the next instruction command.
Definition: ProximConstants.hh:122
ProximConstants::SCL_NEXT_INSTRUCTION
static const std::string SCL_NEXT_INSTRUCTION
Command for advancing simulation to the next instruction in the prog.
Definition: ProximConstants.hh:167
SimulatorFrontend::isSimulationStopped
bool isSimulationStopped() const
Definition: SimulatorFrontend.cc:1271
ProximNextICmd::ProximNextICmd
ProximNextICmd()
Definition: ProximNextICmd.cc:42
ProximNextICmd::simulator_
SimulatorFrontend * simulator_
Definition: ProximNextICmd.hh:55
GUICommand::GUICommand
GUICommand(std::string name, wxWindow *parent)
Definition: GUICommand.cc:42
ProximConstants::COMMAND_NEXTI
@ COMMAND_NEXTI
Definition: ProximConstants.hh:62
SimulatorFrontend::isSimulationInitialized
bool isSimulationInitialized() const
Definition: SimulatorFrontend.cc:1228