本文整理汇总了C++中UmlRelation::isCppMutable方法的典型用法代码示例。如果您正苦于以下问题:C++ UmlRelation::isCppMutable方法的具体用法?C++ UmlRelation::isCppMutable怎么用?C++ UmlRelation::isCppMutable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UmlRelation
的用法示例。
在下文中一共展示了UmlRelation::isCppMutable方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: new_one
bool UmlRelation::new_one(Class * container, const Q3CString & name,
UmlClass * dest, const Q3CString & modifier,
const Q3CString & pretype, const Q3CString & array,
const Q3CString & typeform, aVisibility visibility,
bool staticp, bool constp, bool mutablep, bool volatilep,
const Q3CString & value, Q3CString comment,
Q3CString description
#ifdef ROUNDTRIP
, bool roundtrip, Q3PtrList<UmlItem> & expected_order
#endif
)
{
#ifdef DEBUG_BOUML
cout << "RELATION '" << name << "' from '" << cl->name() << "' to '" << dest->name()
<< "' modifier '" << modifier << "' array '" << array
<< "' typeform '" << typeform << "'\n";
#endif
if (
#ifdef REVERSE
container->from_libp() &&
#endif
(visibility == PrivateVisibility)) {
Lex::finish_line();
Lex::clear_comments();
return TRUE;
}
UmlClass * cl = container->get_uml();
UmlRelation * rel;
#ifdef ROUNDTRIP
if (roundtrip &&
((rel = search_rel(container, name, dest, "")) != 0)) {
rel->set_usefull();
expected_order.append(rel);
}
else {
#endif
rel = UmlBaseRelation::create((modifier.isEmpty() &&
((typeform == "${type}") ||
(typeform[typeform.find("${type}") + 7] != '*')))
? aDirectionalAggregationByValue
: aDirectionalAssociation,
cl, dest);
if (rel == 0) {
UmlCom::trace(Q3CString("<font face=helvetica><b>cannot add relation <i>")
+ name + "</i> in <i>" + cl->name() + "</i> to <i>"
+ dest->name() + "</i></b></font><br><hr>");
return FALSE;
}
#ifdef REVERSE
# ifndef ROUNDTRIP
Statistic::one_relation_more();
# else
if (roundtrip) {
expected_order.append(rel);
container->set_updated();
roundtrip = FALSE;
}
}
# endif
#endif
Lex::finish_line();
comment = Lex::get_comments(comment);
description = Lex::get_description(description);
#ifdef ROUNDTRIP
if (roundtrip) {
if (rel->visibility() != visibility) {
rel->set_Visibility(visibility);
container->set_updated();
}
if (rel->isReadOnly() != constp) {
rel->set_isReadOnly(constp);
container->set_updated();
}
if (rel->isClassMember() != staticp) {
rel->set_isClassMember(staticp);
container->set_updated();
}
if (rel->isCppMutable() != mutablep) {
rel->set_isCppMutable(mutablep);
container->set_updated();
}
if (rel->isVolatile() != volatilep) {
rel->set_isVolatile(volatilep);
container->set_updated();
}
}
else {
#endif
//.........这里部分代码省略.........