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

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

Issue 226263002: Mojo: Move mojo/public/bindings to mojo/public/tools/bindings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 6 years, 8 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 | Annotate | Revision Log
OLDNEW
1 {%- import "struct_macros.tmpl" as struct_macros %} 1 {%- import "struct_macros.tmpl" as struct_macros %}
2 {%- set class_name = struct.name ~ "_Data" -%} 2 {%- set class_name = struct.name ~ "_Data" -%}
3 3
4 class {{class_name}} { 4 class {{class_name}} {
5 public: 5 public:
6 typedef {{struct.name}} Wrapper; 6 typedef {{struct.name}} Wrapper;
7 7
8 static {{class_name}}* New(mojo::Buffer* buf, mojo::Buffer::Destructor dtor = NULL); 8 static {{class_name}}* New(mojo::Buffer* buf, mojo::Buffer::Destructor dtor = NULL);
9 9
10 {#--- Setters -#} 10 {#--- Setters -#}
(...skipping 10 matching lines...) Expand all
21 21
22 private: 22 private:
23 {{class_name}}(); 23 {{class_name}}();
24 ~{{class_name}}(); // NOT IMPLEMENTED 24 ~{{class_name}}(); // NOT IMPLEMENTED
25 25
26 mojo::internal::StructHeader _header_; 26 mojo::internal::StructHeader _header_;
27 {{ struct_macros.fields(struct) }} 27 {{ struct_macros.fields(struct) }}
28 }; 28 };
29 MOJO_COMPILE_ASSERT(sizeof({{class_name}}) == {{struct.packed|struct_size}}, 29 MOJO_COMPILE_ASSERT(sizeof({{class_name}}) == {{struct.packed|struct_size}},
30 bad_sizeof_{{class_name}}); 30 bad_sizeof_{{class_name}});
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698