21 #ifndef _BOOL_OBJECT_H_
22 #define _BOOL_OBJECT_H_
25 #include "function_object.h"
29 class BooleanInstanceImp :
public ObjectImp {
31 BooleanInstanceImp(ObjectImp *proto);
33 virtual const ClassInfo *classInfo()
const {
return &info; }
34 static const ClassInfo info;
43 class BooleanPrototypeImp :
public BooleanInstanceImp {
45 BooleanPrototypeImp(ExecState *exec,
46 ObjectPrototypeImp *objectProto,
47 FunctionPrototypeImp *funcProto);
56 class BooleanProtoFuncImp :
public InternalFunctionImp {
58 BooleanProtoFuncImp(ExecState *exec, FunctionPrototypeImp *funcProto,
59 int i,
int len,
const Identifier &_ident);
61 virtual bool implementsCall()
const;
62 virtual Value call(ExecState *exec, Object &thisObj,
const List &args);
64 enum { ToString, ValueOf };
74 class BooleanObjectImp :
public InternalFunctionImp {
75 friend class BooleanProtoFuncImp;
77 BooleanObjectImp(ExecState *exec, FunctionPrototypeImp *funcProto,
78 BooleanPrototypeImp *booleanProto);
80 virtual bool implementsConstruct()
const;
81 virtual Object construct(ExecState *exec,
const List &args);
83 virtual bool implementsCall()
const;
84 virtual Value call(ExecState *exec, Object &thisObj,
const List &args);