Changeset 798 in webkit for trunk/JavaScriptCore/kjs/bool_object.h
- Timestamp:
- Mar 21, 2002, 4:31:57 PM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/bool_object.h
r6 r798 1 // -*- c-basic-offset: 2 -*- 1 2 /* 2 3 * This file is part of the KDE libraries … … 16 17 * License along with this library; if not, write to the Free Software 17 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 * 20 * $Id$ 18 21 */ 19 22 … … 21 24 #define _BOOL_OBJECT_H_ 22 25 23 #include " object.h"24 #include "function .h"26 #include "internal.h" 27 #include "function_object.h" 25 28 26 29 namespace KJS { 27 30 28 class Boolean Object : public ConstructorImp {31 class BooleanInstanceImp : public ObjectImp { 29 32 public: 30 BooleanObject(const KJSO& funcProto, const KJSO &booleanProto); 31 Completion execute(const List &); 32 Object construct(const List &); 33 BooleanInstanceImp(const Object &proto); 34 35 virtual const ClassInfo *classInfo() const { return &info; } 36 static const ClassInfo info; 33 37 }; 34 38 35 class BooleanPrototype : public ObjectImp { 39 /** 40 * @internal 41 * 42 * The initial value of Boolean.prototype (and thus all objects created 43 * with the Boolean constructor 44 */ 45 class BooleanPrototypeImp : public BooleanInstanceImp { 36 46 public: 37 BooleanPrototype (const Object& proto);38 virtual KJSO get(const UString &p) const;39 enum { ToString, ValueOf };47 BooleanPrototypeImp(ExecState *exec, 48 ObjectPrototypeImp *objectProto, 49 FunctionPrototypeImp *funcProto); 40 50 }; 41 51 42 class BooleanProtoFunc : public InternalFunctionImp { 52 /** 53 * @internal 54 * 55 * Class to implement all methods that are properties of the 56 * Boolean.prototype object 57 */ 58 class BooleanProtoFuncImp : public InternalFunctionImp { 43 59 public: 44 BooleanProtoFunc(int i); 45 Completion execute(const List &); 60 BooleanProtoFuncImp(ExecState *exec, 61 FunctionPrototypeImp *funcProto, int i, int len); 62 63 virtual bool implementsCall() const; 64 virtual Value call(ExecState *exec, Object &thisObj, const List &args); 65 66 enum { ToString, ValueOf }; 46 67 private: 47 68 int id; 69 }; 70 71 /** 72 * @internal 73 * 74 * The initial value of the the global variable's "Boolean" property 75 */ 76 class BooleanObjectImp : public InternalFunctionImp { 77 friend class BooleanProtoFuncImp; 78 public: 79 BooleanObjectImp(ExecState *exec, FunctionPrototypeImp *funcProto, 80 BooleanPrototypeImp *booleanProto); 81 82 virtual bool implementsConstruct() const; 83 virtual Object construct(ExecState *exec, const List &args); 84 85 virtual bool implementsCall() const; 86 virtual Value call(ExecState *exec, Object &thisObj, const List &args); 48 87 }; 49 88
Note:
See TracChangeset
for help on using the changeset viewer.