Jpp  18.2.1-ARCA-DF-PATCH
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Macros | Functions
JZero.cc File Reference

Example program to test zero values (JMATH::zero). More...

#include <iostream>
#include <iomanip>
#include "JMath/JZero.hh"
#include "Jeep/JParser.hh"
#include "Jeep/JMessage.hh"

Go to the source code of this file.

Macros

#define PRINT(OUT, CLASS)   print<CLASS>(OUT, #CLASS)
 

Functions

int main (int argc, char **argv)
 

Detailed Description

Example program to test zero values (JMATH::zero).

Author
mdejong

Definition in file JZero.cc.

Macro Definition Documentation

#define PRINT (   OUT,
  CLASS 
)    print<CLASS>(OUT, #CLASS)

Definition at line 87 of file JZero.cc.

Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 97 of file JZero.cc.

98 {
99  using namespace std;
100 
101  int debug;
102 
103  try {
104 
105  JParser<> zap("Example program to test zero values of non-primitive data types.");
106 
107  zap['d'] = make_field(debug) = 3;
108 
109  zap(argc, argv);
110  }
111  catch(const exception &error) {
112  FATAL(error.what() << endl);
113  }
114 
115  using namespace JPP;
116 
117  PRINT(cout, int);
118  PRINT(cout, float);
119  PRINT(cout, double);
120  PRINT(cout, __A__);
121 
122  ASSERT(is_equal<int> (0));
123  ASSERT(is_equal<float> (0.0));
124  ASSERT(is_equal<double>(0.0));
125  ASSERT(is_equal<__A__> (__A__(0)));
126 
127  return 0;
128 }
Utility class to parse command line options.
Definition: JParser.hh:1514
#define PRINT(OUT, CLASS)
Definition: JZero.cc:87
#define ASSERT(A,...)
Assert macro.
Definition: JMessage.hh:90
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition: JParser.hh:1989
#define FATAL(A)
Definition: JMessage.hh:67
int debug
debug level