class SerializedManagedObjectDelta

Inherits: IScriptExportable

Creates and stores differences between two SerializedManagedObjects (Original object and a modified object).

Created delta can be then applied to the original object so it has the same values as modified version of the object. Note that only serializable fields are compared for the purposes of deltas.

Public

Constructors

SerializedManagedObjectDelta

SerializedManagedObjectDelta(PrivatelyConstruct, const SPtr<IReflectable> &serializedDelta)

Methods

staticCreate

static SPtr<SerializedManagedObjectDelta> Create(const SPtr<SerializedManagedObject> &original, const SPtr<SerializedManagedObject> &modified)

Creates a difference of fields that are different in modified object compared to the original object.

The difference can later be applied to original object to restore it to same state as the modified object. Only serializable fields are considered when comparing the objects. Returns null if there is no difference between the two objects, or if the delta generation failed.

ApplyDelta

void ApplyDelta(MonoObject *scriptObject)

Applies delta stored in this object to the provided object.

The type of the object must be the same as the type of objects the delta was generated from.

Private

Fields

mSerializedDelta

SPtr<IReflectable> mSerializedDelta