array_object.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef _ARRAY_OBJECT_H_
00024 #define _ARRAY_OBJECT_H_
00025
00026 #include "internal.h"
00027 #include "function_object.h"
00028
00029 namespace KJS {
00030
00031 class ArrayInstanceImp : public ObjectImp {
00032 public:
00033 ArrayInstanceImp(const Object &proto);
00034
00035 virtual void put(ExecState *exec, const UString &propertyName, const Value &value, int attr = None);
00036 virtual void putDirect(ExecState *exec, const UString &propertyName, const Value &value, int attr = None);
00041 virtual bool hasOwnProperty(ExecState *exec, const UString &propertyName);
00042
00043 virtual const ClassInfo *classInfo() const { return &info; }
00044 static const ClassInfo info;
00045 };
00046
00047 class ArrayPrototypeImp : public ArrayInstanceImp {
00048 public:
00049 ArrayPrototypeImp(ExecState *exec,
00050 ObjectPrototypeImp *objProto);
00051 Value get(ExecState *exec, const UString &p) const;
00052 virtual const ClassInfo *classInfo() const { return &info; }
00053 static const ClassInfo info;
00054 };
00055
00056 class ArrayProtoFuncImp : public InternalFunctionImp {
00057 public:
00058 ArrayProtoFuncImp(ExecState *exec, int i, int len);
00059
00060 virtual bool implementsCall() const;
00061 virtual Value call(ExecState *exec, Object &thisObj, const List &args);
00062
00063 enum { ToString, ToLocaleString, Concat, Join, Pop, Push,
00064 Reverse, Shift, Slice, Sort, Splice, UnShift };
00065 private:
00066 int id;
00067 };
00068
00069 class ArrayObjectImp : public InternalFunctionImp {
00070 public:
00071 ArrayObjectImp(ExecState *exec,
00072 FunctionPrototypeImp *funcProto,
00073 ArrayPrototypeImp *arrayProto);
00074
00075 virtual bool implementsConstruct() const;
00076 virtual Object construct(ExecState *exec, const List &args);
00077 virtual bool implementsCall() const;
00078 virtual Value call(ExecState *exec, Object &thisObj, const List &args);
00079
00080 };
00081
00082 };
00083
00084 #endif
This file is part of the documentation for kdelibs Version 3.1.0.