BsManagedDiff.h 1.2 KB

123456789101112131415161718192021222324252627282930
  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 "BsBinaryDiff.h"
  6. namespace BansheeEngine
  7. {
  8. /**
  9. * @brief Diff handler that performs RTTI object diff for
  10. * managed objects. Managed objects require special diff
  11. * handling since their serialization works differently.
  12. */
  13. class BS_SCR_BE_EXPORT ManagedDiff : public IDiff
  14. {
  15. protected:
  16. /**
  17. * @copydoc IDiff::generateDiff(const SPtr<SerializedObject>&, const SPtr<SerializedObject>&, ObjectMap&)
  18. */
  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>&, DiffObjectMap&, Vector<DiffCommand>&)
  23. */
  24. void applyDiff(const SPtr<IReflectable>& object, const SPtr<SerializedObject>& serzDiff,
  25. DiffObjectMap& objectMap, Vector<DiffCommand>& diffCommands) override;
  26. };
  27. }