- parentItem->getRefBlock()->addInterface(groupCtlInter);
-
- // connect both interface
- bool ok = true;
- if (refInter->getDirection() == AbstractInterface::Output) {
- ok = refInter->connectTo(groupInter);
- ok = ok & groupInter->connectFrom(refInter);
- }
- else if (refInter->getDirection() == AbstractInterface::Input) {
- ok = groupInter->connectTo(refInter);
- ok = ok & refInter->connectFrom(groupInter);
- }
- else if (refInter->getDirection() == AbstractInterface::InOut) {
- ok = refInter->connectTo(groupInter);
- ok = ok & groupInter->connectFrom(refInter);
- ok = ok & groupInter->connectTo(refInter);
- ok = ok & refInter->connectFrom(groupInter);
- }
- if (!ok) {
- cerr << "abnormal case while connecting a block iface to its parent group" << endl;
- }