Navigation
API > API/Editor > API/Editor/UnrealEd
Transaction tracking system, manages the undo and redo buffer.
| Name | UTransBuffer |
| Type | class |
| Header File | /Engine/Source/Editor/UnrealEd/Classes/Editor/TransBuffer.h |
| Include Path | #include "Editor/TransBuffer.h" |
Syntax
UCLASS (Transient, MinimalAPI)
class UTransBuffer : public UTransactor
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UTransactor → UTransBuffer
Classes
| Name | Remarks |
|---|---|
| FOnTransactorBeforeRedoUndo | Gets an event delegate that is executed when a redo operation is being attempted. |
| FOnTransactorRedo | Gets an event delegate that is executed when a redo operation is being attempted. |
| FOnTransactorTransactionStateChanged | Gets an event delegate that is executed when a transaction state changes. |
| FOnTransactorUndo | Gets an event delegate that is executed when a undo operation is being attempted. |
| FOnTransactorUndoBufferChanged | Gets an event delegate that is executed when the undo buffer changed. |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ActiveCount | int32 | Number of actions in the current transaction | Editor/TransBuffer.h | |
| ActiveRecordCounts | TArray< int32 > | The cached count of the number of object records each time a transaction is begun | Editor/TransBuffer.h | |
| MaxMemory | SIZE_T | Maximum number of bytes the transaction buffer is allowed to occupy | Editor/TransBuffer.h | |
| ResetReason | FText | Text describing the reason that the undo buffer is empty | Editor/TransBuffer.h | |
| UndoBarrierStack | TArray< int32 > | Undo barrier stack | Editor/TransBuffer.h | |
| UndoBuffer | TArray< TSharedRef< FTransaction > > | Variables. | Editor/TransBuffer.h | |
| UndoCount | int32 | Number of transactions that have been undone, and are eligible to be redone | Editor/TransBuffer.h |
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| BeforeRedoUndoDelegate | FOnTransactorBeforeRedoUndo | Holds an event delegate that is executed before a redo or undo operation is attempted. | Editor/TransBuffer.h | |
| CurrentTransaction | FTransaction * | Reference to the current transaction, nullptr when not transacting: | Editor/TransBuffer.h | |
| DisallowObjectSerialization | int32 | Controls whether the transaction buffer is allowed to serialize object references | Editor/TransBuffer.h | |
| PreviousUndoCount | int32 | Cached previous undo count while a transaction is being built in case we cancel it and want to restore the previous undo buffer. | Editor/TransBuffer.h | |
| RedoDelegate | FOnTransactorRedo | Holds an event delegate that is executed when a redo operation is being attempted. | Editor/TransBuffer.h | |
| RemovedTransactions | TArray< TSharedRef< FTransaction > > | The list of transactions that were removed when a transaction was begun in case it is canceled and we want to restore the original state. | Editor/TransBuffer.h | |
| TransactionStateChangedDelegate | FOnTransactorTransactionStateChanged | Holds an event delegate that is executed when a transaction state changes. | Editor/TransBuffer.h | |
| UndoBufferChangedDelegate | FOnTransactorUndoBufferChanged | Holds an event delegate that is executed when the undo buffer changed. | Editor/TransBuffer.h | |
| UndoDelegate | FOnTransactorUndo | Holds an event delegate that is executed when a undo operation is being attempted. | Editor/TransBuffer.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void CheckState() |
Validates the state of the transaction buffer. | Editor/TransBuffer.h | |
void Initialize
(
SIZE_T InMaxMemory |
Constructor. | Editor/TransBuffer.h | |
UTransBuffer::FOnTransactorBeforeRedoUndo TBaseMulticastDelegate_OneParam OnBeforeRedoUndo() |
Editor/TransBuffer.h | ||
UTransBuffer::FOnTransactorRedo TBaseMulticastDelegate_TwoParams OnRedo() |
Editor/TransBuffer.h | ||
UTransBuffer::FOnTransactorTransactionStateChanged TBaseMulticastDelegate_TwoParams OnTransactionStateChanged() |
Editor/TransBuffer.h | ||
UTransBuffer::FOnTransactorUndo TBaseMulticastDelegate_TwoParams OnUndo() |
Editor/TransBuffer.h | ||
UTransBuffer::FOnTransactorUndoBufferChanged TBaseMulticastDelegate_NoParams OnUndoBufferChanged() |
Editor/TransBuffer.h |
Overridden from UTransactor
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| Begins a new undo transaction. | Editor/TransBuffer.h | ||
virtual void Cancel
(
int32 StartIndex |
Cancels the current transaction, no longer capture actions to be placed in the undo buffer. | Editor/TransBuffer.h | |
virtual bool CanRedo
(
FText* Text |
Determines whether the redo option should be selectable. | Editor/TransBuffer.h | |
virtual bool CanUndo
(
FText* Text |
Determines whether the undo option should be selectable. | Editor/TransBuffer.h | |
virtual void ClearUndoBarriers() |
Clears all undo barriers. | Editor/TransBuffer.h | |
virtual bool ContainsPieObjects() |
Editor/TransBuffer.h | ||
virtual bool DisableObjectSerialization() |
Disables the transaction buffer from serializing the set of objects it references. | Editor/TransBuffer.h | |
virtual bool EnableObjectSerialization() |
Enables the transaction buffer to serialize the set of objects it references. | Editor/TransBuffer.h | |
virtual int32 End() |
Attempts to close an undo transaction. Only successful if the transaction's action counter is 1. | Editor/TransBuffer.h | |
virtual int32 FindTransactionIndex
(
const FGuid& TransactionId |
Gets the transaction queue index from its TransactionId. | Editor/TransBuffer.h | |
virtual int32 GetCurrentUndoBarrier() |
Gets the current undo barrier's position in transaction queue | Editor/TransBuffer.h | |
virtual int32 GetQueueLength() |
Gets the current length of the transaction queue. | Editor/TransBuffer.h | |
virtual FTransactionContext GetRedoContext () |
Returns the description of the redo action that will be performed next. | Editor/TransBuffer.h | |
virtual const FTransaction * GetTransaction
(
int32 QueueIndex |
Gets the transaction at the specified queue index. | Editor/TransBuffer.h | |
virtual FTransactionContext GetUndoContext
(
bool bCheckWhetherUndoPossible |
Returns the description of the undo action that will be performed next. | Editor/TransBuffer.h | |
virtual int32 GetUndoCount() |
Gets the number of transactions that were undone and can be redone. | Editor/TransBuffer.h | |
virtual SIZE_T GetUndoSize() |
Determines the amount of data currently stored by the transaction buffer. | Editor/TransBuffer.h | |
virtual bool IsActive() |
Returns whether there are any active actions; i.e. whether actions are currently being captured into the undo buffer. | Editor/TransBuffer.h | |
virtual bool IsObjectInTransactionBuffer
(
const UObject* Object |
Checks if a specific object is referenced by the transaction buffer | Editor/TransBuffer.h | |
virtual bool IsObjectSerializationEnabled() |
Wrapper for checking if the transaction buffer is allowed to serialize object references. | Editor/TransBuffer.h | |
virtual bool IsObjectTransacting
(
const UObject* Object |
Checks if a specific object is in the transaction currently underway | Editor/TransBuffer.h | |
virtual bool Redo() |
Executes an redo transaction, redoing all actions contained by that transaction. | Editor/TransBuffer.h | |
virtual void RemoveUndoBarrier() |
Removes the last set undo barrier from the transaction buffer. | Editor/TransBuffer.h | |
virtual void Reset
(
const FText& Reason |
Resets the entire undo buffer; deletes all undo transactions. | Editor/TransBuffer.h | |
virtual void SetPrimaryUndoObject
(
UObject* Object |
Set passed object as the primary context object for transactions | Editor/TransBuffer.h | |
virtual void SetUndoBarrier () |
Sets an undo barrier at the current point in the transaction buffer. | Editor/TransBuffer.h | |
virtual bool Undo
(
bool bCanRedo |
Executes an undo transaction, undoing all actions contained by that transaction. | Editor/TransBuffer.h |
Overridden from UObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void FinishDestroy() |
Editor/TransBuffer.h | ||
virtual void Serialize
(
FArchive& Ar |
Editor/TransBuffer.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
int32 BeginInternal
(
const TCHAR* SessionContext, |
Implementation of the begin function. Used to create a specific transaction type | Editor/TransBuffer.h | |
| Editor/TransBuffer.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void AddReferencedObjects
(
UObject* InThis, |
Editor/TransBuffer.h |