+ bool selIn = false;\r
+ bool selOut = false;\r
+ bool selInOut = false;\r
+ \r
+ if (direction == AbstractInterface::AnyDirection) {\r
+ selIn = true;\r
+ selOut = true;\r
+ selInOut = true;\r
+ }\r
+ else if (direction == AbstractInterface::Input) {\r
+ selIn = true; \r
+ }\r
+ else if (direction == AbstractInterface::Output) {\r
+ selOut = true; \r
+ }\r
+ else if (direction == AbstractInterface::InOut) {\r
+ selInOut = true; \r
+ }\r
+ if (selIn) {\r
+ foreach(AbstractInterface* iface, inputs) {\r
+ if ((iface->getPurpose() == purpose) || (purpose == AbstractInterface::AnyPurpose)) list.append(iface); \r
+ }\r
+ }\r
+ if (selOut) {\r
+ foreach(AbstractInterface* iface, outputs) {\r
+ if ((iface->getPurpose() == purpose) || (purpose == AbstractInterface::AnyPurpose)) list.append(iface); \r
+ }\r
+ }\r
+ if (selInOut) {\r
+ foreach(AbstractInterface* iface, bidirs) {\r
+ if ((iface->getPurpose() == purpose) || (purpose == AbstractInterface::AnyPurpose)) list.append(iface); \r
+ }\r
+ }\r