Jpp
18.0.0-rc.2
the software that should make you happy
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
examples
JLang
JCppFacet.cc
Go to the documentation of this file.
1
2
#include <string>
3
#include <iostream>
4
#include <iomanip>
5
#include <sstream>
6
7
#include "
Jeep/JParser.hh
"
8
#include "
Jeep/JMessage.hh
"
9
#include "
JLang/JString.hh
"
10
#include "
JLang/JCppFacet.hh
"
11
12
13
/**
14
* Auxiliary program to test JCppFacet class.
15
*/
16
int
main
(
int
argc,
char
**argv)
17
{
18
using namespace
std;
19
using namespace
JPP;
20
21
string
buffer;
22
int
debug
;
23
24
try
{
25
26
JParser<>
zap;
27
28
zap[
't'
] =
make_field
(buffer);
29
zap[
'd'
] =
make_field
(
debug
) = 0;
30
31
if
(zap.
read
(argc, argv) != 0)
32
return
1;
33
}
34
catch
(
const
exception &error) {
35
FATAL
(error.what() << endl);
36
}
37
38
39
const
JCppFacet cpp;
40
41
JString var;
42
43
istringstream
is
(buffer);
44
45
is.imbue(locale(cout.getloc(), cpp.clone()));
46
47
while
(is >> var) {
48
cout <<
"<"
<< var <<
">"
<< endl;
49
}
50
}
JPARSER::JParser
Utility class to parse command line options.
Definition:
JParser.hh:1514
main
int main(int argc, char *argv[])
Definition:
Main.cc:15
JString.hh
is
is
Definition:
JDAQCHSM.chsm:167
make_field
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition:
JParser.hh:1989
JMessage.hh
General purpose messaging.
FATAL
#define FATAL(A)
Definition:
JMessage.hh:67
JPARSER::JParser::read
int read(const int argc, const char *const argv[])
Parse the program's command line options.
Definition:
JParser.hh:1811
JCppFacet.hh
JParser.hh
Utility class to parse command line options.
debug
int debug
debug level
Definition:
archive-put-wiki-detectors.sh:92
Generated by
1.8.5