当前位置: 首页>>代码示例>>C++>>正文


C++ FileOut::idref方法代码示例

本文整理汇总了C++中FileOut::idref方法的典型用法代码示例。如果您正苦于以下问题:C++ FileOut::idref方法的具体用法?C++ FileOut::idref怎么用?C++ FileOut::idref使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FileOut的用法示例。


在下文中一共展示了FileOut::idref方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: write_ends

void UmlRelation::write_ends(FileOut & out) {
  // note : it is the first side
 
  out.indent();
  out << "\t<memberEnd";
  out.idref(this);
  out << "/>\n";
  
  UmlRelation * other = side(FALSE);
  
  out.indent();
  if (other != 0) {
    out << "\t<memberEnd";
    out.idref(other);
    out << "/>\n";
  }
  else {
    out << "\t<ownedEnd xmi:type=\"uml:Property\"";
    out.id_prefix(this, "REVERSE_");
    if (_assoc_class != 0)
      out.ref(_assoc_class, "association");
    else
      out.ref(this, "association", "ASSOC_");
    out << " visibility=\"" << ((_vis_prefix) ? "vis_private\"" : "private\"");
    out.ref(parent(), "type");
    out << " aggregation=\"";
    if (_gen_eclipse)
      out << "none";
    else {
      switch (relationKind()) {
      case anAggregation:
      case aDirectionalAggregation:
	out << "shared";
	break;
      case anAggregationByValue:
      case aDirectionalAggregationByValue:
	out << "composite";
	break;
      default:
	out << "none";
      }
    }
    out << "\" isNavigable=\"false\"/>\n";

    out.indent();
    out << "\t<memberEnd ";
    out.idref_prefix(this, "REVERSE_");
    out << "/>\n";
  }

}
开发者ID:SciBoy,项目名称:douml,代码行数:51,代码来源:UmlRelation.cpp

示例2: write_in

void UmlTransition::write_in(FileOut & out)
{
    out.indent();
    out << "<incoming";
    out.idref(this);
    out << "/>\n";
}
开发者ID:02JanDal,项目名称:douml,代码行数:7,代码来源:UmlTransition.cpp

示例3: ref

void UmlItem::ref(FileOut & out)
{
    // theorically not called
    out << "<UML:???kind=" << kind() << "??? ";
    out.idref(this);
    out << "/>";
}
开发者ID:ErickCastellanos,项目名称:douml,代码行数:7,代码来源:UmlItem.cpp

示例4: write_incoming_flows

void UmlActivityNode::write_incoming_flows(FileOut & out) {
  Q3PtrListIterator<UmlFlow> it(_incoming_flows);
  
  while (it.current() != 0) {
    out.indent();
    out << "<incoming";
    out.idref(it.current());
    out << "/>\n";
    ++it;
  }

}
开发者ID:SciBoy,项目名称:douml,代码行数:12,代码来源:UmlActivityNode.cpp

示例5: write

void UmlTransition::write(FileOut & out)
{
    UmlStateItem * x = dynamic_cast<UmlStateItem *>(parent()->parent());

    if (x == 0)
        x = dynamic_cast<UmlStateItem *>(parent());

    x->memo_trans(this);

    out.indent();
    out << "<outgoing";
    out.idref(this);
    out << "/>\n";
}
开发者ID:02JanDal,项目名称:douml,代码行数:14,代码来源:UmlTransition.cpp

示例6: ref

void UmlClass::ref(FileOut & out)
{
    if ((stereotype() == "actor") ||
        ((parent()->kind() != aClassView) &&
         (parent()->kind() != aClass)))
        out << "<UML:Actor";
    else if (stereotype() == "interface")
        out << "<UML:Interface";
    else
        out << "<UML:Class";

    out.idref(this);
    out << "/>";
}
开发者ID:ErickCastellanos,项目名称:douml,代码行数:14,代码来源:UmlClass.cpp

示例7: write

void UmlCallBehaviorAction::write(FileOut & out) {
  write_begin(out, "CallBehaviorAction");
  write_end(out, TRUE);
  
  UmlItem * b = behavior();
  
  if (b != 0) {
    out.indent();
    out << "<behavior";
    out.idref(b);
    out << "/>\n";
  }

  write_close(out);

}
开发者ID:SciBoy,项目名称:douml,代码行数:16,代码来源:UmlActivityActionClasses.cpp

示例8: write_actuals

void UmlClass::write_actuals(FileOut & out)
{
    Q3ValueList<UmlActualParameter> actual_params = actuals();
    Q3ValueList<UmlActualParameter>::ConstIterator iter;
    int rank;
    UmlClass * super = 0;

    for (iter = actual_params.begin(), rank = 0;
         iter != actual_params.end();
         ++iter, rank += 1) {
        if (super != (*iter).superClass()) {
            if (super != 0) {
                out.indent(-1);
                out.indent();
                out << "</templateBinding>\n";
            }

            super = (*iter).superClass();

            out.indent();
            out << "<templateBinding xmi:type=\"uml:TemplateBinding\"";
            out.id_prefix(this, "ACTUAL", rank);
            out << ">\n";
            out.indent(+1);

            out.indent();
            out << "<boundElement";
            out.idref(this);
            out << " />\n";

            out.indent();
            out << "<signature";
            out.idref_prefix(super, "FORMALS_");
            out << " />\n";
        }

        (*iter).write(out, this, rank);
    }

    if (super != 0) {
        out.indent(-1);
        out.indent();
        out << "</templateBinding>\n";
    }

}
开发者ID:bleakxanadu,项目名称:douml,代码行数:46,代码来源:UmlClass.cpp

示例9: write_exceptions

void UmlOperation::write_exceptions(FileOut & out)
{
    const Q3ValueList<UmlTypeSpec> excpts = exceptions();
    Q3ValueList<UmlTypeSpec>::ConstIterator iter;

    for (iter = excpts.begin(); iter != excpts.end(); ++iter) {
        const UmlTypeSpec & e = *iter;

        if (e.type != 0) {
            out.indent();
            out << "<raisedException";
            out.idref(e.type);
            out << "/>\n";
        }
        else if (!e.explicit_type.isEmpty()) {
            out.indent();
            out << "<raisedException";
            out.idref_datatype(e.explicit_type);
            out << "/>\n";
        }
    }
}
开发者ID:bleakxanadu,项目名称:douml,代码行数:22,代码来源:UmlOperation.cpp

示例10: write_type

void UmlItem::write_type(FileOut & out, const UmlTypeSpec & t, const char * tk)
{
    if (t.type != 0) {
        out.indent();
        out << '<' << ((tk != 0) ? tk : "type") << " xmi:type=\"uml:Class\"";
        out.idref(t.type);
        out << "/>\n";
    }
    else if (!t.explicit_type.isEmpty()) {
        out.indent();
        out << '<' << ((tk != 0) ? tk : "type") << " xmi:type=\"uml:";

        if (t.explicit_type == "int")
            out << ((_uml_20)
                    ? "PrimitiveType\" href=\"http://schema.omg.org/spec/UML/2.0/uml.xml#Integer\"/>\n"
                    : "PrimitiveType\" href=\"http://schema.omg.org/spec/UML/2.1/uml.xml#Integer\"/>\n");
        else if (t.explicit_type == "bool")
            out << ((_uml_20)
                    ? "PrimitiveType\" href=\"http://schema.omg.org/spec/UML/2.0/uml.xml#Boolean\"/>\n"
                    : "PrimitiveType\" href=\"http://schema.omg.org/spec/UML/2.1/uml.xml#Boolean\"/>\n");
        else if (t.explicit_type == "string")
            out << ((_uml_20)
                    ? "PrimitiveType\" href=\"http://schema.omg.org/spec/UML/2.0/uml.xml#String\"/>\n"
                    : "PrimitiveType\" href=\"http://schema.omg.org/spec/UML/2.1/uml.xml#String\"/>\n");
        else if (t.explicit_type == "long")
            out << ((_uml_20)
                    ? "PrimitiveType\" href=\"http://schema.omg.org/spec/UML/2.0/uml.xml#UnlimitedNatural\"/>\n"
                    : "PrimitiveType\" href=\"http://schema.omg.org/spec/UML/2.1/uml.xml#UnlimitedNatural\"/>\n");
        else {
            out << "Class\"";
            out.idref_datatype(t.explicit_type);
            out << "/>\n";
        }
    }

}
开发者ID:vresnev,项目名称:douml,代码行数:36,代码来源:UmlItem.cpp

示例11: ref

void UmlComponent::ref(FileOut & out)
{
    out << "<UML:Component";
    out.idref(this);
    out << "/>";
}
开发者ID:bleakxanadu,项目名称:douml,代码行数:6,代码来源:UmlComponent.cpp

示例12: write_if_needed

bool UmlAttribute::write_if_needed(FileOut & out)
{
    switch (_lang) {
    case Uml:
        parent()->write(out);
        out.indent();
        out << "<UML:Attribute name=\"" << name() << '"';
        break;

    case Cpp:
        if (cppDecl().isEmpty())
            return FALSE;

        parent()->write(out);
        out.indent();
        out << "<UML:Attribute name=\"" << true_name(cppDecl()) << '"';
        break;

    default: // Java
        if (javaDecl().isEmpty())
            return FALSE;

        parent()->write(out);
        out.indent();
        out << "<UML:Attribute name=\"" << true_name(javaDecl()) << '"';
        break;
    }

    out.id(this);

    switch (_lang) {
    case Uml:
        write_visibility(out);
        break;

    case Cpp:
        write_visibility(out,
                         (cppVisibility() == DefaultVisibility)
                         ? visibility() : cppVisibility());
        break;

    default: // Java
        if (javaDecl().find("${visibility}") != -1)
            write_visibility(out, visibility());

        break;
    }

    write_scope(out);
    out << ">\n";
    out.indent(+1);

    const UmlTypeSpec & t = type();

    if ((t.type != 0) || !t.explicit_type.isEmpty()) {
        out.indent();
        out << "<UML:StructuralFeature.type>\n";
        out.indent();
        out << "\t<UML:DataType";

        switch (_lang) {
        case Uml:
            if (t.type != 0)
                out.idref(t.type);
            else
                out.idref_datatype(t.explicit_type);

            break;

        case Cpp:
            write_cpp_type(out);
            break;

        default: // java
            write_java_type(out);
        }

        out << "/>\n";
        out.indent();
        out << "</UML:StructuralFeature.type>\n";
    }

    write_stereotype(out);
    write_annotation(out);
    write_description_properties(out);

    out.indent(-1);
    out.indent();
    out << "</UML:Attribute>\n";

    unload();

    return TRUE;
}
开发者ID:bleakxanadu,项目名称:douml,代码行数:94,代码来源:UmlAttribute.cpp

示例13: write_relation_as_attribute


//.........这里部分代码省略.........
      s = true_name(roleName(), cppDecl());
      break;
    default: // Java
      if (javaDecl().isEmpty())
	return;
      s = true_name(roleName(), javaDecl());
    }
  }
  
  out.indent();
  out << "<ownedAttribute xmi:type=\"uml:Property\" name=\"" << s << '"';
  out.id(this);
  
  if (base != 0)
    out.ref(first, "association", "EXT_");
  else {
    write_visibility(out);
    write_scope(out);
    if (isReadOnly())
      out << " isReadOnly=\"true\"";
    if (isDerived()) {
      out << " isDerived=\"true\"";
      if (isDerivedUnion())
	out << " isDerivedUnion=\"true\"";
    }
    if (isOrdered())
      out << " isOrdered=\"true\"";
    if (isUnique())
      out << " isUnique=\"true\"";
  
    if (first->_assoc_class != 0)
      out.ref(first->_assoc_class, "association");
    else
      out.ref(first, "association", "ASSOC_");
  
    out << " aggregation=\"";
    if (this == first) {
      parent()->memo_relation(this);
      if (_gen_eclipse) {
	switch (relationKind()) {
	case anAggregation:
	case aDirectionalAggregation:
	  out << "shared";
	  break;
	case anAggregationByValue:
	case aDirectionalAggregationByValue:
	  out << "composite";
	  break;
	default:
	  out << "none";
	}
      }
      else
	out << "none";
    }
    else if (_gen_eclipse)
      out << "none";
    else {
      switch (relationKind()) {
      case anAggregation:
      case aDirectionalAggregation:
	out << "shared";
	break;
      case anAggregationByValue:
      case aDirectionalAggregationByValue:
	out << "composite";
	break;
      default:
	out << "none";
      }
    }
    out << '"';
  }
  
  out << ">\n";
  out.indent(+1);
  
  out.indent();
  out << "<type xmi:type=\"uml:Class\"";
  if (base != 0) {
    if (! base->propertyValue("metaclassPath", s))
      s = (_uml_20) ? "http://schema.omg.org/spec/UML/2.0/uml.xml"
		    : "http://schema.omg.org/spec/UML/2.1/uml.xml";
    out << " href=\"" << s << '#' << base->name() << '"';
  }
  else
    out.idref(roleType());
  out << "/>\n";
  write_multiplicity(out, multiplicity(), this);
  write_default_value(out, defaultValue(), this);
  write_constraint(out);
  write_annotation(out);
  write_description_properties(out);
  
  out.indent(-1);
  out.indent();
  out << "</ownedAttribute>\n";

  unload();
}
开发者ID:SciBoy,项目名称:douml,代码行数:101,代码来源:UmlRelation.cpp


注:本文中的FileOut::idref方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。