BsScriptSerializableList.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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 ManagedSerializableList. */
  12. class BS_SCR_BE_EXPORT ScriptSerializableList : public ScriptObject<ScriptSerializableList>
  13. {
  14. public:
  15. SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "SerializableList")
  16. /**
  17. * Creates a new serializable list interop object from the data in the provided property. Caller must ensure the
  18. * property references a System.Collections.Generic.List.
  19. */
  20. static MonoObject* create(const ScriptSerializableProperty* native, MonoObject* managed);
  21. private:
  22. ScriptSerializableList(MonoObject* instance, const SPtr<ManagedSerializableTypeInfoList>& typeInfo);
  23. SPtr<ManagedSerializableTypeInfoList> mTypeInfo;
  24. /************************************************************************/
  25. /* CLR HOOKS */
  26. /************************************************************************/
  27. static MonoObject* internal_createProperty(ScriptSerializableList* nativeInstance);
  28. };
  29. /** @} */
  30. }