Language:
Discover
By Skill Level
By Category

FTransaction

Choose your OS:

Inheritance Hierarchy

ITransaction

FTransaction

Syntax

class FTransaction : public ITransaction

Remarks

Base class for tracking transactions for undo/redo. -----------------------------------------------------------------------FTransaction .

A single transaction, representing a set of serialized, undo-able changes to a set of objects.

warning: The undo buffer cannot be made persistent because of its dependence on offsets of arrays from their owning UObjects.

warning: UObject::Serialize implicitly assumes that class properties do not change in between transaction resets.

Variables

Name Description

Protected variable

bool

 

bFlip

If true, on apply flip the direction of iteration over object records.

Protected variable

TMap < UObject &...

 

ChangedObjects

Objects that will be changed directly by the transaction, empty when not transacting

Protected variable

FString

 

Context

A text string describing the context for the transaction.

Protected variable

FGuid

 

Id

Unique identifier for this transaction, used to track it during its lifetime

Protected variable

int32

 

Inc

Used to track direction to iterate over transaction's object records.

Protected variable

TMap < UObject &...

 

ObjectMap

Used to prevent objects from being serialized to a transaction more than once.

Protected variable

FGuid

 

OperationId

Unique identifier for the active operation on this transaction (if any).

Protected variable

UObject *

 

PrimaryObject

The key object being edited in this transaction. For example the blueprint object. Can be NULL

Protected variable

TArray < FObject ...

 

Records

Transaction variables.

Protected variable

FText

 

Title

Description of the transaction. Can be used by UI

Constructors

Name Description

Public function

FTransaction

(
    const TCHAR * InContext,
    const FText & InTitle,
    bool bInFlip
)

Constructor.

Destructors

Name Description

Public function Virtual

~FTransaction()

Functions

Name Description

Public function

void

 

AddReferencedObjects

(
    FReferenceCollector & Collector
)

Used by GC to collect referenced objects.

Public function

SIZE_T

 

DataSize()

FTransaction interface.

Public function

void

 

DumpObjectMap

(
    FOutputDevice & Ar
)

Outputs the contents of the ObjectMap to the specified output device.

Public function

FGuid

 

GetId()

Returns the unique identifier for this transaction, used to track it during its lifetime

Public function

FGuid

 

GetOperationId()

Returns the unique identifier for the active operation on this transaction (if any)

Public function

const UObjec ...

 

GetPrimaryObject()

Public function

int32

 

GetRecordCount()

Public function

FText

 

GetTitle()

Returns the descriptive text for the transaction

Public function

void

 

GetTransactionObjects

(
    TArray < UObject * >& Objects
)

Get all the objects that are part of this transaction.

Public function Virtual

const TCHAR ...

 

GetTransactionType()

Returns a unique string to serve as a type ID for the FTranscationBase-derived type.

Public function

bool

 

IsObjectTransacting

(
    const UObject * Object
)

Checks if a specific object is in the transaction currently underway

Public function

void

 

RemoveRecords

(
    int32 Count
)

Overridden from ITransaction

Name Description

Public function Virtual

void

 

Apply()

Enacts the transaction.

Public function Virtual

void

 

BeginOperation()

BeginOperation should be called when a transaction or undo/redo starts

Public function Virtual

bool

 

ContainsPieObjects()

True if this record contains a reference to a pie object

Public function Virtual

void

 

EndOperation()

EndOperation should be called when a transaction is finalized or canceled or undo/redo ends

Public function Virtual

void

 

Finalize()

Finalize the transaction (try and work out what's changed).

Public function Virtual

FTransaction ...

 

GetContext()

Gets the full context for the transaction.

Public function Virtual

void

 

SaveArray

(
    UObject * Object,
    FScriptArray * Array,
    int32 Index,
    int32 Count,
    int32 Oper,
    int32 ElementSize,
    STRUCT_DC DefaultConstructor,
    STRUCT_AR Serializer,
    STRUCT_DTOR Destructor
)

Saves an array to the transaction.

Public function Virtual

void

 

SaveObject

(
    UObject * Object
)

FTransactionBase interface.

Public function Virtual

void

 

SetPrimaryObject

(
    UObject * Object
)

Sets the transaction's primary object.

Public function Virtual

void

 

SnapshotObject

(
    UObject * Object
)

Snapshots a UObject within the transaction.

Public function Virtual

void

 

StoreUndo

(
    UObject * Object,
    TUniquePtr < FChange > CustomChange
)

Stores a command that can be used to undo a change to the specified object.

Classes

Name

Description

Protected struct

FChangedObjectValue

Protected class

FObjectRecord

Record of an object.

References

Module

UnrealEd

Header

Editor/UnrealEd/Classes/Editor/Transactor.h