Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Functions
JParser-string.cc File Reference

Example program to test JPARSER::JParser. More...

#include <iostream>
#include <iomanip>
#include <string>
#include "Jeep/JParser.hh"
#include "Jeep/JMessage.hh"

Go to the source code of this file.

Functions

int main (int argc, char **argv)
 

Detailed Description

Example program to test JPARSER::JParser.

Author
mdejong

Definition in file JParser-string.cc.

Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 15 of file JParser-string.cc.

16 {
17  using namespace std;
18 
19  string text;
20  bool a, b, c;
21  int debug;
22 
23  try {
24 
25  JParser<string> zap("Example program to test command line parser.");
26 
27  zap["text"] = make_field(text);
28  zap["a"] = make_field(a);
29  zap["b"] = make_field(b);
30  zap["c"] = make_field(c);
31  zap["debug"] = make_field(debug) = 3, 0, 1, 2;
32 
33  zap(argc, argv);
34  }
35  catch(const exception &error) {
36  FATAL(error.what() << endl);
37  }
38 }
Utility class to parse command line options.
Definition: JParser.hh:1493
char text[TEXT_SIZE]
Definition: elog.cc:72
fi JEventTimesliceWriter a
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition: JParser.hh:1954
int debug
debug level
Definition: JSirene.cc:61
#define FATAL(A)
Definition: JMessage.hh:67