1 package net.mograsim.logic.ui.model.components.params;
3 import java.io.IOException;
6 import net.haspamelodica.swt.helper.swtobjectwrappers.Point;
8 public class SubComponentParams
11 public final static String fileExtension = ".sc";
12 public double width, height;
13 public InterfacePinParams[] interfacePins;
14 public GeneralComponentParams composition;
15 public Map<String, Object> specialized;
17 public static class InterfacePinParams
19 public Point location;
20 public int logicWidth;
23 public static class InnerWireParams
25 public InnerPinParams pin1, pin2;
29 public static class InnerPinParams
31 public int compId, pinIndex;
34 public static SubComponentParams readJson(String path) throws IOException
36 return JsonHandler.readJson(path, SubComponentParams.class);
40 * Writes this {@link SubComponentParams} object into a file in json format. The correct file extension is important! Check
41 * {@link SubComponentParams}.fileExtension
43 public void writeJson(String path)
47 JsonHandler.writeJson(this, path);
51 System.err.println("Failed to write SubComponentParams to file");