OLD | NEW |
1 | 1 |
2 class {{struct.name}} { | 2 class {{struct.name}} { |
3 public: | 3 public: |
4 typedef internal::{{struct.name}}_Data Data_; | 4 using Data_ = internal::{{struct.name}}_Data; |
5 | 5 |
6 {#--- Constants #} | 6 {#--- Constants #} |
7 {%- for constant in struct.constants %} | 7 {%- for constant in struct.constants %} |
8 static const {{constant.kind|cpp_pod_type}} {{constant.name}}; | 8 static const {{constant.kind|cpp_pod_type}} {{constant.name}}; |
9 {%- endfor %} | 9 {%- endfor %} |
10 {#--- Enums #} | 10 {#--- Enums #} |
11 {%- for enum in struct.enums -%} | 11 {%- for enum in struct.enums -%} |
12 {% macro enum_def() %}{% include "enum_declaration.tmpl" %}{% endmacro %} | 12 {% macro enum_def() %}{% include "enum_declaration.tmpl" %}{% endmacro %} |
13 {{enum_def()|indent(2)}} | 13 {{enum_def()|indent(2)}} |
14 {%- endfor %} | 14 {%- endfor %} |
(...skipping 17 matching lines...) Expand all Loading... |
32 {%- endif %} | 32 {%- endif %} |
33 bool Equals(const {{struct.name}}& other) const; | 33 bool Equals(const {{struct.name}}& other) const; |
34 | 34 |
35 {#--- Getters #} | 35 {#--- Getters #} |
36 {% for field in struct.fields %} | 36 {% for field in struct.fields %} |
37 {%- set type = field.kind|cpp_wrapper_type %} | 37 {%- set type = field.kind|cpp_wrapper_type %} |
38 {%- set name = field.name %} | 38 {%- set name = field.name %} |
39 {{type}} {{name}}; | 39 {{type}} {{name}}; |
40 {%- endfor %} | 40 {%- endfor %} |
41 }; | 41 }; |
OLD | NEW |