Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qv4memberdata_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3// Qt-Security score:significant reason:default
4#ifndef QV4MEMBERDATA_H
5#define QV4MEMBERDATA_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include "qv4global_p.h"
19#include "qv4managed_p.h"
20
22
23namespace QV4 {
24
25namespace Heap {
26
27#define MemberDataMembers(class, Member)
28 Member(class, ValueArray, ValueArray, values)
29
30DECLARE_HEAP_OBJECT(MemberData, Base) {
31 DECLARE_MARKOBJECTS(MemberData)
32};
35
36}
37
39{
40 V4_MANAGED(MemberData, Managed)
41 Q_MANAGED_TYPE(MemberData)
42 V4_INTERNALCLASS(MemberData)
43
44 const Value &operator[] (uint idx) const { return d()->values[idx]; }
45 const Value *data() const { return d()->values.data(); }
46 void set(EngineBase *e, uint index, Value v) { d()->values.set(e, index, v); }
47 void set(EngineBase *e, uint index, Heap::Base *b) { d()->values.set(e, index, b); }
48
49 inline uint size() const { return d()->values.size; }
50
51 static Heap::MemberData *allocate(QV4::ExecutionEngine *e, uint n, Heap::MemberData *old = nullptr);
52};
53
54}
55
56QT_END_NAMESPACE
57
58#endif
ReturnedValue operator*() const
Definition qv4value_p.h:478
OptionalReturnedValue(ReturnedValue v)
Definition qv4value_p.h:471
ReturnedValue operator->() const
Definition qv4value_p.h:477
Combined button and popup list for selecting options.
DECLARE_HEAP_OBJECT(StrictArgumentsObject, Object)
DECLARE_EXPORTED_HEAP_OBJECT(Object, Base)
Definition qv4object_p.h:37
DECLARE_HEAP_OBJECT(ArgumentsObject, Object)
DECLARE_HEAP_OBJECT(MemberData, Base)
CallResultDestination
Definition qjsvalue.h:24
Value Primitive
Definition qv4value_p.h:352
Scoped< FunctionObject > ScopedFunctionObject
int qYouForgotTheQ_MANAGED_Macro(T, T)
QList< StackFrame > StackTrace
Scoped< Object > ScopedObject
ReturnedValue value_convert(ExecutionEngine *e, const Value &v)
Scoped< ArrayObject > ScopedArrayObject
Scoped< String > ScopedString
Scoped< StringOrSymbol > ScopedStringOrSymbol
void qYouForgotTheQ_MANAGED_Macro(T1, T2)
PropertyFlag
@ Attr_Invalid
@ Attr_NotConfigurable
@ Attr_Data
@ Attr_NotEnumerable
@ Attr_ReadOnly
@ Attr_NotWritable
@ Attr_ReadOnly_ButConfigurable
@ Attr_Accessor
Q_STATIC_ASSERT(sizeof(CppStackFrame)==sizeof(JSTypesStackFrame))
Scoped< ExecutionContext > ScopedContext
Q_DECLARE_TYPEINFO(QDateTime::Data, Q_RELOCATABLE_TYPE)
DEFINE_OBJECT_VTABLE(StrictArgumentsObject)
DEFINE_OBJECT_VTABLE(ArgumentsObject)
#define V4_MANAGED(DataClass, superClass)
#define V4_MANAGED_SIZE_TEST
#define V4_NEEDS_DESTROY
#define V4_MANAGED_ITSELF(DataClass, superClass)
#define Q_MANAGED_TYPE(type)
#define V4_INTERNALCLASS(c)
#define Q_MANAGED_CHECK
static qint64 virtualGetLength(const Managed *m)
static bool virtualDefineOwnProperty(Managed *m, PropertyKey id, const Property *desc, PropertyAttributes attrs)
Heap::CallContext * context() const
static ReturnedValue virtualGet(const Managed *m, PropertyKey id, const Value *receiver, bool *hasProperty)
static OwnPropertyKeyIterator * virtualOwnPropertyKeys(const Object *m, Value *target)
static bool isNonStrictArgumentsObject(Managed *m)
static bool virtualDeleteProperty(Managed *m, PropertyKey id)
static PropertyAttributes virtualGetOwnProperty(const Managed *m, PropertyKey id, Property *p)
bool isMapped(uint arg) const
static bool virtualPut(Managed *m, PropertyKey id, const Value &value, Value *receiver)
static bool virtualDefineOwnProperty(Managed *m, PropertyKey id, const Property *p, PropertyAttributes attrs)
static qint64 virtualGetLength(const Managed *m)
QStringList toQStringList() const
static constexpr size_t offset
Definition qv4value_p.h:409
void set(EngineBase *e, HeapBasePtr b)
Definition qv4value_p.h:419
HeapBasePtr base()
Definition qv4value_p.h:410
void set(EngineBase *e, const Value &newVal)
Definition qv4value_p.h:416
void init(const QStringList &list)
void init(double val)
static Heap::MemberData * allocate(QV4::ExecutionEngine *e, uint n, Heap::MemberData *old=nullptr)
const Value * data() const
void set(EngineBase *e, uint index, Value v)
const Value & operator[](uint idx) const
void set(EngineBase *e, uint index, Heap::Base *b)
uint size() const
PropertyKey next(const Object *o, Property *pd=nullptr, PropertyAttributes *attrs=nullptr) override
const Value * data() const
Definition qv4value_p.h:451
Value values[1]
Definition qv4value_p.h:432
void set(EngineBase *e, uint index, Value v)
Definition qv4value_p.h:441
void set(EngineBase *e, uint index, Value::HeapBasePtr b)
Definition qv4value_p.h:444
void mark(MarkStack *markStack)
Definition qv4value_p.h:455
Value::HeapBasePtr base()
Definition qv4value_p.h:434
const Value & operator[](uint index) const
Definition qv4value_p.h:447
static constexpr size_t offset
Definition qv4value_p.h:429