Overte C++ Documentation
ScriptValueIterator.h
1 //
2 // ScriptValueIterator.h
3 // libraries/script-engine/src
4 //
5 // Created by Heather Anderson on 5/2/21.
6 // Copyright 2021 Vircadia contributors.
7 // Copyright 2023 Overte e.V.
8 //
9 // Distributed under the Apache License, Version 2.0.
10 // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
11 // SPDX-License-Identifier: Apache-2.0
12 //
13 
16 
17 #ifndef hifi_ScriptValueIterator_h
18 #define hifi_ScriptValueIterator_h
19 
20 #include <memory>
21 
22 #include <QtCore/QString>
23 
24 #include "ScriptValue.h"
25 
27 using ScriptValueIteratorPointer = std::shared_ptr<ScriptValueIterator>;
28 
31 public:
32  virtual ScriptValue::PropertyFlags flags() const = 0;
33  virtual bool hasNext() const = 0;
34  virtual QString name() const = 0;
35  virtual void next() = 0;
36  virtual ScriptValue value() const = 0;
37 
38 protected:
39  ~ScriptValueIterator() {} // prevent explicit deletion of base class
40 };
41 
42 #endif // hifi_ScriptValueIterator_h
43 
[ScriptInterface] Provides an engine-independent interface for QScriptValue
Definition: ScriptValue.h:40
[ScriptInterface] Provides an engine-independent interface for QScriptValueIterator
Definition: ScriptValueIterator.h:30