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 5ef35a2879dbf00bc93cede25379d1badef9ce0b..2314f6e1cae1cadf5a3a904c622e9dda0401d45a 100644 |
--- a/mojo/public/tools/bindings/generators/cpp_templates/module.h.tmpl |
+++ b/mojo/public/tools/bindings/generators/cpp_templates/module.h.tmpl |
@@ -51,9 +51,11 @@ namespace {{variant}} { |
{#--- Enums #} |
{% from "enum_macros.tmpl" import enum_decl -%} |
{% from "enum_macros.tmpl" import enum_stream_operator -%} |
-{% for enum in enums %} |
+{% from "enum_macros.tmpl" import is_known_enum_value -%} |
+{%- for enum in enums %} |
{{enum_decl(enum)}} |
{{enum_stream_operator(enum)}} |
+ {{is_known_enum_value(enum)}} |
{%- endfor %} |
{#--- Constants #} |
@@ -161,15 +163,17 @@ typedef mojo::StructPtr<{{union.name}}> {{union.name}}Ptr; |
{%- endfor %} |
{%- endif %} |
-{% for struct in structs %} |
-{% for enum in struct.enums %} |
+{%- for struct in structs %} |
+{%- for enum in struct.enums %} |
{{enum_stream_operator(enum)}} |
+{{is_known_enum_value(enum)}} |
{%- endfor %} |
{%- endfor %} |
-{% for interface in interfaces %} |
-{% for enum in interface.enums %} |
+{%- for interface in interfaces %} |
+{%- for enum in interface.enums %} |
{{enum_stream_operator(enum)}} |
+{{is_known_enum_value(enum)}} |
{%- endfor %} |
{%- endfor %} |