BsTechniqueRTTI.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
  3. #pragma once
  4. #include "BsCorePrerequisites.h"
  5. #include "BsRTTIType.h"
  6. #include "BsTechnique.h"
  7. namespace BansheeEngine
  8. {
  9. /** @cond RTTI */
  10. /** @addtogroup RTTI-Impl-Core
  11. * @{
  12. */
  13. class BS_CORE_EXPORT TechniqueRTTI : public RTTIType<Technique, IReflectable, TechniqueRTTI>
  14. {
  15. private:
  16. BS_BEGIN_RTTI_MEMBERS
  17. BS_RTTI_MEMBER_PLAIN(mRenderAPI, 0)
  18. BS_RTTI_MEMBER_PLAIN(mRenderer, 1)
  19. BS_RTTI_MEMBER_REFLPTR_ARRAY(mPasses, 2)
  20. BS_RTTI_MEMBER_PLAIN_ARRAY(mTags, 3)
  21. BS_END_RTTI_MEMBERS
  22. public:
  23. TechniqueRTTI()
  24. :mInitMembers(this)
  25. { }
  26. void onDeserializationEnded(IReflectable* obj, const UnorderedMap<String, UINT64>& params) override
  27. {
  28. Technique* technique = static_cast<Technique*>(obj);
  29. technique->initialize();
  30. }
  31. const String& getRTTIName() override
  32. {
  33. static String name = "Technique";
  34. return name;
  35. }
  36. UINT32 getRTTIId() override
  37. {
  38. return TID_Technique;
  39. }
  40. SPtr<IReflectable> newRTTIObject() override
  41. {
  42. return Technique::createEmpty();
  43. }
  44. };
  45. /** @} */
  46. /** @endcond */
  47. }