ScopeGuard< FunctionType > Class Template Reference

Executes a given function on scope exit. More...

#include <ArmarXCore/core/util/OnScopeExit.h>

Public Member Functions

 ScopeGuard (const FunctionType &fn)
 
 ScopeGuard (FunctionType &&fn)
 
 ~ScopeGuard ()
 

Detailed Description

template<typename FunctionType>
class armarx::detail::ScopeGuard< FunctionType >

Executes a given function on scope exit.

Use with the macro ARMARX_ON_SCOPE_EXIT;

Definition at line 71 of file OnScopeExit.h.

Constructor & Destructor Documentation

◆ ScopeGuard() [1/2]

ScopeGuard ( const FunctionType &  fn)
inlineexplicit

Definition at line 74 of file OnScopeExit.h.

◆ ScopeGuard() [2/2]

ScopeGuard ( FunctionType &&  fn)
inlineexplicit

Definition at line 76 of file OnScopeExit.h.

◆ ~ScopeGuard()

~ScopeGuard ( )
inline

Definition at line 78 of file OnScopeExit.h.


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