KJS
KJS::InternalFunctionImp Class Reference
#include <function.h>

Detailed Description
Definition at line 39 of file function.h.
Public Member Functions | |
| InternalFunctionImp () | |
| InternalFunctionImp (FunctionPrototype *) | |
| InternalFunctionImp (FunctionPrototype *, const Identifier &) | |
| virtual bool | implementsCall () const |
| virtual JSValue * | callAsFunction (ExecState *, JSObject *thisObjec, const List &args)=0 |
| virtual bool | implementsHasInstance () const |
| virtual const ClassInfo * | classInfo () const |
| const Identifier & | functionName () const |
| void | setFunctionName (const Identifier &name) |
Static Public Attributes | |
| static const ClassInfo | info = {"Function", 0, 0, 0} |
Constructor & Destructor Documentation
| KJS::InternalFunctionImp::InternalFunctionImp | ( | ) |
Definition at line 213 of file internal.cpp.
| KJS::InternalFunctionImp::InternalFunctionImp | ( | FunctionPrototype * | funcProto | ) |
Definition at line 217 of file internal.cpp.
| KJS::InternalFunctionImp::InternalFunctionImp | ( | FunctionPrototype * | funcProto, | |
| const Identifier & | name | |||
| ) |
Definition at line 222 of file internal.cpp.
Member Function Documentation
| bool KJS::InternalFunctionImp::implementsCall | ( | ) | const [virtual] |
Whether or not the object implements the call() method.
If this returns false you should not call the call() method on this object (typically, an assertion will fail to indicate this).
- Returns:
- true if this object implements the call() method, otherwise false
Reimplemented from KJS::JSObject.
Definition at line 228 of file internal.cpp.
| virtual JSValue* KJS::InternalFunctionImp::callAsFunction | ( | ExecState * | , | |
| JSObject * | thisObjec, | |||
| const List & | args | |||
| ) | [pure virtual] |
Reimplemented from KJS::JSObject.
Implemented in KJS::ArrayProtoFunc, KJS::ArrayObjectImp, KJS::BooleanProtoFunc, KJS::BooleanObjectImp, KJS::DateProtoFunc, KJS::DateObjectImp, KJS::ErrorProtoFunc, KJS::ErrorObjectImp, KJS::NativeErrorImp, KJS::FunctionPrototype, KJS::GlobalFuncImp, KJS::FunctionProtoFunc, KJS::FunctionObjectImp, KJS::MathFuncImp, KJS::NumberProtoFunc, KJS::NumberObjectImp, KJS::ObjectProtoFunc, KJS::ObjectObjectImp, KJS::RegExpProtoFunc, KJS::RegExpObjectImp, KJS::FunctionImp, KJS::StringProtoFunc, KJS::StringObjectImp, and KJS::StringObjectFuncImp.
| bool KJS::InternalFunctionImp::implementsHasInstance | ( | ) | const [virtual] |
Whether or not the object implements the hasInstance() method.
If this returns false you should not call the hasInstance() method on this object (typically, an assertion will fail to indicate this).
- Returns:
- true if this object implements the hasInstance() method, otherwise false
Reimplemented from KJS::JSObject.
Definition at line 233 of file internal.cpp.
| virtual const ClassInfo* KJS::InternalFunctionImp::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 JSObject { virtual const ClassInfo *classInfo() const { return &info; } static const ClassInfo info; // ... }; class FooImp : public JSObject { virtual const ClassInfo *classInfo() const { return &info; } static const ClassInfo info; // ... };
And in your source file:
const ClassInfo BarImp::info = {"Bar", 0, 0, 0}; // no parent class const ClassInfo FooImp::info = {"Foo", &BarImp::info, 0, 0};
- See also:
- inherits()
Reimplemented from KJS::JSObject.
Reimplemented in KJS::NativeErrorImp, KJS::NumberObjectImp, KJS::RegExpObjectImp, KJS::FunctionImp, and KJS::DeclaredFunctionImp.
Definition at line 49 of file function.h.
| const Identifier& KJS::InternalFunctionImp::functionName | ( | ) | const [inline] |
Definition at line 51 of file function.h.
| void KJS::InternalFunctionImp::setFunctionName | ( | const Identifier & | name | ) | [inline] |
Definition at line 52 of file function.h.
Member Data Documentation
const ClassInfo KJS::InternalFunctionImp::info = {"Function", 0, 0, 0} [static] |
Reimplemented in KJS::NativeErrorImp, KJS::NumberObjectImp, KJS::FunctionImp, and KJS::DeclaredFunctionImp.
Definition at line 50 of file function.h.
The documentation for this class was generated from the following files:
KDE 4.0 API Reference