| OLD | NEW |
| 1 {% from "enum_macros.tmpl" import enum_decl -%} | 1 {% from "enum_macros.tmpl" import enum_decl -%} |
| 2 | 2 |
| 3 class {{struct.name}}_Reader; | 3 class {{struct.name}}_Reader; |
| 4 | 4 |
| 5 class {{struct.name}} { | 5 class {{struct.name}} { |
| 6 public: | 6 public: |
| 7 using Data_ = internal::{{struct.name}}_Data; | 7 using Data_ = internal::{{struct.name}}_Data; |
| 8 using Reader = {{struct.name}}_Reader; | 8 using Reader = {{struct.name}}_Reader; |
| 9 | 9 |
| 10 {#--- Enums #} | 10 {#--- Enums #} |
| 11 {%- for enum in struct.enums -%} | 11 {%- for enum in struct.enums -%} |
| 12 {{enum_decl(enum, is_static=true)|indent(2)}} | 12 {{enum_decl(enum)|indent(2)}} |
| 13 {%- endfor %} | 13 {%- endfor %} |
| 14 | 14 |
| 15 {#--- Constants #} | 15 {#--- Constants #} |
| 16 {%- for constant in struct.constants %} | 16 {%- for constant in struct.constants %} |
| 17 {%- if constant.kind|is_integral_kind %} | 17 {%- if constant.kind|is_integral_kind %} |
| 18 static const {{constant.kind|cpp_pod_type}} {{constant.name}} = {{constant|con
stant_value}}; | 18 static const {{constant.kind|cpp_pod_type}} {{constant.name}} = {{constant|con
stant_value}}; |
| 19 {%- else %} | 19 {%- else %} |
| 20 static const {{constant.kind|cpp_pod_type}} {{constant.name}}; | 20 static const {{constant.kind|cpp_pod_type}} {{constant.name}}; |
| 21 {%- endif %} | 21 {%- endif %} |
| 22 {%- endfor %} | 22 {%- endfor %} |
| (...skipping 18 matching lines...) Expand all Loading... |
| 41 {%- endif %} | 41 {%- endif %} |
| 42 bool Equals(const {{struct.name}}& other) const; | 42 bool Equals(const {{struct.name}}& other) const; |
| 43 | 43 |
| 44 {#--- Struct members #} | 44 {#--- Struct members #} |
| 45 {% for field in struct.fields %} | 45 {% for field in struct.fields %} |
| 46 {%- set type = field.kind|cpp_wrapper_type %} | 46 {%- set type = field.kind|cpp_wrapper_type %} |
| 47 {%- set name = field.name %} | 47 {%- set name = field.name %} |
| 48 {{type}} {{name}}; | 48 {{type}} {{name}}; |
| 49 {%- endfor %} | 49 {%- endfor %} |
| 50 }; | 50 }; |
| OLD | NEW |