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