| OLD | NEW |
| 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 Loading... |
| 25 | 25 |
| 26 {%- for namespace in namespaces_as_array %} | 26 {%- for namespace in namespaces_as_array %} |
| 27 namespace {{namespace}} { | 27 namespace {{namespace}} { |
| 28 {%- endfor %} | 28 {%- endfor %} |
| 29 | 29 |
| 30 {#--- Wrapper forward declarations #} | 30 {#--- Wrapper forward declarations #} |
| 31 {% for struct in structs %} | 31 {% for struct in structs %} |
| 32 class {{struct.name}}; | 32 class {{struct.name}}; |
| 33 {%- endfor %} | 33 {%- endfor %} |
| 34 | 34 |
| 35 {#--- Wrapper forward declarations for unions #} | |
| 36 {% for union in unions %} | |
| 37 class {{union.name}}; | |
| 38 {%- endfor %} | |
| 39 | |
| 40 namespace internal { | 35 namespace internal { |
| 41 | 36 |
| 42 {#--- Internal forward declarations #} | 37 {#--- Internal forward declarations #} |
| 43 {% for struct in structs %} | 38 {% for struct in structs %} |
| 44 class {{struct.name}}_Data; | 39 class {{struct.name}}_Data; |
| 45 {%- endfor %} | 40 {%- endfor %} |
| 46 | 41 |
| 47 {% for union in unions %} | |
| 48 class {{union.name}}_Data; | |
| 49 {%- endfor %} | |
| 50 | |
| 51 #pragma pack(push, 1) | 42 #pragma pack(push, 1) |
| 52 | 43 |
| 53 {#--- Class declarations #} | 44 {#--- Class declarations #} |
| 54 {% for struct in structs %} | 45 {% for struct in structs %} |
| 55 {% include "struct_declaration.tmpl" %} | 46 {% include "struct_declaration.tmpl" %} |
| 56 {%- endfor %} | 47 {%- endfor %} |
| 57 | 48 |
| 58 {% for union in unions %} | |
| 59 {% include "union_declaration.tmpl" %} | |
| 60 {%- endfor %} | |
| 61 | |
| 62 #pragma pack(pop) | 49 #pragma pack(pop) |
| 63 | 50 |
| 64 } // namespace internal | 51 } // namespace internal |
| 65 {%- for namespace in namespaces_as_array|reverse %} | 52 {%- for namespace in namespaces_as_array|reverse %} |
| 66 } // namespace {{namespace}} | 53 } // namespace {{namespace}} |
| 67 {%- endfor %} | 54 {%- endfor %} |
| 68 | 55 |
| 69 #endif // {{header_guard}} | 56 #endif // {{header_guard}} |
| OLD | NEW |