# kjs Library API Documentation

Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Namespaces | Source Files

# KJS::InternalFunctionImp Class Reference

Base class for all function objects. More...

`#include <function.h>`

Inheritance diagram for KJS::InternalFunctionImp:

[legend]
Collaboration diagram for KJS::InternalFunctionImp:

[legend]
List of all members.

## Public Member Functions

| InternalFunctionImp (FunctionPrototypeImp *funcProto)
| InternalFunctionImp (ExecState *exec)
bool | implementsHasInstance () const
Boolean | hasInstance (ExecState *exec, const Value &value)
virtual const ClassInfo * | classInfo () const
Identifier | name () const
void | setName (Identifier _ident)

## Static Public Attributes

static const ClassInfo | info = {"Function", 0, 0, 0}

## Protected Attributes

Identifier | ident

## Detailed Description

Base class for all function objects.

It implements the hasInstance method (for instanceof, which only applies to function objects) and allows to give the function a name, used in toString().

Constructors and prototypes of internal objects (implemented in C++) directly inherit from this. FunctionImp also does, for functions implemented in JS.

Definition at line 41 of file function.h.

## Constructor & Destructor Documentation

InternalFunctionImp::InternalFunctionImp | ( | FunctionPrototypeImp * | funcProto | ) |

| Constructor. For C++-implemented functions, `funcProto` is usually static_cast<FunctionPrototypeImp*>(exec->interpreter()->builtinFunctionPrototype().imp()) Definition at line 967 of file internal.cpp.

## Member Function Documentation

void KJS::InternalFunctionImp::setName | ( | Identifier | _ident | ) | `[inline]`

| You might want to use the helper function ObjectImp::setFunctionName for this. Definition at line 57 of file function.h.

The documentation for this class was generated from the following files:

- function.h
- internal.cpp

This file is part of the documentation for kjs Library Version 3.4.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat Jun 11 20:23:10 2005 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003