History

working to clean up the QtScript implementation and move towards completion of the proxy interface

Heather Anderson committed 5 years ago

Commit 2dd9d781 parent 1e018db38 files · +2240 −923Browse files

Showing the changes to libraries/script-engine/src/qtscript/ScriptValueIteratorQtWrapper.cpp (1 of 38 files). Show all

Unified · Split

libraries/script-engine/src/qtscript/ScriptValueIteratorQtWrapper.cpp+33−0
@@ -0,0 +1,33 @@
1+//
2+// ScriptValueIteratorQtWrapper.cpp
3+// libraries/script-engine/src
4+//
5+// Created by Heather Anderson on 8/29/21.
6+// Copyright 2021 Vircadia contributors.
7+//
8+// Distributed under the Apache License, Version 2.0.
9+// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
10+//
11+
12+#include "ScriptValueIteratorQtWrapper.h"
13+
14+ScriptValue::PropertyFlags ScriptValueIteratorQtWrapper::flags() const {
15+ return (ScriptValue::PropertyFlags)(int)_value.flags();
16+}
17+
18+bool ScriptValueIteratorQtWrapper::hasNext() const {
19+ return _value.hasNext();
20+}
21+
22+QString ScriptValueIteratorQtWrapper::name() const {
23+ return _value.name();
24+}
25+
26+void ScriptValueIteratorQtWrapper::next() {
27+ _value.next();
28+}
29+
30+ScriptValuePointer ScriptValueIteratorQtWrapper::value() const {
31+ QScriptValue result = _value.value();
32+ return ScriptValuePointer(new ScriptValueQtWrapper(_engine, std::move(result)));
33+}