本文整理汇总了C++中FileOut::idref_prefix方法的典型用法代码示例。如果您正苦于以下问题:C++ FileOut::idref_prefix方法的具体用法?C++ FileOut::idref_prefix怎么用?C++ FileOut::idref_prefix使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FileOut
的用法示例。
在下文中一共展示了FileOut::idref_prefix方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: write
void UmlFormalParameter::write(FileOut & out, UmlClass * cl, int rank, bool uml20) const {
out.indent();
out << "<parameter";
out.idref_prefix(cl, "TEMPLPARAM", rank);
out << "/>\n";
out.indent();
out << "<ownedParameter xmi:type=\"uml:ClassifierTemplateParameter\"";
out.id_prefix(cl, "TEMPLPARAM", rank);
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, "TEMPLELEM", rank);
out << " name=\"";
out.quote(name());
out << '"';
out.ref(cl, "templateParameter", "TEMPLPARAM", rank);
out << "/>\n";
if (defaultValue().type != 0)
UmlItem::write_default_value(out, defaultValue().type->name(), cl, rank);
else
UmlItem::write_default_value(out, defaultValue().explicit_type, cl, rank);
out.indent(-1);
out.indent();
out << "</ownedParameter>\n";
}
示例2: 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";
}
}
示例3: 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";
}
}