MagicSmoke  $VERSION$
MCleanup Class Reference

clean-up function: executes a lambda expression when it is destructed (i.e. when the instance leaves its scope More...

#include <cleanup.h>

Public Member Functions

 MCleanup (const std::function< void()> &f)
 instantiates a new cleanup object and remembers the given function for later execution More...
 
 ~MCleanup ()
 destructs the object and executes the cleanup function More...
 
void setFunction (const std::function< void()> &f)
 sets a new cleanup function, removing the old one More...
 

Detailed Description

clean-up function: executes a lambda expression when it is destructed (i.e. when the instance leaves its scope

Constructor & Destructor Documentation

MCleanup::MCleanup ( const std::function< void()> &  f)
inline

instantiates a new cleanup object and remembers the given function for later execution

MCleanup::~MCleanup ( )
inline

destructs the object and executes the cleanup function

Member Function Documentation

void MCleanup::setFunction ( const std::function< void()> &  f)
inline

sets a new cleanup function, removing the old one


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