Prusa MINI Firmware overview
restorer< T > Class Template Reference

#include <utility.h>

Public Member Functions

 restorer (T &perm)
 
 restorer (T &perm, T temp_val)
 
 ~restorer ()
 
void restore ()
 

Constructor & Destructor Documentation

◆ restorer() [1/2]

template<typename T >
restorer< T >::restorer ( T &  perm)
70 : ref_(perm), val_(perm) {}

◆ restorer() [2/2]

template<typename T >
restorer< T >::restorer ( T &  perm,
temp_val 
)
71 : ref_(perm), val_(perm) { perm = temp_val; }

◆ ~restorer()

template<typename T >
restorer< T >::~restorer ( )
72 { restore(); }
Here is the call graph for this function:

Member Function Documentation

◆ restore()

template<typename T >
void restorer< T >::restore ( )
73 { ref_ = val_; }
Here is the caller graph for this function:
restorer::restore
void restore()
Definition: utility.h:73