openMSX
Public Member Functions | List of all members
ScopedAssign< T > Class Template Reference

Assign new value to some variable and restore the original value when this object goes out of scope. More...

#include <ScopedAssign.hh>

Public Member Functions

 ScopedAssign (T &var_, T newValue)
 
 ~ScopedAssign ()
 

Detailed Description

template<typename T>
class ScopedAssign< T >

Assign new value to some variable and restore the original value when this object goes out of scope.

Definition at line 7 of file ScopedAssign.hh.

Constructor & Destructor Documentation

◆ ScopedAssign()

template<typename T >
ScopedAssign< T >::ScopedAssign ( T &  var_,
newValue 
)
inline

Definition at line 10 of file ScopedAssign.hh.

◆ ~ScopedAssign()

template<typename T >
ScopedAssign< T >::~ScopedAssign ( )
inline

Definition at line 16 of file ScopedAssign.hh.


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