Ark Server API (ASA) - Wiki
|
#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 |
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.
BeginOperation should be called when a transaction or undo/redo starts
Does the transaction know that the object is being modified.
EndOperation should be called when a transaction is finalized or canceled or undo/redo ends
Called when this transaction is completed to finalize the transaction
|
pure virtual |
Gets the full context for the transaction
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.
|
pure virtual |
Saves an array to the transaction.
Object | The object that owns the array. |
Array | The array to save. |
Index | |
Count | |
Oper | |
ElementSize | |
ElementAlignment | |
Serializer | |
Destructor |
Sets the transaction's primary object.
Object | The primary object to set. |
|
pure virtual |
Snapshots a UObject within the transaction.
Object | The object to snapshot. |
Property | The optional list of properties that have potentially changed on the object (to avoid snapshotting the entire object). |
|
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.
Object | The object the undo change will apply to |
CustomChange | The change that can be used to undo the changes to this object. |