#include #include #include #include #include "Jeep/JParser.hh" #include "Jeep/JMessage.hh" /** * \file * * Example program to test JPARSER::JParser. * \author mdejong */ int main(int argc, char **argv) { using namespace std; string text; bool a, b, c; map buffer; int debug; try { JParser<> zap("Example program to test command line parser."); zap['T'] = make_field(text, "this is some text"); zap['a'] = make_field(a); // default set to false; not mandatory to set zap['b'] = make_field(b); // default set to false; not mandatory to set zap['c'] = make_field(c); // default set to false; not mandatory to set zap['!'] = make_field(buffer) = JPARSER::initialised(); // not mandatory to set zap['d'] = make_field(debug) = 3, 0, 1, 2; // default value, and possible values zap(argc, argv); } catch(const exception &error) { FATAL(error.what() << endl); } }