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

kjs

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

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.