void CommandLineCommonOptionsHolder::initOptions() { options_.addOption(BooleanOption("h").store(&bHelp_) .description("Print help and quit")); options_.addOption(BooleanOption("hidden").store(&bHidden_) .hidden() .description("Show hidden options in help")); options_.addOption(BooleanOption("quiet").store(&bQuiet_) .description("Do not print common startup info or quotes")); options_.addOption(BooleanOption("version").store(&bVersion_) .description("Print extended version information and quit")); options_.addOption(BooleanOption("copyright").store(&bCopyright_) .description("Print copyright information on startup")); options_.addOption(IntegerOption("nice").store(&niceLevel_) .description("Set the nicelevel (default depends on command)")); options_.addOption(BooleanOption("backup").store(&bBackup_) .description("Write backups if output files exist")); options_.addOption(BooleanOption("fpexcept").store(&bFpexcept_) .hidden().description("Enable floating-point exceptions")); options_.addOption(IntegerOption("debug").store(&debugLevel_) .hidden().defaultValueIfSet(1) .description("Write file with debug information, " "1: short (default), 2: also x and f")); }
void SelectionTester::initOptions(IOptionsContainer *options, TrajectoryAnalysisSettings *settings) { static const char *const desc[] = { "This is a test program for selections." }; settings->setHelpText(desc); options->addOption(SelectionOption("select").storeVector(&selections_) .required().multiValue() .description("Selections to test")); options->addOption(IntegerOption("pmax").store(&nmaxind_) .description("Maximum number of indices to print in lists (-1 = print all)")); }
Options * SelectionTester::initOptions(TrajectoryAnalysisSettings * /*settings*/) { static const char *const desc[] = { "This is a test program for selections.", NULL }; _options.setDescription(desc); _options.addOption(SelectionOption("select").storeVector(&_selections) .required().multiValue().allowMultiple() .description("Selections to test")); _options.addOption(IntegerOption("pmax").store(&_nmaxind) .description("Maximum number of indices to print in lists (-1 = print all)")); return &_options; }