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

Public Member Functions

 InfoFunitsCommand (SimControlLanguageCommand &parentCommand)
 
virtual ~InfoFunitsCommand ()
 
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 funits".

Definition at line 665 of file InfoCommand.cc.

Constructor & Destructor Documentation

◆ InfoFunitsCommand()

InfoFunitsCommand::InfoFunitsCommand ( SimControlLanguageCommand parentCommand)
inline

Constructor.

Definition at line 670 of file InfoCommand.cc.

◆ ~InfoFunitsCommand()

virtual InfoFunitsCommand::~InfoFunitsCommand ( )
inlinevirtual

Destructor.

Definition at line 677 of file InfoCommand.cc.

677 {
678 }

Member Function Documentation

◆ execute()

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

Executes the "info funits" command.

"info funits" prints the names of all the function units in the machine.

Parameters
argumentsNo arguments should be given.
Returns
Always true.

Implements SimControlLanguageSubCommand.

Definition at line 689 of file InfoCommand.cc.

689 {
690
691 const int argumentCount = arguments.size() - 2;
692
693 if (!parent().checkArgumentCount(argumentCount, 0, 0)) {
694 return false;
695 }
696 if (!parent().checkMachineLoaded()) {
697 return false;
698 }
699 const TTAMachine::Machine& mach =
703 std::string result = "";
704 bool isFirst = true;
705 for (int i = 0; i < nav.count(); ++i) {
706 if (!isFirst)
707 result += "\n";
708 result += nav.item(i)->name();
709 isFirst = false;
710 }
711 result += "\n" + mach.controlUnit()->name();
712 parent().interpreter()->setResult(result);
713 return true;
714 }
ScriptInterpreter * interpreter() const
virtual void setResult(DataObject *result)
virtual SimControlLanguageCommand & parent()
const TTAMachine::Machine & machine() const
virtual TCEString name() const
ComponentType * item(int index) const
virtual FunctionUnitNavigator functionUnitNavigator() const
Definition Machine.cc:380
virtual ControlUnit * controlUnit() const
Definition Machine.cc:345

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

Here is the call graph for this function:

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