OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 {%- if variant -%} | 5 {%- if variant -%} |
6 {%- set variant_path = "%s-%s"|format(module.path, variant) -%} | 6 {%- set variant_path = "%s-%s"|format(module.path, variant) -%} |
7 {%- else -%} | 7 {%- else -%} |
8 {%- set variant_path = module.path -%} | 8 {%- set variant_path = module.path -%} |
9 {%- endif -%} | 9 {%- endif -%} |
10 | 10 |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 {% endif %} | 185 {% endif %} |
186 {%- endfor %} | 186 {%- endfor %} |
187 | 187 |
188 {#--- Non-inlined structs #} | 188 {#--- Non-inlined structs #} |
189 {% for struct in structs %} | 189 {% for struct in structs %} |
190 {% if not struct|should_inline and not struct|is_native_only_kind %} | 190 {% if not struct|should_inline and not struct|is_native_only_kind %} |
191 {% include "wrapper_class_declaration.tmpl" %} | 191 {% include "wrapper_class_declaration.tmpl" %} |
192 {% endif %} | 192 {% endif %} |
193 {%- endfor %} | 193 {%- endfor %} |
194 | 194 |
195 {#--- Union Serialization Helpers -#} | |
196 {% if unions %} | |
197 {% for union in unions %} | |
198 {% include "union_serialization_declaration.tmpl" %} | |
199 {%- endfor %} | |
200 {%- endif %} | |
201 | |
202 {%- for struct in structs %} | 195 {%- for struct in structs %} |
203 {%- for enum in struct.enums %} | 196 {%- for enum in struct.enums %} |
204 {{enum_stream_operator(enum)}} | 197 {{enum_stream_operator(enum)}} |
205 {{is_known_enum_value(enum)}} | 198 {{is_known_enum_value(enum)}} |
206 {%- endfor %} | 199 {%- endfor %} |
207 {%- endfor %} | 200 {%- endfor %} |
208 | 201 |
209 {%- for interface in interfaces %} | 202 {%- for interface in interfaces %} |
210 {%- for enum in interface.enums %} | 203 {%- for enum in interface.enums %} |
211 {{enum_stream_operator(enum)}} | 204 {{enum_stream_operator(enum)}} |
(...skipping 10 matching lines...) Expand all Loading... |
222 | 215 |
223 namespace mojo { | 216 namespace mojo { |
224 | 217 |
225 {#--- Struct Serialization Helpers -#} | 218 {#--- Struct Serialization Helpers -#} |
226 {% for struct in structs %} | 219 {% for struct in structs %} |
227 {%- if not struct|is_native_only_kind %} | 220 {%- if not struct|is_native_only_kind %} |
228 {% include "struct_serialization_declaration.tmpl" %} | 221 {% include "struct_serialization_declaration.tmpl" %} |
229 {%- endif %} | 222 {%- endif %} |
230 {%- endfor %} | 223 {%- endfor %} |
231 | 224 |
| 225 {#--- Union Serialization Helpers -#} |
| 226 {% if unions %} |
| 227 {%- for union in unions %} |
| 228 {% include "union_serialization_declaration.tmpl" %} |
| 229 {%- endfor %} |
| 230 {%- endif %} |
| 231 |
232 } // namespace mojo | 232 } // namespace mojo |
233 | 233 |
234 #endif // {{header_guard}} | 234 #endif // {{header_guard}} |
OLD | NEW |