#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-private-field"
+#elif defined(_MSC_VER)
+#pragma warning(push)
+#pragma warning(disable:4056)
+#pragma warning(disable:4756)
#endif
#include "{{module.path}}.h"
+#include <math.h>
+
+#include "mojo/public/cpp/bindings/lib/array_serialization.h"
#include "mojo/public/cpp/bindings/lib/bindings_serialization.h"
+#include "mojo/public/cpp/bindings/lib/bounds_checker.h"
+#include "mojo/public/cpp/bindings/lib/map_data_internal.h"
+#include "mojo/public/cpp/bindings/lib/map_serialization.h"
#include "mojo/public/cpp/bindings/lib/message_builder.h"
+#include "mojo/public/cpp/bindings/lib/string_serialization.h"
+#include "mojo/public/cpp/bindings/lib/validate_params.h"
+#include "mojo/public/cpp/bindings/lib/validation_errors.h"
{%- for namespace in namespaces_as_array %}
namespace {{namespace}} {
{%- endfor %}
+
+{#--- Constants #}
+{% for constant in module.constants %}
+const {{constant.kind|cpp_pod_type}} {{constant.name}} = {{constant|constant_value}};
+{%- endfor %}
+
namespace internal {
namespace {
} // namespace
-{#--- Struct destructors #}
-{%- for struct in structs %}
-{%- include "struct_destructor.tmpl" %}
-{%- endfor %}
-
{#--- Struct definitions #}
{% for struct in structs %}
{%- include "struct_definition.tmpl" %}
} // namespace internal
+{#--- Struct Constants #}
+{%- for struct in structs %}
+{% for constant in struct.constants %}
+const {{constant.kind|cpp_pod_type}} {{struct.name}}::{{constant.name}} = {{constant|constant_value}};
+{%- endfor %}
+{%- endfor %}
+
{#--- Struct builder definitions #}
{%- for struct in structs %}
-{%- include "struct_builder_definition.tmpl" %}
+{%- include "wrapper_class_definition.tmpl" %}
{%- endfor %}
{#--- Interface definitions #}
{%- for interface in interfaces %}
{%- include "interface_definition.tmpl" %}
{%- endfor %}
+
+{#--- Struct Serialization Helpers #}
+{%- for struct in structs %}
+{%- include "struct_serialization_definition.tmpl" %}
+{%- endfor %}
+
{%- for namespace in namespaces_as_array|reverse %}
} // namespace {{namespace}}
{%- endfor %}
#if defined(__clang__)
#pragma clang diagnostic pop
+#elif defined(_MSC_VER)
+#pragma warning(pop)
#endif