|
Flow123d
|
This class provides function call stack. More...
#include <sys_function_stack.hh>

Public Member Functions | |
| Trace (const char *const trace_str, const char *const trace_str2, const char *const trace_str3) | |
| ~Trace () | |
Static Public Member Functions | |
| static void | stack_print (FILE *fw) |
| static void | stack_print (std::ostream *os) |
Static Private Attributes | |
| static int | stack_depth = -1 |
| static std::vector < Trace_helper > * | program_stack |
| definition of global variables for stacktrace storage More... | |
This class provides function call stack.
Then the backtrace of the called functions can be reported in the case of an error. Operations with the stack should be only through F_ENTRY and F_STACK_SHOW(stream). To include a function in the call stack just use macro F_ENTRY at the very beginning of the function. F_ENTRY macro is nonempty only for the debugging version. For the release version, i.e. when Flow123d_NODEBUG is defined, F_ENTRY is empty and produce no run-time overhead.
Definition at line 89 of file sys_function_stack.hh.
|
inlineexplicit |
Constructor, takes source filename and func_name of a function, and line number line_no of the call of F_ENTRY. Forms a message string and put it onto stack.
Definition at line 96 of file sys_function_stack.hh.
|
inline |
Destructor, automatically called on the function exit. Pop out the stack message of that function.
Definition at line 111 of file sys_function_stack.hh.
|
inlinestatic |
Prints the stack into a given file.
Definition at line 119 of file sys_function_stack.hh.
|
inlinestatic |
As previous, but output into C++ output stream.
Definition at line 129 of file sys_function_stack.hh.
|
staticprivate |
definition of global variables for stacktrace storage
Definition at line 140 of file sys_function_stack.hh.
|
staticprivate |
Static stack of trace messages.
Definition at line 139 of file sys_function_stack.hh.
1.8.4