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