OpenASIP 2.2
Loading...
Searching...
No Matches
Public Member Functions | List of all members
InfoRegFilesCommand Class Reference
Inheritance diagram for InfoRegFilesCommand:
Inheritance graph
Collaboration diagram for InfoRegFilesCommand:
Collaboration graph

Public Member Functions

 InfoRegFilesCommand (SimControlLanguageCommand &parentCommand)
 
virtual ~InfoRegFilesCommand ()
 
virtual bool execute (const std::vector< DataObject > &arguments)
 
- Public Member Functions inherited from SimControlLanguageSubCommand
 SimControlLanguageSubCommand (SimControlLanguageCommand &parentCommand)
 
virtual ~SimControlLanguageSubCommand ()
 
virtual SimControlLanguageCommandparent ()
 

Detailed Description

Implementation of "info regfiles".

Definition at line 305 of file InfoCommand.cc.

Constructor & Destructor Documentation

◆ InfoRegFilesCommand()

InfoRegFilesCommand::InfoRegFilesCommand ( SimControlLanguageCommand parentCommand)
inline

Constructor.

Definition at line 310 of file InfoCommand.cc.

◆ ~InfoRegFilesCommand()

virtual InfoRegFilesCommand::~InfoRegFilesCommand ( )
inlinevirtual

Destructor.

Definition at line 317 of file InfoCommand.cc.

317 {
318 }

Member Function Documentation

◆ execute()

virtual bool InfoRegFilesCommand::execute ( const std::vector< DataObject > &  arguments)
inlinevirtual

Executes the "info regfiles" command.

"info regfiles" prints the names of all the register files in the machine.

Parameters
argumentsNo arguments should be given.
Returns
Always true.

Implements SimControlLanguageSubCommand.

Definition at line 329 of file InfoCommand.cc.

329 {
330
331 const int argumentCount = arguments.size() - 2;
332
333 if (!parent().checkArgumentCount(argumentCount, 0, 0)) {
334 return false;
335 }
336 if (!parent().checkMachineLoaded()) {
337 return false;
338 }
339 const TTAMachine::Machine& mach =
343 std::string result = "";
344 bool isFirst = true;
345 for (int i = 0; i < nav.count(); ++i) {
346 if (!isFirst)
347 result += "\n";
348 result += nav.item(i)->name();
349 isFirst = false;
350 }
351 parent().interpreter()->setResult(result);
352 return true;
353 }
ScriptInterpreter * interpreter() const
virtual void setResult(DataObject *result)
virtual SimControlLanguageCommand & parent()
const TTAMachine::Machine & machine() const
ComponentType * item(int index) const
virtual RegisterFileNavigator registerFileNavigator() const
Definition Machine.cc:450

References TTAMachine::Machine::Navigator< ComponentType >::count(), CustomCommand::interpreter(), TTAMachine::Machine::Navigator< ComponentType >::item(), SimulatorFrontend::machine(), SimControlLanguageSubCommand::parent(), TTAMachine::Machine::registerFileNavigator(), ScriptInterpreter::setResult(), and SimControlLanguageCommand::simulatorFrontend().

Here is the call graph for this function:

The documentation for this class was generated from the following file: