engine
 
载入中...
搜索中...
未找到
Public 成员函数 | Protected 成员函数 | 所有成员列表
FChange类 参考abstract

FChange modifies a UObject and is meant to be used to implement undo/redo. 更多...

#include <Change.h>

+ 类 FChange 继承关系图:

Public 成员函数

virtual void Apply (UObject *Object)=0
 Makes the change to the object
 
virtual TUniquePtr< FChange > Execute (UObject *Object)=0
 Makes the change to the object, returning a new change that can be used to perfectly roll back this change
 
virtual EChangeStyle GetChangeType ()=0
 What style of change is this
 
virtual bool HasExpired (UObject *Object) const
 
virtual void PrintToLog (class FFeedbackContext &FeedbackContext, const int32 IndentLevel=0)
 Prints this change to the log, including sub-changes if there are any. 更多...
 
virtual void Revert (UObject *Object)=0
 Reverts change to the object
 
virtual FString ToString () const =0
 Describes this change (for debugging)
 
virtual ~FChange ()
 Virtual destructor
 

Protected 成员函数

 FChange ()
 Protected default constructor
 

详细描述

FChange modifies a UObject and is meant to be used to implement undo/redo.

The change is embedded in an FTransaction which executes it instead of the standard serialization transaction (cannot be combined - see FTransaction).

The original FChange style (used by MeshEditor) was that calling Execute() would return a new FChange that applies the opposite action, and FTransaction would swap the two at each undo/redo step (eg a "DeleteObject" FChange would return a "CreateObject" FChange)

The alternative "Command Pattern"-style FChange calls Apply() and Revert() on a single FChange.

FChange may eventually be deprecated. You should subclass FSwapChange and FCommandChange to implement these different styles.

成员函数说明

◆ HasExpired()

virtual bool FChange::HasExpired ( UObject *  Object) const
inlinevirtual
返回
true if this Change has Expired, ie it will no longer have any effect and could be skipped by undo/redo

被 FBeginToolChange, FActivateToolChange , 以及 FToolChangeWrapperChange 重载.

◆ PrintToLog()

virtual void FChange::PrintToLog ( class FFeedbackContext &  FeedbackContext,
const int32  IndentLevel = 0 
)
virtual

Prints this change to the log, including sub-changes if there are any.

For compound changes, there might be multiple lines. You should not need to override this function.

被 FCompoundChange 重载.


该类的文档由以下文件生成: