BsSettingsRTTI.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
  3. #pragma once
  4. #include "BsEditorPrerequisites.h"
  5. #include "BsSettings.h"
  6. #include "BsRTTIType.h"
  7. namespace BansheeEngine
  8. {
  9. /** @cond INTERNAL */
  10. /** @addtogroup RTTI-Impl-Editor
  11. * @{
  12. */
  13. class SettingsRTTI : public RTTIType <Settings, IReflectable, SettingsRTTI>
  14. {
  15. private:
  16. BS_PLAIN_MEMBER(mFloatProperties);
  17. BS_PLAIN_MEMBER(mIntProperties);
  18. BS_PLAIN_MEMBER(mBoolProperties);
  19. BS_PLAIN_MEMBER(mStringProperties);
  20. public:
  21. SettingsRTTI()
  22. {
  23. BS_ADD_PLAIN_FIELD(mFloatProperties, 13);
  24. BS_ADD_PLAIN_FIELD(mIntProperties, 14);
  25. BS_ADD_PLAIN_FIELD(mBoolProperties, 15);
  26. BS_ADD_PLAIN_FIELD(mStringProperties, 16);
  27. }
  28. virtual const String& getRTTIName() override
  29. {
  30. static String name = "Settings";
  31. return name;
  32. }
  33. virtual UINT32 getRTTIId() override
  34. {
  35. return TID_Settings;
  36. }
  37. virtual std::shared_ptr<IReflectable> newRTTIObject() override
  38. {
  39. return bs_shared_ptr_new<Settings>();
  40. }
  41. };
  42. /** @} */
  43. /** @endcond */
  44. }