21 #ifndef _STRING_OBJECT_H_
22 #define _STRING_OBJECT_H_
25 #include "function_object.h"
29 class StringInstanceImp :
public ObjectImp {
31 StringInstanceImp(ObjectImp *proto);
32 StringInstanceImp(ObjectImp *proto,
const UString &
string);
34 virtual Value get(ExecState *exec,
const Identifier &propertyName)
const;
35 virtual void put(ExecState *exec,
const Identifier &propertyName,
const Value &value,
int attr = None);
36 virtual bool hasProperty(ExecState *exec,
const Identifier &propertyName)
const;
37 virtual bool deleteProperty(ExecState *exec,
const Identifier &propertyName);
38 virtual ReferenceList propList(ExecState *exec,
bool recursive);
40 virtual const ClassInfo *classInfo()
const {
return &info; }
41 static const ClassInfo info;
50 class StringPrototypeImp :
public StringInstanceImp {
52 StringPrototypeImp(ExecState *exec,
53 ObjectPrototypeImp *objProto);
54 Value get(ExecState *exec,
const Identifier &p)
const;
55 virtual const ClassInfo *classInfo()
const {
return &info; }
56 static const ClassInfo info;
65 class StringProtoFuncImp :
public InternalFunctionImp {
67 StringProtoFuncImp(ExecState *exec,
int i,
int len);
69 virtual bool implementsCall()
const;
70 virtual Value call(ExecState *exec, Object &thisObj,
const List &args);
72 enum { ToString, ValueOf, CharAt, CharCodeAt, Concat, IndexOf, LastIndexOf,
73 Match, Replace, Search, Slice, Split,
74 Substr, Substring, FromCharCode, ToLowerCase, ToUpperCase,
75 ToLocaleLowerCase, ToLocaleUpperCase, LocaleCompare
77 , Big, Small, Blink, Bold, Fixed, Italics, Strike, Sub, Sup,
78 Fontcolor, Fontsize, Anchor, Link
90 class StringObjectImp :
public InternalFunctionImp {
92 StringObjectImp(ExecState *exec,
93 FunctionPrototypeImp *funcProto,
94 StringPrototypeImp *stringProto);
96 virtual bool implementsConstruct()
const;
97 virtual Object construct(ExecState *exec,
const List &args);
98 virtual bool implementsCall()
const;
99 virtual Value call(ExecState *exec, Object &thisObj,
const List &args);
108 class StringObjectFuncImp :
public InternalFunctionImp {
110 StringObjectFuncImp(ExecState *exec, FunctionPrototypeImp *funcProto);
111 virtual bool implementsCall()
const;
112 virtual Value call(ExecState *exec, Object &thisObj,
const List &args);