2016-04-09 01:28:33 +01:00
|
|
|
#ifndef _LIBRW_DEFINES_HPP_
|
|
|
|
#define _LIBRW_DEFINES_HPP_
|
|
|
|
|
2016-05-24 17:31:54 +02:00
|
|
|
#if RW_DEBUG && RW_VERBOSE_DEBUG_MESSAGES
|
|
|
|
#include <iostream>
|
|
|
|
#define RW_MESSAGE(msg) \
|
|
|
|
std::cout << __FILE__ << ":"<< __LINE__ << ": " << msg << std::endl
|
|
|
|
#define RW_ERROR(msg) \
|
2016-05-24 17:38:41 +02:00
|
|
|
std::cerr << __FILE__ << ":"<< __LINE__ << ": " << msg << std::endl
|
2016-05-24 17:31:54 +02:00
|
|
|
#define RW_CHECK(cond, msg) \
|
|
|
|
if(!(cond)) RW_ERROR(msg)
|
2016-04-10 18:49:23 +01:00
|
|
|
#else
|
2016-05-24 17:31:54 +02:00
|
|
|
#define RW_MESSAGE(msg)
|
|
|
|
#define RW_ERROR(msg)
|
|
|
|
#define RW_CHECK(cond, msg)
|
2016-04-10 18:49:23 +01:00
|
|
|
#endif
|
|
|
|
|
2016-04-28 00:54:42 +01:00
|
|
|
#define RW_UNUSED(var) \
|
|
|
|
(void) var
|
|
|
|
|
|
|
|
#define RW_UNIMPLEMENTED(msg) \
|
2016-06-19 00:51:08 +01:00
|
|
|
RW_MESSAGE("Unimplemented: " << msg)
|
2016-04-09 01:28:33 +01:00
|
|
|
|
|
|
|
#endif
|