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 (const ScopedAssign &)=delete
 
 ScopedAssign (ScopedAssign &&)=delete
 
ScopedAssignoperator= (const ScopedAssign &)=delete
 
ScopedAssignoperator= (ScopedAssign &&)=delete
 
 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() [1/3]

template<typename T >
ScopedAssign< T >::ScopedAssign ( const ScopedAssign< T > &  )
delete

◆ ScopedAssign() [2/3]

template<typename T >
ScopedAssign< T >::ScopedAssign ( ScopedAssign< T > &&  )
delete

◆ ScopedAssign() [3/3]

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

Definition at line 15 of file ScopedAssign.hh.

◆ ~ScopedAssign()

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

Definition at line 21 of file ScopedAssign.hh.

Member Function Documentation

◆ operator=() [1/2]

template<typename T >
ScopedAssign & ScopedAssign< T >::operator= ( const ScopedAssign< T > &  )
delete

◆ operator=() [2/2]

template<typename T >
ScopedAssign & ScopedAssign< T >::operator= ( ScopedAssign< T > &&  )
delete

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