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

Unified Diff: mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_definition.tmpl

Issue 2250183003: Make the fuchsia mojo/public repo the source of truth. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 4 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
deleted file mode 100644
index fd28c08a7166381981951f0f691357088d8ea6d1..0000000000000000000000000000000000000000
--- a/mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_definition.tmpl
+++ /dev/null
@@ -1,46 +0,0 @@
-{%- 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
-{{struct.name}}Ptr {{struct.name}}::New() {
- {{struct.name}}Ptr rv;
- mojo::internal::StructHelper<{{struct.name}}>::Initialize(&rv);
- return rv;
-}
-
-{{struct.name}}::{{struct.name}}()
-{%- for field in struct.fields %}
- {% if loop.first %}:{% else %} {% endif %} {{field.name}}({{field|default_value}}){% if not loop.last %},{% endif %}
-{%- endfor %} {
-}
-
-{{struct.name}}::~{{struct.name}}() {
-}
-
-{% if struct|is_cloneable_kind %}
-{{struct.name}}Ptr {{struct.name}}::Clone() const {
- {{struct.name}}Ptr rv(New());
-{%- for field in struct.fields %}
-{%- if field.kind|is_object_kind and not field.kind|is_string_kind %}
- rv->{{field.name}} = {{field.name}}.Clone();
-{%- else %}
- rv->{{field.name}} = {{field.name}};
-{%- endif %}
-{%- endfor %}
- return rv;
-}
-{% endif %}
-
-bool {{struct.name}}::Equals(const {{struct.name}}& other) const {
-{%- for field in struct.fields %}
- if (!mojo::internal::ValueTraits<{{field.kind|cpp_wrapper_type}}>::Equals(this->{{field.name}}, other.{{field.name}}))
- return false;
-{%- endfor %}
- return true;
-}

Powered by Google App Engine
This is Rietveld 408576698