ObjectFactory factory = GetFactory();
if (!factory)
- return Object::Ptr();
+ BOOST_THROW_EXCEPTION(std::runtime_error("Type does not have a factory function."));
return factory();
}
{
if (id == 0)
return GetPrototype();
+ else if (id == 1)
+ return GetBaseType();
return Object::GetField(id);
}
{
if (name == "prototype")
return 0;
+ else if (name == "base")
+ return 1;
return -1;
}
{
if (id == 0)
return Field(0, "Object", "prototype", NULL, 0);
+ else if (id == 1)
+ return Field(1, "Object", "base", NULL, 0);
throw std::runtime_error("Invalid field ID.");
}
int TypeType::GetFieldCount(void) const
{
- return 1;
+ return 2;
}
ObjectFactory TypeType::GetFactory(void) const