BsSettingsRTTI.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. class SettingsRTTI : public RTTIType <Settings, IReflectable, SettingsRTTI>
  10. {
  11. private:
  12. BS_PLAIN_MEMBER(mFloatProperties);
  13. BS_PLAIN_MEMBER(mIntProperties);
  14. BS_PLAIN_MEMBER(mBoolProperties);
  15. BS_PLAIN_MEMBER(mStringProperties);
  16. public:
  17. SettingsRTTI()
  18. {
  19. BS_ADD_PLAIN_FIELD(mFloatProperties, 13);
  20. BS_ADD_PLAIN_FIELD(mIntProperties, 14);
  21. BS_ADD_PLAIN_FIELD(mBoolProperties, 15);
  22. BS_ADD_PLAIN_FIELD(mStringProperties, 16);
  23. }
  24. virtual const String& getRTTIName() override
  25. {
  26. static String name = "Settings";
  27. return name;
  28. }
  29. virtual UINT32 getRTTIId() override
  30. {
  31. return TID_Settings;
  32. }
  33. virtual std::shared_ptr<IReflectable> newRTTIObject() override
  34. {
  35. return bs_shared_ptr_new<Settings>();
  36. }
  37. };
  38. }