| 988 | // |
| 989 | |
| 990 | LPTSTR Object::Type() |
| 991 | { |
| 992 | Object *base; |
| 993 | ExprTokenType value; |
| 994 | if (GetOwnProp(value, _T("__Class"))) |
| 995 | return _T("Prototype"); // This object is a prototype. |
| 996 | for (base = mBase; base; base = base->mBase) |
| 997 | if (base->GetOwnProp(value, _T("__Class"))) |
| 998 | return TokenToString(value); // This object is an instance of that class. |
| 999 | return _T("Object"); // Provide a default in case __Class has been removed from all of the base objects. |
| 1000 | } |
| 1001 | |
| 1002 | |
| 1003 | Object *Object::CreateClass(Object *aPrototype) |
no test coverage detected