| OLD | NEW |
| (Empty) |
| 1 {%- set header_guard = "%s_INTERNAL_H_"| | |
| 2 format(module.path|upper|replace("/","_")|replace(".","_")) -%} | |
| 3 // NOTE: This file was generated by the Mojo bindings generator. | |
| 4 #ifndef {{header_guard}} | |
| 5 #define {{header_guard}} | |
| 6 | |
| 7 #include "mojo/public/cpp/bindings/lib/bindings_internal.h" | |
| 8 #include "mojo/public/cpp/bindings/lib/buffer.h" | |
| 9 #include "mojo/public/cpp/bindings/lib/union_accessor.h" | |
| 10 #include "mojo/public/cpp/bindings/struct_ptr.h" | |
| 11 #include "mojo/public/cpp/system/buffer.h" | |
| 12 #include "mojo/public/cpp/system/data_pipe.h" | |
| 13 #include "mojo/public/cpp/system/handle.h" | |
| 14 #include "mojo/public/cpp/system/message_pipe.h" | |
| 15 | |
| 16 {%- for import in imports %} | |
| 17 #include "{{import.module.path}}-internal.h" | |
| 18 {%- endfor %} | |
| 19 | |
| 20 namespace mojo { | |
| 21 namespace internal { | |
| 22 class BoundsChecker; | |
| 23 } | |
| 24 } | |
| 25 | |
| 26 {%- for namespace in namespaces_as_array %} | |
| 27 namespace {{namespace}} { | |
| 28 {%- endfor %} | |
| 29 | |
| 30 {#--- Wrapper forward declarations #} | |
| 31 {% for struct in structs %} | |
| 32 class {{struct.name}}; | |
| 33 {%- endfor %} | |
| 34 | |
| 35 {#--- Wrapper forward declarations for unions #} | |
| 36 {% for union in unions %} | |
| 37 class {{union.name}}; | |
| 38 {%- endfor %} | |
| 39 | |
| 40 namespace internal { | |
| 41 | |
| 42 {#--- Internal forward declarations #} | |
| 43 {% for struct in structs %} | |
| 44 class {{struct.name}}_Data; | |
| 45 {%- endfor %} | |
| 46 | |
| 47 {% for union in unions %} | |
| 48 class {{union.name}}_Data; | |
| 49 {%- endfor %} | |
| 50 | |
| 51 #pragma pack(push, 1) | |
| 52 | |
| 53 {#--- Unions must be declared first because they can be members of structs #} | |
| 54 {#--- Union class declarations #} | |
| 55 {% for union in unions %} | |
| 56 {% include "union_declaration.tmpl" %} | |
| 57 {%- endfor %} | |
| 58 | |
| 59 {#--- Class declarations #} | |
| 60 {% for struct in structs %} | |
| 61 {% include "struct_declaration.tmpl" %} | |
| 62 {%- endfor %} | |
| 63 | |
| 64 {#--- Interface parameter data declaration #} | |
| 65 {%- for interface in interfaces %} | |
| 66 {%- for method in interface.methods %} | |
| 67 {% set struct = method.param_struct %} | |
| 68 {% include "struct_declaration.tmpl" %} | |
| 69 {%- if method.response_parameters != None %} | |
| 70 {%- set struct = method.response_param_struct %} | |
| 71 {% include "struct_declaration.tmpl" %} | |
| 72 {%- endif %} | |
| 73 {%- endfor %} | |
| 74 {%- endfor %} | |
| 75 | |
| 76 #pragma pack(pop) | |
| 77 | |
| 78 } // namespace internal | |
| 79 {%- for namespace in namespaces_as_array|reverse %} | |
| 80 } // namespace {{namespace}} | |
| 81 {%- endfor %} | |
| 82 | |
| 83 #endif // {{header_guard}} | |
| OLD | NEW |