BsScriptCodeRTTI.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
  3. #pragma once
  4. #include "BsPrerequisites.h"
  5. #include "BsRTTIType.h"
  6. #include "BsScriptCode.h"
  7. namespace bs
  8. {
  9. /** @cond RTTI */
  10. /** @addtogroup RTTI-Impl-Engine
  11. * @{
  12. */
  13. class BS_EXPORT ScriptCodeRTTI : public RTTIType <ScriptCode, Resource, ScriptCodeRTTI>
  14. {
  15. private:
  16. BS_BEGIN_RTTI_MEMBERS
  17. BS_RTTI_MEMBER_PLAIN(mString, 0)
  18. BS_RTTI_MEMBER_PLAIN(mEditorScript, 1)
  19. BS_END_RTTI_MEMBERS
  20. public:
  21. ScriptCodeRTTI()
  22. :mInitMembers(this)
  23. { }
  24. const String& getRTTIName() override
  25. {
  26. static String name = "ScriptCode";
  27. return name;
  28. }
  29. UINT32 getRTTIId() override
  30. {
  31. return TID_ScriptCode;
  32. }
  33. SPtr<IReflectable> newRTTIObject() override
  34. {
  35. return ScriptCode::_createPtr(L""); // Initial string doesn't matter, it'll get overwritten
  36. }
  37. };
  38. /** @} */
  39. /** @endcond */
  40. }