overte/libraries/script-engine/src/DataViewClass.h
Atlante45 b2b1701965 - Bunch of fixes to typed arrays
- First working prototype for Int8Array
- Base classes for all other typed arrays
2014-07-09 17:47:09 -07:00

36 lines
No EOL
841 B
C++

//
// DataViewClass.h
//
//
// Created by Clement on 7/8/14.
// Copyright 2014 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#ifndef hifi_DataViewClass_h
#define hifi_DataViewClass_h
#include "ArrayBufferViewClass.h"
class DataViewClass : public ArrayBufferViewClass {
Q_OBJECT
public:
DataViewClass(ScriptEngine* scriptEngine);
QScriptValue newInstance(QScriptValue buffer, quint32 byteOffset, quint32 byteLength);
QString name() const;
QScriptValue prototype() const;
private:
static QScriptValue construct(QScriptContext* context, QScriptEngine* engine);
QScriptValue _proto;
QScriptValue _ctor;
QScriptString _name;
};
#endif // hifi_DataViewClass_h