Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(226)

Side by Side Diff: mojo/public/tools/bindings/generators/cpp_templates/module.cc.tmpl

Issue 1956603002: Mojo C++ bindings: switch union to use the new serialization interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@20_array_serializer
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 {#--- Union builder definitions #} 117 {#--- Union builder definitions #}
118 {%- for union in unions %} 118 {%- for union in unions %}
119 {%- include "wrapper_union_class_definition.tmpl" %} 119 {%- include "wrapper_union_class_definition.tmpl" %}
120 {%- endfor %} 120 {%- endfor %}
121 121
122 {#--- Interface definitions #} 122 {#--- Interface definitions #}
123 {%- for interface in interfaces %} 123 {%- for interface in interfaces %}
124 {%- include "interface_definition.tmpl" %} 124 {%- include "interface_definition.tmpl" %}
125 {%- endfor %} 125 {%- endfor %}
126 126
127 {#--- Union Serialization Helpers #}
128 {%- for union in unions %}
129 {%- include "union_serialization_definition.tmpl" %}
130 {%- endfor %}
131
132 {%- if variant %} 127 {%- if variant %}
133 } // namespace {{variant}} 128 } // namespace {{variant}}
134 {%- endif %} 129 {%- endif %}
135 {%- for namespace in namespaces_as_array|reverse %} 130 {%- for namespace in namespaces_as_array|reverse %}
136 } // namespace {{namespace}} 131 } // namespace {{namespace}}
137 {%- endfor %} 132 {%- endfor %}
138 133
139 namespace mojo { 134 namespace mojo {
140 135
141 {#--- Struct Serialization Helpers -#} 136 {#--- Struct Serialization Helpers -#}
142 {% for struct in structs %} 137 {% for struct in structs %}
143 {%- if not struct|is_native_only_kind %} 138 {%- if not struct|is_native_only_kind %}
144 {% include "struct_serialization_definition.tmpl" %} 139 {% include "struct_serialization_definition.tmpl" %}
145 {%- endif %} 140 {%- endif %}
146 {%- endfor %} 141 {%- endfor %}
147 142
143 {#--- Union Serialization Helpers #}
144 {%- for union in unions %}
145 {%- include "union_serialization_definition.tmpl" %}
146 {%- endfor %}
147
148 } // namespace mojo 148 } // namespace mojo
149 149
150 150
151 #if defined(__clang__) 151 #if defined(__clang__)
152 #pragma clang diagnostic pop 152 #pragma clang diagnostic pop
153 #elif defined(_MSC_VER) 153 #elif defined(_MSC_VER)
154 #pragma warning(pop) 154 #pragma warning(pop)
155 #endif 155 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698