35{
37
39
40 try {
41
42 JParser<> zap(
"Example program to test creation and deletion of objects.");
43
45
46 zap(argc, argv);
47 }
48 catch(const exception &error) {
49 FATAL(error.what() << endl);
50 }
51
52
54
55 {
56 cout << "JStorage<double>" << endl;
57
59
61
62 *storage = 123.456;
63
64 cout << *storage << endl;
65
67 }
68
69 {
70 cout << "JStorage<__A__>" << endl;
71
73
74 for (int i = 0; i != 4; ++i) {
75
76 cout << i << ' ' << "recreate()" << endl;
77
79 }
80
81 cout << "reset()" << endl;
82
84 }
85
86 {
87 cout << "JStorage<__A__, JNewCArray>" << endl;
88
90
91 cout << "reset()" << endl;
92
94
95 const int N = 2;
96
97 cout << "create(" << N << ")" << endl;
98
100
101 cout << "reset()" << endl;
102
104 }
105}
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
virtual void reset() override
Reset pointer.
void recreate()
Recreate object in memory.
void create()
Create object in memory.
Utility class to parse command line options.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).