Value restoring janitor class. More...
#include <xsens_janitors.h>
Public Member Functions | |
void | disable (void) |
Disables the value restoring. More... | |
void | enable (void) |
Enables the value restoring. More... | |
JanitorRestore (T &control, bool enabl=true) | |
Constructor. More... | |
~JanitorRestore () | |
Destructor. More... | |
Private Attributes | |
T & | m_control |
bool | m_enabled |
T | m_value |
Value restoring janitor class.
This class can be used to make sure that the value that is in the variable at the time the janitor is created will be in it again when the janitor leaves scope.
Definition at line 106 of file xsens_janitors.h.
|
inline |
Constructor.
Definition at line 116 of file xsens_janitors.h.
|
inline |
Destructor.
Definition at line 121 of file xsens_janitors.h.
|
inline |
Disables the value restoring.
Definition at line 129 of file xsens_janitors.h.
|
inline |
Enables the value restoring.
Definition at line 136 of file xsens_janitors.h.
|
private |
Definition at line 109 of file xsens_janitors.h.
|
private |
Definition at line 111 of file xsens_janitors.h.
|
private |
Definition at line 110 of file xsens_janitors.h.