BsSettingsRTTI.h 872 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #pragma once
  2. #include "BsEditorPrerequisites.h"
  3. #include "BsSettings.h"
  4. #include "BsRTTIType.h"
  5. namespace BansheeEngine
  6. {
  7. class SettingsRTTI : public RTTIType <Settings, IReflectable, SettingsRTTI>
  8. {
  9. private:
  10. BS_PLAIN_MEMBER(mFloatProperties);
  11. BS_PLAIN_MEMBER(mIntProperties);
  12. BS_PLAIN_MEMBER(mBoolProperties);
  13. BS_PLAIN_MEMBER(mStringProperties);
  14. public:
  15. SettingsRTTI()
  16. {
  17. BS_ADD_PLAIN_FIELD(mFloatProperties, 13);
  18. BS_ADD_PLAIN_FIELD(mIntProperties, 14);
  19. BS_ADD_PLAIN_FIELD(mBoolProperties, 15);
  20. BS_ADD_PLAIN_FIELD(mStringProperties, 16);
  21. }
  22. virtual const String& getRTTIName() override
  23. {
  24. static String name = "Settings";
  25. return name;
  26. }
  27. virtual UINT32 getRTTIId() override
  28. {
  29. return TID_Settings;
  30. }
  31. virtual std::shared_ptr<IReflectable> newRTTIObject() override
  32. {
  33. return bs_shared_ptr_new<Settings>();
  34. }
  35. };
  36. }