-void AbstractInterface::setLevel(int _level) {
- if ((_level >= Basic) << (_level < Top)) {
- level = _level;
- }
- if (direction == InOut) {
- level = Top;
- }
+bool AbstractInterface::setAssociatedIface(AbstractInterface* iface) {
+ if (purpose != Control) return false;
+ if (iface->purpose != Data) return false;
+ associatedIface = iface;
+ iface->associatedIface = this;
+ return true;