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

#include <HighlightTopExecCountsCmd.hh>

Inheritance diagram for HighlightTopExecCountsCmd:
Inheritance graph
Collaboration diagram for HighlightTopExecCountsCmd:
Collaboration graph

Public Member Functions

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

Detailed Description

Command for highlighting instructions with top execution counts in the disassembly window.

Definition at line 42 of file HighlightTopExecCountsCmd.hh.

Constructor & Destructor Documentation

◆ HighlightTopExecCountsCmd()

HighlightTopExecCountsCmd::HighlightTopExecCountsCmd ( )

The Constructor.

Definition at line 44 of file HighlightTopExecCountsCmd.cc.

44  :
45  GUICommand("Highlight Top Execution Counts", NULL) {
46 
47  }

Referenced by create().

◆ ~HighlightTopExecCountsCmd()

HighlightTopExecCountsCmd::~HighlightTopExecCountsCmd ( )
virtual

The Destructor.

Definition at line 52 of file HighlightTopExecCountsCmd.cc.

52  {
53 }

Member Function Documentation

◆ create()

HighlightTopExecCountsCmd * HighlightTopExecCountsCmd::create ( ) const
virtual

Creates and returns a new isntance of this command.

Returns
Newly created instance of this command.

Implements GUICommand.

Definition at line 101 of file HighlightTopExecCountsCmd.cc.

101  {
102  return new HighlightTopExecCountsCmd();
103 }

References HighlightTopExecCountsCmd().

Here is the call graph for this function:

◆ Do()

bool HighlightTopExecCountsCmd::Do ( )
virtual

Executes the command.

Implements GUICommand.

Definition at line 60 of file HighlightTopExecCountsCmd.cc.

60  {
62  assert(window != NULL);
63  DisasmTopCountAttrProvider* attrProvider =
65 
66  if (ProximToolbox::frontend()->isProgramLoaded()) {
67  attrProvider->update();
68  }
69  window->setMoveAttrProvider(attrProvider);
70  window->Refresh();
71  return true;
72 }

References assert, ProximToolbox::disassemblyWindow(), ProximToolbox::frontend(), ProximDisassemblyWindow::setMoveAttrProvider(), and DisasmTopCountAttrProvider::update().

Here is the call graph for this function:

◆ icon()

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

Returns full path to the command icon file.

Returns
Full path to the command icon file.

Implements GUICommand.

Definition at line 81 of file HighlightTopExecCountsCmd.cc.

81  {
82  return "clear_console.png";
83 }

◆ id()

int HighlightTopExecCountsCmd::id ( ) const
virtual

Returns ID of this command.

Implements GUICommand.

Definition at line 90 of file HighlightTopExecCountsCmd.cc.

References ProximConstants::COMMAND_HIGHLIGHT_TOP_EXEC_COUNTS.

◆ isEnabled()

bool HighlightTopExecCountsCmd::isEnabled ( )
virtual

Returns true if the command is enabled, false otherwise.

Returns
True if the console window exists.

Implements GUICommand.

Definition at line 112 of file HighlightTopExecCountsCmd.cc.

112  {
113  if (ProximToolbox::frontend()->isProgramLoaded()) {
114  return true;
115  } else {
116  return false;
117  }
118 }

References ProximToolbox::frontend().

Here is the call graph for this function:

The documentation for this class was generated from the following files:
DisasmTopCountAttrProvider
Definition: DisasmTopCountAttrProvider.hh:53
ProximToolbox::frontend
static TracedSimulatorFrontend * frontend()
Definition: ProximToolbox.cc:223
HighlightTopExecCountsCmd::HighlightTopExecCountsCmd
HighlightTopExecCountsCmd()
Definition: HighlightTopExecCountsCmd.cc:44
ProximDisassemblyWindow::setMoveAttrProvider
void setMoveAttrProvider(ProximDisasmAttrProvider *attrProvider)
Definition: ProximDisassemblyWindow.cc:391
DisasmTopCountAttrProvider::update
virtual void update()
Definition: DisasmTopCountAttrProvider.cc:195
assert
#define assert(condition)
Definition: Application.hh:86
ProximConstants::COMMAND_HIGHLIGHT_TOP_EXEC_COUNTS
@ COMMAND_HIGHLIGHT_TOP_EXEC_COUNTS
Definition: ProximConstants.hh:72
GUICommand::GUICommand
GUICommand(std::string name, wxWindow *parent)
Definition: GUICommand.cc:42
ProximToolbox::disassemblyWindow
static ProximDisassemblyWindow * disassemblyWindow()
Definition: ProximToolbox.cc:150
ProximDisassemblyWindow
Definition: ProximDisassemblyWindow.hh:58