kjsembed
#include <static_binding.h>
Inherits InternalFunctionImp.
Public Member Functions | |
StaticConstructor (KJS::ExecState *exec, const Constructor *constructor) | |
void | addStaticMethods (KJS::ExecState *exec, const Method *methods) |
KJS::JSValue * | callAsFunction (KJS::ExecState *exec, KJS::JSObject *, const KJS::List &args) |
KJS::JSObject * | construct (KJS::ExecState *exec, const KJS::List &args) |
KJS::JSValue * | defaultValue (KJS::ExecState *exec, KJS::JSType hint) const |
bool | implementsConstruct () const |
void | setDefaultValue (KJS::JSValue *value) |
Static Public Member Functions | |
static KJS::JSObject * | add (KJS::ExecState *exec, KJS::JSObject *object, const Constructor *constructor) |
static KJS::JSObject * | bind (KJS::ExecState *exec, const QString &className, PointerBase &objPtr) |
static KJS::JSObject * | construct (KJS::ExecState *exec, KJS::JSObject *parent, const KJS::UString &className, const KJS::List &args=KJS::List()) |
static const Constructor * | constructor (const KJS::UString &className) |
static const Method * | methods (const KJS::UString &className) |
Protected Attributes | |
const Constructor * | m_constructor |
Detailed Description
A special method that will create other objects.
If you want to have your binding to be able to create instances of itself it must have at least one of these objects published at the global scope.
Definition at line 68 of file static_binding.h.
Constructor & Destructor Documentation
StaticConstructor::StaticConstructor | ( | KJS::ExecState * | exec, |
const Constructor * | constructor | ||
) |
Create a new constructor.
Definition at line 70 of file static_binding.cpp.
Member Function Documentation
|
static |
Add the constructor to an object.
This is usually the global scope.
Definition at line 96 of file static_binding.cpp.
void KJSEmbed::StaticConstructor::addStaticMethods | ( | KJS::ExecState * | exec, |
const Method * | methods | ||
) |
Add static methods to the object.
|
static |
Definition at line 130 of file static_binding.cpp.
|
inline |
Definition at line 93 of file static_binding.h.
KJS::JSObject * StaticConstructor::construct | ( | KJS::ExecState * | exec, |
const KJS::List & | args | ||
) |
Calls the callback that will in turn create a new instance of this object with the arguments passed in with args.
Definition at line 79 of file static_binding.cpp.
|
static |
This method is used to construct a KJS value from C++.
is equivelent to the following javascript
Definition at line 140 of file static_binding.cpp.
|
static |
Definition at line 125 of file static_binding.cpp.
KJS::JSValue * StaticConstructor::defaultValue | ( | KJS::ExecState * | exec, |
KJS::JSType | hint | ||
) | const |
Definition at line 89 of file static_binding.cpp.
|
inline |
Definition at line 86 of file static_binding.h.
|
static |
Definition at line 120 of file static_binding.cpp.
void StaticConstructor::setDefaultValue | ( | KJS::JSValue * | value | ) |
Definition at line 84 of file static_binding.cpp.
Member Data Documentation
|
protected |
Definition at line 124 of file static_binding.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:22:53 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.