Exemplo n.º 1
0
void UmlActivityParameter::write(FileOut & out) {
  // write parameter def

  out.indent();
  out << "<ownedParameter name=\"";
  out.quote(name());
  out << '"';
  out.id(this);
  write_dir(out);
  write_effect(out);
  write_flags(out);
  out << ">\n";
  
  out.indent(+1);
  
  write_description_properties(out);
  write_multiplicity(out, multiplicity(), this);
  write_default_value(out, defaultValue(), this);
  UmlItem::write_type(out, type());
  
  out.indent(-1);

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

  //write parameter node
  out.indent();
  out << "<node xmi:type=\"uml:ActivityParameterNode\" name =\"";
  out.quote(name());
  out << '"';
  out.id_prefix(this, "PARAMETER_NODE_");
  if (isControlType())
    out << " isControlType=\"true\"";
  write_ordering(out);
  write_selection(out);
  write_in_state(out);
  out << ">\n";
  out.indent(+1);

  UmlItem::write_type(out, type());

  const Q3PtrVector<UmlItem> ch = children();
  unsigned n = ch.size();
  
  for (unsigned i = 0; i != n; i += 1)
    ch[i]->write(out);

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

  unload();
}
Exemplo n.º 2
0
void UmlActivityObject::write(FileOut & out)
{
    const char * k = (parent()->kind() == anActivity)
                     ? "node" : "containedNode";

    out.indent();
    out << '<' << k << " xmi:type=\"uml:";

    WrapperStr st = stereotype();

    if (st == "datastore")
        out << "DataStoreNode";
    else if (st == "centralBuffer")
        out << "CentralBufferNode";
    else
        out << "ObjectNode";

    out << "\" name=\"";
    out.quote(name());
    out << '"';
    out.id(this);

    if (isControlType())
        out << " isControlType=\"true\"";

    write_ordering(out);
    write_selection(out);
    write_in_state(out);
    out << ">\n";

    out.indent(+1);

    write_description_properties(out);
    write_multiplicity(out, multiplicity(), this);
    UmlItem::write_type(out, type());

    const QVector<UmlItem*> ch = children();
    unsigned n = ch.size();

    for (unsigned i = 0; i != n; i += 1)
        ch[i]->write(out);

    write_incoming_flows(out);

    out.indent(-1);

    out.indent();
    out << "</" << k << ">\n";

    unload();
}
Exemplo n.º 3
0
void UmlActivityObject::solve_output_flows() {
  ControlOrData v = (isControlType()) ? IsControl : IsData;
  const QVector<UmlItem> ch = children();
  unsigned n = ch.size();
  
  for (unsigned i = 0; i != n; i += 1) {
    UmlFlow * f = dynamic_cast<UmlFlow *>(ch[i]);

    if ((f != 0) && (f->control_or_data() == Unset))
      f->set_control_or_data(v);
  }

  QListIterator<UmlFlow> it(_incoming_flows);
  
  while (it.current() != 0) {
    if (it.current()->control_or_data() == Unset)
      it.current()->set_control_or_data(v);

    ++it;
  }
}