• Skip to content
  • Skip to link menu
KDE 4.0 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KJS

KJS::FunctionObjectImp

KJS::FunctionObjectImp Class Reference

#include <function_object.h>

Inheritance diagram for KJS::FunctionObjectImp:

Inheritance graph
[legend]

List of all members.


Detailed Description

Definition at line 53 of file function_object.h.


Public Member Functions

 FunctionObjectImp (ExecState *, FunctionPrototype *)
virtual ~FunctionObjectImp ()
virtual bool implementsConstruct () const
virtual JSObject * construct (ExecState *, const List &args)
virtual JSObject * construct (ExecState *, const List &args, const Identifier &functionName, const UString &sourceURL, int lineNumber)
virtual JSValue * callAsFunction (ExecState *, JSObject *thisObj, const List &args)

Constructor & Destructor Documentation

FunctionObjectImp::FunctionObjectImp ( ExecState *  exec,
FunctionPrototype *  funcProto 
)

Definition at line 149 of file function_object.cpp.

FunctionObjectImp::~FunctionObjectImp (  )  [virtual]

Definition at line 158 of file function_object.cpp.


Member Function Documentation

bool FunctionObjectImp::implementsConstruct (  )  const [virtual]

Whether or not the object implements the construct() method.

If this returns false you should not call the construct() method on this object (typically, an assertion will fail to indicate this).

Returns:
true if this object implements the construct() method, otherwise false

Reimplemented from KJS::JSObject.

Definition at line 162 of file function_object.cpp.

JSObject * FunctionObjectImp::construct ( ExecState *  exec,
const List &  args 
) [virtual]

Creates a new object based on this object.

Typically this means the following: 1. A new object is created 2. The prototype of the new object is set to the value of this object's "prototype" property 3. The call() method of this object is called, with the new object passed as the this value 4. The new object is returned

In some cases, Host objects may differ from these semantics, although this is discouraged.

If an error occurs during construction, the execution state's exception will be set. This can be tested for with ExecState::hadException(). Under some circumstances, the exception object may also be returned.

Note: This function should not be called if implementsConstruct() returns false, in which case it will result in an assertion failure.

Parameters:
exec The current execution state
args The arguments to be passed to call() once the new object has been created
Returns:
The newly created & initialized object Implementation of the [[Construct]] internal property

Reimplemented from KJS::JSObject.

Definition at line 253 of file function_object.cpp.

JSObject * FunctionObjectImp::construct ( ExecState *  exec,
const List &  args,
const Identifier &  functionName,
const UString &  sourceURL,
int  lineNumber 
) [virtual]

Reimplemented from KJS::JSObject.

Definition at line 168 of file function_object.cpp.

JSValue * FunctionObjectImp::callAsFunction ( ExecState *  exec,
JSObject *  thisObj,
const List &  args 
) [virtual]

Implements KJS::InternalFunctionImp.

Definition at line 259 of file function_object.cpp.


The documentation for this class was generated from the following files:
  • function_object.h
  • function_object.cpp

KJS

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • KIO
  • KIOSlave
  • KJS
  •   WTF
  • KJSEmbed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  •   core
  • Phonon
  •   Backend
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal