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

#include <ProximRunCmd.hh>

Inheritance diagram for ProximRunCmd:
Inheritance graph
Collaboration diagram for ProximRunCmd:
Collaboration graph

Public Member Functions

 ProximRunCmd ()
 
virtual ~ProximRunCmd ()
 
virtual bool Do ()
 
virtual int id () const
 
virtual ProximRunCmdcreate () 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 starting simulation run in Proxim.

Definition at line 43 of file ProximRunCmd.hh.

Constructor & Destructor Documentation

◆ ProximRunCmd()

ProximRunCmd::ProximRunCmd ( )

The Constructor.

Definition at line 42 of file ProximRunCmd.cc.

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

References simulator_.

Referenced by create().

◆ ~ProximRunCmd()

ProximRunCmd::~ProximRunCmd ( )
virtual

The Destructor.

Definition at line 51 of file ProximRunCmd.cc.

51  {
52 }

Member Function Documentation

◆ create()

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

91  {
92  return new ProximRunCmd();
93 }

References ProximRunCmd().

Here is the call graph for this function:

◆ Do()

bool ProximRunCmd::Do ( )
virtual

Executes the command.

Implements GUICommand.

Definition at line 59 of file ProximRunCmd.cc.

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

◆ icon()

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

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

◆ id()

int ProximRunCmd::id ( ) const
virtual

Returns ID of this command.

Implements GUICommand.

Definition at line 80 of file ProximRunCmd.cc.

80  {
82 }

References ProximConstants::COMMAND_RUN.

◆ isEnabled()

bool ProximRunCmd::isEnabled ( )
virtual

Returns true if the command is enabled, false otherwise.

Returns
True if the simulation is initialized and ready to run, false otherwise.

Implements GUICommand.

Definition at line 103 of file ProximRunCmd.cc.

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

References SimulatorFrontend::isSimulationInitialized(), and simulator_.

Here is the call graph for this function:

Member Data Documentation

◆ simulator_

SimulatorFrontend* ProximRunCmd::simulator_
private

Definition at line 54 of file ProximRunCmd.hh.

Referenced by isEnabled(), and ProximRunCmd().


The documentation for this class was generated from the following files:
ProximRunCmd::simulator_
SimulatorFrontend * simulator_
Definition: ProximRunCmd.hh:54
ProximRunCmd::ProximRunCmd
ProximRunCmd()
Definition: ProximRunCmd.cc:42
ProximConstants::COMMAND_NAME_RUN
static const std::string COMMAND_NAME_RUN
Name of the run command.
Definition: ProximConstants.hh:118
GUICommand::GUICommand
GUICommand(std::string name, wxWindow *parent)
Definition: GUICommand.cc:42
ProximConstants::COMMAND_RUN
@ COMMAND_RUN
Definition: ProximConstants.hh:60
SimulatorFrontend::isSimulationInitialized
bool isSimulationInitialized() const
Definition: SimulatorFrontend.cc:1228