27 #include "../api/qscriptengine.h" 28 #include "../api/qscriptengine_p.h" 29 #include "../api/qscriptcontext.h" 30 #include "../api/qscriptcontext_p.h" 31 #include "../api/qscriptclass.h" 32 #include "../api/qscriptclasspropertyiterator.h" 35 #include "PropertyNameArray.h" 37 #include <QtCore/qstringlist.h> 50 : m_class(c), m_object(o)
66 const JSC::Identifier &propertyName,
67 JSC::PropertySlot &slot)
73 QScriptClass::QueryFlags flags =
78 slot.setValue((
const JSC::JSValue &)val);
87 const JSC::Identifier &propertyName,
88 JSC::JSValue value, JSC::PutPropertySlot &slot)
96 QScriptClass::QueryFlags flags =
109 const JSC::Identifier &propertyName)
115 JSC::PropertyNameArray &propertyNames,
116 JSC::EnumerationMode mode)
119 for (
int ii = 0; ii < properties.
count(); ++ii) {
121 propertyNames.add(JSC::Identifier(exec, name));
130 return JSC::CallTypeNone;
131 callData.native.function =
call;
132 return JSC::CallTypeHost;
136 JSC::JSValue thisValue,
const JSC::ArgList &args)
139 return JSC::throwError(exec, JSC::TypeError,
"callee is not a DeclarativeObject object");
143 return JSC::throwError(exec, JSC::TypeError,
"callee is not a DeclarativeObject object");
154 scriptClass->
call(static_cast<DeclarativeObjectDelegate*>(delegate)->
m_object, ctxt);
157 return (JSC::JSValue &)(result);
166 JSC::JSValue value, JSC::JSValue proto)
virtual Type type() const
The QScriptContext class represents a Qt Script function invocation.
virtual Value call(Object *, QScriptContext *)
virtual void getOwnPropertyNames(QScriptObject *, JSC::ExecState *, JSC::PropertyNameArray &, JSC::EnumerationMode mode=JSC::ExcludeDontEnumProperties)
virtual JSC::ConstructType getConstructData(QScriptObject *, JSC::ConstructData &)
virtual bool deleteProperty(QScriptObject *, JSC::ExecState *, const JSC::Identifier &propertyName)
QScriptEnginePrivate * scriptEngineFromExec(const JSC::ExecState *exec)
virtual void getOwnPropertyNames(QScriptObject *, JSC::ExecState *, JSC::PropertyNameArray &, JSC::EnumerationMode mode=JSC::ExcludeDontEnumProperties)
virtual Type type() const =0
virtual bool hasInstance(QScriptObject *, JSC::ExecState *, JSC::JSValue value, JSC::JSValue proto)
#define QT_END_NAMESPACE
This macro expands to.
bool compareToObject(QScriptObject *, JSC::ExecState *, JSC::JSObject *)
JSC::CallFrame * pushContext(JSC::CallFrame *exec, JSC::JSValue thisObject, const JSC::ArgList &args, JSC::JSObject *callee, bool calledAsConstructor=false, bool clearScopeChain=false)
JSC native function doesn't have different stackframe or context.
QScriptDeclarativeClass * m_class
QScriptObjectDelegate * delegate() const
int count(const T &t) const
Returns the number of occurrences of value in the list.
static const JSC::ClassInfo info
The QString class provides a Unicode character string.
virtual void put(QScriptObject *, JSC::ExecState *exec, const JSC::Identifier &propertyName, JSC::JSValue, JSC::PutPropertySlot &)
virtual void put(QScriptObject *, JSC::ExecState *exec, const JSC::Identifier &propertyName, JSC::JSValue, JSC::PutPropertySlot &)
virtual JSC::ConstructType getConstructData(QScriptObject *, JSC::ConstructData &)
The QScriptDeclarativeClass::Value class acts as a container for JavaScript data types.
virtual void setProperty(Object *, const Identifier &name, const QScriptValue &)
JSC::ExecState * currentFrame
virtual bool compare(Object *, Object *)
#define QT_BEGIN_NAMESPACE
This macro expands to.
virtual QScriptClass::QueryFlags queryProperty(Object *, const Identifier &, QScriptClass::QueryFlags flags)
static QScriptDeclarativeClassPrivate * get(QScriptDeclarativeClass *c)
static QScriptContext * contextForFrame(JSC::ExecState *frame)
const T & at(int i) const
Returns the item at index position i in the list.
virtual bool hasInstance(QScriptObject *, JSC::ExecState *, JSC::JSValue value, JSC::JSValue proto)
The QStringList class provides a list of strings.
virtual bool deleteProperty(QScriptObject *, JSC::ExecState *, const JSC::Identifier &propertyName)
~DeclarativeObjectDelegate()
virtual bool getOwnPropertySlot(QScriptObject *, JSC::ExecState *, const JSC::Identifier &propertyName, JSC::PropertySlot &)
virtual bool getOwnPropertySlot(QScriptObject *, JSC::ExecState *, const JSC::Identifier &propertyName, JSC::PropertySlot &)
static JSC::JSValue JSC_HOST_CALL call(JSC::ExecState *, JSC::JSObject *, JSC::JSValue, const JSC::ArgList &)
static const QCssKnownValue properties[NumProperties - 1]
QScriptValue scriptValueFromJSCValue(JSC::JSValue value)
QScriptDeclarativeClass * scriptClass() const
The QScriptValue class acts as a container for the Qt Script data types.
DeclarativeObjectDelegate(QScriptDeclarativeClass *c, QScriptDeclarativeClass::Object *o)
static QScriptValue property(const QScriptValue &, const Identifier &)
virtual JSC::CallType getCallData(QScriptObject *, JSC::CallData &)
virtual QStringList propertyNames(Object *)
QScriptDeclarativeClass::Object * m_object