Example program to test JLANG::JReference class.
More...
#include <iostream>
#include <iomanip>
#include "JLang/JPointer.hh"
#include "JLang/JReference.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::JReference class.
- Author
- mdejong
Definition in file JReference.cc.
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 18 of file JReference.cc.
26 JParser<> zap(
"Example program to test referencing of objects.");
32 catch(
const exception &error) {
33 FATAL(error.what() << endl);
39 cout <<
"JPointer <int> p(new int());" << endl;
41 JPointer <int> p(
new int());
43 cout <<
"JReference<int* const> o(p);" << endl;
45 JReference<int* const>
o(p);
47 cout <<
"*p = 123;" << endl;
51 cout << setw(3) << left <<
"*o" <<
" == " << setw(3) << left <<
"*p" <<
"?" << endl;
52 cout << setw(3) << right << *
o <<
" == " << setw(3) << right << *p << endl;
Utility class to parse command line options.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object