Reset variable on exiting scope.
More...
#include <scoped.h>
template<typename T>
class TfScopedVar< T >
Reset variable on exiting scope.
A TfScopedVar
sets a variable to a value when created then restores its original value when destroyed. For example:
int func(bool x) {
return func2(x);
}
Reset variable on exiting scope.
Definition at line 133 of file scoped.h.
◆ TfScopedVar()
Set/reset variable.
Sets x
to val
immediately and restores its old value when this goes out of scope.
Definition at line 141 of file scoped.h.
◆ ~TfScopedVar()
The documentation for this class was generated from the following file: