4#ifndef QQMLTYPEWRAPPER_P_H
5#define QQMLTYPEWRAPPER_P_H
18#include <QtCore/qglobal.h>
19#include <QtCore/qpointer.h>
21#include <private/qv4value_p.h>
22#include <private/qv4functionobject_p.h>
23#include <private/qv4qmetaobjectwrapper_p.h>
27class QQmlTypeNameCache;
58 QQmlType
type()
const;
60 Kind kind()
const {
return Kind(flags & KindMask); }
63 const QMetaObject *metaObject, QMetaType metaType)
66 if (!t.constructors && metaObject) {
67 t.constructors = QMetaObjectWrapper::createConstructors(metaObject, metaType);
70 return t.constructors;
75 const QV4::String *name, QV4::ExecutionEngine *engine)
const;
97 void init() { Object::init(); }
99 QQmlType
type()
const;
122 static void initProto(ExecutionEngine *v4);
132 static int virtualMetacall(Object *object, QMetaObject::Call call,
int index,
void **a);
141 static bool virtualPut(Managed *m, PropertyKey id,
const Value &value, Value *receiver);
149 static ReturnedValue method_toString(
150 const FunctionObject *b,
const Value *thisObject,
const Value *,
int);
168 V4_OBJECT2(QQmlEnumWrapper, Object)
171 static ReturnedValue virtualGet(
const Managed *m, PropertyKey id,
const Value *receiver,
bool *hasProperty);
QQmlTypeWrapper QQmlTypeConstructor
static ReturnedValue createEnumWrapper(ExecutionEngine *v4, Scope &scope, QQmlType type, int enumIndex, bool scoped)
static int enumForSingleton(QQmlTypeLoader *typeLoader, String *name, const QQmlType &type, bool *ok)
DEFINE_OBJECT_VTABLE(QQmlTypeWrapper)
static ReturnedValue instanceOfQObject(const QV4::QQmlTypeWrapper *typeWrapper, QObject *wrapperObject)
DEFINE_OBJECT_VTABLE(QQmlTypeConstructor)
void warnWithLocation(const Heap::QQmlTypeWrapper *wrapper, Callback &&callback)
const QQmlTypePrivate * typePrivate
void init(TypeNameMode m, QObject *o, QQmlTypeNameCache *type, const QQmlImportRef *import)
const QQmlPropertyData * constructors
QQmlTypeNameCache * typeNamespace
void warnIfUncreatable() const
QMetaType metaType() const
QQmlTypeNameCache::Result queryNamespace(const QV4::String *name, QV4::ExecutionEngine *engine) const
const QMetaObject * metaObject() const
const QQmlTypePrivate * typePrivate
void init(TypeNameMode m, QObject *o, const QQmlTypePrivate *type)
const QQmlImportRef * importNamespace
QV4QPointer< QObject > object
TypeNameMode typeNameMode() const
const QQmlPropertyData * ensureConstructorsCache(const QMetaObject *metaObject, QMetaType metaType)
static ReturnedValue lookupSingletonMethod(Lookup *l, ExecutionEngine *engine, const Value &base)
static bool virtualPut(Managed *m, PropertyKey id, const Value &value, Value *receiver)
static ReturnedValue create(ExecutionEngine *, QObject *, const QQmlRefPointer< QQmlTypeNameCache > &, const QQmlImportRef *, Heap::QQmlTypeWrapper::TypeNameMode=Heap::QQmlTypeWrapper::IncludeEnums)
static ReturnedValue create(ExecutionEngine *, QObject *, const QQmlType &, Heap::QQmlTypeWrapper::TypeNameMode=Heap::QQmlTypeWrapper::IncludeEnums)
static OwnPropertyKeyIterator * virtualOwnPropertyKeys(const Object *m, Value *target)
V4_NEEDS_DESTROY bool isSingleton() const
QObject * singletonObject() const
const QMetaObject * metaObject() const
static int virtualMetacall(Object *object, QMetaObject::Call call, int index, void **a)
static bool virtualResolveLookupSetter(Object *object, ExecutionEngine *engine, Lookup *lookup, const Value &value)
static ReturnedValue virtualInstanceOf(const Object *typeObject, const Value &var)
static ReturnedValue lookupEnum(Lookup *l, ExecutionEngine *engine, const Value &base)
static PropertyAttributes virtualGetOwnProperty(const Managed *m, PropertyKey id, Property *p)
static ReturnedValue lookupEnumValue(Lookup *l, ExecutionEngine *engine, const Value &base)
static void initProto(ExecutionEngine *v4)
static ReturnedValue lookupSingletonProperty(Lookup *l, ExecutionEngine *engine, const Value &base)
static bool virtualIsEqualTo(Managed *that, Managed *o)
static ReturnedValue virtualResolveLookupGetter(const Object *object, ExecutionEngine *engine, Lookup *lookup)
QVariant toVariant() const