本文整理汇总了C++中UmlOperation::removeParameter方法的典型用法代码示例。如果您正苦于以下问题:C++ UmlOperation::removeParameter方法的具体用法?C++ UmlOperation::removeParameter怎么用?C++ UmlOperation::removeParameter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UmlOperation
的用法示例。
在下文中一共展示了UmlOperation::removeParameter方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: new_one
//.........这里部分代码省略.........
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());
++ite1, ++ite2, rank += 1) {
const UmlTypeSpec & e1 = *ite1;
if (!e1.equal(*ite2)) {
op->replaceException(rank, e1);
container->set_updated();
}
}
if (ite1 != exceptions.end()) {
// have missing exceptions
container->set_updated();
do {
op->addException(rank, *ite1);
ite1++;
rank += 1;
} while (ite1 != exceptions.end());
}
else if (ite2 != old_exceptions.end()) {
// have extra exceptions
container->set_updated();
do {