Example program to test JLANG::JBool class.
More...
#include <iostream>
#include <iomanip>
#include "JLang/JBool.hh"
#include "JLang/JConversion.hh"
#include "Jeep/JParser.hh"
#include "Jeep/JMessage.hh"
Go to the source code of this file.
|
#define | C_OPERAND(OP, A, B) |
| Operand macro.
|
|
#define | C_SWITCH(VALUE, A, B) |
| Switch macro.
|
|
|
int | main (int argc, char **argv) |
|
Example program to test JLANG::JBool class.
- Author
- mdejong
Definition in file JBool.cc.
◆ C_OPERAND
#define C_OPERAND |
( |
| OP, |
|
|
| A, |
|
|
| B ) |
Value:
Auxiliary template class for type bool.
Operand macro.
- Parameters
-
OP | logical operator |
A | first value |
B | second value |
- Returns
- result
Definition at line 62 of file JBool.cc.
◆ C_SWITCH
#define C_SWITCH |
( |
| VALUE, |
|
|
| A, |
|
|
| B ) |
Value:
Switch macro.
The result equals first option if value true; else second option.
- Parameters
-
VALUE | value |
A | first option |
B | second option |
- Returns
- result
Definition at line 73 of file JBool.cc.
◆ main()
int main |
( |
int | argc, |
|
|
char ** | argv ) |
Definition at line 82 of file JBool.cc.
83{
85
87
88 try {
89
90 JParser<> zap(
"Example program to test boolean algebra at compile time.");
91
93
94 zap(argc, argv);
95 }
96 catch(const exception &error) {
97 FATAL(error.what() << endl);
98 }
99
101
102 const bool X = true;
103 const bool Y = false;
104
107
115
118
120
123
126
127 return 0;
128}
#define C_OPERAND(OP, A, B)
Operand macro.
#define C_SWITCH(VALUE, A, B)
Switch macro.
#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).
Type definition of logical AND.
static JBool<!value > c_not()
Make logical NOT.
Type definition of logical OR.
Type definition of logical XOR.