| Index: mojo/public/tools/bindings/generators/cpp_templates/module.cc.tmpl
|
| diff --git a/mojo/public/tools/bindings/generators/cpp_templates/module.cc.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/module.cc.tmpl
|
| index 4e423aa8448506936c3602d687030926939f0769..f84ece2b403ebbd25d45a67f4d77a4a18b1dedbb 100644
|
| --- a/mojo/public/tools/bindings/generators/cpp_templates/module.cc.tmpl
|
| +++ b/mojo/public/tools/bindings/generators/cpp_templates/module.cc.tmpl
|
| @@ -15,6 +15,12 @@
|
| {%- for namespace in namespaces_as_array %}
|
| namespace {{namespace}} {
|
| {%- endfor %}
|
| +
|
| +{#--- Constants #}
|
| +{% for constant in module.constants %}
|
| +const {{constant.kind|cpp_pod_type}} {{constant.name}} = {{constant.value|expression_to_text(module)}};
|
| +{%- endfor %}
|
| +
|
| namespace internal {
|
| namespace {
|
|
|
| @@ -50,6 +56,13 @@ const uint32_t {{method_name}} = {{method.ordinal}};
|
|
|
| } // namespace internal
|
|
|
| +{#--- Struct Constants #}
|
| +{%- for struct in structs %}
|
| +{% for constant in struct.constants %}
|
| +const {{constant.kind|cpp_pod_type}} {{struct.name}}::{{constant.name}} = {{constant.value|expression_to_text(module)}};
|
| +{%- endfor %}
|
| +{%- endfor %}
|
| +
|
| {#--- Struct builder definitions #}
|
| {%- for struct in structs %}
|
| {%- include "struct_builder_definition.tmpl" %}
|
|
|