BsManagedDiff.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
  3. #pragma once
  4. #include "BsScriptEnginePrerequisites.h"
  5. #include "Serialization/BsBinaryDiff.h"
  6. namespace bs
  7. {
  8. /** @addtogroup SBansheeEngine
  9. * @{
  10. */
  11. /**
  12. * Diff handler that performs RTTI object diff for managed objects. Managed objects require special diff handling since
  13. * their serialization works differently.
  14. */
  15. class BS_SCR_BE_EXPORT ManagedDiff : public IDiff
  16. {
  17. protected:
  18. /** @copydoc IDiff::generateDiff(const SPtr<SerializedObject>&, const SPtr<SerializedObject>&, ObjectMap&) */
  19. SPtr<SerializedObject> generateDiff(const SPtr<SerializedObject>& orgSerzObj,
  20. const SPtr<SerializedObject>& newSerzObj, ObjectMap& objectMap) override;
  21. /**
  22. * @copydoc IDiff::applyDiff(const SPtr<IReflectable>&, const SPtr<SerializedObject>&,
  23. * FrameAlloc&, DiffObjectMap&, FrameVector<DiffCommand>&, SerializationContext*)
  24. */
  25. void applyDiff(const SPtr<IReflectable>& object, const SPtr<SerializedObject>& serzDiff,
  26. FrameAlloc& alloc, DiffObjectMap& objectMap, FrameVector<DiffCommand>& diffCommands,
  27. SerializationContext* context) override;
  28. };
  29. /** @} */
  30. }