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 "BsPrerequisites.h" |
6 | #include "Reflection/BsRTTIType.h" |
7 | #include "Resources/BsScriptCode.h" |
8 | |
9 | namespace bs |
10 | { |
11 | /** @cond RTTI */ |
12 | /** @addtogroup RTTI-Impl-Engine |
13 | * @{ |
14 | */ |
15 | |
16 | class BS_EXPORT ScriptCodeRTTI : public RTTIType <ScriptCode, Resource, ScriptCodeRTTI> |
17 | { |
18 | private: |
19 | BS_BEGIN_RTTI_MEMBERS |
20 | BS_RTTI_MEMBER_PLAIN(mString, 0) |
21 | BS_RTTI_MEMBER_PLAIN(mEditorScript, 1) |
22 | BS_END_RTTI_MEMBERS |
23 | |
24 | public: |
25 | const String& getRTTIName() override |
26 | { |
27 | static String name = "ScriptCode"; |
28 | return name; |
29 | } |
30 | |
31 | UINT32 getRTTIId() override |
32 | { |
33 | return TID_ScriptCode; |
34 | } |
35 | |
36 | SPtr<IReflectable> newRTTIObject() override |
37 | { |
38 | return ScriptCode::_createPtr(L""); // Initial string doesn't matter, it'll get overwritten |
39 | } |
40 | }; |
41 | |
42 | /** @} */ |
43 | /** @endcond */ |
44 | } |
45 |