22 #ifndef _NUMBER_OBJECT_H_
23 #define _NUMBER_OBJECT_H_
26 #include "function_object.h"
30 class NumberInstanceImp :
public ObjectImp {
32 NumberInstanceImp(ObjectImp *proto);
34 virtual const ClassInfo *classInfo()
const {
return &info; }
35 static const ClassInfo info;
44 class NumberPrototypeImp :
public NumberInstanceImp {
46 NumberPrototypeImp(ExecState *exec,
47 ObjectPrototypeImp *objProto,
48 FunctionPrototypeImp *funcProto);
57 class NumberProtoFuncImp :
public InternalFunctionImp {
59 NumberProtoFuncImp(ExecState *exec, FunctionPrototypeImp *funcProto,
60 int i,
int len,
const Identifier &_ident);
62 virtual bool implementsCall()
const;
63 virtual Value call(ExecState *exec, Object &thisObj,
const List &args);
65 enum { ToString, ToLocaleString, ValueOf, ToFixed, ToExponential, ToPrecision };
75 class NumberObjectImp :
public InternalFunctionImp {
77 NumberObjectImp(ExecState *exec,
78 FunctionPrototypeImp *funcProto,
79 NumberPrototypeImp *numberProto);
81 virtual bool implementsConstruct()
const;
82 virtual Object construct(ExecState *exec,
const List &args);
84 virtual bool implementsCall()
const;
85 virtual Value call(ExecState *exec, Object &thisObj,
const List &args);
87 Value
get(ExecState *exec,
const Identifier &p)
const;
88 Value getValueProperty(ExecState *exec,
int token)
const;
89 virtual const ClassInfo *classInfo()
const {
return &info; }
90 static const ClassInfo info;
91 enum { NaNValue, NegInfinity, PosInfinity, MaxValue, MinValue };
93 Completion execute(
const List &);
94 Object construct(
const List &);