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

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

Issue 1375313006: For c++, Generate enum classes instead of enum from mojom. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 3 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/interface_declaration.tmpl
diff --git a/mojo/public/tools/bindings/generators/cpp_templates/interface_declaration.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/interface_declaration.tmpl
index 9edc1db8e5a6becf99e7c8c50484d669badb4b36..6b962c1d6120f55e57a7a8581351dce9d7fec50d 100644
--- a/mojo/public/tools/bindings/generators/cpp_templates/interface_declaration.tmpl
+++ b/mojo/public/tools/bindings/generators/cpp_templates/interface_declaration.tmpl
@@ -47,3 +47,9 @@ class {{interface.name}} {
virtual void {{method.name}}({{interface_macros.declare_request_params("", method)}}) = 0;
{%- endfor %}
};
+
+{#--- Enum Operators #}
+{% from "enum_macros.tmpl" import global_enum_operators_decl -%}
+{%- for enum in interface.enums %}
+ {{global_enum_operators_decl(enum, class_name=interface.name)}}
+{%- endfor %}

Powered by Google App Engine
This is Rietveld 408576698