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