| Index: mojo/public/cpp/bindings/array.h
|
| diff --git a/mojo/public/cpp/bindings/array.h b/mojo/public/cpp/bindings/array.h
|
| index bf971764526a926b29f4c8a32587ef8637bad90f..fdc00eb76aae3ae6caa1fbba5c063e6a15d4f6ed 100644
|
| --- a/mojo/public/cpp/bindings/array.h
|
| +++ b/mojo/public/cpp/bindings/array.h
|
| @@ -27,6 +27,7 @@ class Array {
|
| typedef typename Traits::ConstRefType ConstRefType;
|
| typedef typename Traits::RefType RefType;
|
| typedef typename Traits::StorageType StorageType;
|
| + typedef typename Traits::SinkType SinkType;
|
|
|
| typedef internal::Array_Data<typename internal::WrapperTraits<T>::DataType>
|
| Data_;
|
| @@ -75,6 +76,16 @@ class Array {
|
| RefType at(size_t offset) { return Traits::at(&vec_, offset); }
|
| RefType operator[](size_t offset) { return at(offset); }
|
|
|
| + void push_back(SinkType value) {
|
| + is_null_ = false;
|
| + Traits::PushBack(&vec_, value);
|
| + }
|
| +
|
| + void resize(size_t size) {
|
| + is_null_ = false;
|
| + Traits::Resize(&vec_, size);
|
| + }
|
| +
|
| const std::vector<StorageType>& storage() const {
|
| return vec_;
|
| }
|
|
|