OpenMS
2.7.0
|
Exception-safe way of executing arbitrary code at the end of a scope. More...
#include <OpenMS/CONCEPT/RAIICleanup.h>
Public Member Functions | |
RAIICleanup ()=delete | |
no default CTor; we need a lambda More... | |
RAIICleanup (std::function< void()> l) | |
pass in any lambda you like which does the cleanup at the end More... | |
~RAIICleanup () | |
Private Attributes | |
std::function< void()> | l_ |
called upon destruction More... | |
Exception-safe way of executing arbitrary code at the end of a scope.
Just pass in a (capturing) lambda function, which will be called upon destruction of an instance of this class.
|
delete |
no default CTor; we need a lambda
|
inline |
pass in any lambda you like which does the cleanup at the end
|
inline |
References RAIICleanup::l_.
|
private |
called upon destruction
Referenced by RAIICleanup::~RAIICleanup().