Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
ITransaction Class Referenceabstract

#include <ITransaction.h>

Public Member Functions

virtual void BeginOperation ()=0
 
virtual void EndOperation ()=0
 
virtual void Finalize ()=0
 
virtual void Apply ()=0
 
virtual FTransactionContext GetContext () const =0
 
virtual bool IsTransient () const =0
 
virtual bool ContainsPieObjects () const =0
 
virtual void SaveArray (UObject *Object, class FScriptArray *Array, int32 Index, int32 Count, int32 Oper, int32 ElementSize, uint32 ElementAlignment, STRUCT_DC DefaultConstructor, STRUCT_AR Serializer, STRUCT_DTOR Destructor)=0
 
virtual void SaveObject (UObject *Object)=0
 
virtual void StoreUndo (UObject *Object, TUniquePtr< FChange > CustomChange)=0
 
virtual void SetPrimaryObject (UObject *Object)=0
 
virtual void SnapshotObject (UObject *Object, TArrayView< const FProperty * > Properties)=0
 
virtual bool ContainsObject (const UObject *Object) const =0
 

Detailed Description

Interface for transactions.

Transactions are created each time an UObject is modified, for example in the Editor. The data stored inside a transaction object can then be used to provide undo/redo functionality.

Definition at line 86 of file ITransaction.h.

Member Function Documentation

◆ Apply()

virtual void ITransaction::Apply ( )
pure virtual

Applies the transaction.

◆ BeginOperation()

virtual void ITransaction::BeginOperation ( )
pure virtual

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

◆ ContainsObject()

virtual bool ITransaction::ContainsObject ( const UObject * Object) const
pure virtual

Does the transaction know that the object is being modified.

◆ ContainsPieObjects()

virtual bool ITransaction::ContainsPieObjects ( ) const
pure virtual
Returns
if this transaction tracks PIE objects

◆ EndOperation()

virtual void ITransaction::EndOperation ( )
pure virtual

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

◆ Finalize()

virtual void ITransaction::Finalize ( )
pure virtual

Called when this transaction is completed to finalize the transaction

◆ GetContext()

virtual FTransactionContext ITransaction::GetContext ( ) const
pure virtual

Gets the full context for the transaction

◆ IsTransient()

virtual bool ITransaction::IsTransient ( ) const
pure virtual

Report if a transaction should be put in the undo buffer. A transaction will be transient if it contains PIE objects or result in a no-op. If this returns true the transaction won't be put in the transaction buffer.

Returns
true if the transaction is transient.

◆ SaveArray()

virtual void ITransaction::SaveArray ( UObject * Object,
class FScriptArray * Array,
int32 Index,
int32 Count,
int32 Oper,
int32 ElementSize,
uint32 ElementAlignment,
STRUCT_DC DefaultConstructor,
STRUCT_AR Serializer,
STRUCT_DTOR Destructor )
pure virtual

Saves an array to the transaction.

Parameters
ObjectThe object that owns the array.
ArrayThe array to save.
Index
Count
Oper
ElementSize
ElementAlignment
Serializer
Destructor
See also
SaveObject

◆ SaveObject()

virtual void ITransaction::SaveObject ( UObject * Object)
pure virtual

Saves an UObject to the transaction.

Parameters
ObjectThe object to save.
See also
SaveArray

◆ SetPrimaryObject()

virtual void ITransaction::SetPrimaryObject ( UObject * Object)
pure virtual

Sets the transaction's primary object.

Parameters
ObjectThe primary object to set.

◆ SnapshotObject()

virtual void ITransaction::SnapshotObject ( UObject * Object,
TArrayView< const FProperty * > Properties )
pure virtual

Snapshots a UObject within the transaction.

Parameters
ObjectThe object to snapshot.
PropertyThe optional list of properties that have potentially changed on the object (to avoid snapshotting the entire object).

◆ StoreUndo()

virtual void ITransaction::StoreUndo ( UObject * Object,
TUniquePtr< FChange > CustomChange )
pure virtual

Stores a command that can be used to undo a change to the specified object. This may be called multiple times in the same transaction to stack up changes that will be rolled back in reverse order. No copy of the object itself is stored.

Parameters
ObjectThe object the undo change will apply to
CustomChangeThe change that can be used to undo the changes to this object.

The documentation for this class was generated from the following file: