| Index: mojo/public/tools/bindings/generators/cpp_templates/module.h.tmpl
|
| diff --git a/mojo/public/tools/bindings/generators/cpp_templates/module.h.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/module.h.tmpl
|
| index 87880a26f31ed52d75244b518a6ba10f86cdf9be..d96fb60b8ff72f23d91a55e3f5fa37f81fd66dc9 100644
|
| --- a/mojo/public/tools/bindings/generators/cpp_templates/module.h.tmpl
|
| +++ b/mojo/public/tools/bindings/generators/cpp_templates/module.h.tmpl
|
| @@ -71,29 +71,6 @@ typedef mojo::StructPtr<{{union.name}}> {{union.name}}Ptr;
|
| {% endif %}
|
| {%- endfor %}
|
|
|
| -{#--- Unions must be declared first because they can be members of structs #}
|
| -{#--- Unions #}
|
| -{% for union in unions %}
|
| -{% include "wrapper_union_class_declaration.tmpl" %}
|
| -{%- endfor %}
|
| -
|
| -{#--- NOTE: Non-inlined structs may have pointers to inlined structs, so we #}
|
| -{#--- need to fully define inlined structs ahead of the others. #}
|
| -
|
| -{#--- Inlined structs #}
|
| -{% for struct in structs %}
|
| -{% if struct|should_inline %}
|
| -{% include "wrapper_class_declaration.tmpl" %}
|
| -{% endif %}
|
| -{%- endfor %}
|
| -
|
| -{#--- Non-inlined structs #}
|
| -{% for struct in structs %}
|
| -{% if not struct|should_inline %}
|
| -{% include "wrapper_class_declaration.tmpl" %}
|
| -{% endif %}
|
| -{%- endfor %}
|
| -
|
| {#--- Interfaces -#}
|
| {% for interface in interfaces %}
|
| {% include "interface_declaration.tmpl" %}
|
| @@ -119,6 +96,29 @@ typedef mojo::StructPtr<{{union.name}}> {{union.name}}Ptr;
|
| {% include "interface_response_validator_declaration.tmpl" %}
|
| {%- endfor %}
|
|
|
| +{#--- Unions must be declared first because they can be members of structs #}
|
| +{#--- Unions #}
|
| +{% for union in unions %}
|
| +{% include "wrapper_union_class_declaration.tmpl" %}
|
| +{%- endfor %}
|
| +
|
| +{#--- NOTE: Non-inlined structs may have pointers to inlined structs, so we #}
|
| +{#--- need to fully define inlined structs ahead of the others. #}
|
| +
|
| +{#--- Inlined structs #}
|
| +{% for struct in structs %}
|
| +{% if struct|should_inline %}
|
| +{% include "wrapper_class_declaration.tmpl" %}
|
| +{% endif %}
|
| +{%- endfor %}
|
| +
|
| +{#--- Non-inlined structs #}
|
| +{% for struct in structs %}
|
| +{% if not struct|should_inline %}
|
| +{% include "wrapper_class_declaration.tmpl" %}
|
| +{% endif %}
|
| +{%- endfor %}
|
| +
|
| {#--- Struct Serialization Helpers -#}
|
| {% if structs %}
|
| {% for struct in structs %}
|
|
|