BsComponentRTTI.h 577 B

1234567891011121314151617181920212223242526272829303132333435
  1. #pragma once
  2. #include "BsCorePrerequisites.h"
  3. #include "BsRTTIType.h"
  4. #include "BsComponent.h"
  5. namespace BansheeEngine
  6. {
  7. class BS_CORE_EXPORT ComponentRTTI : public RTTIType<Component, GameObject, ComponentRTTI>
  8. {
  9. private:
  10. public:
  11. ComponentRTTI()
  12. {
  13. }
  14. virtual const String& getRTTIName()
  15. {
  16. static String name = "Component";
  17. return name;
  18. }
  19. virtual UINT32 getRTTIId()
  20. {
  21. return TID_Component;
  22. }
  23. virtual std::shared_ptr<IReflectable> newRTTIObject()
  24. {
  25. BS_EXCEPT(InternalErrorException, "Cannot instantiate an abstract class.");
  26. }
  27. };
  28. }