Command Struct Reference

#include <OpenMS/VISUAL/DIALOGS/WizardHelper.h>

Collaboration diagram for Command:

Public Member Functions

 Command (const String &e, const QStringList &a, const ArgLoop &l)
size_t getLoopCount () const
QStringList getArgs (const int loop_number) const

Public Attributes

String exe
QStringList args
ArgLoop loop

Detailed Description

Allows running an executable with arguments Multiple execution in a loop is supported by the ArgLoop argument e.g. running 'ls -la .' and 'ls -la ..' uses Command("ls", QStringList() << "-la" << "%1", ArgLoop{ Args {QStringList() << "." << "..", 1 } }) All lists in loop[i].loop_arg should have the same size (i.e. same number of loops)

Constructor & Destructor Documentation

◆ Command()

Command ( const String e,
const QStringList &  a,
const ArgLoop l 

Member Function Documentation

◆ getArgs()

QStringList getArgs ( const int  loop_number) const

for a given loop, return the substituted arguments loop_number of 0 is always valid, i.e. no loop args, just use the unmodified args provided

References Command::args, Command::getLoopCount(), and Command::loop.

◆ getLoopCount()

size_t getLoopCount ( ) const

how many loops can we make according to the ArgLoop provided? if ArgLoop is empty, we just do a single invokation

References Command::args, and Command::loop.

Referenced by Command::getArgs().

Member Data Documentation

◆ args

QStringList args

◆ exe

String exe

◆ loop