本文整理汇总了C++中UmlClass::getChild方法的典型用法代码示例。如果您正苦于以下问题:C++ UmlClass::getChild方法的具体用法?C++ UmlClass::getChild怎么用?C++ UmlClass::getChild使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UmlClass
的用法示例。
在下文中一共展示了UmlClass::getChild方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: generate
void UmlJunctionPseudoState::generate(UmlClass * machine, UmlClass * anystate, UmlState * state) {
// create an operation because a priori shared
if (_oper.isEmpty())
_oper.sprintf("_junction%d", ++_rank);
UmlClass * cl = state->assocClass();
UmlOperation * junction;
if (((junction = (UmlOperation *) cl->getChild(anOperation, _oper)) == 0) &&
((junction = UmlBaseOperation::create(cl, _oper)) == 0)) {
UmlCom::trace("Error : cannot create operation '" + _oper
+ "' in class '" + cl->name() + "'<br>");
throw 0;
}
junction->defaultDef();
junction->setComment("implement a junction, through an operation because shared, internal");
junction->setType("void", "${type}");
junction->addParam(0, InputOutputDirection, "stm", machine);
junction->setParams("${t0} & ${p0}");
Q3CString body;
const Q3PtrVector<UmlItem> ch = children();
Q3PtrList<UmlTransition> trs;
unsigned index;
for (index = 0; index != ch.count(); index += 1)
if (ch[index]->kind() == aTransition)
// theo mandatory
trs.append((UmlTransition *) ch[index]);
UmlTransition::generate(trs, machine, anystate, state, body, " ", FALSE);
junction->set_CppBody(body);
}