Jpp  debug
the software that should make you happy
Macros | Functions
JConversion.cc File Reference

Example program to test JLANG::JConversion class. More...

#include <iostream>
#include <iomanip>
#include "JLang/JConversion.hh"
#include "Jeep/JParser.hh"
#include "Jeep/JMessage.hh"

Go to the source code of this file.

Macros

#define PRINT(OUT, U, V)   print<U,V>(OUT, #U, #V)
 Print class parameters. More...
 

Functions

int main (int argc, char **argv)
 

Detailed Description

Example program to test JLANG::JConversion class.

Author
mdejong

Definition in file JConversion.cc.

Macro Definition Documentation

◆ PRINT

#define PRINT (   OUT,
  U,
 
)    print<U,V>(OUT, #U, #V)

Print class parameters.

Parameters
OUToutput stream
Uclass
Vclass

Definition at line 45 of file JConversion.cc.

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 54 of file JConversion.cc.

55 {
56  using namespace std;
57  using namespace JPP;
58 
59  int debug;
60 
61  try {
62 
63  JParser<> zap("Example program to test class inspection.");
64 
65  zap['d'] = make_field(debug) = 3;
66 
67  zap(argc, argv);
68  }
69  catch(const exception &error) {
70  FATAL(error.what() << endl);
71  }
72 
73  if (debug >= debug_t) {
74 
75  cout << setw(36) << left << "name";
76  cout << setw(12) << " same ";
77  cout << setw(12) << " derived";
78  cout << endl;
79 
80  cout << setfill('.');
81 
82  PRINT(cout, __A__, __A__);
83  PRINT(cout, __B__, __A__);
84  PRINT(cout, __A__, __B__);
85  PRINT(cout, __A__, __B__);
86  }
87 
92 }
#define PRINT(OUT, U, V)
Print class parameters.
Definition: JConversion.cc:45
#define ASSERT(A,...)
Assert macro.
Definition: JMessage.hh:90
#define FATAL(A)
Definition: JMessage.hh:67
int debug
debug level
Definition: JSirene.cc:69
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition: JParser.hh:2158
Utility class to parse command line options.
Definition: JParser.hh:1714
@ debug_t
debug
Definition: JMessage.hh:29
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Definition: JSTDTypes.hh:14
Template class test for polymorphism.
Definition: JConversion.hh:22