$search
helper class to set timeout of _serial_base on construction and reset to previous value on destruction. (RAII-idiom) More...
#include <serialbase.h>
Public Member Functions | |
cSetTimeoutTemporarily (cSerialBase *_serial_base, double new_timeout) | |
CTOR: remember current timeout of _serial_base and set its timeout to new_timeout, but only if current timeout and new_timeout differ. | |
~cSetTimeoutTemporarily () | |
DTOR: restore the remembered timeout. | |
Private Attributes | |
double | old_timeout |
cSerialBase * | serial_base |
helper class to set timeout of _serial_base on construction and reset to previous value on destruction. (RAII-idiom)
Definition at line 165 of file serialbase.h.
cSerialBase::cSetTimeoutTemporarily::cSetTimeoutTemporarily | ( | cSerialBase * | _serial_base, | |
double | new_timeout | |||
) | [inline] |
CTOR: remember current timeout of _serial_base and set its timeout to new_timeout, but only if current timeout and new_timeout differ.
Definition at line 171 of file serialbase.h.
cSerialBase::cSetTimeoutTemporarily::~cSetTimeoutTemporarily | ( | ) | [inline] |
DTOR: restore the remembered timeout.
Definition at line 180 of file serialbase.h.
double cSerialBase::cSetTimeoutTemporarily::old_timeout [private] |
Definition at line 168 of file serialbase.h.
Definition at line 167 of file serialbase.h.