class UmlFormalParameter
!!!132227.cpp!!!	write(inout out : FileOut, in cl : UmlClass, in rank : int, in uml20 : bool) : void
  char tp[32];
  char te[32];

  sprintf(tp, "TEMPLPARAM%d_", rank);
  sprintf(te, "TEMPLELEM%d_", rank);
  
  out.indent();
  out << "<parameter";
  out.idref_prefix(cl, tp);
  out << "/>\n";
  out.indent();
  out << "<ownedParameter xmi:type=\"uml:ClassifierTemplateParameter\"";
  out.id_prefix(cl, tp);
  out << ">\n";
  out.indent(+1);

  out.indent();
  if (uml20)
    out << "<ownedElement xmi:type=\"uml:Class\"";
  else
    out << "<ownedParameteredElement xmi:type=\"uml:Class\"";
  out.id_prefix(cl, te);
  out << " name=\"";
  out.quote(name());
  out << '"';
  out.ref(cl, "templateParameter", tp);
  out << "/>\n";

  if (defaultValue().type != 0)
    UmlItem::write_default_value(out, defaultValue().type->name());
  else
    UmlItem::write_default_value(out, defaultValue().explicit_type);

  out.indent(-1);
  out.indent();
  out << "</ownedParameter>\n";
