|
DuxReiNummariae 1.1.0-alpha.19
Simple and powerful budgeting application
|
Provides a RAII way to execute a bit of code upon the destruction of the object. More...
#include <ScopeExecutor.hpp>
Public Member Functions | |
| ScopeExecutor (std::function< void()> execute) | |
| Full initialisation constructor. | |
| ~ScopeExecutor () | |
| Executes the supplied function. | |
Provides a RAII way to execute a bit of code upon the destruction of the object.
| drn::foundation::ScopeExecutor::ScopeExecutor | ( | std::function< void()> | execute | ) |
Full initialisation constructor.
| execute | The function that should be executed upon object destruction. The executable function must not throw. |
| drn::foundation::ScopeExecutor::~ScopeExecutor | ( | ) |
Executes the supplied function.