OLD | NEW |
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 Loading... |
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}}); |
OLD | NEW |