KJS::FunctionImp Class Reference
Implementation class for functions implemented in JS. More...
#include <internal.h>
Inheritance diagram for KJS::FunctionImp:

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 ClassInfo * | classInfo () 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 |
Detailed Description
Implementation class for functions implemented in JS.
Definition at line 390 of file internal.h.
Member Function Documentation
|
Implementation of the [[Get]] internal property (implemented by all Objects).
Reimplemented from KJS::ObjectImp. Definition at line 477 of file function.cpp. References KJS::ContextImp::activationObject(), KJS::argumentsPropertyName, KJS::ContextImp::callingContext(), KJS::ExecState::context(), KJS::ContextImp::function(), KJS::ObjectImp::get(), KJS::Context::imp(), KJS::lengthPropertyName, and param. Referenced by KJS::DeclaredFunctionImp::construct(). |
|
Implementation of the [[Put]] internal property (implemented by all Objects).
Reimplemented from KJS::ObjectImp. Definition at line 508 of file function.cpp. References KJS::argumentsPropertyName, KJS::lengthPropertyName, and KJS::ObjectImp::put(). Referenced by KJS::FunctionObjectImp::construct(), and KJS::FuncExprNode::evaluate(). |
|
Implementation of the [[HasProperty]] internal property (implemented by all Objects).
Reimplemented from KJS::ObjectImp. Definition at line 515 of file function.cpp. References KJS::argumentsPropertyName, KJS::ObjectImp::hasProperty(), and KJS::lengthPropertyName. |
|
Implementation of the [[Delete]] internal property (implemented by all Objects).
Reimplemented from KJS::ObjectImp. Definition at line 522 of file function.cpp. References KJS::argumentsPropertyName, KJS::ObjectImp::deleteProperty(), and KJS::lengthPropertyName. |
|
Implementation of the [[Call]] internal property.
Reimplemented from KJS::ObjectImp. Definition at line 329 of file function.cpp. References KJS::DebuggerImp::abort(), KJS::CString::c_str(), KJS::Completion::complType(), KJS::ExecState::context(), KJS::UString::cstring(), KJS::InterpreterImp::debugger(), KJS::Debugger::enterContext(), KJS::ExecState::exception(), KJS::Debugger::exitContext(), KJS::Interpreter::globalObject(), KJS::ExecState::hadException(), KJS::InternalFunctionImp::ident, KJS::Debugger::imp(), KJS::Context::imp(), KJS::Interpreter::imp(), KJS::ExecState::interpreter(), KJS::Identifier::isEmpty(), line0, line1, KJS::printInfo(), KJS::ExecState::setException(), KJS::ContextImp::setLines(), sid, KJS::Identifier::ustring(), and KJS::Completion::value(). Referenced by KJS::DeclaredFunctionImp::construct(). |
|
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};
Reimplemented from KJS::InternalFunctionImp. Reimplemented in KJS::DeclaredFunctionImp. Definition at line 415 of file internal.h. References info. |
The documentation for this class was generated from the following files: