error_object.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef _ERROR_OBJECT_H_
00023 #define _ERROR_OBJECT_H_
00024
00025 #include "internal.h"
00026 #include "function_object.h"
00027
00028 namespace KJS {
00029
00030 class ErrorInstanceImp : public ObjectImp {
00031 public:
00032 ErrorInstanceImp(ObjectImp *proto);
00033
00034 virtual const ClassInfo *classInfo() const { return &info; }
00035 static const ClassInfo info;
00036 };
00037
00038 class ErrorPrototypeImp : public ObjectImp {
00039 public:
00040 ErrorPrototypeImp(ExecState *exec,
00041 ObjectPrototypeImp *objectProto,
00042 FunctionPrototypeImp *funcProto);
00043 };
00044
00045 class ErrorProtoFuncImp : public InternalFunctionImp {
00046 public:
00047 ErrorProtoFuncImp(ExecState *exec, FunctionPrototypeImp *funcProto);
00048 virtual bool implementsCall() const;
00049 virtual Value call(ExecState *exec, Object &thisObj, const List &args);
00050 };
00051
00052 class ErrorObjectImp : public InternalFunctionImp {
00053 public:
00054 ErrorObjectImp(ExecState *exec, FunctionPrototypeImp *funcProto,
00055 ErrorPrototypeImp *errorProto);
00056
00057 virtual bool implementsConstruct() const;
00058 virtual Object construct(ExecState *exec, const List &args);
00059
00060 virtual bool implementsCall() const;
00061 virtual Value call(ExecState *exec, Object &thisObj, const List &args);
00062 };
00063
00064
00065
00066
00067
00068 class NativeErrorPrototypeImp : public ObjectImp {
00069 public:
00070 NativeErrorPrototypeImp(ExecState *exec, ErrorPrototypeImp *errorProto,
00071 ErrorType et, UString name, UString message);
00072 private:
00073 ErrorType errType;
00074 };
00075
00076 class NativeErrorImp : public InternalFunctionImp {
00077 public:
00078 NativeErrorImp(ExecState *exec, FunctionPrototypeImp *funcProto,
00079 const Object &prot);
00080
00081 virtual bool implementsConstruct() const;
00082 virtual Object construct(ExecState *exec, const List &args);
00083 virtual bool implementsCall() const;
00084 virtual Value call(ExecState *exec, Object &thisObj, const List &args);
00085
00086 virtual void mark();
00087
00088 virtual const ClassInfo *classInfo() const { return &info; }
00089 static const ClassInfo info;
00090 private:
00091 ObjectImp *proto;
00092 };
00093
00094 }
00095
00096 #endif
|