string_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 _STRING_OBJECT_H_
00024 #define _STRING_OBJECT_H_
00025
00026 #include "internal.h"
00027 #include "function_object.h"
00028
00029 namespace KJS {
00030
00031 class StringInstanceImp : public ObjectImp {
00032 public:
00033 StringInstanceImp(const Object &proto);
00034
00035 virtual const ClassInfo *classInfo() const { return &info; }
00036 static const ClassInfo info;
00037 };
00038
00045 class StringPrototypeImp : public StringInstanceImp {
00046 public:
00047 StringPrototypeImp(ExecState *exec,
00048 ObjectPrototypeImp *objProto);
00049 Value get(ExecState *exec, const UString &p) const;
00050 virtual const ClassInfo *classInfo() const { return &info; }
00051 static const ClassInfo info;
00052 };
00053
00060 class StringProtoFuncImp : public InternalFunctionImp {
00061 public:
00062 StringProtoFuncImp(ExecState *exec, int i, int len);
00063
00064 virtual bool implementsCall() const;
00065 virtual Value call(ExecState *exec, Object &thisObj, const List &args);
00066
00067 enum { ToString, ValueOf, CharAt, CharCodeAt, Concat, IndexOf, LastIndexOf,
00068 Match, Replace, Search, Slice, Split,
00069 Substr, Substring, FromCharCode, ToLowerCase, ToUpperCase
00070 #ifndef KJS_PURE_ECMA
00071 , Big, Small, Blink, Bold, Fixed, Italics, Strike, Sub, Sup,
00072 Fontcolor, Fontsize, Anchor, Link
00073 #endif
00074 };
00075 private:
00076 int id;
00077 };
00078
00084 class StringObjectImp : public InternalFunctionImp {
00085 public:
00086 StringObjectImp(ExecState *exec,
00087 FunctionPrototypeImp *funcProto,
00088 StringPrototypeImp *stringProto);
00089
00090 virtual bool implementsConstruct() const;
00091 virtual Object construct(ExecState *exec, const List &args);
00092 virtual bool implementsCall() const;
00093 virtual Value call(ExecState *exec, Object &thisObj, const List &args);
00094 };
00095
00102 class StringObjectFuncImp : public InternalFunctionImp {
00103 public:
00104 StringObjectFuncImp(ExecState *exec, FunctionPrototypeImp *funcProto);
00105 virtual bool implementsCall() const;
00106 virtual Value call(ExecState *exec, Object &thisObj, const List &args);
00107 };
00108
00109 }
00110
00111 #endif
00112
This file is part of the documentation for kdelibs Version 3.1.4.