KJS::DeclaredFunctionImp Class Reference

Inheritance diagram for KJS::DeclaredFunctionImp:

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

Detailed Description

Definition at line 428 of file internal.h.


Public Member Functions

 DeclaredFunctionImp (ExecState *exec, const Identifier &n, FunctionBodyNode *b, const ScopeChain &sc)
 ~DeclaredFunctionImp ()
bool implementsConstruct () const
Object construct (ExecState *exec, const List &args)
virtual Completion execute (ExecState *exec)
CodeType codeType () const
virtual const ClassInfoclassInfo () const

Public Attributes

FunctionBodyNodebody

Static Public Attributes

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

Member Function Documentation

virtual const ClassInfo* KJS::DeclaredFunctionImp::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::FunctionImp.

Definition at line 441 of file internal.h.

Object DeclaredFunctionImp::construct ( ExecState exec,
const List args 
) [virtual]

Implementation of the [[Construct]] internal property.

See also:
Object::construct()

Reimplemented from KJS::ObjectImp.

Definition at line 576 of file function.cpp.


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