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

kjs

  • kjs
function_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 _FUNCTION_OBJECT_H_
23 #define _FUNCTION_OBJECT_H_
24 
25 #include "internal.h"
26 #include "object_object.h"
27 #include "function.h"
28 
29 namespace KJS {
30 
35  class FunctionPrototypeImp : public InternalFunctionImp {
36  public:
37  FunctionPrototypeImp(ExecState *exec);
38  virtual ~FunctionPrototypeImp();
39 
40  virtual bool implementsCall() const;
41  virtual Value call(ExecState *exec, Object &thisObj, const List &args);
42  };
43 
50  class FunctionProtoFuncImp : public InternalFunctionImp {
51  public:
52  FunctionProtoFuncImp(ExecState *exec,
53  FunctionPrototypeImp *funcProto, int i, int len, const Identifier &_ident);
54 
55  virtual bool implementsCall() const;
56  virtual Value call(ExecState *exec, Object &thisObj, const List &args);
57 
58  enum { ToString, Apply, Call };
59  private:
60  int id;
61  };
62 
68  class FunctionObjectImp : public InternalFunctionImp {
69  public:
70  FunctionObjectImp(ExecState *exec, FunctionPrototypeImp *funcProto);
71  virtual ~FunctionObjectImp();
72 
73  virtual bool implementsConstruct() const;
74  virtual Object construct(ExecState *exec, const List &args);
75  virtual bool implementsCall() const;
76  virtual Value call(ExecState *exec, Object &thisObj, const List &args);
77  };
78 
79 } // namespace
80 
81 #endif // _FUNCTION_OBJECT_H_
KJS::Value
Value objects are act as wrappers ("smart pointers") around ValueImp objects and their descendents...
Definition: value.h:168
KJS::InternalFunctionImp
Base class for all function objects.
Definition: function.h:41
KJS::FunctionPrototypeImp
The initial value of Function.prototype (and thus all objects created with the Function constructor) ...
Definition: function_object.h:35
KJS::Object
Represents an Object.
Definition: object.h:82
KJS
Definition: array_instance.h:28
KJS::List
Native list type.
Definition: list.h:48
KJS::ExecState
Represents the current state of script execution.
Definition: interpreter.h:439
KJS::Identifier
Represents an Identifier for a Javascript object.
Definition: identifier.h:32

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