Function calling janitor class for std::function with 0 parameters. More...
#include <xsens_janitors.h>
Public Types | |
typedef std::function< ResultType(void)> | t_func_JanitorFunc |
A function prototype for a janitor function. More... | |
Public Member Functions | |
void | disable (void) |
Disables the function calling. More... | |
void | enable (void) |
Enables the function calling. More... | |
JanitorStdFunc0 (t_func_JanitorFunc func, bool enabl=true) | |
Constructor. More... | |
~JanitorStdFunc0 () | |
Destructor. More... | |
Private Member Functions | |
const JanitorStdFunc0 & | operator= (const JanitorStdFunc0 &) |
Private Attributes | |
bool | m_enabled |
t_func_JanitorFunc | m_funcJF |
Function calling janitor class for std::function with 0 parameters.
This class can be used to make sure that the given function is called on the given object when the janitor leaves scope. Take care that the object is not of a type that is destroyed before the function unrolling begins.
Definition at line 514 of file xsens_janitors.h.
typedef std::function<ResultType(void)> xsens::JanitorStdFunc0< ResultType >::t_func_JanitorFunc |
A function prototype for a janitor function.
Definition at line 517 of file xsens_janitors.h.
|
inline |
Constructor.
Definition at line 526 of file xsens_janitors.h.
|
inline |
Destructor.
Definition at line 531 of file xsens_janitors.h.
|
inline |
Disables the function calling.
Definition at line 539 of file xsens_janitors.h.
|
inline |
Enables the function calling.
Definition at line 546 of file xsens_janitors.h.
|
private |
|
private |
Definition at line 521 of file xsens_janitors.h.
|
private |
Definition at line 520 of file xsens_janitors.h.