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

kjs

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

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.8.1.2
This website is maintained by Timothy Pearson.