24 #ifndef PXR_BASE_TF_SCOPED_H
25 #define PXR_BASE_TF_SCOPED_H
50 template <
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);
132 template <
typename T>
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);
212 #endif // PXR_BASE_TF_SCOPED_H
TfScoped(const Procedure &leave, T *obj)
Execute leave, passing obj, when this object goes out of scope.
TfScoped(T *obj, const Procedure &leave)
Execute leave on obj when this object goes out of scope.
T Procedure
The type of the function executed on destruction.
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
LeafData & operator=(const LeafData &)=delete
#define PXR_NAMESPACE_CLOSE_SCOPE
TfScopedVar(T &x, const T &val)
TfScoped(const Procedure &leave)
Execute leave when this object goes out of scope.
TfScopedAutoVar(T &x, const T &val)