24#ifndef PXR_BASE_TF_SCOPED_H
25#define PXR_BASE_TF_SCOPED_H
31PXR_NAMESPACE_OPEN_SCOPE
50template <
typename T = std::function<
void ()> >
65 static void *
operator new(::std::size_t size);
82 _obj(obj), _onExit(leave) { }
88 static void *
operator new(::std::size_t size);
106 _obj(obj), _onExit(leave) { }
112 static void *
operator new(::std::size_t size);
152 static void *
operator new(::std::size_t size);
188 template <
typename T>
197 template <
typename T>
198 static void _Set(T* x,
const T& val)
204 static void *
operator new(::std::size_t size);
210PXR_NAMESPACE_CLOSE_SCOPE
Reset variable on exiting scope.
TfScopedAutoVar(T &x, const T &val)
Set/reset variable.
Execute code on exiting scope.
TfScoped(const Procedure &leave)
Execute leave when this object goes out of scope.
T Procedure
The type of the function executed on destruction.
Reset variable on exiting scope.
TfScopedVar(T &x, const T &val)
Set/reset variable.