Jpp
examples
JLang
JSize.cc
Go to the documentation of this file.
1
2
#include <iostream>
3
#include <iomanip>
4
#include <vector>
5
6
#include "
JLang/JLangToolkit.hh
"
7
8
#include "
Jeep/JParser.hh
"
9
#include "
Jeep/JMessage.hh
"
10
11
12
/**
13
* \file
14
*
15
* Example program to test JLANG::getSize method.
16
* \author mdejong
17
*/
18
int
main
(
int
argc,
char
**argv)
19
{
20
using namespace
std
;
21
22
int
debug
;
23
24
try
{
25
26
JParser<>
zap(
"Example program to test getSize."
);
27
28
zap[
'd'
] =
make_field
(
debug
) = 0;
29
30
zap(argc, argv);
31
}
32
catch
(
const
exception &error) {
33
FATAL
(error.what() << endl);
34
}
35
36
using namespace
JPP
;
37
38
{
39
int
buffer[10];
40
41
cout <<
getSize
(buffer) << endl;
42
}
43
{
44
const
int
buffer[] = { 1, 2, 3 };
45
46
cout <<
getSize
(buffer) << endl;
47
}
48
}
JMessage.hh
JPARSER::JParser
Utility class to parse command line options.
Definition:
JParser.hh:1493
JPP
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Definition:
JAAnetToolkit.hh:37
JLANG::getSize
size_t getSize(T(&array)[N])
Get size of c-array.
Definition:
JLangToolkit.hh:32
debug
int debug
debug level
Definition:
JSirene.cc:59
JParser.hh
make_field
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition:
JParser.hh:1954
std
Definition:
jaanetDictionary.h:36
main
int main(int argc, char **argv)
Definition:
JSize.cc:18
FATAL
#define FATAL(A)
Definition:
JMessage.hh:67
JLangToolkit.hh
Generated by
1.8.16