Implement missing Type::SetField method

refs #8169
This commit is contained in:
Gunnar Beutner 2015-01-14 13:32:40 +01:00
parent eee89da1eb
commit 2ef798f378
2 changed files with 11 additions and 0 deletions

View File

@ -88,6 +88,16 @@ void Type::SetPrototype(const Object::Ptr& object)
m_Prototype = object;
}
void Type::SetField(int id, const Value& value)
{
if (id == 0) {
SetPrototype(value);
return;
}
Object::SetField(id, value);
}
Value Type::GetField(int id) const
{
if (id == 0)

View File

@ -81,6 +81,7 @@ public:
static void Register(const Type::Ptr& type);
static Type::Ptr GetByName(const String& name);
virtual void SetField(int id, const Value& value);
virtual Value GetField(int id) const;
protected: