##get false
<%def name="get_true_false(value)", filter="trim">
  <%
  if value is False:
    return "false"
  elif value is True:
    return "true"
  else:
    return value
  %>
</%def>

##list to modelica list
##Modelica does not allow empty lists, sets one zero entry as default for
##such cases
<%def name="get_list(list)", filter="trim">
  <%
  if list:
    return str(list).replace('[', '{').replace(']', '}')
  else:
    ret="{0}"
    return ret
  %>
</%def>

##catch zero orientations
##The value nOrientations defines length of lists in Modelica, thus must be
##greater than zero
<%def name="min_orientations(orientation)", filter="trim">
  <%
  if orientation < 1:
    return 1
  else:
    return orientation
  %>
</%def>