21 #ifndef _NUMBER_OBJECT_H_
22 #define _NUMBER_OBJECT_H_
25 #include "function_object.h"
29 class NumberInstanceImp :
public ObjectImp {
31 NumberInstanceImp(ObjectImp *proto);
33 virtual const ClassInfo *classInfo()
const {
return &info; }
34 static const ClassInfo info;
43 class NumberPrototypeImp :
public NumberInstanceImp {
45 NumberPrototypeImp(ExecState *exec,
46 ObjectPrototypeImp *objProto,
47 FunctionPrototypeImp *funcProto);
56 class NumberProtoFuncImp :
public InternalFunctionImp {
58 NumberProtoFuncImp(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, ToLocaleString, ValueOf, ToFixed, ToExponential, ToPrecision };
74 class NumberObjectImp :
public InternalFunctionImp {
76 NumberObjectImp(ExecState *exec,
77 FunctionPrototypeImp *funcProto,
78 NumberPrototypeImp *numberProto);
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);
86 Value get(ExecState *exec,
const Identifier &p)
const;
87 Value getValueProperty(ExecState *exec,
int token)
const;
88 virtual const ClassInfo *classInfo()
const {
return &info; }
89 static const ClassInfo info;
90 enum { NaNValue, NegInfinity, PosInfinity, MaxValue, MinValue };
92 Completion execute(
const List &);
93 Object construct(
const List &);