- for (Pin p : comp.getPins().values())
- if (p.getRelX() == 0)
- inputPinNames.add(p.name);
- else
- outputPinNames.add(p.name);
-
- outputPinNames.remove("R=0");
- inputPinNames.add("R=0");
+ if (comp instanceof SimpleRectangularHardcodedGUIComponent)
+ {
+ SimpleRectangularHardcodedGUIComponent compCasted = (SimpleRectangularHardcodedGUIComponent) comp;
+ for (Pin p : comp.getPins().values())
+ if (compCasted.getPinUsage(p) == Usage.INPUT)
+ inputPinNames.add(p.name);
+ else
+ outputPinNames.add(p.name);
+ } else
+ for (Pin p : comp.getPins().values())
+ if (p.getRelX() == 0)
+ inputPinNames.add(p.name);
+ else
+ outputPinNames.add(p.name);