class
BinaryDeltaHandler
Inherits:
IDeltaHandler
Generates and applies delta (differences) between two objects.
This handler is to be used for all native types, while a separate IDeltaHandler is to be provided for script types.
Provided object may be any IReflectable object, and special handling is done to also natively support delta between SerializedObject types.
Protected
Methods
GenerateDeltaRecursive
SPtr<SerializedObject> GenerateDeltaRecursive(IReflectable *original, IReflectable *modified, ObjectMap &objectMap, RTTIOperationContext &context, bool replicableOnly) override
Recursive version of GenerateDelta(const SPtr <IReflectable > & , const SPtr <IReflectable > & , bool).
GenerateDeltaApplyCommands
void GenerateDeltaApplyCommands(const SPtr<IReflectable> &object, const SPtr<SerializedObject> &delta, FrameAllocator &allocator, DeltaObjectMap &objectMap, FrameVector<DeltaCommand> &inOutDeltaCommands, RTTIOperationContext &context) override
Generates a set of commands that determine operations that need to be performed on in order to apply all the changes from .
Commands are output in .
GenerateDeltaCommandForFieldEntry
void GenerateDeltaCommandForFieldEntry(RTTIType *rttiInstance, const SPtr<IReflectable> &object, RTTIIteratorField &field, const SPtr<ISerialized> &entryDelta, u32 arrayIndex, void *mapKey, DeltaObjectMap &inOutObjectMap, FrameVector<DeltaCommand> &outCommands, RTTIOperationContext &context, FrameAllocator &allocator)
Generates delta commands for a single field entry (e.g. a single array or map entry, or the entire field if not a container).
- rttiInstance
- RTTIType instance for the current object.
- object
- Object that contains the field we're applying the delta to.
- field
- Field to which to apply the delta to.
- entryDelta
- Object containing the delta value to apply.
- arrayIndex
- Optional array index, if the entry we're applying the value to is part of an array. Set to ~0u if not an array.
- mapKey
- Optional map key, if the entry we're applying the value to is part of a map. Set to null if not a map.
- inOutObjectMap
- Map that contains any deserialized objects so far, and into which new deserialized objects will be inserted.
- outCommands
- List of generated commands into which to output the commands.
- context
- Serialization context.
- allocator
- Allocator to perform temporary allocations with.
GenerateDeltaCommandForDataBlockField
void GenerateDeltaCommandForDataBlockField(RTTIField &field, const SPtr<ISerialized> &entryDelta, FrameVector<DeltaCommand> &outCommands)
Generates delta commands for a data block field.
- field
- Field to which to apply the delta to.
- entryDelta
- Object containing the delta value to apply.
- outCommands
- List of generated commands into which to output the commands.