Debugging macros
[QuantLib macros]
Detailed Description
For debugging purposes, macros can be used to output information about the code being executed.
Defines | |
#define | QL_TRACE_ENABLE |
enable tracing | |
#define | QL_TRACE_DISABLE |
disable tracing | |
#define | QL_TRACE_ON(out) |
set tracing stream | |
#define | QL_TRACE(message) |
output tracing information | |
#define | QL_TRACE_ENTER_FUNCTION |
output tracing information | |
#define | QL_TRACE_EXIT_FUNCTION |
output tracing information | |
#define | QL_TRACE_LOCATION |
output tracing information | |
#define | QL_TRACE_VARIABLE(variable) |
output tracing information |
Define Documentation
#define QL_TRACE_ENABLE |
enable tracing
The statement
can be used to enable tracing. Such statement might be ignored; refer to QL_TRACE for details.- Examples:
- tracing_example.cpp.
#define QL_TRACE_DISABLE |
disable tracing
The statement
can be used to disable tracing. Such statement might be ignored; refer to QL_TRACE for details.#define QL_TRACE_ON | ( | out | ) |
set tracing stream
The statement
QL_TRACE_ON(stream);
#define QL_TRACE | ( | message | ) |
output tracing information
The statement
QL_TRACE(message);
- Examples:
- tracing_example.cpp.
#define QL_TRACE_ENTER_FUNCTION |
output tracing information
The statement
can be used at the beginning of a function to trace the fact that the program execution is entering such function. It should be paired with a corresponding QL_TRACE_EXIT_FUNCTION macro. Such statement might be ignored; refer to QL_TRACE for details. Also, function information might not be available depending on the compiler.- Examples:
- tracing_example.cpp.
#define QL_TRACE_EXIT_FUNCTION |
output tracing information
The statement
can be used before returning from a function to trace the fact that the program execution is exiting such function. It should be paired with a corresponding QL_TRACE_ENTER_FUNCTION macro. Such statement might be ignored; refer to QL_TRACE for details. Also, function information might not be available depending on the compiler.- Examples:
- tracing_example.cpp.
#define QL_TRACE_LOCATION |
output tracing information
The statement
can be used to trace the current file and line. Such statement might be ignored; refer to QL_TRACE for details.- Examples:
- tracing_example.cpp.
#define QL_TRACE_VARIABLE | ( | variable | ) |
output tracing information
The statement
QL_TRACE_VARIABLE(variable);
- Examples:
- tracing_example.cpp.