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

Unified Diff: mojo/public/tools/bindings/generators/cpp_templates/module.h.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/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 39fe8bcd5f78e67a3f68da30b7d2195aa40f7613..045a594ed4fa6211f9f1ee005fb6059bbce60696 100644
--- a/mojo/public/tools/bindings/generators/cpp_templates/module.h.tmpl
+++ b/mojo/public/tools/bindings/generators/cpp_templates/module.h.tmpl
@@ -9,6 +9,7 @@
#define {{header_guard}}
#include <stdint.h>
+#include <type_traits>
#include "mojo/public/cpp/bindings/array.h"
#include "mojo/public/cpp/bindings/callback.h"
@@ -32,8 +33,10 @@ namespace {{namespace}} {
{#--- Enums #}
{% from "enum_macros.tmpl" import enum_decl -%}
+{% from "enum_macros.tmpl" import global_enum_operators_decl -%}
{% for enum in enums %}
{{enum_decl(enum)}}
+ {{global_enum_operators_decl(enum)}}
{%- endfor %}
{#--- Constants #}

Powered by Google App Engine
This is Rietveld 408576698