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/BsPlainText.h"
8
9namespace bs
10{
11 /** @cond RTTI */
12 /** @addtogroup RTTI-Impl-Engine
13 * @{
14 */
15
16 class BS_EXPORT PlainTextRTTI : public RTTIType <PlainText, Resource, PlainTextRTTI>
17 {
18 private:
19 WString& getString(PlainText* obj) { return obj->mString; }
20 void setString(PlainText* obj, WString& val) { obj->mString = val; }
21 public:
22 PlainTextRTTI()
23 {
24 addPlainField("mString", 0, &PlainTextRTTI::getString, &PlainTextRTTI::setString);
25 }
26
27 const String& getRTTIName() override
28 {
29 static String name = "PlainText";
30 return name;
31 }
32
33 UINT32 getRTTIId() override
34 {
35 return TID_PlainText;
36 }
37
38 SPtr<IReflectable> newRTTIObject() override
39 {
40 return PlainText::_createPtr(L""); // Initial string doesn't matter, it'll get overwritten
41 }
42 };
43
44 /** @} */
45 /** @endcond */
46}