Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
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#ifndef QV4MEMBERDATA_H
4#define QV4MEMBERDATA_H
5
6//
7// W A R N I N G
8// -------------
9//
10// This file is not part of the Qt API. It exists purely as an
11// implementation detail. This header file may change from version to
12// version without notice, or even be removed.
13//
14// We mean it.
15//
16
17#include "qv4global_p.h"
18#include "qv4managed_p.h"
19
21
22namespace QV4 {
23
24namespace Heap {
25
26#define MemberDataMembers(class, Member) \
27 Member(class, ValueArray, ValueArray, values)
28
32Q_STATIC_ASSERT(std::is_trivial_v<MemberData>);
33
34}
35
37{
40
41 const Value &operator[] (uint idx) const { return d()->values[idx]; }
42 const Value *data() const { return d()->values.data(); }
43 void set(EngineBase *e, uint index, Value v) { d()->values.set(e, index, v); }
44 void set(EngineBase *e, uint index, Heap::Base *b) { d()->values.set(e, index, b); }
45
46 inline uint size() const { return d()->values.size; }
47
48 static Heap::MemberData *allocate(QV4::ExecutionEngine *e, uint n, Heap::MemberData *old = nullptr);
49};
50
51}
52
54
55#endif
Combined button and popup list for selecting options.
#define Q_STATIC_ASSERT(Condition)
Definition qassert.h:108
GLboolean GLboolean GLboolean b
GLsizei const GLfloat * v
[13]
GLuint index
[2]
GLfloat n
unsigned int uint
Definition qtypes.h:34
#define V4_MANAGED(DataClass, superClass)
#define V4_INTERNALCLASS(c)
#define DECLARE_HEAP_OBJECT(name, base)
#define DECLARE_MARKOBJECTS(class)
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)
void set(EngineBase *e, uint index, Heap::Base *b)
uint size() const