| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #ifndef SkValue_DEFINED | 8 #ifndef SkValue_DEFINED |
| 9 #define SkValue_DEFINED | 9 #define SkValue_DEFINED |
| 10 | 10 |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 uint32_t u32() const; | 66 uint32_t u32() const; |
| 67 float f32() const; | 67 float f32() const; |
| 68 SkData* bytes() const; | 68 SkData* bytes() const; |
| 69 | 69 |
| 70 const uint16_t* u16s(int* count) const; | 70 const uint16_t* u16s(int* count) const; |
| 71 const uint32_t* u32s(int* count) const; | 71 const uint32_t* u32s(int* count) const; |
| 72 const float* f32s(int* count) const; | 72 const float* f32s(int* count) const; |
| 73 | 73 |
| 74 // Object | 74 // Object |
| 75 void set(Key, SkValue); | 75 void set(Key, SkValue); |
| 76 const SkValue* get(Key) const; |
| 76 void foreach(std::function<void(Key, const SkValue&)>) const; | 77 void foreach(std::function<void(Key, const SkValue&)>) const; |
| 77 | 78 |
| 78 // Array | 79 // Array |
| 79 size_t length() const; | 80 size_t length() const; |
| 80 const SkValue& at(size_t) const; | 81 const SkValue& at(size_t) const; |
| 81 void append(SkValue); | 82 void append(SkValue); |
| 82 | 83 |
| 83 private: | 84 private: |
| 84 class Obj; | 85 class Obj; |
| 85 class Arr; | 86 class Arr; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 107 template <typename T> const T* asTs(SkValue::Type, int*) const; | 108 template <typename T> const T* asTs(SkValue::Type, int*) const; |
| 108 }; | 109 }; |
| 109 | 110 |
| 110 template <typename T> | 111 template <typename T> |
| 111 SkValue SkToValue(const T&); | 112 SkValue SkToValue(const T&); |
| 112 | 113 |
| 113 template <typename T> | 114 template <typename T> |
| 114 bool SkFromValue(const SkValue&, T*); | 115 bool SkFromValue(const SkValue&, T*); |
| 115 | 116 |
| 116 #endif // SkValue_DEFINED | 117 #endif // SkValue_DEFINED |
| OLD | NEW |