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

Unified Diff: third_party/mojo/src/mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_declaration.tmpl

Issue 1410053006: Move third_party/mojo/src/mojo/public to mojo/public (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 5 years, 1 month 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: third_party/mojo/src/mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_declaration.tmpl
diff --git a/third_party/mojo/src/mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_declaration.tmpl b/third_party/mojo/src/mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_declaration.tmpl
deleted file mode 100644
index 0293accde40db9a2a4d6edc980d37100988e5b18..0000000000000000000000000000000000000000
--- a/third_party/mojo/src/mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_declaration.tmpl
+++ /dev/null
@@ -1,46 +0,0 @@
-{% from "enum_macros.tmpl" import enum_decl -%}
-class {{struct.name}} {
- public:
- using Data_ = internal::{{struct.name}}_Data;
-
-{#--- Enums #}
-{%- for enum in struct.enums -%}
- {{enum_decl(enum, is_static=true)|indent(2)}}
-{%- endfor %}
-
-{#--- Constants #}
-{%- for constant in struct.constants %}
-{%- if constant.kind|is_integral_kind %}
- static const {{constant.kind|cpp_pod_type}} {{constant.name}} = {{constant|constant_value}};
-{%- else %}
- static const {{constant.kind|cpp_pod_type}} {{constant.name}};
-{%- endif %}
-{%- endfor %}
-
- static {{struct.name}}Ptr New();
-
- template <typename U>
- static {{struct.name}}Ptr From(const U& u) {
- return mojo::TypeConverter<{{struct.name}}Ptr, U>::Convert(u);
- }
-
- template <typename U>
- U To() const {
- return mojo::TypeConverter<U, {{struct.name}}>::Convert(*this);
- }
-
- {{struct.name}}();
- ~{{struct.name}}();
-
-{% if struct|is_cloneable_kind %}
- {{struct.name}}Ptr Clone() const;
-{%- endif %}
- bool Equals(const {{struct.name}}& other) const;
-
-{#--- Struct members #}
-{% for field in struct.fields %}
-{%- set type = field.kind|cpp_wrapper_type %}
-{%- set name = field.name %}
- {{type}} {{name}};
-{%- endfor %}
-};

Powered by Google App Engine
This is Rietveld 408576698