1 // -*- mode: c++; c-basic-offset: 4 -*-
3 #ifndef __UserObjectImp_h
4 #define __UserObjectImp_h
14 class UserObjectImp : public ObjectImp
17 UserObjectImp(JSUserObject* userObject);
18 virtual ~UserObjectImp();
20 virtual const ClassInfo *classInfo() const;
21 static const ClassInfo info;
23 virtual bool implementsCall() const;
25 virtual void getPropertyNames(ExecState *exec, IdentifierSequencedSet& propertyNames);
27 virtual ValueImp *callAsFunction(ExecState *exec, ObjectImp *thisObj, const List &args);
28 virtual bool getOwnPropertySlot(ExecState *, const Identifier&, PropertySlot&);
29 virtual void put(ExecState *exec, const Identifier &propertyName, ValueImp *value, int attr = None);
31 ValueImp *toPrimitive(ExecState *exec, Type preferredType = UnspecifiedType) const;
32 virtual bool toBoolean(ExecState *exec) const;
33 virtual double toNumber(ExecState *exec) const;
34 virtual UString toString(ExecState *exec) const;
38 JSUserObject* GetJSUserObject() const;
42 static ValueImp *userObjectGetter(ExecState *, const Identifier&, const PropertySlot&);
44 JSUserObject* fJSUserObject;