Go to the documentation of this file. 38 #define FILE_NAME ::boca::FileName(__FILE__) 40 #define NAMESPACE_NAME ::boca::NameSpaceName(__PRETTY_FUNCTION__) 42 #define CLASS_NAME ::boca::ClassName(__PRETTY_FUNCTION__) 44 #define FUNCTION_NAME ::boca::FunctionName(__PRETTY_FUNCTION__) 46 #define NAMES FILE_NAME, __LINE__, NAMESPACE_NAME, CLASS_NAME, FUNCTION_NAME 48 #define VARIABLE(value) #value, value 50 #define STREAM(value) ::boca::Stream2(VARIABLE(value)) 52 #define LOG0 ::boca::Log(NAMES) 54 #define LOG1(value) ::boca::Log(NAMES, VARIABLE(value)) 56 #define LOG2(value, value2) ::boca::Log(NAMES, VARIABLE(value), VARIABLE(value2)) 58 #define LOG3(value, value2, value3) ::boca::Log(NAMES, VARIABLE(value), VARIABLE(value2), VARIABLE(value3)) 60 #define LOG4(value, value2, value3, value4) ::boca::Log(NAMES, VARIABLE(value), VARIABLE(value2), VARIABLE(value3), VARIABLE(value4)) 62 #define LOG5(value, value2, value3, value4, value5) ::boca::Log(NAMES, VARIABLE(value), VARIABLE(value2), VARIABLE(value3), VARIABLE(value4), VARIABLE(value5)) 64 #define LOG(arg0, arg1, arg2, arg3, arg4, arg5, arg, ...) arg 66 #define CHOOSE(...) LOG(__VA_ARGS__, , LOG5, LOG4, LOG3, LOG2, LOG1, ) 68 #define ALIVE(...) CHOOSE(__VA_ARGS__)(__VA_ARGS__) 70 #define DEAD(...) do { if (0) ALIVE(__VA_ARGS__); } while (0) 72 #define DEAD0 do { if (0) LOG0; } while (0) 74 #define ERROR(...) ALIVE(__VA_ARGS__) 78 #define DETAIL(...) ALIVE(__VA_ARGS__) 81 #define DETAIL(...) DEAD(__VA_ARGS__) 85 #if defined(DETAILED) || defined(DEBUGGING) 86 #define DEBUG(...) ALIVE(__VA_ARGS__) 89 #define DEBUG(...) DEAD(__VA_ARGS__) 93 #if defined(DETAILED) || defined(DEBUGGING) || defined(INFORMATION) 94 #define INFO(...) ALIVE(__VA_ARGS__) 97 #define INFO(...) DEAD(__VA_ARGS__) 101 #if defined(DETAILED) || defined(DEBUGGING) || defined(INFORMATION) || defined(NOTIFICATION) 102 #define NOTE(...) ALIVE(__VA_ARGS__) 105 #define NOTE(...) DEAD(__VA_ARGS__) 109 #define CHECK(condition, ...) if(!(condition)) { ERROR("Check failed", __VA_ARGS__); } 110 #define DEBUG_CHECK(condition, ...) if(!(condition)) { DEBUG(__VA_ARGS__); } 112 #define DEFAULT_1(condition) default : ERROR("Switch Default", condition); break; 113 #define DEFAULT_2(condition, value) default : ERROR("Switch Default", condition); return value; 115 #define DEFAULT_ARGUMENTS(arg1, arg2, arg, ...) arg 116 #define DEFAULT_CHOOSE(...) DEFAULT_ARGUMENTS(__VA_ARGS__, DEFAULT_2, DEFAULT_1, ) 118 #define DEFAULT(...) DEFAULT_CHOOSE(__VA_ARGS__)(__VA_ARGS__)