blob: d02d296c9769eaae4a976ed9cd783dffaa9b28ab [file] [log] [blame]
{% import 'templates/fields/base.tmpl' as base %}
{% from 'templates/fields/field.tmpl' import encode, set_if_changed %}
{% from 'templates/macros.tmpl' import print_if %}
{% macro decl_public_methods(field) %}
{{base.decl_getter_method(field)}}
void {{field.setter_method_name}}() {{print_if(field.mutable, "const ")}}{
{{set_if_changed(field, encode(field, "true"))|indent(2)}}
}
{% endmacro %}
{% macro decl_protected_methods(field) -%}
{{base.decl_internal_setter_method(field)}}
{%- endmacro %}