Example program to test JLANG::JClonable class.
More...
#include <iostream>
#include <iomanip>
#include "JLang/JClonable.hh"
#include "Jeep/JParser.hh"
#include "Jeep/JMessage.hh"
Go to the source code of this file.
|
int | main (int argc, char **argv) |
|
Example program to test JLANG::JClonable class.
- Author
- mdejong
Definition in file JClonable.cc.
◆ main()
int main |
( |
int | argc, |
|
|
char ** | argv ) |
Definition at line 54 of file JClonable.cc.
55{
58
60
61 try {
62
63 JParser<> zap(
"Example program to test object cloning.");
64
66
67 zap(argc, argv);
68 }
69 catch(const exception &error) {
70 FATAL(error.what() << endl);
71 }
72
73 __B__ b;
74 __C__ c;
75
76 {
77 __A__* p = b.clone();
78
79 ASSERT(p->get() == __B__::value);
80
81 delete p;
82 }
83
84 {
85 __A__* p = c.clone();
86
87 ASSERT(p->get() == __C__::value);
88
89 delete p;
90 }
91
92 return 0;
93}
#define ASSERT(A,...)
Assert macro.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Utility class to parse command line options.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).