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

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

Issue 622593002: mojo: Allow circular dependencies between structs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 2 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 {%- set header_guard = "%s_INTERNAL_H_"| 5 {%- set header_guard = "%s_INTERNAL_H_"|
6 format(module.path|upper|replace("/","_")|replace(".","_")) %} 6 format(module.path|upper|replace("/","_")|replace(".","_")) %}
7 7
8 #ifndef {{header_guard}} 8 #ifndef {{header_guard}}
9 #define {{header_guard}} 9 #define {{header_guard}}
10 10
(...skipping 14 matching lines...) Expand all
25 namespace {{namespace}} { 25 namespace {{namespace}} {
26 {%- endfor %} 26 {%- endfor %}
27 27
28 {#--- Wrapper forward declarations #} 28 {#--- Wrapper forward declarations #}
29 {% for struct in structs %} 29 {% for struct in structs %}
30 class {{struct.name}}; 30 class {{struct.name}};
31 {%- endfor %} 31 {%- endfor %}
32 32
33 namespace internal { 33 namespace internal {
34 34
35 {#--- Internal forward declarations #}
36 {% for struct in structs %}
37 class {{struct.name}}_Data;
38 {%- endfor %}
39
35 #pragma pack(push, 1) 40 #pragma pack(push, 1)
36 41
37 {#--- Class declarations #} 42 {#--- Class declarations #}
38 {% for struct in structs %} 43 {% for struct in structs %}
39 {% include "struct_declaration.tmpl" %} 44 {% include "struct_declaration.tmpl" %}
40 {%- endfor %} 45 {%- endfor %}
41 46
42 #pragma pack(pop) 47 #pragma pack(pop)
43 48
44 } // namespace internal 49 } // namespace internal
45 {%- for namespace in namespaces_as_array|reverse %} 50 {%- for namespace in namespaces_as_array|reverse %}
46 } // namespace {{namespace}} 51 } // namespace {{namespace}}
47 {%- endfor %} 52 {%- endfor %}
48 53
49 #endif // {{header_guard}} 54 #endif // {{header_guard}}
OLDNEW
« no previous file with comments | « mojo/public/python/mojo/bindings/descriptor.py ('k') | mojo/public/tools/bindings/generators/cpp_templates/struct_macros.tmpl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698