Jpp
Main Page
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
a
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
v
w
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Typedefs
b
c
h
j
l
m
p
s
Enumerations
Enumerator
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
w
y
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
m
o
p
q
r
s
t
u
v
Enumerations
Enumerator
a
c
d
e
f
i
j
k
n
o
p
s
t
u
v
w
Related Functions
c
f
g
j
o
p
r
s
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
Variables
_
a
b
c
d
e
f
g
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
Typedefs
b
c
d
f
g
i
j
o
p
r
t
Enumerations
Enumerator
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
examples
JLang
JReference.cc
Go to the documentation of this file.
1
2
#include <iostream>
3
#include <iomanip>
4
5
#include "
JLang/JPointer.hh
"
6
#include "
JLang/JReference.hh
"
7
8
#include "
Jeep/JParser.hh
"
9
#include "
Jeep/JMessage.hh
"
10
11
12
/**
13
* \file
14
*
15
* Example program to test JLANG::JReference class.
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 referencing of objects."
);
27
28
zap[
'd'
] =
make_field
(
debug
) = 3;
29
30
zap(argc, argv);
31
}
32
catch
(
const
exception &error) {
33
FATAL
(error.what() << endl);
34
}
35
36
37
using namespace
JPP
;
38
39
cout <<
"JPointer <int> p(new int());"
<< endl;
40
41
JPointer <int> p(
new
int
());
42
43
cout <<
"JReference<int* const> o(p);"
<< endl;
44
45
JReference<int* const> o(p);
46
47
cout <<
"*p = 123;"
<< endl;
48
49
*p = 123;
50
51
cout << setw(3) << left <<
"*o"
<<
" == "
<< setw(3) << left <<
"*p"
<<
"?"
<< endl;
52
cout << setw(3) << right << *o <<
" == "
<< setw(3) << right << *p << endl;
53
}
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
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
JReference.hh
main
int main(int argc, char **argv)
Definition:
JReference.cc:18
FATAL
#define FATAL(A)
Definition:
JMessage.hh:67
JPointer.hh
Generated by
1.8.16