BsManagedDiff.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  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. * DiffObjectMap&, Vector<DiffCommand>&)
  24. */
  25. void applyDiff(const SPtr<IReflectable>& object, const SPtr<SerializedObject>& serzDiff,
  26. DiffObjectMap& objectMap, Vector<DiffCommand>& diffCommands) override;
  27. };
  28. /** @} */
  29. }