function_object.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef _FUNCTION_OBJECT_H_
00023 #define _FUNCTION_OBJECT_H_
00024
00025 #include "internal.h"
00026 #include "object_object.h"
00027 #include "function.h"
00028
00029 namespace KJS {
00030
00035 class FunctionPrototypeImp : public InternalFunctionImp {
00036 public:
00037 FunctionPrototypeImp(ExecState *exec);
00038 virtual ~FunctionPrototypeImp();
00039
00040 virtual bool implementsCall() const;
00041 virtual Value call(ExecState *exec, Object &thisObj, const List &args);
00042 };
00043
00050 class FunctionProtoFuncImp : public InternalFunctionImp {
00051 public:
00052 FunctionProtoFuncImp(ExecState *exec,
00053 FunctionPrototypeImp *funcProto, int i, int len, const Identifier &_ident);
00054
00055 virtual bool implementsCall() const;
00056 virtual Value call(ExecState *exec, Object &thisObj, const List &args);
00057
00058 enum { ToString, Apply, Call };
00059 private:
00060 int id;
00061 };
00062
00068 class FunctionObjectImp : public InternalFunctionImp {
00069 public:
00070 FunctionObjectImp(ExecState *exec, FunctionPrototypeImp *funcProto);
00071 virtual ~FunctionObjectImp();
00072
00073 virtual bool implementsConstruct() const;
00074 virtual Object construct(ExecState *exec, const List &args);
00075 virtual bool implementsCall() const;
00076 virtual Value call(ExecState *exec, Object &thisObj, const List &args);
00077 };
00078
00079 }
00080
00081 #endif // _FUNCTION_OBJECT_H_
|