BsScriptSerializableDictionary.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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 "BsScriptObject.h"
  6. namespace bs
  7. {
  8. /** @addtogroup ScriptInteropEngine
  9. * @{
  10. */
  11. /** Interop class between C++ & CLR for ManagedSerializableDictionary. */
  12. class BS_SCR_BE_EXPORT ScriptSerializableDictionary : public ScriptObject<ScriptSerializableDictionary>
  13. {
  14. public:
  15. SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "SerializableDictionary")
  16. /**
  17. * Creates a new serializable dictionary interop object from the data in the provided property. Caller must ensure
  18. * the property references a System.Collections.Generic.Dictionary.
  19. */
  20. static MonoObject* create(const ScriptSerializableProperty* native, MonoObject* managed);
  21. private:
  22. ScriptSerializableDictionary(MonoObject* instance, const SPtr<ManagedSerializableTypeInfoDictionary>& typeInfo);
  23. SPtr<ManagedSerializableTypeInfoDictionary> mTypeInfo;
  24. /************************************************************************/
  25. /* CLR HOOKS */
  26. /************************************************************************/
  27. static MonoObject* internal_createKeyProperty(ScriptSerializableDictionary* nativeInstance);
  28. static MonoObject* internal_createValueProperty(ScriptSerializableDictionary* nativeInstance);
  29. };
  30. /** @} */
  31. }