Hotwheels-Cluster 1.2
Creation of Cluster APP for SEA:ME project.
 
Loading...
Searching...
No Matches
SystemCommandExecutor Class Reference

Class that executes system commands and reads files. More...

#include <SystemCommandExecutor.hpp>

Public Member Functions

QString executeCommand (const QString &command) const override
 Executes a system command.
 
QString readFile (const QString &filePath) const override
 Reads a file and returns its contents.
 
- Public Member Functions inherited from ISystemCommandExecutor
virtual ~ISystemCommandExecutor ()=default
 

Detailed Description

Class that executes system commands and reads files.

Definition at line 28 of file SystemCommandExecutor.hpp.

Member Function Documentation

◆ executeCommand()

QString SystemCommandExecutor::executeCommand ( const QString & command) const
overridevirtual

Executes a system command.

Parameters
commandThe command to execute as a QString.
Returns
The standard output of the executed command, trimmed of any leading or trailing whitespace.

Implements ISystemCommandExecutor.

Definition at line 25 of file SystemCommandExecutor.cpp.

◆ readFile()

QString SystemCommandExecutor::readFile ( const QString & filePath) const
overridevirtual

Reads a file and returns its contents.

Parameters
filePathThe path to the file to read as a QString.
Returns
The contents of the file, trimmed of any leading or trailing whitespace, or an empty string if the file could not be opened.

Implements ISystemCommandExecutor.

Definition at line 39 of file SystemCommandExecutor.cpp.


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