本文整理汇总了C++中UmlClass::propertyValue方法的典型用法代码示例。如果您正苦于以下问题:C++ UmlClass::propertyValue方法的具体用法?C++ UmlClass::propertyValue怎么用?C++ UmlClass::propertyValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UmlClass
的用法示例。
在下文中一共展示了UmlClass::propertyValue方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: extend
void UmlClass::extend(WrapperStr mcl)
{
if (parent()->parent()->kind() != aPackage)
return;
int index = mcl.find('#');
if (index == -1)
return;
WrapperStr path = mcl.left(index);
const char * defltpath0 = "http://schema.omg.org/spec/UML/2.0/uml.xml";
const char * defltpath1 = "http://schema.omg.org/spec/UML/2.1/uml.xml";
bool dflt = ((path == defltpath0) || (path == defltpath1));
mcl = mcl.mid(index + 1);
static Q3PtrList<UmlClass> metaclasses;
Q3PtrListIterator<UmlClass> it(metaclasses);
UmlClass * metacl = UmlClass::get(mcl, 0);
WrapperStr s;
if ((metacl == 0) ||
(metacl->stereotype() != "metaclass") ||
!((dflt) ? (!metacl->propertyValue("metaclassPath", s) ||
(s == defltpath0) ||
(s == defltpath1))
: (metacl->propertyValue("metaclassPath", s) &&
(path == s)))) {
metacl = 0;
if (dflt) {
for (; (metacl = it.current()) != 0; ++it) {
if (!strcmp(mcl, metacl->name()) &&
(!metacl->propertyValue("metaclassPath", s) ||
(s == defltpath0) ||
(s == defltpath1)))
break;
}
}
else {
for (; (metacl = it.current()) != 0; ++it) {
if (!strcmp(mcl, metacl->name()) &&
metacl->propertyValue("metaclassPath", s) &&
(path == s))
break;
}
}
if (metacl == 0) {
metacl = addMetaclass(mcl, (dflt) ? 0 : (const char *)path); //[rageek] different types for ? :
metaclasses.append(metacl);
}
}
UmlRelation::create(aDirectionalAssociation, this, metacl);
}
示例2: 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();
}