OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_STRUCT_TRAITS_H_ | 5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_STRUCT_TRAITS_H_ |
6 #define MOJO_PUBLIC_CPP_BINDINGS_STRUCT_TRAITS_H_ | 6 #define MOJO_PUBLIC_CPP_BINDINGS_STRUCT_TRAITS_H_ |
7 | 7 |
8 namespace mojo { | 8 namespace mojo { |
9 | 9 |
10 // This must be specialized for any type |T| to be serialized/deserialized as | 10 // This must be specialized for any type |T| to be serialized/deserialized as |
(...skipping 16 matching lines...) Expand all Loading... |
27 // Value or reference of the same type used in the generated stuct | 27 // Value or reference of the same type used in the generated stuct |
28 // wrapper type, or the following alternatives: | 28 // wrapper type, or the following alternatives: |
29 // - string: | 29 // - string: |
30 // Value or reference of any type that has a StringTraits defined. | 30 // Value or reference of any type that has a StringTraits defined. |
31 // Supported by default: base::StringPiece, std::string, | 31 // Supported by default: base::StringPiece, std::string, |
32 // WTF::String (in blink). | 32 // WTF::String (in blink). |
33 // | 33 // |
34 // - array: | 34 // - array: |
35 // Value or reference of any type that has an ArrayTraits defined. | 35 // Value or reference of any type that has an ArrayTraits defined. |
36 // Supported by default: std::vector, CArray, mojo::Array, WTF::Vector | 36 // Supported by default: std::vector, CArray, mojo::Array, WTF::Vector |
37 // (in blink), mojo::WTFArray (in blink). | 37 // (in blink). |
38 // | 38 // |
39 // - map: | 39 // - map: |
40 // Value or reference of any type that has a MapTraits defined. | 40 // Value or reference of any type that has a MapTraits defined. |
41 // Supported by default: std::map, std::unordered_map, | 41 // Supported by default: std::map, std::unordered_map, |
42 // WTF::HashMap (in blink). | 42 // WTF::HashMap (in blink). |
43 // | 43 // |
44 // - struct: | 44 // - struct: |
45 // Value or reference of any type that has a StructTraits defined. | 45 // Value or reference of any type that has a StructTraits defined. |
46 // | 46 // |
47 // - enum: | 47 // - enum: |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 // | 157 // |
158 // static bool Read(FooDataView data, CustomFoo* output); | 158 // static bool Read(FooDataView data, CustomFoo* output); |
159 // }; | 159 // }; |
160 // | 160 // |
161 template <typename DataViewType, typename T> | 161 template <typename DataViewType, typename T> |
162 struct StructTraits; | 162 struct StructTraits; |
163 | 163 |
164 } // namespace mojo | 164 } // namespace mojo |
165 | 165 |
166 #endif // MOJO_PUBLIC_CPP_BINDINGS_STRUCT_TRAITS_H_ | 166 #endif // MOJO_PUBLIC_CPP_BINDINGS_STRUCT_TRAITS_H_ |
OLD | NEW |