#ifndef Int8Array_h
#define Int8Array_h
#include "wtf/IntegralTypedArrayBase.h"
namespace WTF {
class ArrayBuffer;
class Int8Array FINAL : public IntegralTypedArrayBase<signed char> {
public:
static inline PassRefPtr<Int8Array> create(unsigned length);
static inline PassRefPtr<Int8Array> create(const signed char* array, unsigned length);
static inline PassRefPtr<Int8Array> create(PassRefPtr<ArrayBuffer>, unsigned byteOffset, unsigned length);
static inline PassRefPtr<Int8Array> createUninitialized(unsigned length);
using TypedArrayBase<signed char>::set;
using IntegralTypedArrayBase<signed char>::set;
inline PassRefPtr<Int8Array> subarray(int start) const;
inline PassRefPtr<Int8Array> subarray(int start, int end) const;
virtual ViewType type() const OVERRIDE
{
return TypeInt8;
}
private:
inline Int8Array(PassRefPtr<ArrayBuffer>,
unsigned byteOffset,
unsigned length);
friend class TypedArrayBase<signed char>;
};
PassRefPtr<Int8Array> Int8Array::create(unsigned length)
{
return TypedArrayBase<signed char>::create<Int8Array>(length);
}
PassRefPtr<Int8Array> Int8Array::create(const signed char* array, unsigned length)
{
return TypedArrayBase<signed char>::create<Int8Array>(array, length);
}
PassRefPtr<Int8Array> Int8Array::create(PassRefPtr<ArrayBuffer> buffer, unsigned byteOffset, unsigned length)
{
return TypedArrayBase<signed char>::create<Int8Array>(buffer, byteOffset, length);
}
PassRefPtr<Int8Array> Int8Array::createUninitialized(unsigned length)
{
return TypedArrayBase<signed char>::createUninitialized<Int8Array>(length);
}
Int8Array::Int8Array(PassRefPtr<ArrayBuffer> buffer, unsigned byteOffset, unsigned length)
: IntegralTypedArrayBase<signed char>(buffer, byteOffset, length)
{
}
PassRefPtr<Int8Array> Int8Array::subarray(int start) const
{
return subarray(start, length());
}
PassRefPtr<Int8Array> Int8Array::subarray(int start, int end) const
{
return subarrayImpl<Int8Array>(start, end);
}
}
using WTF::Int8Array;
#endif