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