Lines Matching refs:array
20 inline void copy(SkTArray<T, true>* self, const T* array) {
21 memcpy(self->fMemArray, array, self->fCount * sizeof(T));
29 inline void copy(SkTArray<T, false>* self, const T* array) {
31 new (self->fItemArray + i) T(array[i]);
52 * Creates an empty array with no initial storage
63 * Creates an empty array that will preallocate space for reserveCount
71 * Copies one array to another. The new array will be heap allocated.
73 explicit SkTArray(const SkTArray& array) {
74 this->init(array.fItemArray, array.fCount, NULL, 0);
78 * Creates a SkTArray by copying contents of a standard C array. The new
79 * array will be heap allocated. Be careful not to use this constructor
82 SkTArray(const T* array, int count) {
83 this->init(array, count, NULL, 0);
87 * assign copy of array to this
89 SkTArray& operator =(const SkTArray& array) {
94 checkRealloc((int)array.count());
95 fCount = array.count();
96 SkTArrayExt::copy(this, static_cast<const T*>(array.fMemArray));
115 * Number of elements in the array.
120 * Is the array empty.
149 * call made on the array that might add or remove elements.
272 * Creates an empty array that will use the passed storage block until it
273 * is insufficiently large to hold the entire array.
281 * Copy another array, using preallocated storage if preAllocCount >=
282 * array.count(). Otherwise storage will only be used when array shrinks
286 SkTArray(const SkTArray& array, SkAlignedSTStorage<N,T>* storage) {
287 this->init(array.fItemArray, array.fCount, storage->get(), N);
291 * Copy a C array, using preallocated storage if preAllocCount >=
292 * count. Otherwise storage will only be used when array shrinks
296 SkTArray(const T* array, int count, SkAlignedSTStorage<N,T>* storage) {
297 this->init(array, count, storage->get(), N);
300 void init(const T* array, int count,
318 SkTArrayExt::copy(this, array);
376 * Subclass of SkTArray that contains a preallocated memory block for the array.
387 SkSTArray(const SkSTArray& array)
388 : INHERITED(array, &fStorage) {
391 explicit SkSTArray(const INHERITED& array)
392 : INHERITED(array, &fStorage) {
395 SkSTArray(const T* array, int count)
396 : INHERITED(array, count, &fStorage) {
399 SkSTArray& operator= (const SkSTArray& array) {
400 return *this = *(const INHERITED*)&array;
403 SkSTArray& operator= (const INHERITED& array) {
404 INHERITED::operator=(array);