void UmlActivityObject::import_it(FileIn & in, Token & token)
{
    if (token.valueOf("iscontroltype") == "true")
        set_IsControlType(TRUE);

    WrapperStr s;

    if (!(s = token.valueOf("ordering")).isEmpty())
        setOrdering(s, in);

    if (!(s = token.valueOf("selection")).isEmpty())
        setSelection(s);

    if (!(s = token.valueOf("instate")).isEmpty())
        setInState(s);

    if (!(s = token.valueOf("type")).isEmpty())
        setType(s);

    if (! token.closed()) {
        WrapperStr k = token.what();
        const char * kstr = k;

        while (in.read(), !token.close(kstr)) {
            s = token.what();

            if (s == "selection") {
                setSelection(token.xmiIdref());

                if (! token.closed())
                    in.finish(s);
            }
            else if (s == "instate") {
                setInState(token.xmiIdref());

                if (! token.closed())
                    in.finish(s);
            }
            else if (s == "type") {
                setType(token);

                if (! token.closed())
                    in.finish(s);
            }
            else if (s == "lowervalue")
                importMultiplicity(in, token, FALSE);
            else if (s == "uppervalue")
                importMultiplicity(in, token, TRUE);
            else if (s == "upperbound") {
                if (! token.closed())
                    in.finish(s);
            }
            else
                UmlItem::import(in, token);
        }
    }
}
Exemple #2
0
void UmlActivityParameter::readParameterNode(FileIn & in, Token & token) {
  QCString s;

  if (token.valueOf("iscontroltype") == "true")
    set_IsControlType(TRUE);
  if (!(s = token.valueOf("ordering")).isEmpty())
    setOrdering(s, in);
  if (!(s = token.valueOf("instate")).isEmpty())
    setInState(s);
  if (!(s = token.valueOf("selection")).isEmpty())
    setSelection(s);
  if (!(s = token.valueOf("type")).isEmpty())
    setType(s);
    
  if (!token.closed()) {
    QCString k = token.what();
    const char * kstr = k;
      
    while (in.read(), !token.close(kstr)) {
      s = token.what();
      
      if (s == "selection") {
	setSelection(token.xmiIdref());
	if (! token.closed())
	  in.finish(s);
      }
      else if (s == "instate") {
	setInState(token.xmiIdref());
	if (! token.closed())
	  in.finish(s);
      }
      else if (s == "type") {
	setType(token);
	if (! token.closed())
	  in.finish(s);
      }
      else
	UmlItem::import(in, token);
    }
  }
}