Debian Codegraph @

src/ScopedAssign.h

raw symbols SCIP
1 #cxx . . $ `<file>/src/ScopedAssign.h`/ifndef SCOPEDASSIGN_HH
2 #define SCOPEDASSIGN_HHcxx . . $ `src/ScopedAssign.h:2:9`!
3
4 /** Assign new value to some variable and restore the original value
5 * when this object goes out of scope.
6 */
7 template<typename T> class ScopedAssigncxx . . $ ScopedAssign#
8 {
9 public:
10 [[nodiscard]] ScopedAssigncxx . . $ ScopedAssign#`ScopedAssign<T>`(c294a3505e7ed828).(T& var_, T newValue)
11 : varcxx . . $ ScopedAssign#var.(var_)
12 {
13 oldValuecxx . . $ ScopedAssign#oldValue. = varcxx . . $ ScopedAssign#var.;
14 varcxx . . $ ScopedAssign#var. = newValue;
15 }
16 ~cxx . . $ ScopedAssign#`~ScopedAssign<T>`(49f6e7a06ebc5aa8).ScopedAssign()
17 {
18 varcxx . . $ ScopedAssign#var. = oldValuecxx . . $ ScopedAssign#oldValue.;
19 }
20 private:
21 T& varcxx . . $ ScopedAssign#var.;
22 T oldValuecxx . . $ ScopedAssign#oldValue.;
23 };
24
25 #endif