Changeset 29588 in webkit for trunk/JavaScriptCore/kjs/bool_object.h
- Timestamp:
- Jan 17, 2008, 11:27:33 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/bool_object.h
r28110 r29588 1 // -*- c-basic-offset: 2 -*-2 1 /* 3 * This file is part of the KDE libraries4 2 * Copyright (C) 1999-2000 Harri Porten ([email protected]) 3 * Copyright (C) 2008 Apple Inc. All rights reserved. 5 4 * 6 5 * This library is free software; you can redistribute it and/or … … 28 27 namespace KJS { 29 28 30 class BooleanInstance : public JSWrapperObject {31 public:32 BooleanInstance(JSObject *proto);29 class BooleanInstance : public JSWrapperObject { 30 public: 31 BooleanInstance(JSObject* proto); 33 32 34 virtual const ClassInfo *classInfo() const { return &info; }35 static const ClassInfo info;36 };33 virtual const ClassInfo* classInfo() const { return &info; } 34 static const ClassInfo info; 35 }; 37 36 38 /** 39 * @internal 40 * 41 * The initial value of Boolean.prototype (and thus all objects created 42 * with the Boolean constructor 43 */ 44 class BooleanPrototype : public BooleanInstance { 45 public: 46 BooleanPrototype(ExecState *exec, 47 ObjectPrototype *objectProto, 48 FunctionPrototype *funcProto); 49 }; 37 /** 38 * @internal 39 * 40 * The initial value of Boolean.prototype (and thus all objects created 41 * with the Boolean constructor 42 */ 43 class BooleanPrototype : public BooleanInstance { 44 public: 45 BooleanPrototype(ExecState*, ObjectPrototype*, FunctionPrototype*); 46 }; 50 47 51 /** 52 * @internal 53 * 54 * Class to implement all methods that are properties of the 55 * Boolean.prototype object 56 */ 57 class BooleanProtoFunc : public InternalFunctionImp { 58 public: 59 BooleanProtoFunc(ExecState*, FunctionPrototype*, int i, int len, const Identifier&); 48 /** 49 * @internal 50 * 51 * The initial value of the the global variable's "Boolean" property 52 */ 53 class BooleanObjectImp : public InternalFunctionImp { 54 public: 55 BooleanObjectImp(ExecState*, FunctionPrototype*, BooleanPrototype*); 60 56 61 virtual JSValue *callAsFunction(ExecState *exec, JSObject *thisObj, const List &args); 57 virtual bool implementsConstruct() const; 58 virtual JSObject* construct(ExecState*, const List&); 62 59 63 enum { ToString, ValueOf }; 64 private: 65 int id; 66 }; 60 virtual JSValue* callAsFunction(ExecState*, JSObject*, const List&); 61 }; 67 62 68 /** 69 * @internal 70 * 71 * The initial value of the the global variable's "Boolean" property 72 */ 73 class BooleanObjectImp : public InternalFunctionImp { 74 friend class BooleanProtoFunc; 75 public: 76 BooleanObjectImp(ExecState *exec, FunctionPrototype *funcProto, 77 BooleanPrototype *booleanProto); 63 } // namespace KJS 78 64 79 virtual bool implementsConstruct() const; 80 virtual JSObject *construct(ExecState *exec, const List &args); 81 82 virtual JSValue *callAsFunction(ExecState *exec, JSObject *thisObj, const List &args); 83 }; 84 85 } // namespace 86 87 #endif 65 #endif // BOOL_OBJECT_H_
Note:
See TracChangeset
for help on using the changeset viewer.