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

Side by Side Diff: mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_declaration.tmpl

Issue 814543006: Move //mojo/{public, edk} underneath //third_party (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 11 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 unified diff | Download patch
OLDNEW
(Empty)
1
2 class {{struct.name}} {
3 public:
4 typedef internal::{{struct.name}}_Data Data_;
5
6 {#--- Constants #}
7 {%- for constant in struct.constants %}
8 static const {{constant.kind|cpp_pod_type}} {{constant.name}};
9 {%- endfor %}
10 {#--- Enums #}
11 {%- for enum in struct.enums -%}
12 {% macro enum_def() %}{% include "enum_declaration.tmpl" %}{% endmacro %}
13 {{enum_def()|indent(2)}}
14 {%- endfor %}
15 static {{struct.name}}Ptr New();
16
17 template <typename U>
18 static {{struct.name}}Ptr From(const U& u) {
19 return mojo::TypeConverter<{{struct.name}}Ptr, U>::Convert(u);
20 }
21
22 template <typename U>
23 U To() const {
24 return mojo::TypeConverter<U, {{struct.name}}>::Convert(*this);
25 }
26
27 {{struct.name}}();
28 ~{{struct.name}}();
29
30 {% if struct|is_cloneable_kind %}
31 {{struct.name}}Ptr Clone() const;
32 {%- endif %}
33 bool Equals(const {{struct.name}}& other) const;
34
35 {#--- Getters #}
36 {% for field in struct.fields %}
37 {%- set type = field.kind|cpp_wrapper_type %}
38 {%- set name = field.name %}
39 {{type}} {{name}};
40 {%- endfor %}
41 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698