Public Member Functions | Private Attributes | List of all members
cSerialBase::cSetTimeoutTemporarily Class Reference

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. More...
 
 ~cSetTimeoutTemporarily ()
 DTOR: restore the remembered timeout. More...
 

Private Attributes

double old_timeout
 
cSerialBaseserial_base
 

Detailed Description

helper class to set timeout of _serial_base on construction and reset to previous value on destruction. (RAII-idiom)

Definition at line 163 of file serialbase.h.

Constructor & Destructor Documentation

◆ cSetTimeoutTemporarily()

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 169 of file serialbase.h.

◆ ~cSetTimeoutTemporarily()

cSerialBase::cSetTimeoutTemporarily::~cSetTimeoutTemporarily ( )
inline

DTOR: restore the remembered timeout.

Definition at line 178 of file serialbase.h.

Member Data Documentation

◆ old_timeout

double cSerialBase::cSetTimeoutTemporarily::old_timeout
private

Definition at line 166 of file serialbase.h.

◆ serial_base

cSerialBase* cSerialBase::cSetTimeoutTemporarily::serial_base
private

Definition at line 165 of file serialbase.h.


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


sdhlibrary_cpp
Author(s): Dirk Osswald
autogenerated on Mon Feb 28 2022 23:41:52