All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
raii.h
1//
2// Copyright 2024 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
7
8#ifndef PXR_BASE_TS_RAII_H
9#define PXR_BASE_TS_RAII_H
10
11#include "pxr/pxr.h"
12#include "pxr/base/ts/api.h"
13#include "pxr/base/ts/types.h"
14#include "pxr/base/tf/stacked.h"
15
16PXR_NAMESPACE_OPEN_SCOPE
17
18
19#ifdef doxygen
20
25{
26public:
27 TsAntiRegressionAuthoringSelector(TsAntiRegressionMode mode);
28};
29
30#else
31
32TF_DEFINE_STACKED(
33 TsAntiRegressionAuthoringSelector, /* perThread = */ true, TS_API)
34{
35public:
36 TsAntiRegressionAuthoringSelector(TsAntiRegressionMode mode) : mode(mode) {}
37 const TsAntiRegressionMode mode;
38};
39
40#endif // doxygen
41
42
43#ifdef doxygen
44
48{
49public:
51};
52
53#else
54
55TF_DEFINE_STACKED(
56 TsEditBehaviorBlock, /* perThread = */ true, TS_API)
57{
58};
59
60#endif // doxygen
61
62
63PXR_NAMESPACE_CLOSE_SCOPE
64
65#endif
RAII helper class that locally sets the anti-regression authoring mode.
Definition: raii.h:25
RAII helper class that temporarily prevents automatic behaviors when editing splines.
Definition: raii.h:48