ImFusion SDK 4.3
ScopeGuard< ReleaseFunc > Class Template Reference

#include <ImFusion/Core/Utils/ScopeGuard.h>

Templated proxy class to implement generic scope guards. More...

Detailed Description

template<class ReleaseFunc>
class ImFusion::Utils::ScopeGuard< ReleaseFunc >

Templated proxy class to implement generic scope guards.

ScopeGuard ensures that the function given during initialization is executed when the ScopeGuard instance is destroyed (i.e. leaves its scope) unless the guard is dismissed before.

Note
Implementation inspired by Andrei Alexandrescu's talk on Systematic Error Handling in C++.
See also
makeScopeGuard()

Public Member Functions

 ScopeGuard (ReleaseFunc f)
 
 ScopeGuard (const ScopeGuard &)=delete
 
ScopeGuardoperator= (const ScopeGuard &)=delete
 
 ScopeGuard (ScopeGuard &&rhs) noexcept
 
void dismiss ()
 

The documentation for this class was generated from the following file:
Search Tab / S to search, Esc to close