22 #ifndef _STRING_OBJECT_H_
23 #define _STRING_OBJECT_H_
26 #include "function_object.h"
30 class StringInstanceImp :
public ObjectImp {
32 StringInstanceImp(ObjectImp *proto);
33 StringInstanceImp(ObjectImp *proto,
const UString &
string);
35 virtual Value get(ExecState *exec,
const Identifier &propertyName)
const;
36 virtual void put(ExecState *exec,
const Identifier &propertyName,
const Value &value,
int attr = None);
37 virtual bool hasProperty(ExecState *exec,
const Identifier &propertyName)
const;
38 virtual bool deleteProperty(ExecState *exec,
const Identifier &propertyName);
39 virtual ReferenceList propList(ExecState *exec,
bool recursive);
41 virtual const ClassInfo *classInfo()
const {
return &info; }
42 static const ClassInfo info;
51 class StringPrototypeImp :
public StringInstanceImp {
53 StringPrototypeImp(ExecState *exec,
54 ObjectPrototypeImp *objProto);
55 Value get(ExecState *exec,
const Identifier &p)
const;
56 virtual const ClassInfo *classInfo()
const {
return &info; }
57 static const ClassInfo info;
66 class StringProtoFuncImp :
public InternalFunctionImp {
68 StringProtoFuncImp(ExecState *exec,
int i,
int len);
70 virtual bool implementsCall()
const;
71 virtual Value call(ExecState *exec, Object &thisObj,
const List &args);
73 enum { ToString, ValueOf, CharAt, CharCodeAt, Concat, IndexOf, LastIndexOf,
74 Match, Replace, Search, Slice, Split,
75 Substr, Substring, FromCharCode, ToLowerCase, ToUpperCase,
76 ToLocaleLowerCase, ToLocaleUpperCase, LocaleCompare
78 , Big, Small, Blink, Bold, Fixed, Italics, Strike, Sub, Sup,
79 Fontcolor, Fontsize, Anchor, Link
91 class StringObjectImp :
public InternalFunctionImp {
93 StringObjectImp(ExecState *exec,
94 FunctionPrototypeImp *funcProto,
95 StringPrototypeImp *stringProto);
97 virtual bool implementsConstruct()
const;
98 virtual Object construct(ExecState *exec,
const List &args);
99 virtual bool implementsCall()
const;
100 virtual Value call(ExecState *exec, Object &thisObj,
const List &args);
109 class StringObjectFuncImp :
public InternalFunctionImp {
111 StringObjectFuncImp(ExecState *exec, FunctionPrototypeImp *funcProto);
112 virtual bool implementsCall()
const;
113 virtual Value call(ExecState *exec, Object &thisObj,
const List &args);