Overte C++ Documentation
ArrayBufferViewClass.h
1 //
2 // ArrayBufferViewClass.h
3 //
4 //
5 // Created by Clement on 7/8/14.
6 // Copyright 2014 High Fidelity, Inc.
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_ArrayBufferViewClass_h
18 #define hifi_ArrayBufferViewClass_h
19 
20 #include <QtCore/QObject>
21 #include "V8Types.h"
22 
23 // V8TODO Do not remove yet, this will be useful in later PRs
24 /*class ScriptEngineV8;
25 
26 static const QString BUFFER_PROPERTY_NAME = "buffer";
27 static const QString BYTE_OFFSET_PROPERTY_NAME = "byteOffset";
28 static const QString BYTE_LENGTH_PROPERTY_NAME = "byteLength";
29 
31 class ArrayBufferViewClass : public QObject, public QScriptClass {
32  Q_OBJECT
33 public:
34  ArrayBufferViewClass(ScriptEngineV8* scriptEngine);
35 
36  ScriptEngineV8* getScriptEngine() { return _scriptEngine; }
37 
38  virtual QueryFlags queryProperty(const V8ScriptValue& object,
39  const V8ScriptString& name,
40  QueryFlags flags, uint* id) override;
41  virtual V8ScriptValue property(const V8ScriptValue& object,
42  const V8ScriptString& name, uint id) override;
43  virtual V8ScriptValue::PropertyFlags propertyFlags(const V8ScriptValue& object,
44  const V8ScriptString& name, uint id) override;
45 protected:
46  // JS Object attributes
47  V8ScriptString _bufferName;
48  V8ScriptString _byteOffsetName;
49  V8ScriptString _byteLengthName;
50 
51  ScriptEngineV8* _scriptEngine;
52 };
53 */
54 #endif // hifi_ArrayBufferViewClass_h
55