| Index: mojo/public/tools/bindings/generators/cpp_templates/module-internal.h.tmpl
|
| diff --git a/mojo/public/tools/bindings/generators/cpp_templates/module-internal.h.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/module-internal.h.tmpl
|
| index c59c9f75db9e1792a57606381f339581b59e6b4f..c761c253182af7d2b98ade6c76340697f70a08f3 100644
|
| --- a/mojo/public/tools/bindings/generators/cpp_templates/module-internal.h.tmpl
|
| +++ b/mojo/public/tools/bindings/generators/cpp_templates/module-internal.h.tmpl
|
| @@ -63,6 +63,12 @@ class {{struct.name}}_Data;
|
| class {{union.name}}_Data;
|
| {%- endfor %}
|
|
|
| +{#--- Enums #}
|
| +{% from "enum_macros.tmpl" import enum_data_decl -%}
|
| +{%- for enum in enums %}
|
| + {{enum_data_decl(enum)}}
|
| +{%- endfor %}
|
| +
|
| #pragma pack(push, 1)
|
|
|
| {#--- Unions must be declared first because they can be members of structs #}
|
| @@ -71,11 +77,24 @@ class {{union.name}}_Data;
|
| {% include "union_declaration.tmpl" %}
|
| {%- endfor %}
|
|
|
| -{#--- Class declarations #}
|
| +{#--- Struct class declarations #}
|
| {% for struct in structs %}
|
| {% include "struct_declaration.tmpl" %}
|
| {%- endfor %}
|
|
|
| +{#--- Interface class declarations. They are needed only when they contain
|
| + enums. #}
|
| +{%- for interface in interfaces %}
|
| +{%- if interface.enums %}
|
| +class {{interface.name}}_Data {
|
| + public:
|
| +{%- for enum in interface.enums %}
|
| + {{enum_data_decl(enum)|indent(2)}}
|
| +{%- endfor %}
|
| +};
|
| +{%- endif %}
|
| +{%- endfor %}
|
| +
|
| #pragma pack(pop)
|
|
|
| } // namespace internal
|
|
|