Added support for property descriptions

This commit is contained in:
parax0 2016-01-05 01:41:22 -07:00
parent 8cf9968134
commit 70d8981037
1 changed files with 16 additions and 2 deletions

View File

@ -32,6 +32,7 @@ class IPropertyTemplate
protected: protected:
CStructTemplate *mpParent; CStructTemplate *mpParent;
TString mName; TString mName;
TString mDescription;
u32 mID; u32 mID;
ECookPreference mCookPreference; ECookPreference mCookPreference;
std::vector<u32> mAllowedVersions; std::vector<u32> mAllowedVersions;
@ -72,6 +73,9 @@ public:
else else
mCookPreference = eNoCookPreference; mCookPreference = eNoCookPreference;
} }
else if (rkParamName == "description")
mDescription = rkValue;
} }
virtual IProperty* InstantiateProperty() = 0; virtual IProperty* InstantiateProperty() = 0;
@ -81,6 +85,11 @@ public:
return mName; return mName;
} }
inline TString Description() const
{
return mDescription;
}
inline u32 PropertyID() const inline u32 PropertyID() const
{ {
return mID; return mID;
@ -91,9 +100,14 @@ public:
return mCookPreference; return mCookPreference;
} }
inline void SetName(const TString& Name) inline void SetName(const TString& rkName)
{ {
mName = Name; mName = rkName;
}
inline void SetDescription(const TString& rkDesc)
{
mDescription = rkDesc;
} }
inline CStructTemplate* Parent() const inline CStructTemplate* Parent() const