• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • kjs
 

kjs

  • kjs
string_object.h
1/*
2 * This file is part of the KDE libraries
3 * Copyright (C) 1999-2000 Harri Porten (porten@kde.org)
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 *
19 */
20
21#ifndef _STRING_OBJECT_H_
22#define _STRING_OBJECT_H_
23
24#include "internal.h"
25#include "function_object.h"
26
27namespace KJS {
28
29 class StringInstanceImp : public ObjectImp {
30 public:
31 StringInstanceImp(ObjectImp *proto);
32 StringInstanceImp(ObjectImp *proto, const UString &string);
33
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);
39
40 virtual const ClassInfo *classInfo() const { return &info; }
41 static const ClassInfo info;
42 };
43
50 class StringPrototypeImp : public StringInstanceImp {
51 public:
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;
57 };
58
65 class StringProtoFuncImp : public InternalFunctionImp {
66 public:
67 StringProtoFuncImp(ExecState *exec, int i, int len);
68
69 virtual bool implementsCall() const;
70 virtual Value call(ExecState *exec, Object &thisObj, const List &args);
71
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
76#ifndef KJS_PURE_ECMA
77 , Big, Small, Blink, Bold, Fixed, Italics, Strike, Sub, Sup,
78 Fontcolor, Fontsize, Anchor, Link
79#endif
80 };
81 private:
82 int id;
83 };
84
90 class StringObjectImp : public InternalFunctionImp {
91 public:
92 StringObjectImp(ExecState *exec,
93 FunctionPrototypeImp *funcProto,
94 StringPrototypeImp *stringProto);
95
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);
100 };
101
108 class StringObjectFuncImp : public InternalFunctionImp {
109 public:
110 StringObjectFuncImp(ExecState *exec, FunctionPrototypeImp *funcProto);
111 virtual bool implementsCall() const;
112 virtual Value call(ExecState *exec, Object &thisObj, const List &args);
113 };
114
115} // namespace
116
117#endif
118

kjs

Skip menu "kjs"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

kjs

Skip menu "kjs"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for kjs by doxygen 1.9.4
This website is maintained by Timothy Pearson.