bool_object.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef _BOOL_OBJECT_H_
00023 #define _BOOL_OBJECT_H_
00024
00025 #include "internal.h"
00026 #include "function_object.h"
00027
00028 namespace KJS {
00029
00030 class BooleanInstanceImp : public ObjectImp {
00031 public:
00032 BooleanInstanceImp(ObjectImp *proto);
00033
00034 virtual const ClassInfo *classInfo() const { return &info; }
00035 static const ClassInfo info;
00036 };
00037
00044 class BooleanPrototypeImp : public BooleanInstanceImp {
00045 public:
00046 BooleanPrototypeImp(ExecState *exec,
00047 ObjectPrototypeImp *objectProto,
00048 FunctionPrototypeImp *funcProto);
00049 };
00050
00057 class BooleanProtoFuncImp : public InternalFunctionImp {
00058 public:
00059 BooleanProtoFuncImp(ExecState *exec, FunctionPrototypeImp *funcProto,
00060 int i, int len, const Identifier &_ident);
00061
00062 virtual bool implementsCall() const;
00063 virtual Value call(ExecState *exec, Object &thisObj, const List &args);
00064
00065 enum { ToString, ValueOf };
00066 private:
00067 int id;
00068 };
00069
00075 class BooleanObjectImp : public InternalFunctionImp {
00076 friend class BooleanProtoFuncImp;
00077 public:
00078 BooleanObjectImp(ExecState *exec, FunctionPrototypeImp *funcProto,
00079 BooleanPrototypeImp *booleanProto);
00080
00081 virtual bool implementsConstruct() const;
00082 virtual Object construct(ExecState *exec, const List &args);
00083
00084 virtual bool implementsCall() const;
00085 virtual Value call(ExecState *exec, Object &thisObj, const List &args);
00086 };
00087
00088 }
00089
00090 #endif
|