35 using boost::program_options::variable_value;
36 using boost::program_options::value;
37 using boost::program_options::options_description;
38 using boost::program_options::positional_options_description;
71 log.info(
"This Works");
76 cout <<
"This Works too!" << endl;
78 if (args.count(
"input-files")) {
80 for (
string file : files) {
81 cout <<
"Input file " << file << endl;
89 options_description desc(
"");
90 desc.add_options()(
"input-files", value<vector<string>>(),
"Input files");
92 positional_options_description pos_desc;
93 pos_desc.add(
"input-files", -1);
Example of an Elements program.
ExitCode
Strongly typed exit numbers.
Macro to silence unused variables warnings from the compiler.
Abstract class for all Elements programs.
std::pair< options_description, positional_options_description > defineProgramArguments() override
This methods must be used to the program arguments.
#define MAIN_FOR(ELEMENTS_PROGRAM_NAME)
ExitCode mainMethod(ELEMENTS_UNUSED map< string, variable_value > &args) override
The "main" method.
static Logging getLogger(const std::string &name="")