OLD | NEW |
1 {#- TODO(vardhan): This template produces crazy amounts of whitespace. Clean | 1 {#- TODO(vardhan): This template produces crazy amounts of whitespace. Clean |
2 this stuff up (it involves digging through all the templates included here. -#} | 2 this stuff up (it involves digging through all the templates included here. -#} |
3 // Copyright 2013 The Chromium Authors. All rights reserved. | 3 // Copyright 2013 The Chromium Authors. All rights reserved. |
4 // Use of this source code is governed by a BSD-style license that can be | 4 // Use of this source code is governed by a BSD-style license that can be |
5 // found in the LICENSE file. | 5 // found in the LICENSE file. |
6 | 6 |
7 {%- import "struct_macros.tmpl" as struct_macros %} | 7 {%- import "struct_macros.tmpl" as struct_macros %} |
8 {% import "interface_macros.tmpl" as interface_macros -%} | 8 {% import "interface_macros.tmpl" as interface_macros -%} |
9 {%- set header_guard = "%s_H_"| | 9 {%- set header_guard = "%s_H_"| |
10 format(module.path|upper|replace("/","_")|replace(".","_")) %} | 10 format(module.path|upper|replace("/","_")|replace(".","_")) %} |
(...skipping 25 matching lines...) Expand all Loading... |
36 {#------------------------ #} | 36 {#------------------------ #} |
37 | 37 |
38 {%- for namespace in namespaces_as_array %} | 38 {%- for namespace in namespaces_as_array %} |
39 namespace {{namespace}} { | 39 namespace {{namespace}} { |
40 {%- endfor %} | 40 {%- endfor %} |
41 | 41 |
42 {#--- Interface Forward Declarations -#} | 42 {#--- Interface Forward Declarations -#} |
43 {% for interface in interfaces %} | 43 {% for interface in interfaces %} |
44 class {{interface.name}}; | 44 class {{interface.name}}; |
45 using {{interface.name}}Ptr = mojo::InterfacePtr<{{interface.name}}>; | 45 using {{interface.name}}Ptr = mojo::InterfacePtr<{{interface.name}}>; |
46 using {{interface.name}}Handle = mojo::InterfaceHandle<{{interface.name}}>; | |
47 {% endfor %} | 46 {% endfor %} |
48 | 47 |
49 {#--- Struct Forward Declarations -#} | 48 {#--- Struct Forward Declarations -#} |
50 {% for struct in structs %} | 49 {% for struct in structs %} |
51 {{ struct_macros.structptr_forward_decl(struct) }} | 50 {{ struct_macros.structptr_forward_decl(struct) }} |
52 {% endfor %} | 51 {% endfor %} |
53 | 52 |
54 {#--- Union Forward Declarations -#} | 53 {#--- Union Forward Declarations -#} |
55 {% for union in unions %} | 54 {% for union in unions %} |
56 class {{union.name}}; | 55 class {{union.name}}; |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 {#--- Request and response parameter structs for Interface methods -#} | 175 {#--- Request and response parameter structs for Interface methods -#} |
177 {% for interface in interfaces -%} | 176 {% for interface in interfaces -%} |
178 {{interface_macros.declare_param_structs_for_interface(interface)}} | 177 {{interface_macros.declare_param_structs_for_interface(interface)}} |
179 {%- endfor %} | 178 {%- endfor %} |
180 | 179 |
181 {%- for namespace in namespaces_as_array|reverse %} | 180 {%- for namespace in namespaces_as_array|reverse %} |
182 } // namespace {{namespace}} | 181 } // namespace {{namespace}} |
183 {%- endfor %} | 182 {%- endfor %} |
184 | 183 |
185 #endif // {{header_guard}} | 184 #endif // {{header_guard}} |
OLD | NEW |