本文整理汇总了C++中UmlOperation::replaceParameter方法的典型用法代码示例。如果您正苦于以下问题:C++ UmlOperation::replaceParameter方法的具体用法?C++ UmlOperation::replaceParameter怎么用?C++ UmlOperation::replaceParameter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UmlOperation
的用法示例。
在下文中一共展示了UmlOperation::replaceParameter方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: new_one
//.........这里部分代码省略.........
if (op->isJavaFinal() != finalp) {
container->set_updated();
op->set_isJavaFinal(finalp);
}
if (op->isJavaSynchronized() != synchronizedp) {
container->set_updated();
op->set_isJavaSynchronized(synchronizedp);
}
if (nequal(op->javaAnnotations(), annotation)) {
container->set_updated();
op->set_JavaAnnotations(annotation);
}
if (!op->returnType().equal(return_type)) {
container->set_updated();
op->set_ReturnType(return_type);
}
Q3ValueList<UmlParameter>::Iterator itp1;
const Q3ValueList<UmlParameter> old_params = op->params();
Q3ValueList<UmlParameter>::ConstIterator itp2;
for (rank = 0, itp1 = params.begin(), itp2 = old_params.begin();
(itp1 != params.end()) && (itp2 != old_params.end());
++itp1, ++itp2, rank += 1) {
UmlParameter & p1 = *itp1;
const UmlParameter & p2 = *itp2;
if ((p1.name != p2.name) ||
nequal(p1.default_value, p2.default_value) ||
!p1.type.equal(p2.type)) {
if (p1.dir != InputDirection)
p1.dir = p2.dir;
op->replaceParameter(rank, p1);
container->set_updated();
}
else if ((p1.dir == InputDirection) && (p2.dir != InputDirection)) {
op->replaceParameter(rank, p1);
container->set_updated();
}
}
if (itp1 != params.end()) {
// have missing params
container->set_updated();
do {
op->addParameter(rank, *itp1);
itp1++;
rank += 1;
} while (itp1 != params.end());
}
else if (itp2 != old_params.end()) {
// have extra params
container->set_updated();
do {
op->removeParameter(rank);
itp2++;
} while (itp2 != old_params.end());
}
Q3ValueList<UmlTypeSpec>::ConstIterator ite1;
const Q3ValueList<UmlTypeSpec> old_exceptions = op->exceptions();
Q3ValueList<UmlTypeSpec>::ConstIterator ite2;
for (rank = 0, ite1 = exceptions.begin(), ite2 = old_exceptions.begin();
(ite1 != exceptions.end()) && (ite2 != old_exceptions.end());