| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2010 The Android Open Source Project | 3 * Copyright 2010 The Android Open Source Project |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 | 9 |
| 10 #ifndef SkPDFTypes_DEFINED | 10 #ifndef SkPDFTypes_DEFINED |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 | 243 |
| 244 /** The size of the array. | 244 /** The size of the array. |
| 245 */ | 245 */ |
| 246 int size() { return fValue.count(); } | 246 int size() { return fValue.count(); } |
| 247 | 247 |
| 248 /** Preallocate space for the given number of entries. | 248 /** Preallocate space for the given number of entries. |
| 249 * @param length The number of array slots to preallocate. | 249 * @param length The number of array slots to preallocate. |
| 250 */ | 250 */ |
| 251 void reserve(int length); | 251 void reserve(int length); |
| 252 | 252 |
| 253 /** Returns the object at the given offset in the array. | |
| 254 * @param index The index into the array to retrieve. | |
| 255 */ | |
| 256 SkPDFObject* getAt(int index) { return fValue[index]; } | |
| 257 | |
| 258 /** Set the object at the given offset in the array. Ref's value. | |
| 259 * @param index The index into the array to set. | |
| 260 * @param value The value to add to the array. | |
| 261 * @return The value argument is returned. | |
| 262 */ | |
| 263 SkPDFObject* setAt(int index, SkPDFObject* value); | |
| 264 | |
| 265 /** Append the object to the end of the array and increments its ref count. | 253 /** Append the object to the end of the array and increments its ref count. |
| 266 * @param value The value to add to the array. | 254 * @param value The value to add to the array. |
| 267 * @return The value argument is returned. | 255 * @return The value argument is returned. |
| 268 */ | 256 */ |
| 269 SkPDFObject* append(SkPDFObject* value); | 257 SkPDFObject* append(SkPDFObject* value); |
| 270 | 258 |
| 271 /** Creates a SkPDFInt object and appends it to the array. | 259 /** Creates a SkPDFInt object and appends it to the array. |
| 272 * @param value The value to add to the array. | 260 * @param value The value to add to the array. |
| 273 */ | 261 */ |
| 274 void appendInt(int32_t value); | 262 void appendInt(int32_t value); |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 442 int32_t getObjectNumber(SkPDFObject* obj) const; | 430 int32_t getObjectNumber(SkPDFObject* obj) const; |
| 443 | 431 |
| 444 const SkTDArray<SkPDFObject*>& objects() const { return fObjects; } | 432 const SkTDArray<SkPDFObject*>& objects() const { return fObjects; } |
| 445 | 433 |
| 446 private: | 434 private: |
| 447 SkTDArray<SkPDFObject*> fObjects; | 435 SkTDArray<SkPDFObject*> fObjects; |
| 448 SkTHashMap<SkPDFObject*, int32_t> fObjectNumbers; | 436 SkTHashMap<SkPDFObject*, int32_t> fObjectNumbers; |
| 449 }; | 437 }; |
| 450 | 438 |
| 451 #endif | 439 #endif |
| OLD | NEW |