KJS::FunctionImp Class Reference

#include <internal.h>

Inheritance diagram for KJS::FunctionImp:

KJS::InternalFunctionImp KJS::ObjectImp KJS::ValueImp KJS::DeclaredFunctionImp List of all members.

Detailed Description

Implementation class for functions implemented in JS.

Definition at line 390 of file internal.h.


Public Member Functions

 FunctionImp (ExecState *exec, const Identifier &n=Identifier::null())
virtual ~FunctionImp ()
virtual Value get (ExecState *exec, const Identifier &propertyName) const
virtual void put (ExecState *exec, const Identifier &propertyName, const Value &value, int attr=None)
virtual bool hasProperty (ExecState *exec, const Identifier &propertyName) const
virtual bool deleteProperty (ExecState *exec, const Identifier &propertyName)
virtual bool implementsCall () const
virtual Value call (ExecState *exec, Object &thisObj, const List &args)
void addParameter (const Identifier &n)
Identifier parameterProperty (int index) const
UString parameterString () const
virtual CodeType codeType () const =0
virtual Completion execute (ExecState *exec)=0
int firstLine () const
int lastLine () const
int sourceId () const
virtual const ClassInfoclassInfo () const

Static Public Attributes

static const ClassInfo info = {"Function", &InternalFunctionImp::info, 0, 0}

Protected Attributes

Parameter * param
int line0
int line1
int sid

Friends

class ActivationImp

Member Function Documentation

Value FunctionImp::call ( ExecState exec,
Object thisObj,
const List args 
) [virtual]

Implementation of the [[Call]] internal property.

See also:
Object::call()

Reimplemented from KJS::ObjectImp.

Definition at line 347 of file function.cpp.

virtual const ClassInfo* KJS::FunctionImp::classInfo (  )  const [inline, virtual]

A pointer to a ClassInfo struct for this class.

This provides a basic facility for run-time type information, and can be used to check an object's class an inheritance (see inherits()). This should always return a statically declared pointer, or 0 to indicate that there is no class information.

This is primarily useful if you have application-defined classes that you wish to check against for casting purposes.

For example, to specify the class info for classes FooImp and BarImp, where FooImp inherits from BarImp, you would add the following in your class declarations:

   class BarImp : public ObjectImp {
     virtual const ClassInfo *classInfo() const { return &info; }
     static const ClassInfo info;
     // ...
   };

   class FooImp : public ObjectImp {
     virtual const ClassInfo *classInfo() const { return &info; }
     static const ClassInfo info;
     // ...
   };

And in your source file:

   const ClassInfo BarImp::info = {0, 0, 0}; // no parent class
   const ClassInfo FooImp::info = {&BarImp::info, 0, 0};

See also:
inherits()

Reimplemented from KJS::InternalFunctionImp.

Reimplemented in KJS::DeclaredFunctionImp.

Definition at line 415 of file internal.h.

bool FunctionImp::deleteProperty ( ExecState exec,
const Identifier propertyName 
) [virtual]

Implementation of the [[Delete]] internal property (implemented by all Objects).

See also:
Object::deleteProperty()

Reimplemented from KJS::ObjectImp.

Definition at line 540 of file function.cpp.

Value FunctionImp::get ( ExecState exec,
const Identifier propertyName 
) const [virtual]

Implementation of the [[Get]] internal property (implemented by all Objects).

See also:
Object::get()

Reimplemented from KJS::ObjectImp.

Definition at line 495 of file function.cpp.

bool FunctionImp::hasProperty ( ExecState exec,
const Identifier propertyName 
) const [virtual]

Implementation of the [[HasProperty]] internal property (implemented by all Objects).

See also:
Object::hasProperty()

Reimplemented from KJS::ObjectImp.

Definition at line 533 of file function.cpp.

void FunctionImp::put ( ExecState exec,
const Identifier propertyName,
const Value value,
int  attr = None 
) [virtual]

Implementation of the [[Put]] internal property (implemented by all Objects).

See also:
Object::put()

Reimplemented from KJS::ObjectImp.

Definition at line 526 of file function.cpp.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys