|
FastLED 3.9.15
|
RAII guard for automatic call stack tracking.
Pushes function name on construction, pops on destruction. Non-copyable, non-movable for simplicity.
This class is always compiled but only functional when FASTLED_DEBUG_STACK_TRACE is defined. The linker can eliminate unused code when trace macros are not used.
#include <trace.h>
Public Member Functions | |
| ScopedTrace (const char *function, int line) FL_NOEXCEPT | |
| Construct and push function name onto stack. | |
| ScopedTrace (const ScopedTrace &) FL_NOEXCEPT=delete | |
| ScopedTrace (ScopedTrace &&) FL_NOEXCEPT=delete | |
| ~ScopedTrace () FL_NOEXCEPT | |
| Destructor - automatically pops from stack. | |
| ScopedTrace & | operator= (const ScopedTrace &) FL_NOEXCEPT=delete |
| ScopedTrace & | operator= (ScopedTrace &&) FL_NOEXCEPT=delete |
Static Public Member Functions | |
| static void | clear () FL_NOEXCEPT |
| Clear the entire call stack (primarily for testing) | |
| static fl::size | depth () FL_NOEXCEPT |
| Get the current stack depth. | |
| static fl::string | dump () FL_NOEXCEPT |
| Dump the current call stack to a string. | |
| static void | dump (fl::vector< TracePoint > *out) FL_NOEXCEPT |
| Dump the current call stack to an inlined vector of TracePoints. | |
| static void | pop () FL_NOEXCEPT |
| Pop the most recent function from the call stack. | |
| static void | push (const char *function, int line) FL_NOEXCEPT |
| Push a function name onto the call stack. | |