5 #include "core/LongOptions.h" 6 #include "core/Arguments.h" 7 #include "core/Command.h" 10 #include "SweepController.h" 16 R
"(* Help message for 'sweep' controller * 19 The sweep method interprets the stdout of 'generator' as newline-separated 20 list of parameters and runs 'simulator' on each of them. 22 Upon completion, the controller outputs the parameter names, followed by 23 newline-separated list of simulated parameters. 26 -P, --parameter-names=NAMES NAMES is a comma-separated list of 28 -S, --simulator=CMD CMD is simulator command 29 -G, --generator=CMD CMD is generator command 35 lopts.
add({
"parameter-names", required_argument,
nullptr,
'P'});
36 lopts.
add({
"simulator", required_argument,
nullptr,
'S'});
37 lopts.
add({
"generator", required_argument,
nullptr,
'G'});
68 catch (
const std::out_of_range& e)
70 std::string error_msg;
71 error_msg +=
"One or more arguments missing, try '";
73 error_msg +=
" sweep --help' for more info";
74 throw std::runtime_error(error_msg);
static std::string help()
SweepController(const Input &input_obj)
static SweepController * makeController(const Arguments &args)
const char * g_program_name
static void addLongOptions(LongOptions &lopts)
void add(struct option long_opt)
std::string optionalArgument(const std::string &option_name) const