KiCad PCB EDA Suite
|
RAII class that executes a function at construction and another at destruction. More...
#include <scoped_set_reset.h>
Public Member Functions | |
SCOPED_EXECUTION (Func initFunc, Func destroyFunc) | |
~SCOPED_EXECUTION () | |
Private Attributes | |
Func | m_initFunc |
Func | m_destroyFunc |
RAII class that executes a function at construction and another at destruction.
Useful to ensure cleanup code is executed even if an exception is thrown.
Definition at line 77 of file scoped_set_reset.h.
|
inline |
Definition at line 80 of file scoped_set_reset.h.
References SCOPED_EXECUTION< Func >::m_initFunc.
|
inline |
Definition at line 86 of file scoped_set_reset.h.
References SCOPED_EXECUTION< Func >::m_destroyFunc.
|
private |
Definition at line 93 of file scoped_set_reset.h.
Referenced by SCOPED_EXECUTION< Func >::~SCOPED_EXECUTION().
|
private |
Definition at line 92 of file scoped_set_reset.h.
Referenced by SCOPED_EXECUTION< Func >::SCOPED_EXECUTION().