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