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

Side by Side Diff: mojo/public/tools/bindings/generators/cpp_templates/module-shared-internal.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
« no previous file with comments | « no previous file | mojo/public/tools/bindings/generators/cpp_templates/module-shared.h.tmpl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_INTERNAL_H_"|format( 5 {%- set header_guard = "%s_SHARED_INTERNAL_H_"|format(
6 module.path|upper|replace("/","_")|replace(".","_")| 6 module.path|upper|replace("/","_")|replace(".","_")|
7 replace("-", "_")) %} 7 replace("-", "_")) %}
8 8
9 #ifndef {{header_guard}} 9 #ifndef {{header_guard}}
10 #define {{header_guard}} 10 #define {{header_guard}}
11 11
12 #include <stdint.h> 12 #include <stdint.h>
13 13
14 #include "mojo/public/cpp/bindings/lib/array_internal.h" 14 #include "mojo/public/cpp/bindings/lib/array_internal.h"
15 #include "mojo/public/cpp/bindings/lib/bindings_internal.h" 15 #include "mojo/public/cpp/bindings/lib/bindings_internal.h"
16 #include "mojo/public/cpp/bindings/lib/map_data_internal.h" 16 #include "mojo/public/cpp/bindings/lib/map_data_internal.h"
17 #include "mojo/public/cpp/bindings/lib/native_enum_data.h" 17 #include "mojo/public/cpp/bindings/lib/native_enum_data.h"
18 #include "mojo/public/cpp/bindings/lib/native_struct_data.h" 18 #include "mojo/public/cpp/bindings/lib/native_struct_data.h"
19 #include "mojo/public/cpp/bindings/lib/buffer.h" 19 #include "mojo/public/cpp/bindings/lib/buffer.h"
20 20
21 {%- for import in imports %} 21 {%- for import in imports %}
22 #include "{{import.module.path}}-shared-internal.h" 22 #include "{{import.path}}-shared-internal.h"
23 {%- endfor %} 23 {%- endfor %}
24 24
25 namespace mojo { 25 namespace mojo {
26 namespace internal { 26 namespace internal {
27 class ValidationContext; 27 class ValidationContext;
28 } 28 }
29 } 29 }
30 30
31 {%- for namespace in namespaces_as_array %} 31 {%- for namespace in namespaces_as_array %}
32 namespace {{namespace}} { 32 namespace {{namespace}} {
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 {%- endfor %} 90 {%- endfor %}
91 91
92 #pragma pack(pop) 92 #pragma pack(pop)
93 93
94 } // namespace internal 94 } // namespace internal
95 {%- for namespace in namespaces_as_array|reverse %} 95 {%- for namespace in namespaces_as_array|reverse %}
96 } // namespace {{namespace}} 96 } // namespace {{namespace}}
97 {%- endfor %} 97 {%- endfor %}
98 98
99 #endif // {{header_guard}} 99 #endif // {{header_guard}}
OLDNEW
« no previous file with comments | « no previous file | mojo/public/tools/bindings/generators/cpp_templates/module-shared.h.tmpl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698