1//************************************ bs::framework - Copyright 2018 Marko Pintera **************************************//
2//*********** Licensed under the MIT license. See LICENSE.md for full terms. This notice is not to be removed. ***********//
3#pragma once
4
5#include "BsCorePrerequisites.h"
6#include "Reflection/BsRTTIType.h"
7#include "Material/BsShaderInclude.h"
8
9namespace bs
10{
11 /** @cond RTTI */
12 /** @addtogroup RTTI-Impl-Core
13 * @{
14 */
15
16 class BS_CORE_EXPORT ShaderIncludeRTTI : public RTTIType <ShaderInclude, Resource, ShaderIncludeRTTI>
17 {
18 private:
19 String& getString(ShaderInclude* obj) { return obj->mString; }
20 void setString(ShaderInclude* obj, String& val) { obj->mString = val; }
21 public:
22 ShaderIncludeRTTI()
23 {
24 addPlainField("mString", 0, &ShaderIncludeRTTI::getString, &ShaderIncludeRTTI::setString);
25 }
26
27 const String& getRTTIName() override
28 {
29 static String name = "ShaderInclude";
30 return name;
31 }
32
33 UINT32 getRTTIId() override
34 {
35 return TID_ShaderInclude;
36 }
37
38 SPtr<IReflectable> newRTTIObject() override
39 {
40 return ShaderInclude::_createPtr(""); // Initial string doesn't matter, it'll get overwritten
41 }
42 };
43
44 /** @} */
45 /** @endcond */
46}