Debugging and error reporting functions and macros. More...
Collaboration diagram for Debug:
Functions | |
| std::string | boca::NameSpaceName (std::string const &pretty_function) |
| std::string | boca::ClassName (std::string const &pretty_function) |
| std::string | boca::FunctionName (std::string const &pretty_function) |
| std::string | boca::FileName (std::string const &file) |
| template<typename Value > | |
| std::string | boca::ApplyIoFlags (Value const &message) |
| template<typename Value > | |
| std::string | boca::Stream (Value const &message, int width=20, bool right=false) |
| template<typename Value > | |
| std::string | boca::Stream2 (std::string const &variable, Value const &value) |
| void | boca::Log (std::string const &file, int line, std::string const &name_space, std::string const &class_name, std::string const &function, bool final=true) |
| template<typename Value > | |
| void | boca::LogVariable (std::string const &variable, Value const &value) |
| template<typename Value > | |
| void | boca::LogVariable (std::string const &variable, const std::vector< Value > &values) |
| void | boca::LogVariable (std::string const &, char const *value) |
| template<typename Value > | |
| void | boca::Log (std::string const &file, int line, std::string const &name_space, std::string const &class_name, std::string const &function, std::string const &variable, Value value, bool final=true) |
| template<typename Value , typename Value2 > | |
| void | boca::Log (std::string const &file, int line, std::string const &name_space, std::string const &class_name, std::string const &function, std::string const &variable, const Value value, std::string const &variable2, const Value2 value2, bool final=true) |
| template<typename Value , typename Value2 , typename Value3 > | |
| void | boca::Log (std::string const &file, int line, std::string const &name_space, std::string const &class_name, std::string const &function, std::string const &variable, const Value value, std::string const &variable2, const Value2 value2, std::string const &variable3, const Value3 value3, bool final=true) |
| template<typename Value , typename Value2 , typename Value3 , typename Value4 > | |
| void | boca::Log (std::string const &file, int line, std::string const &name_space, std::string const &class_name, std::string const &function, std::string const &variable, const Value value, std::string const &variable2, const Value2 value2, std::string const &variable3, const Value3 value3, std::string const &variable4, const Value4 value4, bool final=true) |
| template<typename Value , typename Value2 , typename Value3 , typename Value4 , typename Value5 > | |
| void | boca::Log (std::string const &file, int line, std::string const &name_space, std::string const &class_name, std::string const &function, std::string const &variable, const Value value, std::string const &variable2, const Value2 value2, std::string const &variable3, const Value3 value3, std::string const &variable4, const Value4 value4, std::string const &variable5, const Value5 value5) |
| void | boca::Debug (bool final=true) |
| template<typename Value > | |
| void | boca::Debug (std::string const &variable, Value value, bool final=true) |
| template<typename Value , typename Value2 > | |
| void | boca::Debug (std::string const &variable, const Value value, std::string const &variable2, const Value2 value2, bool final=true) |
| template<typename Value , typename Value2 , typename Value3 > | |
| void | boca::Debug (std::string const &variable, const Value value, std::string const &variable2, const Value2 value2, std::string const &variable3, const Value3 value3, bool final=true) |
| template<typename Value , typename Value2 , typename Value3 , typename Value4 > | |
| void | boca::Debug (std::string const &variable, const Value value, std::string const &variable2, const Value2 value2, std::string const &variable3, const Value3 value3, std::string const &variable4, const Value4 value4, bool final=true) |
| template<typename Value , typename Value2 , typename Value3 , typename Value4 , typename Value5 > | |
| void | boca::Debug (std::string const &variable, const Value value, std::string const &variable2, const Value2 value2, std::string const &variable3, const Value3 value3, std::string const &variable4, const Value4 value4, std::string const &variable5, const Value5 value5) |
| template<typename Value > | |
| void | boca::Default (std::string const &variable, const Value value) |
| void | boca::Error (std::string const &variable) |
| #define | FILE_NAME ::boca::FileName(__FILE__) |
| #define | NAMESPACE_NAME ::boca::NameSpaceName(__PRETTY_FUNCTION__) |
| #define | CLASS_NAME ::boca::ClassName(__PRETTY_FUNCTION__) |
| #define | FUNCTION_NAME ::boca::FunctionName(__PRETTY_FUNCTION__) |
| #define | NAMES FILE_NAME, __LINE__, NAMESPACE_NAME, CLASS_NAME, FUNCTION_NAME |
| #define | VARIABLE(value) #value, value |
| #define | STREAM(value) ::boca::Stream2(VARIABLE(value)) |
| #define | LOG0 ::boca::Log(NAMES) |
| #define | LOG1(value) ::boca::Log(NAMES, VARIABLE(value)) |
| #define | LOG2(value, value2) ::boca::Log(NAMES, VARIABLE(value), VARIABLE(value2)) |
| #define | LOG3(value, value2, value3) ::boca::Log(NAMES, VARIABLE(value), VARIABLE(value2), VARIABLE(value3)) |
| #define | LOG4(value, value2, value3, value4) ::boca::Log(NAMES, VARIABLE(value), VARIABLE(value2), VARIABLE(value3), VARIABLE(value4)) |
| #define | LOG5(value, value2, value3, value4, value5) ::boca::Log(NAMES, VARIABLE(value), VARIABLE(value2), VARIABLE(value3), VARIABLE(value4), VARIABLE(value5)) |
| #define | LOG(arg0, arg1, arg2, arg3, arg4, arg5, arg, ...) arg |
| #define | CHOOSE(...) LOG(__VA_ARGS__, , LOG5, LOG4, LOG3, LOG2, LOG1, ) |
| #define | ALIVE(...) CHOOSE(__VA_ARGS__)(__VA_ARGS__) |
| #define | DEAD(...) do { if (0) ALIVE(__VA_ARGS__); } while (0) |
| #define | DEAD0 do { if (0) LOG0; } while (0) |
| #define | ERROR(...) ALIVE(__VA_ARGS__) |
| #define | ERROR0 LOG0 |
| #define | DETAIL(...) DEAD(__VA_ARGS__) |
| #define | DETAIL0 DEAD0 |
| #define | DEBUG(...) DEAD(__VA_ARGS__) |
| #define | DEBUG0 DEAD0 |
| #define | INFO(...) DEAD(__VA_ARGS__) |
| #define | INFO0 DEAD0 |
| #define | NOTE(...) ALIVE(__VA_ARGS__) |
| #define | NOTE0 LOG0 |
| #define | CHECK(condition, ...) if(!(condition)) { ERROR("Check failed", __VA_ARGS__); } |
| #define | DEBUG_CHECK(condition, ...) if(!(condition)) { DEBUG(__VA_ARGS__); } |
| #define | DEFAULT_1(condition) default : ERROR("Switch Default", condition); break; |
| #define | DEFAULT_2(condition, value) default : ERROR("Switch Default", condition); return value; |
| #define | DEFAULT_ARGUMENTS(arg1, arg2, arg, ...) arg |
| #define | DEFAULT_CHOOSE(...) DEFAULT_ARGUMENTS(__VA_ARGS__, DEFAULT_2, DEFAULT_1, ) |
| #define | DEFAULT(...) DEFAULT_CHOOSE(__VA_ARGS__)(__VA_ARGS__) |
Detailed Description
Debugging and error reporting functions and macros.
Macro Definition Documentation
| #define ALIVE | ( | ... | ) | CHOOSE(__VA_ARGS__)(__VA_ARGS__) |
| #define CLASS_NAME ::boca::ClassName(__PRETTY_FUNCTION__) |
| #define DEBUG | ( | ... | ) | DEAD(__VA_ARGS__) |
| #define DEBUG0 DEAD0 |
| #define DEFAULT | ( | ... | ) | DEFAULT_CHOOSE(__VA_ARGS__)(__VA_ARGS__) |
| #define DEFAULT_1 | ( | condition | ) | default : ERROR("Switch Default", condition); break; |
| #define DEFAULT_2 | ( | condition, | |
| value | |||
| ) | default : ERROR("Switch Default", condition); return value; |
| #define DEFAULT_ARGUMENTS | ( | arg1, | |
| arg2, | |||
| arg, | |||
| ... | |||
| ) | arg |
| #define DEFAULT_CHOOSE | ( | ... | ) | DEFAULT_ARGUMENTS(__VA_ARGS__, DEFAULT_2, DEFAULT_1, ) |
| #define DETAIL | ( | ... | ) | DEAD(__VA_ARGS__) |
| #define DETAIL0 DEAD0 |
| #define ERROR | ( | ... | ) | ALIVE(__VA_ARGS__) |
| #define ERROR0 LOG0 |
| #define FILE_NAME ::boca::FileName(__FILE__) |
| #define FUNCTION_NAME ::boca::FunctionName(__PRETTY_FUNCTION__) |
| #define INFO | ( | ... | ) | DEAD(__VA_ARGS__) |
| #define INFO0 DEAD0 |
| #define LOG | ( | arg0, | |
| arg1, | |||
| arg2, | |||
| arg3, | |||
| arg4, | |||
| arg5, | |||
| arg, | |||
| ... | |||
| ) | arg |
| #define LOG3 | ( | value, | |
| value2, | |||
| value3 | |||
| ) | ::boca::Log(NAMES, VARIABLE(value), VARIABLE(value2), VARIABLE(value3)) |
| #define LOG4 | ( | value, | |
| value2, | |||
| value3, | |||
| value4 | |||
| ) | ::boca::Log(NAMES, VARIABLE(value), VARIABLE(value2), VARIABLE(value3), VARIABLE(value4)) |
| #define LOG5 | ( | value, | |
| value2, | |||
| value3, | |||
| value4, | |||
| value5 | |||
| ) | ::boca::Log(NAMES, VARIABLE(value), VARIABLE(value2), VARIABLE(value3), VARIABLE(value4), VARIABLE(value5)) |
| #define NAMES FILE_NAME, __LINE__, NAMESPACE_NAME, CLASS_NAME, FUNCTION_NAME |
| #define NAMESPACE_NAME ::boca::NameSpaceName(__PRETTY_FUNCTION__) |
| #define NOTE | ( | ... | ) | ALIVE(__VA_ARGS__) |
| #define NOTE0 LOG0 |
| #define STREAM | ( | value | ) | ::boca::Stream2(VARIABLE(value)) |
| #define VARIABLE | ( | value | ) | #value, value |
Function Documentation
template<typename Value >
| std::string boca::ApplyIoFlags | ( | Value const & | message | ) |
| std::string boca::ClassName | ( | std::string const & | pretty_function | ) |
| void boca::Debug | ( | bool | final = true | ) |
template<typename Value >
| void boca::Debug | ( | std::string const & | variable, |
| Value | value, | ||
| bool | final = true |
||
| ) |
template<typename Value , typename Value2 >
| void boca::Debug | ( | std::string const & | variable, |
| const Value | value, | ||
| std::string const & | variable2, | ||
| const Value2 | value2, | ||
| bool | final = true |
||
| ) |
template<typename Value , typename Value2 , typename Value3 >
| void boca::Debug | ( | std::string const & | variable, |
| const Value | value, | ||
| std::string const & | variable2, | ||
| const Value2 | value2, | ||
| std::string const & | variable3, | ||
| const Value3 | value3, | ||
| bool | final = true |
||
| ) |
template<typename Value , typename Value2 , typename Value3 , typename Value4 >
| void boca::Debug | ( | std::string const & | variable, |
| const Value | value, | ||
| std::string const & | variable2, | ||
| const Value2 | value2, | ||
| std::string const & | variable3, | ||
| const Value3 | value3, | ||
| std::string const & | variable4, | ||
| const Value4 | value4, | ||
| bool | final = true |
||
| ) |
template<typename Value , typename Value2 , typename Value3 , typename Value4 , typename Value5 >
| void boca::Debug | ( | std::string const & | variable, |
| const Value | value, | ||
| std::string const & | variable2, | ||
| const Value2 | value2, | ||
| std::string const & | variable3, | ||
| const Value3 | value3, | ||
| std::string const & | variable4, | ||
| const Value4 | value4, | ||
| std::string const & | variable5, | ||
| const Value5 | value5 | ||
| ) |
template<typename Value >
| void boca::Default | ( | std::string const & | variable, |
| const Value | value | ||
| ) |
| void boca::Error | ( | std::string const & | variable | ) |
| std::string boca::FileName | ( | std::string const & | file | ) |
| std::string boca::FunctionName | ( | std::string const & | pretty_function | ) |
| void boca::Log | ( | std::string const & | file, |
| int | line, | ||
| std::string const & | name_space, | ||
| std::string const & | class_name, | ||
| std::string const & | function, | ||
| bool | final = true |
||
| ) |
template<typename Value >
| void boca::Log | ( | std::string const & | file, |
| int | line, | ||
| std::string const & | name_space, | ||
| std::string const & | class_name, | ||
| std::string const & | function, | ||
| std::string const & | variable, | ||
| Value | value, | ||
| bool | final = true |
||
| ) |
template<typename Value , typename Value2 >
| void boca::Log | ( | std::string const & | file, |
| int | line, | ||
| std::string const & | name_space, | ||
| std::string const & | class_name, | ||
| std::string const & | function, | ||
| std::string const & | variable, | ||
| const Value | value, | ||
| std::string const & | variable2, | ||
| const Value2 | value2, | ||
| bool | final = true |
||
| ) |
template<typename Value , typename Value2 , typename Value3 >
| void boca::Log | ( | std::string const & | file, |
| int | line, | ||
| std::string const & | name_space, | ||
| std::string const & | class_name, | ||
| std::string const & | function, | ||
| std::string const & | variable, | ||
| const Value | value, | ||
| std::string const & | variable2, | ||
| const Value2 | value2, | ||
| std::string const & | variable3, | ||
| const Value3 | value3, | ||
| bool | final = true |
||
| ) |
template<typename Value , typename Value2 , typename Value3 , typename Value4 >
| void boca::Log | ( | std::string const & | file, |
| int | line, | ||
| std::string const & | name_space, | ||
| std::string const & | class_name, | ||
| std::string const & | function, | ||
| std::string const & | variable, | ||
| const Value | value, | ||
| std::string const & | variable2, | ||
| const Value2 | value2, | ||
| std::string const & | variable3, | ||
| const Value3 | value3, | ||
| std::string const & | variable4, | ||
| const Value4 | value4, | ||
| bool | final = true |
||
| ) |
template<typename Value , typename Value2 , typename Value3 , typename Value4 , typename Value5 >
| void boca::Log | ( | std::string const & | file, |
| int | line, | ||
| std::string const & | name_space, | ||
| std::string const & | class_name, | ||
| std::string const & | function, | ||
| std::string const & | variable, | ||
| const Value | value, | ||
| std::string const & | variable2, | ||
| const Value2 | value2, | ||
| std::string const & | variable3, | ||
| const Value3 | value3, | ||
| std::string const & | variable4, | ||
| const Value4 | value4, | ||
| std::string const & | variable5, | ||
| const Value5 | value5 | ||
| ) |
template<typename Value >
| void boca::LogVariable | ( | std::string const & | variable, |
| Value const & | value | ||
| ) |
template<typename Value >
| void boca::LogVariable | ( | std::string const & | variable, |
| const std::vector< Value > & | values | ||
| ) |
| void boca::LogVariable | ( | std::string const & | , |
| char const * | value | ||
| ) |
| std::string boca::NameSpaceName | ( | std::string const & | pretty_function | ) |
template<typename Value >
| std::string boca::Stream | ( | Value const & | message, |
| int | width = 20, |
||
| bool | right = false |
||
| ) |
template<typename Value >
| std::string boca::Stream2 | ( | std::string const & | variable, |
| Value const & | value | ||
| ) |
