|
feisty meow concerns codebase
2.140
|
a small object that represents a stack trace in progress. More...
#include <callstack_tracker.h>
Public Member Functions | |
| frame_tracking_instance (const char *class_name="", const char *func="", const char *file="", int line=0, bool add_frame=false) | |
| as an automatic variable, this can hang onto frame information. More... | |
| frame_tracking_instance (const frame_tracking_instance &to_copy) | |
| ~frame_tracking_instance () | |
| releases the information and this stack frame in the tracker. More... | |
| frame_tracking_instance & | operator= (const frame_tracking_instance &to_copy) |
| void | assign (const char *class_name, const char *func, const char *file, int line) |
| similar to assignment operator but doesn't require an object. More... | |
| void | clean () |
| throws out our accumulated memory and pops frame if applicable. More... | |
Public Attributes | |
| bool | _frame_involved |
| has this object been added to the tracker? More... | |
| char * | _class |
| char * | _func |
| char * | _file |
| newly allocated copies. More... | |
| int | _line |
a small object that represents a stack trace in progress.
the object will automatically be destroyed when the containing scope exits. this enables a users of the stack tracker to simply label their function name and get the frame added. if they want finer grained tracking, they should update the line number periodically through their function, especially when memory is about to be allocated or where something might go wrong.
Definition at line 145 of file callstack_tracker.h.
| application::frame_tracking_instance::frame_tracking_instance | ( | const char * | class_name = "", |
| const char * | func = "", |
||
| const char * | file = "", |
||
| int | line = 0, |
||
| bool | add_frame = false |
||
| ) |
as an automatic variable, this can hang onto frame information.
if "add_frame" is true, then this actually adds the stack frame in question to the tracker. thus if you use this class at the top of your function, such as via the FUNCDEF macro, then you can forget about having to pop the frame later.
Definition at line 267 of file callstack_tracker.cpp.
References _frame_involved, application::callstack_tracker::push_frame(), and application::thread_wide_stack_trace().
| application::frame_tracking_instance::frame_tracking_instance | ( | const frame_tracking_instance & | to_copy | ) |
Definition at line 282 of file callstack_tracker.cpp.
| application::frame_tracking_instance::~frame_tracking_instance | ( | ) |
releases the information and this stack frame in the tracker.
Definition at line 292 of file callstack_tracker.cpp.
References clean().
| void application::frame_tracking_instance::assign | ( | const char * | class_name, |
| const char * | func, | ||
| const char * | file, | ||
| int | line | ||
| ) |
similar to assignment operator but doesn't require an object.
Definition at line 317 of file callstack_tracker.cpp.
References _class, _file, _frame_involved, _func, _line, clean(), and NULL_POINTER.
| void application::frame_tracking_instance::clean | ( | ) |
throws out our accumulated memory and pops frame if applicable.
Definition at line 294 of file callstack_tracker.cpp.
References _class, _file, _frame_involved, _func, _line, NULL_POINTER, application::callstack_tracker::pop_frame(), and application::thread_wide_stack_trace().
Referenced by assign(), and ~frame_tracking_instance().
| frame_tracking_instance & application::frame_tracking_instance::operator= | ( | const frame_tracking_instance & | to_copy | ) |
Definition at line 307 of file callstack_tracker.cpp.
| char* application::frame_tracking_instance::_class |
Definition at line 150 of file callstack_tracker.h.
| char * application::frame_tracking_instance::_file |
newly allocated copies.
Definition at line 150 of file callstack_tracker.h.
| bool application::frame_tracking_instance::_frame_involved |
has this object been added to the tracker?
Definition at line 149 of file callstack_tracker.h.
Referenced by assign(), clean(), and frame_tracking_instance().
| char * application::frame_tracking_instance::_func |
Definition at line 150 of file callstack_tracker.h.
| int application::frame_tracking_instance::_line |
Definition at line 151 of file callstack_tracker.h.