KiCad PCB EDA Suite
Loading...
Searching...
No Matches
SCOPED_EXECUTION< Func > Class Template Reference

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
 

Detailed Description

template<typename Func>
class SCOPED_EXECUTION< Func >

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.

Constructor & Destructor Documentation

◆ SCOPED_EXECUTION()

template<typename Func >
SCOPED_EXECUTION< Func >::SCOPED_EXECUTION ( Func  initFunc,
Func  destroyFunc 
)
inline

Definition at line 80 of file scoped_set_reset.h.

References SCOPED_EXECUTION< Func >::m_initFunc.

◆ ~SCOPED_EXECUTION()

template<typename Func >
SCOPED_EXECUTION< Func >::~SCOPED_EXECUTION ( )
inline

Definition at line 86 of file scoped_set_reset.h.

References SCOPED_EXECUTION< Func >::m_destroyFunc.

Member Data Documentation

◆ m_destroyFunc

template<typename Func >
Func SCOPED_EXECUTION< Func >::m_destroyFunc
private

Definition at line 93 of file scoped_set_reset.h.

Referenced by SCOPED_EXECUTION< Func >::~SCOPED_EXECUTION().

◆ m_initFunc

template<typename Func >
Func SCOPED_EXECUTION< Func >::m_initFunc
private

Definition at line 92 of file scoped_set_reset.h.

Referenced by SCOPED_EXECUTION< Func >::SCOPED_EXECUTION().


The documentation for this class was generated from the following file: