Navigation
API > API/Editor > API/Editor/CurveEditor
Base class for scoped changes that intend to append a command to the transaction system when the scope ends. It detects if constructed within a FScopedTransaction context: by calling IsCancelled(), you can handle the case of the root transaction being cancelled. We don't expect this to be copied / moved. If needed in the future, you can remove this BUT go through the subclasses and make sure their (auto-generated) move constructors work. Const members, like the ones in this class and subclasses, cause the compiler to auto-generate copy constructor instead of move constructors.
| Name | FScopedChangeBase |
| Type | class |
| Header File | /Engine/Source/Editor/CurveEditor/Public/Modification/Utils/ScopedChangeBase.h |
| Include Path | #include "Modification/Utils/ScopedChangeBase.h" |
Syntax
class FScopedChangeBase : public FNoncopyable
Inheritance Hierarchy
- FNoncopyable → FScopedChangeBase
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FScopedChangeBase
(
TWeakPtr< FCurveEditor > InCurveEditor, |
Modification/Utils/ScopedChangeBase.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bIsCancelled | bool | Whether to skip submitting the change when the scope ends. | Modification/Utils/ScopedChangeBase.h | |
| bWasStartedInTransaction | const bool | Whether we were constructed in a transaction. | Modification/Utils/ScopedChangeBase.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void Cancel() |
Prevent the change from being appended. | Modification/Utils/ScopedChangeBase.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool IsCancelled() |
Whether the change should be appended. | Modification/Utils/ScopedChangeBase.h | |
void TryAppendCommand
(
TUniquePtr< FCurveEditorCommandChange > InCommand |
Appends the change if it is not cancelled. | Modification/Utils/ScopedChangeBase.h |