Jpp
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
examples
JLang
JObjectWriter.cc
Go to the documentation of this file.
1
2
#include <string>
3
#include <iostream>
4
#include <iomanip>
5
6
#include "
JLang/JTypeList.hh
"
7
#include "
JLang/JObjectWriter.hh
"
8
#include "
JLang/JASCIIFileWriter.hh
"
9
10
#include "
Jeep/JParser.hh
"
11
#include "
Jeep/JMessage.hh
"
12
13
14
/**
15
* \file
16
*
17
* Example program to test JLANG::JObjectWriter class.
18
* \author mdejong
19
*/
20
int
main
(
int
argc,
char
**argv)
21
{
22
using namespace
std;
23
24
string
outputFile
;
25
int
debug
;
26
27
try
{
28
29
JParser<>
zap(
"Example program to test object writing class."
);
30
31
zap[
'o'
] =
make_field
(
outputFile
);
32
zap[
'd'
] =
make_field
(
debug
) = 0;
33
34
zap(argc, argv);
35
}
36
catch
(
const
exception &error) {
37
FATAL
(error.what() << endl);
38
}
39
40
41
using namespace
JPP;
42
43
typedef
44
JTypeList<int,
45
JTypeList<string> > JTypelist_t;
46
47
JAccessibleObjectWriter<JTypelist_t> out;
48
49
out.reset(
new
JASCIIFileWriter<JTypelist_t>(
outputFile
.c_str(),
"\n"
));
50
51
out.put(1);
52
out.put(
"noot"
);
53
out.put(3);
54
55
out.close();
56
}
JPARSER::JParser
Utility class to parse command line options.
Definition:
JParser.hh:1493
JASCIIFileWriter.hh
JObjectWriter.hh
outputFile
string outputFile
Definition:
JDAQTimesliceSelector.cc:37
JTypeList.hh
make_field
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition:
JParser.hh:1954
debug
int debug
debug level
Definition:
JSirene.cc:61
JMessage.hh
General purpose messaging.
FATAL
#define FATAL(A)
Definition:
JMessage.hh:67
JParser.hh
Utility class to parse command line options.
main
int main(int argc, char *argv[])
Definition:
Main.cpp:15
Generated by
1.8.5