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

Unified Diff: mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_definition.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, 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_definition.tmpl
diff --git a/mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_definition.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_definition.tmpl
index 8c61c86ab18527ffdcb80e789d8aee1a44c4e6a2..421ce0046efd335e5e493dfdf98b413f4e4f208c 100644
--- a/mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_definition.tmpl
+++ b/mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_definition.tmpl
@@ -1,8 +1,10 @@
{%- from "enum_macros.tmpl" import is_valid_enum_def %}
+{%- from "enum_macros.tmpl" import global_enum_operators_def %}
{#--- Enums #}
{%- for enum in struct.enums -%}
{{is_valid_enum_def(enum, class_name=struct.name)}}
+ {{global_enum_operators_def(enum, class_name=struct.name)}}
{%- endfor %}
// static

Powered by Google App Engine
This is Rietveld 408576698