Chromium Code Reviews| 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 0a54e1d5a58a0901887af92d6af019ec84ae4d62..af97091a4a88481b3b58c69a562dc490d88b9f4c 100644 |
| --- a/mojo/public/tools/bindings/generators/cpp_templates/module.h.tmpl |
| +++ b/mojo/public/tools/bindings/generators/cpp_templates/module.h.tmpl |
| @@ -14,6 +14,8 @@ |
| #include "mojo/public/cpp/bindings/interface_ptr.h" |
| #include "mojo/public/cpp/bindings/message_filter.h" |
| #include "mojo/public/cpp/bindings/no_interface.h" |
| +#include "mojo/public/cpp/bindings/string.h" |
| +#include "mojo/public/cpp/bindings/struct_ptr.h" |
| #include "{{module.path}}-internal.h" |
| {%- for import in imports %} |
| #include "{{import.module.path}}.h" |
| @@ -39,9 +41,22 @@ class {{interface.name}}; |
| typedef mojo::InterfacePtr<{{interface.name}}> {{interface.name}}Ptr; |
| {% endfor %} |
| +{#--- Struct Forward Declarations -#} |
| +{% for struct in structs %} |
| +class {{struct.name}}; |
| +{% if struct|should_inline %} |
| +typedef mojo::InlinedStructPtr<{{struct.name}}> {{struct.name}}Ptr; |
| +{% include "wrapper_class_declaration.tmpl" %} |
| +{% else %} |
| +typedef mojo::StructPtr<{{struct.name}}> {{struct.name}}Ptr; |
| +{% endif %} |
| +{% endfor %} |
| + |
| {#--- Structs #} |
| {% for struct in structs %} |
| -{% include "wrapper_class_declaration.tmpl" %} |
| +{% if not struct|should_inline %} |
| +{% include "wrapper_class_declaration.tmpl" %} |
|
yzshen1
2014/05/27 22:16:59
Why do line 49 and line 58 need to be in different
|
| +{% endif %} |
| {%- endfor %} |
| {#--- Interfaces -#} |
| @@ -69,19 +84,15 @@ typedef mojo::InterfacePtr<{{interface.name}}> {{interface.name}}Ptr; |
| {% include "interface_response_validator_declaration.tmpl" %} |
| {%- endfor %} |
| +{#--- Struct Serialization Helpers -#} |
| +{% if structs %} |
| +{% for struct in structs %} |
| +{% include "struct_serialization_declaration.tmpl" %} |
| +{%- endfor %} |
| +{%- endif %} |
| + |
| {%- for namespace in namespaces_as_array|reverse %} |
| } // namespace {{namespace}} |
| {%- endfor %} |
| -{#--- Enum TypeTraits Specializations #} |
| -{% if enums %} |
| -namespace mojo { |
| -namespace internal { |
| -{% for enum in enums %} |
| -{% include "enum_traits.tmpl" %} |
| -{%- endfor %} |
| -} // namespace internal |
| -} // namespace mojo |
| -{%- endif %} |
| - |
| #endif // {{header_guard}} |