Example program to test JLANG::JEquation class.
More...
#include <string>
#include <iostream>
#include <fstream>
#include <sstream>
#include <locale>
#include <iomanip>
#include <limits>
#include <iterator>
#include "JLang/JException.hh"
#include "JLang/JEquation.hh"
#include "Jeep/JParser.hh"
#include "Jeep/JMessage.hh"
Go to the source code of this file.
|
| int | main (int argc, char **argv) |
| |
Example program to test JLANG::JEquation class.
- Author
- mdejong
Definition in file JEquation.cc.
◆ main()
| int main |
( |
int | argc, |
|
|
char ** | argv ) |
Definition at line 24 of file JEquation.cc.
25{
27
28 string inputFile;
30
31 try {
32
33 JParser<> zap(
"Example program to test equation parsing");
34
37
38 zap(argc, argv);
39 }
40 catch(const exception &error) {
41 FATAL(error.what() << endl);
42 }
43
44
46
50
52
53 ifstream in(inputFile.c_str());
54
55 in.imbue(locale(in.getloc(), facet.clone()));
56
60
63
64 for (
JEquation equation; in >> equation; ) {
65
66 int i = 0;
67
68 for ( ; facet.isDivision(equation.getSeparator()); ++i) {
69
70 cout <<
"[" <<
setw(2) << right << i <<
"]" <<
' '
73
74 equation.setEquation(facet);
75 }
76
77 cout <<
"[" <<
setw(2) << right << i <<
"]" <<
' '
80 }
81
82 in.close();
83}
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Facet class to specify parsing of equations in currect locale (see class JLANG::JEquation).
Simple data structure to support I/O of equations (see class JLANG::JEquation).
General purpose equation class.
Template definition of a multi-dimensional oscillation probability interpolation table.
Utility class to parse command line options.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).