Moved files to 'reactics-bdd'

This commit is contained in:
Artur Meski
2019-03-03 22:26:33 +00:00
parent 21edba3c65
commit 97c83ba535
1694 changed files with 0 additions and 0 deletions

47
reactics-bdd/macro.hh Normal file
View File

@@ -0,0 +1,47 @@
#ifndef __MY_MACROS__
#define __MY_MACROS__
#include <cassert>
#include <iostream>
#define LINENUM std::cout << __FILE__ << " (function " << __func__ << "), line " << __LINE__ << std::endl;
/* Fatal error */
#define FERROR(s) \
{ \
std::cerr << "EE: " << __FILE__ << " (function " << __func__ << "), line " << __LINE__ << ": " << s << std::endl; \
exit(1); \
}
#define WARNING(s) \
{ \
std::cerr << "== WARNING: " << s << std::endl; \
}
#define VERB(s) \
assert(opts != nullptr); \
if (opts->verbose > 0) { \
std::cerr << "ii VERBOSE(1): " << __FILE__ << " (" << __func__ << ":" << __LINE__ << "): " << s << std::endl; \
}
#define VERB_L2(s) \
assert(opts != nullptr); \
if (opts->verbose > 1) { \
std::cerr << "ii VERBOSE(2): " << __FILE__ << " (" << __func__ << ":" << __LINE__ << "): " << s << std::endl; \
}
#define VERB_L3(s) \
assert(opts != nullptr); \
if (opts->verbose > 2) { \
std::cerr << "ii VERBOSE(3): " << __FILE__ << " (" << __func__ << ":" << __LINE__ << "): " << s << std::endl; \
}
#define VERB_LN(n,s) \
assert(opts != nullptr); \
if (opts->verbose >= (n)) { \
std::cerr << "ii VERBOSE(" << (n) << "): " << __FILE__ << " (" << __func__ << ":" << __LINE__ << "): " << s << std::endl; \
}
#define SET_ADD(set1, set2) (set1).insert((set2).begin(), (set2).end())
#endif