KJSEmbed
KJSEmbed::StaticConstructor Class Reference
#include <static_binding.h>

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 | |||
| ) |
Member Function Documentation
| void KJSEmbed::StaticConstructor::addStaticMethods | ( | KJS::ExecState * | exec, | |
| const Method * | methods | |||
| ) |
Add static methods to the object.
KJS::JSObject *ctor = StaticConstructor::add( exec, parent, TestPointer::constructor() ); // Ctor ctor.addStaticMethods( exec, TestPointer::staticMethods() );
| bool KJSEmbed::StaticConstructor::implementsConstruct | ( | ) | const [inline, virtual] |
| KJS::JSObject * StaticConstructor::construct | ( | KJS::ExecState * | exec, | |
| const KJS::List & | args | |||
| ) | [virtual] |
Calls the callback that will in turn create a new instance of this object with the arguments passed in with args.
Reimplemented from KJS::JSObject.
Definition at line 79 of file static_binding.cpp.
| KJS::JSValue* KJSEmbed::StaticConstructor::callAsFunction | ( | KJS::ExecState * | exec, | |
| KJS::JSObject * | , | |||
| const KJS::List & | args | |||
| ) | [inline, virtual] |
| void StaticConstructor::setDefaultValue | ( | KJS::JSValue * | value | ) |
Definition at line 84 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.
| KJS::JSObject * StaticConstructor::add | ( | KJS::ExecState * | exec, | |
| KJS::JSObject * | object, | |||
| const Constructor * | constructor | |||
| ) | [static] |
Add the constructor to an object.
This is usually the global scope.
Definition at line 96 of file static_binding.cpp.
| KJS::JSObject * StaticConstructor::construct | ( | KJS::ExecState * | exec, | |
| KJS::JSObject * | parent, | |||
| const KJS::UString & | className, | |||
| const KJS::List & | args = KJS::List() | |||
| ) | [static] |
This method is used to construct a KJS value from C++.
is equivelent to the following javascript
var myType = new MyType("test");
Definition at line 140 of file static_binding.cpp.
| KJS::JSObject * StaticConstructor::bind | ( | KJS::ExecState * | exec, | |
| const QString & | className, | |||
| PointerBase & | objPtr | |||
| ) | [static] |
Definition at line 130 of file static_binding.cpp.
| const Method * StaticConstructor::methods | ( | const KJS::UString & | className | ) | [static] |
Definition at line 120 of file static_binding.cpp.
| const Constructor * StaticConstructor::constructor | ( | const KJS::UString & | className | ) | [static] |
Definition at line 125 of file static_binding.cpp.
Member Data Documentation
const Constructor* KJSEmbed::StaticConstructor::m_constructor [protected] |
Definition at line 124 of file static_binding.h.
The documentation for this class was generated from the following files:
KDE 4.0 API Reference