UTransBuffer

Transaction tracking system, manages the undo and redo buffer.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

UnrealEd

Header

/Engine/Source/Editor/UnrealEd/Classes/Editor/TransBuffer.h

Include

#include "Editor/TransBuffer.h"

Syntax

class UTransBuffer : public UTransactor

Remarks

Transaction tracking system, manages the undo and redo buffer.

Variables

Name Description

Public variable

int32

 

ActiveCount

Number of actions in the current transaction

Public variable

TArray< int32 >

 

ActiveRecordCounts

The cached count of the number of object records each time a transaction is begun

Public variable

SIZE_T

 

MaxMemory

Maximum number of bytes the transaction buffer is allowed to occupy

Public variable

FText

 

ResetReason

Text describing the reason that the undo buffer is empty

Public variable

TArray< int32 >

 

UndoBarrierStack

Undo barrier stack

Public variable

TArray< TShared...

 

UndoBuffer

Variables.

Public variable

int32

 

UndoCount

Number of transactions that have been undone, and are eligible to be redone

Functions

Name Description

Public function Static

void

 

AddReferencedObjects

(
    UObject* InThis,
    FReferenceCollector& Collector
)

Protected function

int32

 

BeginInternal

(
    const TCHAR* SessionContext,
    const FText& Description
)

Implementation of the begin function. Used to create a specific transaction type

Public function Const

void

 

CheckState()

Validates the state of the transaction buffer.

Public function

void

 

Initialize

(
    SIZE_T InMaxMemory
)

Constructor.

Public function

UTransBuffer...

 

OnBeforeRedoUndo()

Public function

UTransBuffer...

 

OnRedo()

Public function

UTransBuffer...

 

OnTransactionStateChanged()

Public function

UTransBuffer...

 

OnUndo()

Public function

UTransBuffer...

 

OnUndoBufferChanged()

Overridden from UTransactor

Name Description

Public function Virtual

int32

 

Begin

(
    const TCHAR* SessionContext,
    const FText& Description
)

Begins a new undo transaction.

Public function Virtual

void

 

Cancel

(
    int32 StartIndex
)

Cancels the current transaction, no longer capture actions to be placed in the undo buffer.

Public function Virtual

bool

 

CanRedo

(
    FText* Text
)

Determines whether the redo option should be selectable.

Public function Virtual

bool

 

CanUndo

(
    FText* Text
)

Determines whether the undo option should be selectable.

Public function Virtual

void

 

ClearUndoBarriers()

Clears all undo barriers.

Public function Virtual Const

bool

 

ContainsPieObjects()

Public function Virtual

bool

 

DisableObjectSerialization()

Disables the transaction buffer from serializing the set of objects it references.

Public function Virtual

bool

 

EnableObjectSerialization()

Enables the transaction buffer to serialize the set of objects it references.

Public function Virtual

int32

 

End()

Attempts to close an undo transaction. Only successful if the transaction's action counter is 1.

Public function Virtual Const

int32

 

FindTransactionIndex

(
    const FGuid& TransactionId
)

Gets the transaction queue index from its TransactionId.

Public function Virtual Const

int32

 

GetQueueLength()

Gets the current length of the transaction queue.

Public function Virtual

FTransaction...

 

GetRedoContext()

Returns the description of the redo action that will be performed next.

Public function Virtual Const

const FTrans...

 

GetTransaction

(
    int32 QueueIndex
)

Gets the transaction at the specified queue index.

Public function Virtual

FTransaction...

 

GetUndoContext

(
    bool bCheckWhetherUndoPossible
)

Returns the description of the undo action that will be performed next.

Public function Virtual Const

int32

 

GetUndoCount()

Gets the number of transactions that were undone and can be redone.

Public function Virtual Const

SIZE_T

 

GetUndoSize()

Determines the amount of data currently stored by the transaction buffer.

Public function Virtual

bool

 

IsActive()

Returns whether there are any active actions; i.e. whether actions are currently being captured into the undo buffer.

Public function Virtual Const

bool

 

IsObjectInTransationBuffer

(
    const UObject* Object
)

Checks if a specific object is referenced by the transaction buffer

Public function Virtual

bool

 

IsObjectSerializationEnabled()

Wrapper for checking if the transaction buffer is allowed to serialize object references.

Public function Virtual Const

bool

 

IsObjectTransacting

(
    const UObject* Object
)

Checks if a specific object is in the transaction currently underway

Public function Virtual

bool

 

Redo()

Executes an redo transaction, redoing all actions contained by that transaction.

Public function Virtual

void

 

RemoveUndoBarrier()

Removes the last set undo barrier from the transaction buffer.

Public function Virtual

void

 

Reset

(
    const FText& Reason
)

Resets the entire undo buffer; deletes all undo transactions.

Public function Virtual

void

 

SetPrimaryUndoObject

(
    UObject* Object
)

Set passed object as the primary context object for transactions

Public function Virtual

void

 

SetUndoBarrier()

Sets an undo barrier at the current point in the transaction buffer.

Public function Virtual

bool

 

Undo

(
    bool bCanRedo
)

Executes an undo transaction, undoing all actions contained by that transaction.

Overridden from UObject

Name Description

Public function Virtual

void

 

FinishDestroy()

Called to finish destroying the object.

Public function Virtual

void

 

Serialize

(
    FArchive& Ar
)

Handles reading, writing, and reference collecting using FArchive.

Classes

Name

Description

Public class

FOnTransactorBeforeRedoUndo

Gets an event delegate that is executed when a redo operation is being attempted.

Public class

FOnTransactorRedo

Gets an event delegate that is executed when a redo operation is being attempted.

Public class

FOnTransactorTransactionStateChanged

Gets an event delegate that is executed when a transaction state changes.

Public class

FOnTransactorUndo

Gets an event delegate that is executed when a undo operation is being attempted.

Public class

FOnTransactorUndoBufferChanged

Gets an event delegate that is executed when the undo buffer changed.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss