本文整理汇总了C++中UmlRelation::multiplicity方法的典型用法代码示例。如果您正苦于以下问题:C++ UmlRelation::multiplicity方法的具体用法?C++ UmlRelation::multiplicity怎么用?C++ UmlRelation::multiplicity使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UmlRelation
的用法示例。
在下文中一共展示了UmlRelation::multiplicity方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: new_one
//.........这里部分代码省略.........
// array & modified are empty, pretype is empty ?
decl = CppSettings::relationDecl(TRUE, "*");
int index = typeform.find("<"); // cannot be -1
Q3CString st = typeform.left(index);
Q3CString st_uml = CppSettings::umlType(st);
#ifdef ROUNDTRIP
if (roundtrip) {
if (st_uml.isEmpty())
st_uml = st;
if (neq(rel->stereotype(), st_uml)) {
rel->set_Stereotype(st_uml);
container->set_updated();
}
}
else
#endif
rel->set_Stereotype((st_uml.isEmpty()) ? st : st_uml);
int index2;
if ((index2 = decl.find("<${type}>")) == -1) {
decl = " ${comment}${static}${mutable}${volatile}${const}${stereotype}<${type}> ${name}${value};";
index2 = decl.find("<${type}>");
}
decl.replace(index2, 9, typeform.mid(index));
}
else {
if (!array.isEmpty()) {
#ifdef ROUNDTRIP
if (roundtrip) {
if (neq(rel->multiplicity(), array)) {
rel->set_Multiplicity(array);
container->set_updated();
}
}
else
#endif
rel->set_Multiplicity(array);
}
decl = CppSettings::relationDecl(modifier != "*", array);
int index;
if (!pretype.isEmpty() &&
((index = decl.find("${type}")) != 0))
decl.insert(index,(const char*)( pretype + " "));
if ((modifier == "&") && ((index = decl.find("${type}")) != 0))
decl.insert(index + 7, " &");
}
if (! value.isEmpty()) {
int index = decl.find("${value}");
if (index != -1)
decl.insert(index + 2, "h_");
#ifdef ROUNDTRIP
if (roundtrip) {
if (!staticp) {
Q3CString v = rel->defaultValue();
if (!v.isEmpty() && (((const char *) v)[0] == '='))
示例2: new_one
//.........这里部分代码省略.........
}
if (decl.find("${description}") != -1) {
if (nequal(rel->description(), description)) {
rel->set_Description(description);
container->set_updated();
}
}
else if (nequal(rel->description(), Lex::simplify_comment(comment))) {
rel->set_Description(comment); // comment was set
container->set_updated();
}
if (rel->isReadOnly() != constp) {
rel->set_isReadOnly(constp);
container->set_updated();
}
if (rel->isJavaTransient() != transientp) {
rel->set_isJavaTransient(transientp);
container->set_updated();
}
if (rel->isVolatile() != volatilep) {
rel->set_isVolatile(volatilep);
container->set_updated();
}
if (rel->isClassMember() != staticp) {
rel->set_isClassMember(staticp);
container->set_updated();
}
if (neq(rel->multiplicity(), array)) {
rel->set_Multiplicity(array);
container->set_updated();
}
WrapperStr v = rel->defaultValue();
if (!v.isEmpty() && (((const char *) v)[0] == '='))
v = v.mid(1);
if (nequal(v, value)) {
rel->set_DefaultValue(value);
container->set_updated();
}
if (nequal(rel->javaAnnotations(), annotation)) {
rel->set_JavaAnnotations(annotation);
container->set_updated();
}
if (neq(rel->javaDecl(), decl)) {
rel->set_JavaDecl(decl);
container->set_updated();
}
rel->set_usefull();
expected_order.append(rel);
}
else {
#endif
rel->set_Visibility(visibility);
示例3: new_one
//.........这里部分代码省略.........
}
if (decl.find("${description}") != -1) {
if (nequal(rel->description(), description)) {
rel->set_Description(description);
container->set_updated();
}
}
else if (nequal(rel->description(), Lex::simplify_comment(comment))) {
rel->set_Description(comment); // comment was set
container->set_updated();
}
if (rel->isReadOnly() != constp) {
rel->set_isReadOnly(constp);
container->set_updated();
}
if (rel->isJavaTransient() != transientp) {
rel->set_isJavaTransient(transientp);
container->set_updated();
}
if (rel->isVolatile() != volatilep) {
rel->set_isVolatile(volatilep);
container->set_updated();
}
if (rel->isClassMember() != staticp) {
rel->set_isClassMember(staticp);
container->set_updated();
}
if (neq(rel->multiplicity(), array)) {
rel->set_Multiplicity(array);
container->set_updated();
}
if (neq(rel->defaultValue(), value)) {
rel->set_DefaultValue(value);
container->set_updated();
}
if (nequal(rel->javaAnnotations(), annotation)) {
rel->set_JavaAnnotations(annotation);
container->set_updated();
}
if (neq(rel->stereotype(), st) &&
(rel->stereotype().isEmpty() ||
(JavaSettings::relationAttributeStereotype(rel->stereotype()) != st))) {
rel->set_Stereotype(st);
container->set_updated();
}
if (neq(rel->javaDecl(), decl)) {
rel->set_JavaDecl(decl);
container->set_updated();
}
// role name is the right one
rel->set_usefull();
expected_order.append(rel);
}
else {