Jpp
15.0.0
the software that should make you happy
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
examples
JLang
JResolve.cc
Go to the documentation of this file.
1
#include <iostream>
2
#include <iomanip>
3
4
#include "
JLang/JResolve.hh
"
5
#include "
Jeep/JParser.hh
"
6
#include "
Jeep/JMessage.hh
"
7
8
9
namespace
{
10
struct
__A__ { };
11
struct
__B__;
12
}
13
14
15
#define PRINT(OUT, CLASS) OUT << setw(8) << std::left << #CLASS << ' ' << JLANG::JResolve<CLASS>::value << std::endl;
16
17
18
/**
19
* \file
20
*
21
* Test of class JLANG::JResolve.
22
* \author mdejong
23
*/
24
int
main
(
int
argc,
char
**argv)
25
{
26
using namespace
std;
27
28
int
debug
;
29
30
try
{
31
32
JParser<>
zap(
"Example program to test whetger a class exists."
);
33
34
zap[
'd'
] =
make_field
(
debug
) =3;
35
36
zap(argc, argv);
37
}
38
catch
(
const
exception &error) {
39
FATAL
(error.what() << endl);
40
}
41
42
PRINT
(cout, __A__);
43
PRINT
(cout, __B__);
44
45
ASSERT
(
JLANG::JResolve<__A__>::value
==
true
);
46
ASSERT
(
JLANG::JResolve<__B__>::value
==
false
);
47
48
return
0;
49
}
JLANG::JResolve
Test exitence of class T.
Definition:
JResolve.hh:21
JPARSER::JParser
Utility class to parse command line options.
Definition:
JParser.hh:1500
main
int main(int argc, char *argv[])
Definition:
Main.cc:15
JResolve.hh
ASSERT
#define ASSERT(A,...)
Assert macro.
Definition:
JMessage.hh:90
make_field
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition:
JParser.hh:1961
debug
int debug
debug level
Definition:
JSirene.cc:63
JMessage.hh
General purpose messaging.
FATAL
#define FATAL(A)
Definition:
JMessage.hh:67
PRINT
#define PRINT(OUT, CLASS)
Definition:
JResolve.cc:15
JParser.hh
Utility class to parse command line options.
Generated by
1.8.5