7#ifndef PXR_BASE_TF_SCOPED_H
8#define PXR_BASE_TF_SCOPED_H
14PXR_NAMESPACE_OPEN_SCOPE
33template <
typename T = std::function<
void ()> >
48 static void *
operator new(::std::size_t size);
65 _obj(obj), _onExit(leave) { }
71 static void *
operator new(::std::size_t size);
89 _obj(obj), _onExit(leave) { }
95 static void *
operator new(::std::size_t size);
135 static void *
operator new(::std::size_t size);
171 template <
typename T>
180 template <
typename T>
181 static void _Set(T* x,
const T& val)
187 static void *
operator new(::std::size_t size);
193PXR_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.