|
ReXGlue SDK
|
#include <rex/utility.h>
Public Member Functions | |
| ScopeGuard (MoveOnlyFunction< void()> release) | |
| ScopeGuard (ScopeGuard &&other) noexcept | |
| ScopeGuard & | operator= (ScopeGuard &&other) noexcept |
| void | Reset () |
Runs a function once when it is destroyed, reset or assigned over. Move only and nullable.
|
explicit |
Creates a guard that runs a function.
| release | Runs once, on destruction, Reset or reassignment. |
|
noexcept |
Takes the function of another guard.
| other | The guard to take from, which then does nothing. |
|
noexcept |
Runs this function and takes the function of another guard.
| other | The guard to take from, which then does nothing. |
| void rex::ScopeGuard::Reset | ( | ) |
Runs the function now and leaves the guard doing nothing.