#ifndef Uint32Array_h
#define Uint32Array_h
#include "IntegralTypedArrayBase.h"
namespace WTF {
class ArrayBuffer;
class Uint32Array : public IntegralTypedArrayBase<unsigned int> {
public:
static inline PassRefPtr<Uint32Array> create(unsigned length);
static inline PassRefPtr<Uint32Array> create(unsigned int* array, unsigned length);
static inline PassRefPtr<Uint32Array> create(PassRefPtr<ArrayBuffer>, unsigned byteOffset, unsigned length);
bool set(TypedArrayBase<unsigned int>* array, unsigned offset) { return TypedArrayBase<unsigned int>::set(array, offset); }
void set(unsigned index, double value) { IntegralTypedArrayBase<unsigned int>::set(index, value); }
inline PassRefPtr<Uint32Array> subarray(int start) const;
inline PassRefPtr<Uint32Array> subarray(int start, int end) const;
private:
inline Uint32Array(PassRefPtr<ArrayBuffer>,
unsigned byteOffset,
unsigned length);
friend class TypedArrayBase<unsigned int>;
virtual bool isUnsignedIntArray() const { return true; }
};
PassRefPtr<Uint32Array> Uint32Array::create(unsigned length)
{
return TypedArrayBase<unsigned int>::create<Uint32Array>(length);
}
PassRefPtr<Uint32Array> Uint32Array::create(unsigned int* array, unsigned length)
{
return TypedArrayBase<unsigned int>::create<Uint32Array>(array, length);
}
PassRefPtr<Uint32Array> Uint32Array::create(PassRefPtr<ArrayBuffer> buffer, unsigned byteOffset, unsigned length)
{
return TypedArrayBase<unsigned int>::create<Uint32Array>(buffer, byteOffset, length);
}
Uint32Array::Uint32Array(PassRefPtr<ArrayBuffer> buffer, unsigned byteOffset, unsigned length)
: IntegralTypedArrayBase<unsigned int>(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 // Uint32Array_h