DynExp
Highly flexible laboratory automation for dynamically changing experiments.
Util::OnDestruction< ObjectT, CallableT > Class Template Reference

Holds a CallableMemberWrapper and invokes its callable when being destroyed. More...

Public Member Functions

template<typename... ArgTs>
 OnDestruction (ObjectT &Object, const CallableT Callable, ArgTs &&...Args)
 Constructs a OnDestruction instance which calls Callable upon destruction of this instance. More...
 
 ~OnDestruction ()
 

Private Attributes

CallableMemberWrapper< ObjectT, CallableT > CallableWrapper
 

Detailed Description

template<typename ObjectT, typename CallableT>
class Util::OnDestruction< ObjectT, CallableT >

Holds a CallableMemberWrapper and invokes its callable when being destroyed.

Template Parameters
ObjectTType of the object the member function belongs to
CallableTThe member function's function pointer type

Definition at line 493 of file Util.h.

Constructor & Destructor Documentation

◆ OnDestruction()

template<typename ObjectT , typename CallableT >
template<typename... ArgTs>
Util::OnDestruction< ObjectT, CallableT >::OnDestruction ( ObjectT &  Object,
const CallableT  Callable,
ArgTs &&...  Args 
)
inline

Constructs a OnDestruction instance which calls Callable upon destruction of this instance.

Template Parameters
...ArgTsTypes of the arguments expected by the wrapped member function
Parameters
ObjectInstance the member function is invoked on
CallablePointer to a member function
...ArgsArguments to be passed to the member function upon invocation

Definition at line 504 of file Util.h.

◆ ~OnDestruction()

template<typename ObjectT , typename CallableT >
Util::OnDestruction< ObjectT, CallableT >::~OnDestruction ( )
inline

Definition at line 507 of file Util.h.

Member Data Documentation

◆ CallableWrapper

template<typename ObjectT , typename CallableT >
CallableMemberWrapper<ObjectT, CallableT> Util::OnDestruction< ObjectT, CallableT >::CallableWrapper
private

Definition at line 510 of file Util.h.


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