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_DataViewPrototype_h
18#define hifi_DataViewPrototype_h
19
20#include <QtCore/QObject>
21
22#include "V8Types.h"
23#include "../Scriptable.h"
24
25// V8TODO Do not remove yet, this will be useful in later PRs
26/*/// [V8] The javascript functions associated with a <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView">DataView</a></code> instance prototype
27class DataViewPrototype : public QObject, public Scriptable {
28 Q_OBJECT
29public:
30 DataViewPrototype(QObject* parent = NULL);
31
32public slots:
33 // Gets the value of the given type at the specified byte offset
34 // from the start of the view. There is no alignment constraint;
35 // multi-byte values may be fetched from any offset.
36 //
37 // For multi-byte values, the optional littleEndian argument
38 // indicates whether a big-endian or little-endian value should be
39 // read. If false or undefined, a big-endian value is read.
40 //
41 // These methods raise an exception if they would read