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

Side by Side Diff: mojo/public/tools/bindings/generators/cpp_templates/module-shared.h.tmpl

Issue 2864753002: Mojo code generator: simplify how imported types and values are handled. (Closed)
Patch Set: . Created 3 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 {%- set header_guard = "%s_SHARED_H_"|format( 5 {%- set header_guard = "%s_SHARED_H_"|format(
6 module.path|upper|replace("/","_")|replace(".","_")| 6 module.path|upper|replace("/","_")|replace(".","_")|
7 replace("-", "_")) %} 7 replace("-", "_")) %}
8 8
9 {%- macro mojom_type_traits(kind) %} 9 {%- macro mojom_type_traits(kind) %}
10 template <> 10 template <>
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 #include "mojo/public/cpp/bindings/enum_traits.h" 47 #include "mojo/public/cpp/bindings/enum_traits.h"
48 #include "mojo/public/cpp/bindings/interface_data_view.h" 48 #include "mojo/public/cpp/bindings/interface_data_view.h"
49 #include "mojo/public/cpp/bindings/lib/bindings_internal.h" 49 #include "mojo/public/cpp/bindings/lib/bindings_internal.h"
50 #include "mojo/public/cpp/bindings/lib/serialization.h" 50 #include "mojo/public/cpp/bindings/lib/serialization.h"
51 #include "mojo/public/cpp/bindings/map_data_view.h" 51 #include "mojo/public/cpp/bindings/map_data_view.h"
52 #include "mojo/public/cpp/bindings/native_enum.h" 52 #include "mojo/public/cpp/bindings/native_enum.h"
53 #include "mojo/public/cpp/bindings/native_struct_data_view.h" 53 #include "mojo/public/cpp/bindings/native_struct_data_view.h"
54 #include "mojo/public/cpp/bindings/string_data_view.h" 54 #include "mojo/public/cpp/bindings/string_data_view.h"
55 #include "{{module.path}}-shared-internal.h" 55 #include "{{module.path}}-shared-internal.h"
56 {%- for import in imports %} 56 {%- for import in imports %}
57 #include "{{import.module.path}}-shared.h" 57 #include "{{import.path}}-shared.h"
58 {%- endfor %} 58 {%- endfor %}
59 59
60 {{namespace_begin()}} 60 {{namespace_begin()}}
61 61
62 {#--- Struct Forward Declarations -#} 62 {#--- Struct Forward Declarations -#}
63 {%- for struct in structs %} 63 {%- for struct in structs %}
64 {%- if struct|is_native_only_kind %} 64 {%- if struct|is_native_only_kind %}
65 using {{struct.name}}DataView = mojo::NativeStructDataView; 65 using {{struct.name}}DataView = mojo::NativeStructDataView;
66 {%- else %} 66 {%- else %}
67 class {{struct.name}}DataView; 67 class {{struct.name}}DataView;
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 {%- endfor %} 203 {%- endfor %}
204 204
205 {%- for union in unions %} 205 {%- for union in unions %}
206 {% include "union_data_view_definition.tmpl" %} 206 {% include "union_data_view_definition.tmpl" %}
207 {%- endfor %} 207 {%- endfor %}
208 208
209 {{namespace_end()}} 209 {{namespace_end()}}
210 210
211 #endif // {{header_guard}} 211 #endif // {{header_guard}}
212 212
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698