OpenMS
Loading...
Searching...
No Matches
Command Struct Reference

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

Collaboration diagram for Command:
[legend]

Public Member Functions

 Command (const String &e, const std::vector< String > &a, const ArgLoop &l)
 
size_t getLoopCount () const
 
std::vector< StringgetArgs (const int loop_number) const
 

Public Attributes

String exe
 
std::vector< Stringargs
 
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", {"-la", "%1"}, ArgLoop{ Args {{"..", "."}, 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 std::vector< String > &  a,
const ArgLoop l 
)
inline

Member Function Documentation

◆ getArgs()

std::vector< String > getArgs ( const int  loop_number) const
inline

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(), Command::loop, and String::substitute().

◆ getLoopCount()

size_t getLoopCount ( ) const
inline

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

std::vector<String> args

◆ exe

String exe

◆ loop