Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(408)

Unified Diff: mojo/public/tools/bindings/generators/cpp_templates/module.cc.tmpl

Issue 294833002: Mojo: more idiomatic C++ bindings (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: mojo/public/tools/bindings/generators/cpp_templates/module.cc.tmpl
diff --git a/mojo/public/tools/bindings/generators/cpp_templates/module.cc.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/module.cc.tmpl
index 6ef71c325e1f07bccf21c9c7155d8471700e5545..db81ef10fcd511b4591740897761b1cb6d9dcaee 100644
--- a/mojo/public/tools/bindings/generators/cpp_templates/module.cc.tmpl
+++ b/mojo/public/tools/bindings/generators/cpp_templates/module.cc.tmpl
@@ -9,7 +9,9 @@
#include "{{module.path}}.h"
+#include "mojo/public/cpp/bindings/lib/array_serialization.h"
#include "mojo/public/cpp/bindings/lib/bindings_serialization.h"
+#include "mojo/public/cpp/bindings/lib/string_serialization.h"
#include "mojo/public/cpp/bindings/lib/message_builder.h"
{%- for namespace in namespaces_as_array %}
@@ -44,11 +46,6 @@ const uint32_t {{method_name}} = {{method.ordinal}};
} // namespace
-{#--- Struct destructors #}
-{%- for struct in structs %}
-{%- include "struct_destructor.tmpl" %}
-{%- endfor %}
-
{#--- Struct definitions #}
{% for struct in structs %}
{%- include "struct_definition.tmpl" %}
@@ -65,13 +62,19 @@ const {{constant.kind|cpp_pod_type}} {{struct.name}}::{{constant.name}} = {{cons
{#--- Struct builder definitions #}
{%- for struct in structs %}
-{%- include "struct_builder_definition.tmpl" %}
+{%- include "wrapper_class_definition.tmpl" %}
{%- endfor %}
{#--- Interface definitions #}
{%- for interface in interfaces %}
{%- include "interface_definition.tmpl" %}
{%- endfor %}
+
+{#--- Struct Serialization Helpers #}
+{%- for struct in structs %}
+{%- include "struct_serialization_definition.tmpl" %}
+{%- endfor %}
+
{%- for namespace in namespaces_as_array|reverse %}
} // namespace {{namespace}}
{%- endfor %}

Powered by Google App Engine
This is Rietveld 408576698