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
qv4stringiterator_p.h
Go to the documentation of this file.
1// Copyright (C) 2018 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
4
5#ifndef QV4STRINGITERATOR_P_H
6#define QV4STRINGITERATOR_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include "qv4object_p.h"
20#include "qv4string_p.h"
21
23
24
25namespace QV4 {
26
27namespace Heap {
28
29#define StringIteratorObjectMembers(class, Member)
30 Member(class, Pointer, String *, iteratedString)
31 Member(class, NoMark, quint32, nextIndex)
32
34 DECLARE_MARKOBJECTS(StringIteratorObject)
35 void init(String *str, QV4::ExecutionEngine *engine)
36 {
37 Object::init();
38 this->iteratedString.set(engine, str);
39 this->nextIndex = 0;
40 }
41};
42
43}
44
46{
47 V4_PROTOTYPE(iteratorPrototype)
49
50 static ReturnedValue method_next(const FunctionObject *b, const Value *thisObject, const Value *argv, int argc);
51};
52
54{
55 V4_OBJECT2(StringIteratorObject, Object)
57 V4_PROTOTYPE(stringIteratorPrototype)
58
60};
61
62
63}
64
65QT_END_NAMESPACE
66
67#endif // QV4ARRAYITERATOR_P_H
DECLARE_HEAP_OBJECT(StrictArgumentsObject, Object)
Definition qjsvalue.h:23
Scoped< FunctionObject > ScopedFunctionObject
Scoped< Object > ScopedObject
Scoped< ArrayObject > ScopedArrayObject
Scoped< String > ScopedString
@ Attr_Invalid
@ Attr_NotConfigurable
@ Attr_NotWritable
#define Q_MANAGED_TYPE(type)
#define CHECK_EXCEPTION()
#define RETURN_RESULT(r)
DEFINE_OBJECT_VTABLE(StringObject)
static const QLocale * getLocaleDataResource(const QV4::Value &val)
static Heap::String * thisAsString(ExecutionEngine *v4, const QV4::Value *thisObject)
static QLocale getLocaleFromArgs(const FunctionObject *b, const QV4::Value *argv, int argc)
static QString getThisString(ExecutionEngine *v4, const QV4::Value *thisObject)
static void appendReplacementString(QString *result, const QString &input, const QString &replaceValue, uint *matchOffsets, int captureCount)
DEFINE_OBJECT_VTABLE(StringCtor)
bool isArrayIndex() const
uint asArrayIndex() const
static PropertyKey fromArrayIndex(uint idx)
Scope(ExecutionEngine *e)
ScopedValue(const Scope &scope)
SparseArrayNode * nextNode()
static ReturnedValue method_next(const FunctionObject *b, const Value *thisObject, const Value *argv, int argc)
static bool virtualDeleteProperty(Managed *m, PropertyKey id)