BsManagedDiff.h 950 B

12345678910111213141516171819202122232425262728
  1. #pragma once
  2. #include "BsScriptEnginePrerequisites.h"
  3. #include "BsBinaryDiff.h"
  4. namespace BansheeEngine
  5. {
  6. /**
  7. * @brief Diff handler that performs RTTI object diff for
  8. * managed objects. Managed objects require special diff
  9. * handling since their serialization works differently.
  10. */
  11. class BS_SCR_BE_EXPORT ManagedDiff : public IDiff
  12. {
  13. protected:
  14. /**
  15. * @copydoc IDiff::generateDiff(const SPtr<SerializedObject>&, const SPtr<SerializedObject>&, ObjectMap&)
  16. */
  17. SPtr<SerializedObject> generateDiff(const SPtr<SerializedObject>& orgSerzObj,
  18. const SPtr<SerializedObject>& newSerzObj, ObjectMap& objectMap) override;
  19. /**
  20. * @copydoc IDiff::applyDiff(const SPtr<IReflectable>&, const SPtr<SerializedObject>&, DiffObjectMap&, Vector<DiffCommand>&)
  21. */
  22. void applyDiff(const SPtr<IReflectable>& object, const SPtr<SerializedObject>& serzDiff,
  23. DiffObjectMap& objectMap, Vector<DiffCommand>& diffCommands) override;
  24. };
  25. }