{% 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_public_getter_method(field)}}
{% if field.builder or field.mutable %}
void {{field.setter_method_name}}() {{print_if(field.mutable, "const ")}}{
{{set_if_changed(field, encode(field, "true"))|indent(2)}}
}
{% endif %}
{% endmacro %}
{% macro decl_protected_methods(field) -%}
{{base.decl_protected_setter_method(field)}}
{%- endmacro %}