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

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

Issue 615063003: Mojo cpp bindings: support Clone() for structs and arrays which don't contain handles. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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/wrapper_class_declaration.tmpl
diff --git a/mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_declaration.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_declaration.tmpl
index 3f426a5f04bbe9d2d786a8cbcc5f7a17fdd45f45..21f29680ab20c006e0888f05c07466d29a9b85b7 100644
--- a/mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_declaration.tmpl
+++ b/mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_declaration.tmpl
@@ -21,6 +21,9 @@ class {{struct.name}} {
{{struct.name}}();
~{{struct.name}}();
+{% if struct|is_cloneable_kind %}
+ {{struct.name}}Ptr Clone() const;
darin (slow to review) 2014/10/02 20:14:13 Doesn't this potentially conflict with a user defi
Aaron Boodman 2014/10/10 20:27:47 It seems like it would. Since I am going to add Eq
yzshen1 2014/10/10 20:30:21 This question has been resolved. Clone() is defin
Aaron Boodman 2014/10/10 21:04:15 per our IM chat, this isn't resolved -- it is poss
darin (slow to review) 2014/10/12 17:57:30 Right, good catch. I'd be OK dictating that field
+{%- endif %}
{#--- Getters #}
{% for field in struct.fields %}

Powered by Google App Engine
This is Rietveld 408576698